Information Management Technologies
Information Management Technologies CS 301
Popular in Course
Popular in ComputerScienence
verified elite notetaker
CS 201 intro into computer science
verified elite notetaker
verified elite notetaker
verified elite notetaker
verified elite notetaker
verified elite notetaker
This 53 page Class Notes was uploaded by Keeley Bechtelar on Saturday September 26, 2015. The Class Notes belongs to CS 301 at Bowling Green State University taught by Staff in Fall. Since its upload, it has received 6 views. For similar materials see /class/214195/cs-301-bowling-green-state-university in ComputerScienence at Bowling Green State University.
Reviews for Information Management Technologies
Report this Material
What is Karma?
Karma is the currency of StudySoup.
Date Created: 09/26/15
Da39rabase Concest By Walfer Maner Sources Tummm hug www waschom cam sg me andstumm Dn39hnl mu Da rabase systems Today Accaunts Ovemew John Jones Mmuav kamar my Chechan 7 15 Rzgular Saunas rnun vwmm WW WNW rm mm Cu 72m mun nu ma Search versus query What if you wanted to find out which actor39s donated to John Ker39r39y39s presidential campaign Tr y Hollywood Ker39r39 donations in your favorite sear39c engine Search versus quer39y What if I wanted to find out the average donation of actors to each candidate What if I wanted to compare actor39 donations this campaign to the last one What if I wanted to find out who gave the most to each candidate w mmmmmu m mom mums 7 rs we win new cow was mnwnom TEAM a I M mu m wnoiu Paperbased databases The cabinet drawers index folders system made information I more organized I more accessible I more maintainable I more reliable I more secure Paperbased databases Not all that flexible because all things are filed in one place only I Why is this bad OTOH we could file things in multiple places I Why is this bad Why bad to be filed in one place only Our ideas Why bad To be filed in one place only Dr Maner says Why bad To be filed in several places Our39 ideas Why bad To be filed in several places Dr39 Maner Says Towards a definition Think about how you would define a database I Write down the keywords that would occur in your definition Exchange ideas with your neighbor Our key words and definition 9 Keywords Key words and definition My key words Computerbased databases Are managed by a DBMS DataBase Management System Most noteworthy feature of a DBMS Use of data abstraction to separate the DBMS into layers More about layers lam Is the WWW a DBMS 9 Our ideas It is a like a database because it Is the WWW a DBMS Dr Maner says It is a like a database because Is The WWW a DBMS Our ideas Is The WWW a DBMS Dr Maner Says IT is no r like a database because i139 The WWW will be a da rabase Tim Berner sLee Web 20 30 and The semantic webquot The WWW will be a database XQL XML Query Language Inr4 gum umMrws upmmmpnum What doyou m m this query Will do m a u gtnlt mvv WW Ymmxml tamarindWNW The WWW will be a database XQL XML Query Language 9 3m in D Em Wm m x maigsmwam I uvmmrdebal m x5dalutmmatel gtlt Currandated u m wlmenxilrequeui 1 511 wwwmwmmmlwrcm z 5qCanp mm man cn lacatwn lodl mnbm employee Seanme What do you lh nk This code Will do7 a mvv WW Wmnxml mamamm The WWW will be a database SPARQL Using SPARQLquot to nera e a mm ltMlp xmlns 5am mle aknumnamwm my own clletomIzed live Emirrigan m ggaem P anet RDF W 3 gt ea WHERE mm wig rmgt What will this 322123 15mglawk n m39is code do m asunmgm WM Q Result The mmdweaiwammname mosf racer fen Wigwam em rssli k em dc agevdal Eos s y loggers that I know smm SVARDLvaacalandRDF uewunvuavdwanaunced 5mm Ru ResamcebescwlmnFiamewam The WWW will be a database SPARQL FOAF FOAF quotFr iendofAFr iendquot l A way to describe yourself 0 your name o email address and o the people you39re friends with Uses XML and RDF Pr ovides data for SPARQL queries The WWW will be a database SPARQL walterfoafr df w mewmnnmmsmm mamas ltMDifgtltminsmmliua mm rs ltMlplDurlorgrss1D mm dc ltMlp mun urgdcelem mm yersmmueummmmmm gt 5ammemuwameam mm mm m mm szry up rm m p FRDMQMpblan rdtcomindarm mum Wmieuocumenv RDMNAMEDW H mm P 21 Versonrm it me gt mm mom mm mm w Jayson mm mm m a 21 k 4021 MW mm mum nummm m9 anemaccreawknmmame mm mDox rm mm mmmnnmgmhgsum Wiem rs Mia mle mm MW ems mam ailemdcdate de mm MW mm mom Emlsmmm mg m rm some mischisonmnmmu p The WWW will be a database SPARQL For more information 1HE SFARQL HANDBOQK Is an 05 file system a DBMS Thought Experiment 1 You and your partner are editing the same file You both save it at the same time Whose changes survive a yours b your partner39s d neither Thought Experiment 2 You39re updating a file The power goes out Which of your changes survive b none c all since last save Noteworthy features of a MS Commit protocol means no data is ever lost 0 Provides security and auditing mechanisms Moves data transparently to and from assorted types of physical storage 6 Manages multiple users with different privilegesquot Creates multiple saveable customized viewsquot e Supports a query language to store retrieve filter sort organize update and merge data from the data asequot 0 Can use XML as a data interchange formatquot m slmunhc mmu m an m swy mm mm mtlnlhe wame Layers of data abstraction Layering Allows different users to have different views o the data Allows a logical organization of data that is independent of its physical organization Abstraction The logical layer seen by DB programmers is straction from the physical ayer The external layer seen by users is an abstraction from the logical layer External layer Logical Inlernal layer Schema Physical lg layer g g 9 The physical layer data files that actually contain the data Usually distr buted across multiple disc drives Often distr buted across multiple servers Distribution for parallelism redundancy e The DBMS works with OS to manage file storage Uses hash tables Many common operations are 01 I e The user of the database does not need to know how the DBMS does what it does The logical layer The logical la er ackages and Transforms the p ysical data 13 into a common structure In abstract form this structure is nown CIS CI SC e CI I It is a conceptual model of the structure of a database I Schema are specified using a Data Definition Language DDL 0 Defines the data contents and relationships 0 Visual models are often used next slide mm Logical layer schema The external layer This is the layer where users interact indirectly with the database and issue 39 queries The DBMS transforms selected items from the logical layer eg data structures to arm each user View 9 User views can be stored for reuse or discarde External layer Logical layer Physical Data independence Physical U U U 9 a a layer K g g g E g a a a Physical data independence To understand this consider the opposite of data independence Any change to the way data is stored would requrie a change to every computer program that uses the data Would occur if data were retrieved b specifying an exact disk location cylinder head track Physical data independence The ability to make design changes to the storage layer without disrupting the organization of the database Changes such as l Adding a new server I Adding another disk drive Swapping disk drives External User layer v 2w 1 Lagical ham indepe deuce Logical Imzmai layer Physical layer an j aquDiDq 2M aanmnq a A aququ Logical da i a independence The abilifr 1390 make design changes 1390 The logica layer without disrupting existing users and processes Changes such as l Addin a new database Table or a row and co umn To an existing Tab e l Adding data items To an existing Table 0nqmammsx Reprodudmn39nghis ubiainzbiefrum mm CanumSlJck cumr yamq ii u NEIL JNTEFLEWEPHE LL hsz m Musw cmer HAUL EMMA 391 3TYPES OF DATABASE 1 Flat file database Similar to a CSV text file or spreadsheet Very little information about how data are structure on related Structure and relationship mostly in the mind of the beholderquot the user or added during report generation Does not meet the definitions of a database we identified earlier Fla t filing requires little skill so is often used to store information that would better be stored in a real da tabase House number Street City State 1 Flat file database A linear set of records where each record is asingle line each line is divided into a fixed number of la s 0 No subfields allowed each field has a fixed maximum length 9 Startin in 1890 for about 50 ears we believe that any resident of t e USA could be re resen ted in a single 80 character line in a flat file Why House number Street my Slate 1 The last flatfile database MM w u 25 u l m u u 23 u us l l an 3 sp 5 r a u an d l A u M j nested Oatweal l u a 2m 5 Flat file database What could you do with a flatfile database Sort l Generate reports 0 Could format the report 0 Could filter out lines or fields Flat file database FlaT file daTabase FlaT file sysTemsguickly become cumbersome and ifficulT To mainTain lt9gtWh lt9gtGeTs harder and harder To TranslaTe daTa from The physical layer flaT file of records Throu h a logical layer formaTTing filgTers an inTo The user View prinTed reporT Breaking poinT occurs aT abouT 100 records FlaT file daTabase problems WhaT is The problem here FlaT file daTabase problems FlaT file DBs wasTe com uTer sTorage by requiring daTa To be epT on iTems ThaT logically cannoT exisT I I For example a flaT file of addresses ThaT includes a column for zip code will have To provide space for zip codes even for foreign addresses Can you Think of oTher similar examples Our examples of da ra Tha r canno r logically exis r 1 mm wt ammo at r N a w mm m m mm m 50L mmr my mama mums i l 2 Hierarchical da l39abase Similar To an organization chart lt9 Also similar To The way we structure our personal computer files into directories and subdirec rories Hierarchical da l39abase Records are connected using poin rers The poin rer Tells The system where The related record is physically store Each poin rer establishes a oneTo many or parentTochild relationship Ex I am A munupger is responsible for many employees but each employee has only one manager Fla r 9 Hierarchical da rabase Hierarchical da rabase problems lt0gt 1 course has many students and 1 sTudenT has many grades so far so 900 BuT doesn39T 1 sTudenT also have many courses If we want To represent This nuance in a hierarchical DB we are SOL 6 Why STuden r Courses is a ma man rela rionship 20 D igression Many to manyquot When we say a relationship is manymany it is typically not literally many to many but is actual 1many going in one directio d 1many going back in the opposite direction lt9 Example 1 client can own up to M many accoun 1 account be owned by up to N many clients D igression Many to manyquot 1Ml 0quot LIN When we say a relationship is manyzmany it is typically not literally manytomany but is actual l 1many going in one direction and l 1many going back in the opposite direction More examples Our manyzzmany examples 21 Hierarchical daTabase CUSTOMER ORDER ORDER DETAlL Consider This Typical iness siTLiaTion A cLIsTomer can place An order can conTain many 6 oils These customer to order clearly one To many relaTionships Hierarchical daTabase problems CUSTOMER BuT mosT business would also recognise ThaT l 1 employee can be associaTed wiTh many EMPLOYEE l 1 producT can be lisTed in many order deTails ORDER DETAlL Hierarchical daTabase problems CUSTOMER For The hierarch To work These nee To be 1many relaTionships going lefT To righT parenT To child EMPLOYEE Q BUT They are acTLially 1many going righT To lefT 50 An EMPLOYEE is not associated with a un qua OkDEk A PRODUCT is not associated with a un qua OkDEk DETAIL 22 Hierarchical da rabase problems CUSTOMER Fixirzig This problem wou akT e fundamen ral rule of hierarchy ha each child can have of mos r one parent Workarounds exis r EMPLOYEE corn liccrr EPICYCLES Epicycle m Apparent Motion of G mam tame ui I V Epuwe Ruroqrade Molmn mm m w 3 5 m Buss hur or A n a As39 m wimmmst mm w Arum En MW R tmu m m m 1 L g N 1 T a a ya 3 y 4 W J m 4mg Mme 23 2 NeTwork daTabases lt9gtIn some ways similar To The hierarchical model in ThaT poinTers are used To link files BuT paThways are more numerous and can become circular MulTiple inheriTance is possible i w vkohucra um cum row orqu mm m mm m ms Wanner NeTwork daTabase problems ComplexiTyl MulTiple paThways To geT To The desired desTinaTion inherenT cir 39 rIT 9 severe programming Traversal difficulTies DifficulT To keep The rouTe map39 up To a e 9 high mainTenance cosTs 3 RelaTional daTabase lt9 Flexible no pre defined paThways lt9gtInsTead of poinTers keys or opporTuniTies for linking chunks of daTa Chunks are selecTed organized and combined on The fly MosT of The apparenT organizaTion of a relaTional DB is due To The recombinanT acTiviTy done aT query Time 24 4 Relational database Invented by Edgar F Codd a British computer scientist quotA Relational Model of Data for Large Shared Data Banksquot Communications of the ACM 13 6 377387 IBM refused to implement the relational model in o der to preserve revenue from IMSDB which allowed Oracle to get the upper hand 4 Relational database All types of relations easily represented 11 relations 0 easin represented in a single row of a table l us Jame cusliaddress 4 Relational database All types of relations easily represented I1mclny relations 0 can be represented in a single row cumming cusliurderl cusLurderZ 0 better use separate tables relate them through keys culeiame Dram 25 4 Relational database All types of relations easily represented Manymany relations 0 can be captured in two tables linked by keys murder parlinumber 0 better connect them through a separate third table murder cuspurderglm mber purpnumber Relational database EMPLOYEE DETAIL Relational database CUSTOMER I What parts of this would be illegal in a many hierarchical PRODUCT DETAIL 26 Database ontology ENTITIES ATTRIBUTES RELATIONS Entities A primary informationbearing object Could be a person place thing or concept about which data is collected Just about anything that can be named with a noun can be an entity Entities 9 A very common entity that is found in many business oriented databases is the CUSTOMER Conceptually this entity be represents all the customers in the database An individual customer is an instance of the entity 27 Let39s name some en l39i ries 5uspec1 Wi rness De rec rive Crime Repor1 Vic rim Loca rion Da l abase on rology ENTITIES ATTRIBUTES RELATIONS A Hri bu res An aTTribuTe is a Uan factquot That describes an enTiTy AKA quallly character s c descrplor properly A Hribu res canno r be broken down into smaller Lm39 s olleosl nulmony meomngfulwoyeg zlpcude 9 Examples name address Telephone number associated wiTh The customer en h ry 28 Let39s name some attributes Item has quantity price description Car has year make model mileage Crime has victim perp unsub unknown subject suspect Pizza has topping size crust shape price Hint Th nk of an entity name then list hasra attributes Unique attributes 9 For rigor we need a unique attribute guaranteed to distinguish one customer from another I get this ability to distinguish customers by adding an extra attribute known as the Primary key eld gissmmmsmmquot Guaran teed unique keys quotquot NM rarely occur naturally so such keys are often created through artificial means Digression An artificial unique identifier Vehicle identification number VIN snnmt 2 2 29 Are these identifiers unique Social security number Passport number P00 number Order number Bank account number Serial numbers SKU stockkeepmguml number How about these CD license codes UPC bar codes Driver39s license number Email address IP address Phone numbers Credit card number Summary EHTiTY gt CUSTOMER CUSTID COMPANYNAME Value Of ADDRESS t is c Ty identifier COUNTRY is unique PHONE attributes 30 Database ontology ENTITIES ATTRIBUTES RELATIONS Relationships Relationships are the logical connections among entities In DB schema relations are represented by linesjoining entities toget er Such lines connections do not really exist in a relational o 50 relational DBs do not contain explicit relations I merely offer the opportunity for the construction ul39ons muny relationships may really exist Relationships Each end of the relationship line shows the maximum cardinality of the relationship which is l the number of instances of one entity that can be associated with the entity at the other en The line may or may not bear the name of the relationship 31 No139a139ional var39ian rs lnfnnnavjnn Engineering style WWW my mm mum gt0 zem m many uplmnal No139a139ional var39ian rs lI MW mm mm gt unem Zn at man No139a139ional var39ian rs samman slylz Due m nne 0 gtO za u urmtre in mm urmnre Due m nne urmnre 32 No139a139ional varian rs Marlin xiyie 1 7 ans and unly ans mandahry 1 7 one a mum mandatory n1 e m a ans uphunal 11 7 ans and unly ans mandatory No139a139ional varian rs Common ideas l Abili ry To represent cardinali ry generally as o Zero 0 o Singularity 1 o Plurality 1 l Abili ry To further specify cardinali ry 0 Zero as possible or mpossible o Singularity constrained to exactiy one no more or less o Piuraiity constrained an exact num er o Plurality constrained to a exact range 2831 Tim X39ve deemed I ma on SQL diatom second x 1116 van vo yeti me wk on SQt demon isquot 33 EntityRelationship Modelling ERM There are a number of different ways to rerresent in a diagram the details of re ationships and cardinality Different systems use different notations Here is a quick look mum i mam ammo hm Dizath mm mm Uma1 Reiaiions drawn but not named Reiaiions drawn and named 34 R2 amons drawn and named Emu m Dru mummy nnn mm 11 mm Rzmmons drawn bur not named Example 35 min CAN vou wow i m How 10 MM CHANGES ro TIE sxms DATABASE K Emma AH News Hm 390 Z i y I BAREJ 3 K CW Ava m EBIY TNE mung k e 10 mom my Business rules quot A business rule is a policy procedure or standard that an organization has adopted Some business rules must be reflected in the construction and functioning of the database They typically impose constraints on the database design Examples of business rules One company39s business rule may state a customer can place many orders at the same time Another companyS business rule may state a customer can only place one order at a time 36 Tables Primary uniT of sTorage in The relaTional model is The Table Each row represenTs one occurrence insTance of The enTiTy or record Each column represenTs one aTTribuTe for ThaT enTiTy An aTTribuTe column occurs only once in The Table cusTID address phone o 50 how we d you share mulT pie phone numbers 9 Each Table is like a mini spreadsheeT ME Mm l m m m um Tables For each Table aTTribuTe we specify iTs properT39e Some of These will be unfamiliar ltQAlso Typically specify WheTher opTionaI WheTher has adefauIT value I W mandaTory or heTher can be null 39 39 Related tables Q Each table of information can be related to other tables of information by associating values of key attributes Here Social Security Number keys are associated s t is a pr mary key in Pers foreign key n Medical kecor Personal Information Medical Records 55 rst Last DOB kela on onal Information and a ds Note inai relations do not ocmallyexlsl inine bar Ju l possibiliiyot creating relations Related tables another way Personal Info PIN 39rst Last DOB Name Name Disease Info DiseaseiID Disease Name 39 Recommended for selfstudy SQEourse a nzeramiye oniine QLTr 1162111111115 alnlng SQIgourseE Auvullmll oniine sQLTmilling amu 38 Search By Walter Maner Bruce Randall Donald Dartmouth College for his lecture not es on w sdanmwh edu 759m Teach n ex Leeme Su39nma ue w mi Patrick Winston Harvard University For his approach to pseu ocode Arr caInfeIqenc 3rd edition James B Marshall Pomona College For his anima Ions M la quotn 9 minimwinNitmllA7J7crl5l J2 Cl ude Latombe Stanford University Lil law an a For his extended step by ste example 2l40 bslidesLrudversari wewem lilluHuislanfui d adoulummbees a SilernJvr e WHY SEARCH I With humans search is often triggere by a mismatch between what we have and what we want I With computers it is much the same I Search circumstance initial 0 begins with a given unsatisfactory state Q then seeks to advance one step at a time from the gIven circu satisfactory solution 1 o a stance towa a goal state WHY SEARCH I When do we stop searching Sumelimes we will slop searching only if we reach the goal ememee Sumelimes we will slop searching if we reach quotanyquot goal gmeslee Sumelimes we will slop searching if we reach a state that is at least X o better than the initial state 0 Sumelimes we will slop searching if we get frustrated Same rules govern casino behavior When do we stop gambling o o WHY SEARCH I At any given decision point many next steps are possible I We need to explore many different next steps b ause some paths may not advance us toward the solution some paths may even take s bac ward I But we don39t want to repeat the same step inefficient at best futile at worst I we will need to formulate asearch method to minimize these dangers VOCABULARY OF SEARCH I The Search Problem 2 To find a sequence of operators t cessively transform the initial state into a goal state ariritaoliintermediatestatethatis gaadenaugh j I Problem State One state in the state space either o the initial starting state or o a goal state or c an intermediate state encountered in the quest for the goal state VOCABULARY OF SEARCH I Problem Space The environment in which the search takes place 0 It consists of I a set of states of the problem and I a set of operators that change the states 0 A problem space is typically enormous even infinite VOCABULARY OF SEARCH I Problem Space The envtronment In which the search takes p e a Formally agraph S A I a space 5 O CONGlYlS a set of states each represented as a YlOdE O llWZ lYllllal state is guaranteed to b2 0 agoal state may or may not be in 5 set of actions A 0 an aCllOYl lS astute lr aYlSlllOYl operator can change one state lYllO another a each action has in preconditions and postconditions It 5 meets preconditionsot A then the space Wlll contain an edge between s and 3 and 5 Will reflect the postconditions of A Copy This now for later reference OUR PROBLEM INSTANCE l Problem Insfance A problem space ThaT conTaIns aT leasT one goal sToTe 4 4 This map is deceptive You can never seequotfurTher Than The nexT nodes so sTanding aT 5 you can only see 3 far as A and D VOCABULARY OF SEARCH I Branching FacTor o The average number of children neighbors of nodes in The search space or a The average number of new sTaTes ThaT could follow a given sTaTe 4ui 5 Lee VOCABULARY OF SEARCH 1 I COST 0 search cosT resources expended To find a paTh 0quot 0 Traversal cosT resources used To follow a paTh VOCABULARY OF SEARCH I Fufilify giveup poinT o Occurs when I we have exhousTed all possible soluTions rare I we have made no furTher progress or a sufficienle long period I The search becomes circular or selfdefeaTing I The esTimaTed cosT of conTinuing The search exceeds some cuTo f o NoT ToTally fLrTile if we quiT knowing The besT inTermediaTe sTaTe found so for WarGames 1983 WOPR War Operations Plan and Response was the name for the wargaming computer system which is running a program named quotJoshuaquot WarGames I After playing out all possible outcomes for Global Thermonuclear War 0 Joshua Greetings Professor Falken 0 Stephen Falken Hello Joshua 0 Joshua A strange game The only winning move is not to play How about a nice game of chess WarGames VOCABULARY OF SEARCH I Heuristics o guidelines or quotrules of thumbquot I make it more likely that a problem can be solved I do not guarantee a correct solution 0 different from algorithms which guarantee a correct solution for all proper input I Heuristic Evaluation Function 0 An estimating function that predicts the likelihood that a possible next state will lead to a goal state 5 mm m a We run an m um in W mulled x ow suimunumis Ml EXAMPLE OF HEURISTIC 39 I In geographic spaces you can use m 7 y sTraighTIine disTance as a heurisTic W gfl 4 l 0 psi l quot 39LEH iu L FFH in Tab This map is decepTive You can never see furTher Than The 4 nexT nodes so sTunding 0T 5 you can only see as for as A and D lr39il l Elie gun L ew ezrch0rlllnns Bell a Slapsuich musing W VOCABULARY OF SEARCH Creme 5m i I quotOpenquot and quotClosedquot LisTs Click an Resel Seavcn lu sian seaicn uyev m siEp again v i 5 w gt o The open lisT AKA fronTier is The lisT an of nodes we have seen AKA observed buT have noT yeT explored AKA visiTed 5 5 vltegt o The closed lisT is The lisT of nodes we have boTh seen and explored on 3n n r 2n be m gt VOCABULARY OF SEARCH VOCABULARY OF SEARCH I Generally search proceeds by I peraTors I 1 d H1 139 A ASTaTeTransiTian OperaTars O S ecflng a no 6 on 6 open ls o Transform one sTaTe inTo anoTher mquot ler 0 quotMovequot you from one locaTion in The 0 quotexpandingquot ThaT node which conSIsTs Search space 0 anofhep f I DifferencereducTion OperaTors I adding iTs immediaTe children To The open AKA ReducTian OperaTors 5 if my 0quotquot quot already 0quot 16 l Sed o A subseT of sTaTeTransiTion operaTors IisT and 39 o Transform The currenT sTaTe InTo one I placing The expanded node on The closed fhaf is more like fhe goal 1012 IisT TYPES OF SEARCH TYPES OF SEARCH PROBLEMS PROBLEMS I Uninformed Search I Informed Search 0 One of The quotweak meThodsII 0 One of The quotsTrong meThodsII 0 Search meThods ThaT use liTTle or no 0 Search meThods ThaT use a significanT domain knowledge To guide search amounT domain knowledge To guide 0 Work across many domains 550quot I As more domain knowledge is used The search becomes beTTer informed 0 Work only when domain knowledge is available EVALUATION CRITERIA FOR SEARCH METHODS I Ideally search meThods should be compleTe O A search meThod is compleTe if iT is guaranTeed To find a soluTion whenever one exisTs o AlgoriThms always saTisfy This cr iTer ion heur isTics usually do noT EVALUATION CRITERIA FOR SEARCH METHODS I Ideally search meThods should be opTimal O A search meThod is opTimal if iT finds The besT soluTion ThaT exisTs o AlgoriThms mosle saTisfy This cr iTer ion heur isTics usually do noT EVALUATION CRITERIA FOR SEARCH METHODS I Ideally search meThods should be simple 0 low Time complexiTy 0 low space complexiTy SEARCH ALGORITHMS v SEARCH HEURISTICS l 39 I Search heurisTics are usually subopTimal or39 incompleTe or39 boTh O BuT have accepTable Time and space complexiTy for very large search spaces I Search algoriThms are usually boTh opTimal and compleTe O BuT have unaccepTable Time or39 space complexiTy for very large search spaces BLIND SEARCH METHODS A BREA DTHFIRST SEARCH I General ConcepT o ExhaLIsTive exploraTIon of The search space in a MdeTermined order WIThouT considering casT I Uninformed a Simpler because no domain knowledge is required buT a Less efficienT because iT lacks ThaT knowledge BREADTHFIRSTT 1 D SEARCH ELM BREADTHFIRST SEARCH We willuseadecismn Tree lakeeplrockafaurchmces I Concept 0 Explore children of The rooT node firsT Then children of Those children and so on AssumpTion m Makes The mosT sense when The goal could be anywhere in The search space buT isn39T deeply idden aclually aphilusuphyuflife 331 BREADTHFIRST SEARCH ConcepT 0 Explore children of The r ooT node firsT Then children of Those children and so on I Can you puT This inTo sTepbysTep pseudocode BLIND BREADTHFIRST SEARCH Deque double ended queue Pseudocode Set n to be a deque of initial nodes While n is not empty Set x to be the first node in n R eeee e x from n goal node then signal success and halt the children of x e seen children c r n to the END of N End While Signal failure 3 s BLIND BREADTHFIRST SEARCH Chalkboard simuIaTion using open and closed IisTs asb BLIND BREADTHFIRST SEARCH I Even when BreadThfir39sT Search finds a goal node iT does noT know how iT goT There I How mighT This be fixed 9 BLIND BREADTHFIRST SEARCH I Even when BreadTh firsT Search finds a goal node iT does noT know how iT goT There I How mighT This be fixed 0 Use a decision Tree for bookkeeping Then BLIND BREADTHFIRST SEARCH I The closed lisT seen beforequot may become very large I How should we cope wiTh This walk paTh from goal To rooT when goal is ad ed To decision Tree 0 Use Traceback on The Closed LisT when goal is added To Closed LisT 0 Keep a deqLIe of parTial paThs asm leaslrcusl Search 123 7 7 DEPTHFIRST r quot f D SEARCH H n A DEPTHFIQST SEARCH DEPTHFIRST SEARCH I Concept o Follow one path deep into the tree until a goal is found or backtracking is uired I Assumption Makes the most sense when the goal is likely to be at a few specific places in the s arch space but may be deeply buried domain apniosphyof inc 3 DEPTHFIRST SEARCH I Concept 0 Follow one path deep into the tree untii oai is found or backtracking is required How should we revise This I Pseudocode DEPTHFIRST SEARCH I Pseudocode BLIND DEPTHFIRST SEARCH I Chalkboard simulaTion using open and closed IisTs I For39 maximum clar iTy how should we organize The Tr39ace grid l HEURIS39IIC mm mm SEARCH I ConcepT 0 Uses some fLIncTion To esTimaTe The cosT or likelihood of reaching a goal sTaTe from The currenT sTaTe DeTaiIs o quotCosTquot can mean almosT anyThing ThaT is measura le 0 Usually incor oraTes domain knowledge To improve e ficiency over blind search BE ST FIRSTSEARCH BESTFIRST sEARCH 13W HEURISTLC BESTFIRST SEARCH METHOD HEURIS IIC BESTFIRST SEARCH I Conce 139 Expand The node That has The best I Pseudocode e n he a a e a m m mag evalua rlon according To The heurls rlc a in unit t fundion 51 min f m a u u m Mae 1m a 1 and 131 l No res m 5 5 o This approach doesn39T necessarily find m mum at x y H mm gummy The shortest paTh m in mud nxdex and mm Signal hum LEASTCOST SEARCH LEAST COST FIRST ARC H SEARCH METHOD I Conce 139 Expand the par iial pa fh That has accumula red The leas r TOTCli cosT so far HEURIS39IIC LEASTCOST HEURIS39IIC LEASTCOST SEARCH I Pseudocode Clank 3 zexnrlenqlh path to m look a a human any containing um path aqua is my new path 111 extending x u neiqhhnxs ngjm all new path nnlaininq 1MP Add m xnnaininy new yalhs u m dean enlixe an Ivy accumulated Em costs End quotmu Signal failue LEASTCOST VARIANT 1 HEURI SITC LEASTCOST SEARCH WITH LOWERBOUND ESTIMATES I Concep r 0 Like Heuris ric LeasT cos r Me rhod considers accumulated cost 0 Unlike Heuris ric LeasT cos r Me rhod also considers esTimaTed remaining cosT HEURI SITC l I WITH LOWERBOUND ESTIMATES I Pseudocode caeate LEAST COST SEARCH zeaaalengtn yaatn tn the ant nude an a unerelemznt iegne containing this yaatn until the iegne is eanyaty Let x lae the 15 yaatn in the iegne am the iegne ate new yaatne lay extending x to neignlaau eet al 5 containing lung 1 new path End until signal failu HEURI SITC LEAST COST SEARCH l I HEURI SITC WITH DYNAMIC PROGRAMMI N6 l I LEASTCOST SEARCH WITH DYNAMIC PROGRAMMING I ComepJr I Pseudocode 0 Uses the Dynamic Programming 222 infiiiiiz Ke aiiha22 a23 2n39 2datn PrinCiPlel WhiCh STGTCS quotquot2 ihiedi i fiiaT a ln an tne aegae I The best way THROUGH a particular ET 5 M Elma intermediate place is the best way TO IT signal eneeeee q n mm the starting place followed by the quot mquotquot best way FROM IT to the gen caeate new yaatne lay extenaiing x to neignlaau tn the iegne End until lay yaatn lengtne signal failue