Uninformed Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 31 Jan 2012
|
|
- Garey Houston
- 6 years ago
- Views:
Transcription
1 1 Hl Dumé III Uninformed Serch Hl Dumé III Comuter Science University of Mrylnd CS 421: Introduction to Artificil Intelligence 31 Jn 2012 Mny slides courtesy of Dn Klein, Sturt Russell, or Andrew Moore
2 2 Hl Dumé III Announcements Forgot to tell you login informtion for we ge: User nme = cs421 (ut no uotes) Pssword = (still no uotes) (this will e used for osting solutions) Junkfood mchines: You my develo t home, ut must run on Junkfood Homework 1 hs een osted Project 1 will e osted soon
3 3 Hl Dumé III Tody Agents tht Pln Ahed Serch Prolems Uniformed Serch Methods Deth-First Serch Bredth-First Serch Uniform-Cost Serch
4 4 Hl Dumé III Serch Prolems A serch rolem consists of: A stte sce A successor function N, 1.0 A strt stte nd gol test E, 1.0 A solution is seuence of ctions ( ln) which trnsforms the strt stte to gol stte
5 5 Hl Dumé III Reflex Agents Reflex gents: Choose ction sed on current ercet nd memory My hve memory or model of the world s current stte Do not consider the future conseuences of their ctions Cn reflex gent e rtionl? [demo: reflex ]
6 6 Hl Dumé III Gol Bsed Agents Gol-sed gents: Pln hed Decisions sed on (hyothesized) conseuences of ctions Must hve model of how the world evolves in resonse to ctions [demo: ln fst / slow ]
7 7 Hl Dumé III Serch Trees N, 1.0 E, 1.0 A serch tree: This is wht if tree of lns nd outcomes Strt stte t the root node Children corresond to successors Nodes leled with sttes, corresond to PLANS to those sttes For most rolems, cn never uild the whole tree So, hve to find wys to use only the imortnt rts!
8 8 Hl Dumé III Stte Sce Grhs u.hl3.nme/ic.l?= There s some ig grh in which Ech stte is node Ech successor is n outgoing rc Imortnt: For most rolems we could never ctully uild this grh How mny sttes in Pcmn? S d c h Lughly tiny serch grh for tiny serch rolem e r f G
9 9 Hl Dumé III Exmle: Romni
10 10 Hl Dumé III Another Serch Tree Serch: Exnd out ossile lns Mintin fringe of unexnded lns Try to exnd s few tree nodes s ossile
11 11 Hl Dumé III Sttes vs. Nodes Prolem grhs hve rolem sttes Reresent n strcted stte of the world Hve successors, redecessors, cn e gol / non-gol Serch trees hve serch nodes Reresent ln (th) which results in the node s stte Hve 1 rent, length nd cost, oint to rolem stte Exnd uses successor function to crete new tree nodes The sme rolem stte in multile serch tree nodes
12 12 Hl Dumé III Generl Tree Serch Imortnt ides: Fringe Exnsion Exlortion strtegy Detiled seudocode is in the ook! Min uestion: which fringe nodes to exlore?
13 13 Hl Dumé III Exmle: Tree Serch c G S d h e f r
14 Stte Grhs vs Serch Trees S d c h e G f Ech NODE in in the serch tree is n entire PATH in the rolem grh. r S We lmost lwys construct oth on demnd nd we construct s little s ossile. 14 Hl Dumé III (me@hl3.nme) d c h e r f c G e h r f c G
15 15 Hl Dumé III Review: Deth First Serch S d c e h f r c G e h f r c G S G d c e h f r h f d c e r Strtegy: exnd deeest node first Imlementtion: Fringe is LIFO stck
16 Review: Bredth First Serch Strtegy: exnd shllowest node first Imlementtion: Fringe is FIFO ueue S d c h e r G f S Serch Tiers d c h e r h e r f f c G c G 16 Hl Dumé III (me@hl3.nme)
17 17 Hl Dumé III Serch Algorithm Proerties Comlete? Gurnteed to find solution if one exists? Otiml? Gurnteed to find the lest cost th? Time comlexity? Sce comlexity? Vriles: n Numer of sttes in the rolem The verge rnching fctor B (the verge numer of successors) C* Cost of lest cost solution s Deth of the shllowest solution m Mx deth of the serch tree
18 18 Hl Dumé III DFS n # sttes vg rnch C* lest cost s shllow gol m mx deth Algorithm Comlete Otiml Time Sce DFS Deth First Serch N N N N O(B Infinite LMAX ) O(LMAX) Infinite START GOAL Infinite ths mke DFS incomlete How cn we fix this?
19 19 Hl Dumé III DFS With cycle checking, DFS is comlete. 1 node nodes 2 nodes m tiers n # sttes vg rnch C* lest cost s shllow gol m mx deth u.hl3.nme/ic.l?=dfs m nodes Algorithm Comlete Otiml Time Sce DFS w/ Pth Checking N N O(B LMAX ) O(LMAX) Y
20 20 Hl Dumé III BFS n # sttes vg rnch C* lest cost s shllow gol m mx deth s tiers 1 node nodes 2 nodes s nodes m nodes
21 21 Hl Dumé III Itertive Deeening Itertive deeening uses DFS s suroutine: 1. Do DFS which only serches for ths of length <=1 (DFS gives u on th of length 2) 2. If 1 filed, do DFS which only serches ths of length 2 or less. 3. If 2 filed, do DFS which only serches ths of length 3 or less..nd so on. n # sttes vg rnch C* lest cost s shllow gol m mx deth Algorithm Comlete Otiml Time Sce DFS w/ Pth Y BFS ID Checking Y Y
22 22 Hl Dumé III Comrisons n # sttes vg rnch C* lest cost s shllow gol m mx deth When will BFS outerform DFS? When will DFS outerform BFS?
23 Costs on Actions START d 2 c e h r GOAL 2 f 1 Notice tht BFS finds the shortest th in terms of numer of trnsitions. It does not find the lest-cost th. We will uickly cover n lgorithm which does find the lest-cost th. 23 Hl Dumé III (me@hl3.nme)
24 Uniform Cost Serch Exnd cheest node first: Fringe is riority ueue S d c h e 8 1 r G f 2 1 S 0 Cost contours Hl Dumé III (me@hl3.nme) d c h e 13 r f 11 c G h e r f c G 16
25 25 Hl Dumé III Priority Queue Refresher A riority ueue is dt structure in which you cn insert nd retrieve (key, vlue) irs with the following oertions:.ush(key, vlue).o() inserts (key, vlue) into the ueue. returns the key with the lowest vlue, nd removes it from the ueue. You cn romote or demote keys y resetting their riorities Unlike regulr ueue, insertions into riority ueue re not constnt time, usully O(log n) We ll need riority ueues for most cost-sensitive serch methods.
26 26 Hl Dumé III Uniform Cost Serch Wht will UCS do for this grh? 0 START GOAL Wht does this men for comleteness?
27 27 Hl Dumé III Uniform Cost Serch Algorithm Comlete Otiml Time Sce DFS BFS UCS w/ Pth Checking Y* Y O(C* C*/ε ) O( C*/ε ) n # sttes vg rnch C* lest cost s shllow gol m mx deth C*/ε tiers We ll tlk more out uniform cost serch s filure cses lter
28 Uniform Cost Prolems Rememer: exlores incresing cost contours c 1 c 2 The good: UCS is comlete nd otiml! c 3 The d: Exlores otions in every direction No informtion out gol loction Strt Gol 28 Hl Dumé III (me@hl3.nme) [demo: ucs contours ]
29 29 Hl Dumé III Heuristics
30 30 Hl Dumé III Best First / Greedy Serch Exnd the node tht seems closest Wht cn go wrong?
31 31 Hl Dumé III Best First / Greedy Serch START h=12 h= d h=11 h=8 h=8 8 2 c 2 e h 4 3 h=9 h=5 h=4 h=6 2 f 5 r h=6 GOAL 5 h=0 h=4
32 32 Hl Dumé III Best First / Greedy Serch A common cse: Best-first tkes you stright to the (wrong) gol Worst-cse: like dlyguided DFS in the worst cse Cn exlore everything Cn get stuck in loos if no cycle checking Like DFS in comleteness (finite sttes w/ cycle checking)
33 33 Hl Dumé III Serch Gone Wrong?
34 34 Hl Dumé III Extr Work? Filure to detect reeted sttes cn cuse exonentilly more work. Why?
35 35 Hl Dumé III Grh Serch In BFS, for exmle, we shouldn t other exnding the circled nodes (why?) S d e c e h r h r f f c G c G
36 36 Hl Dumé III Grh Serch Very simle fix: never exnd stte tye twice Cn this wreck comleteness? Why or why not? How out otimlity? Why or why not?
37 37 Hl Dumé III Some Hints Grh serch is lmost lwys etter thn tree serch (when not?) Fringes re sometimes clled closed lists ut don t imlement them with lists (use sets)! Nodes re concetully ths, ut etter to reresent with stte, cost, nd reference to rent node
38 38 Hl Dumé III Best First Greedy Serch n # sttes vg rnch C* lest cost s shllow gol m mx deth Algorithm Comlete Otiml Time Sce Greedy Best-First Serch Y* N O( m ) O( m ) m Wht do we need to do to mke it comlete? Cn we mke it otiml? Next clss!
CS 188: Artificial Intelligence Fall 2008
CS 188: Artificil Intelligence Fll 2008 Lecture 2: Queue-Bsed Serc 9/2/2008 Dn Klein UC Berkeley Mny slides from eiter Sturt Russell or Andrew Moore Announcements Written ssignments: One mini-omework ec
More informationAI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley
AI Adjcent Fields Philosophy: Logic, methods of resoning Mind s physicl system Foundtions of lerning, lnguge, rtionlity Mthemtics Forml representtion nd proof Algorithms, computtion, (un)decidility, (in)trctility
More informationCSEP 573 Artificial Intelligence Winter 2016
CSEP 573 Artificil Intelligence Winter 2016 Luke Zettlemoyer Problem Spces nd Serch slides from Dn Klein, Sturt Russell, Andrew Moore, Dn Weld, Pieter Abbeel, Ali Frhdi Outline Agents tht Pln Ahed Serch
More informationCSCI 446: Artificial Intelligence
CSCI 446: Artificil Intelligence Serch Instructor: Michele Vn Dyne [These slides were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI t UC Berkeley. All CS188 mterils re vilble t http://i.berkeley.edu.]
More informationToday. Search Problems. Uninformed Search Methods. Depth-First Search Breadth-First Search Uniform-Cost Search
Uninformed Serch [These slides were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI t UC Berkeley. All CS188 mterils re vilble t http://i.berkeley.edu.] Tody Serch Problems Uninformed Serch Methods
More informationSearch Gone Wrong? CS 188: Artificial Intelligence Fall Today. Announcements. General Tree Search. Recap: Search. Lecture 3: A* Search 9/3/2009
C 88: Artiicil Intelligence Fll 009 erch one Wrong? Lecture : A* erch 9//009 Pieter Aeel UC Berkeley Mny slides rom Dn Klein Announcements Assignments: Project 0 (Python tutoril): due Fridy /8 t 4:59m
More informationSolving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016
Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence Winter 2016 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl
More informationCS 221: Artificial Intelligence Fall 2011
CS 221: Artificil Intelligence Fll 2011 Lecture 2: Serch (Slides from Dn Klein, with help from Sturt Russell, Andrew Moore, Teg Grenger, Peter Norvig) Problem types! Fully observble, deterministic! single-belief-stte
More informationSolving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence
Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl component
More informationToday. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.
CS 88: Artificil Intelligence Fll 00 Lecture : A* Serch 9//00 A* Serch rph Serch Tody Heuristic Design Dn Klein UC Berkeley Multiple slides from Sturt Russell or Andrew Moore Recp: Serch Exmple: Pncke
More informationAnnouncements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem
Announcements Project : erch It s live! Due 9/. trt erly nd sk questions. It s longer thn most! Need prtner? Come up fter clss or try Pizz ections: cn go to ny, ut hve priority in your own C 88: Artificil
More informationAnnouncements. CS 188: Artificial Intelligence Fall Recap: Search. Today. General Tree Search. Uniform Cost. Lecture 3: A* Search 9/4/2007
CS 88: Artificil Intelligence Fll 2007 Lecture : A* Serch 9/4/2007 Dn Klein UC Berkeley Mny slides over the course dpted from either Sturt Russell or Andrew Moore Announcements Sections: New section 06:
More informationCS 188: Artificial Intelligence Fall Search Gone Wrong?
CS 188: Artificial Intelligence Fall 2009 Lecture 3: A* Search 9/3/2009 Pieter Aeel UC Berkeley Many slides from Dan Klein Search Gone Wrong? 1 Announcements Assignments: Project 0 (Python tutorial): due
More informationCS 5522: Artificial Intelligence II
CS 5522: Artificial Intelligence II Search Algorithms Instructor: Wei Xu Ohio State University [These slides were adapted from CS188 Intro to AI at UC Berkeley.] Today Agents that Plan Ahead Search Problems
More informationAnnouncements. CS 188: Artificial Intelligence
Announcements Projects: Looking for project partners? --- Come to front after lecture. Try pair programming, not divide-and-conquer Account forms available up front during break and after lecture Assignments
More informationCS321 Languages and Compiler Design I. Winter 2012 Lecture 5
CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,
More informationAnnouncements. Project 0: Python Tutorial Due last night
Announcements Project 0: Python Tutorial Due last night HW1 officially released today, but a few people have already started on it Due Monday 2/6 at 11:59 pm P1: Search not officially out, but some have
More information2 Computing all Intersections of a Set of Segments Line Segment Intersection
15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design
More informationCSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe
CSCI 0 fel Ferreir d Silv rfsilv@isi.edu Slides dpted from: Mrk edekopp nd Dvid Kempe LOG STUCTUED MEGE TEES Series Summtion eview Let n = + + + + k $ = #%& #. Wht is n? n = k+ - Wht is log () + log ()
More informationCSC 2114: Artificial Intelligence Search
CSC 2114: Artificial Intelligence Search Ernest Mwebaze emwebaze@cit.ac.ug Office: Block A : 3 rd Floor [Slide Credit Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. Reference materials
More informationMa/CS 6b Class 1: Graph Recap
M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Instructor: Adm Sheffer. TA: Cosmin Pohot. 1pm Mondys, Wednesdys, nd Fridys. http://mth.cltech.edu/~2015-16/2term/m006/ Min ook: Introduction to Grph
More informationMa/CS 6b Class 1: Graph Recap
M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Adm Sheffer. Office hour: Tuesdys 4pm. dmsh@cltech.edu TA: Victor Kstkin. Office hour: Tuesdys 7pm. 1:00 Mondy, Wednesdy, nd Fridy. http://www.mth.cltech.edu/~2014-15/2term/m006/
More informationITEC2620 Introduction to Data Structures
ITEC0 Introduction to Dt Structures Lecture 7 Queues, Priority Queues Queues I A queue is First-In, First-Out = FIFO uffer e.g. line-ups People enter from the ck of the line People re served (exit) from
More informationFig.25: the Role of LEX
The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing
More informationRegular Expression Matching with Multi-Strings and Intervals. Philip Bille Mikkel Thorup
Regulr Expression Mtching with Multi-Strings nd Intervls Philip Bille Mikkel Thorup Outline Definition Applictions Previous work Two new problems: Multi-strings nd chrcter clss intervls Algorithms Thompson
More informationDr. D.M. Akbar Hussain
Dr. D.M. Akr Hussin Lexicl Anlysis. Bsic Ide: Red the source code nd generte tokens, it is similr wht humns will do to red in; just tking on the input nd reking it down in pieces. Ech token is sequence
More informationPointer Analysis. CSE 501 Spring 15
Pointer Anlysis CSE 501 Sring 15 Course Outline St8c nlysis Dtflow nd strct interret8on Alic8ons We re here Beyond generl- urose lnguges Progrm Verific8on Dynmic nlysis New comilers Tody Intro to ointer
More informationCOMP 423 lecture 11 Jan. 28, 2008
COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring
More informationIn the last lecture, we discussed how valid tokens may be specified by regular expressions.
LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.
More informationCSE 473: Ar+ficial Intelligence
CSE 473: Ar+ficial Intelligence Search Instructor: Luke Ze=lemoyer University of Washington [These slides were adapted from Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials
More informationWhat are suffix trees?
Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl
More informationLanguages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *
Pln for Tody nd Beginning Next week Interpreter nd Compiler Structure, or Softwre Architecture Overview of Progrmming Assignments The MeggyJv compiler we will e uilding. Regulr Expressions Finite Stte
More informationLexical Analysis: Constructing a Scanner from Regular Expressions
Lexicl Anlysis: Constructing Scnner from Regulr Expressions Gol Show how to construct FA to recognize ny RE This Lecture Convert RE to n nondeterministic finite utomton (NFA) Use Thompson s construction
More informationDefinition of Regular Expression
Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll
More informationUnit #9 : Definite Integral Properties, Fundamental Theorem of Calculus
Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl
More informationCS 343: Artificial Intelligence
CS 343: Artificial Intelligence Informed Search Prof. Scott Niekum University of Texas at Austin [These slides based on ones created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.
More informationCS 241. Fall 2017 Midterm Review Solutions. October 24, Bits and Bytes 1. 3 MIPS Assembler 6. 4 Regular Languages 7.
CS 241 Fll 2017 Midterm Review Solutions Octoer 24, 2017 Contents 1 Bits nd Bytes 1 2 MIPS Assemly Lnguge Progrmming 2 3 MIPS Assemler 6 4 Regulr Lnguges 7 5 Scnning 9 1 Bits nd Bytes 1. Give two s complement
More informationCS 4100 // artificial intelligence
CS 4100 // artificial intelligence instructor: byron wallace Search I Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials Thanks to John DeNero
More informationCS 188: Ar)ficial Intelligence
CS 188: Ar)ficial Intelligence Search Instructors: Pieter Abbeel & Anca Dragan University of California, Berkeley [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley
More informationPage. Harsh Reality. Dynamic Memory Allocation. Malloc Package. Process Memory Image. Assumptions. Malloc Example
Hrsh Relity Memory Mtters Memory is not unbounded It must be llocted nd mnged 1 Mny lictions re memory dominted Esecilly those bsed on comlex, grh lgorithms Memory referencing bugs esecilly ernicious Effects
More informationCSCI 446: Artificial Intelligence
CSCI 446: Artificial Intelligence Informed Search Instructor: Michele Van Dyne [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available
More informationPointer Analysis. What is Points-to Analysis? Outline. What is Points-to Analysis? What is Points-to Analysis? What is Pointer Analysis? Rupesh Nasre.
Pointer Anlysis Wht is? Ruesh Nsre. CS6843 Anlysis IIT Mdrs Jn 2014 = &x; = ; if ( == *) { } else { } oints to x 4 Outline Wht is? Introduction Pointer nlysis s DFA rolem Design decisions nlysis, Steensgrd's
More informationIf you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.
Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online
More informationAlgorithm Design (5) Text Search
Algorithm Design (5) Text Serch Tkshi Chikym School of Engineering The University of Tokyo Text Serch Find sustring tht mtches the given key string in text dt of lrge mount Key string: chr x[m] Text Dt:
More informationToday. Informed Search. Graph Search. Heuristics Greedy Search A* Search
Informed Search [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] Today Informed Search Heuristics
More information521495A: Artificial Intelligence
521495A: Artificial Intelligence Search Lectured by Abdenour Hadid Associate Professor, CMVS, University of Oulu Slides adopted from http://ai.berkeley.edu Agent An agent is an entity that perceives the
More informationCS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig
CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of
More informationCS143 Handout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexical Analysis
CS143 Hndout 07 Summer 2011 June 24 th, 2011 Written Set 1: Lexicl Anlysis In this first written ssignment, you'll get the chnce to ply round with the vrious constructions tht come up when doing lexicl
More informationInformed Search A* Algorithm
Informed Search A* Algorithm CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2018 Soleymani Artificial Intelligence: A Modern Approach, Chapter 3 Most slides have
More informationCompression Outline :Algorithms in the Real World. Lempel-Ziv Algorithms. LZ77: Sliding Window Lempel-Ziv
Compression Outline 15-853:Algorithms in the Rel World Dt Compression III Introduction: Lossy vs. Lossless, Benchmrks, Informtion Theory: Entropy, etc. Proility Coding: Huffmn + Arithmetic Coding Applictions
More informationHomework. Context Free Languages III. Languages. Plan for today. Context Free Languages. CFLs and Regular Languages. Homework #5 (due 10/22)
Homework Context Free Lnguges III Prse Trees nd Homework #5 (due 10/22) From textbook 6.4,b 6.5b 6.9b,c 6.13 6.22 Pln for tody Context Free Lnguges Next clss of lnguges in our quest! Lnguges Recll. Wht
More informationContext-Free Grammars
Context-Free Grmmrs Descriing Lnguges We've seen two models for the regulr lnguges: Finite utomt ccept precisely the strings in the lnguge. Regulr expressions descrie precisely the strings in the lnguge.
More informationCS 188: Artificial Intelligence
CS 188: Artificial Intelligence Today Informed Search Informed Search Heuristics Greedy Search A* Search Instructor: Marco Alvarez University of Rhode Island (These slides were created/modified by Dan
More informationContext-Free Grammars
Context-Free Grmmrs Descriing Lnguges We've seen two models for the regulr lnguges: Finite utomt ccept precisely the strings in the lnguge. Regulr expressions descrie precisely the strings in the lnguge.
More informationHyperbolas. Definition of Hyperbola
CHAT Pre-Clculus Hyperols The third type of conic is clled hyperol. For n ellipse, the sum of the distnces from the foci nd point on the ellipse is fixed numer. For hyperol, the difference of the distnces
More information2-3 search trees red-black BSTs B-trees
2-3 serch trees red-lck BTs B-trees 3 2-3 tree llow 1 or 2 keys per node. 2-node: one key, two children. 3-node: two keys, three children. ymmetric order. Inorder trversl yields keys in scending order.
More informationCS201 Discussion 10 DRAWTREE + TRIES
CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the
More informationProduct of polynomials. Introduction to Programming (in C++) Numerical algorithms. Product of polynomials. Product of polynomials
Product of polynomils Introduction to Progrmming (in C++) Numericl lgorithms Jordi Cortdell, Ricrd Gvldà, Fernndo Orejs Dept. of Computer Science, UPC Given two polynomils on one vrile nd rel coefficients,
More informationCS 430 Spring Mike Lam, Professor. Parsing
CS 430 Spring 2015 Mike Lm, Professor Prsing Syntx Anlysis We cn now formlly descrie lnguge's syntx Using regulr expressions nd BNF grmmrs How does tht help us? Syntx Anlysis We cn now formlly descrie
More informationCompilers Spring 2013 PRACTICE Midterm Exam
Compilers Spring 2013 PRACTICE Midterm Exm This is full length prctice midterm exm. If you wnt to tke it t exm pce, give yourself 7 minutes to tke the entire test. Just like the rel exm, ech question hs
More informationLING/C SC/PSYC 438/538. Lecture 21 Sandiway Fong
LING/C SC/PSYC 438/538 Lecture 21 Sndiwy Fong Tody's Topics Homework 8 Review Optionl Homework 9 (mke up on Homework 7) Homework 8 Review Question1: write Prolog regulr grmmr for the following lnguge:
More informationRegistering as an HPE Reseller
Registering s n HPE Reseller Quick Reference Guide for new Prtners Mrch 2019 Registering s new Reseller prtner There re four min steps to register on the Prtner Redy Portl s new Reseller prtner: Appliction
More informationArtificial Intelligence Informed Search
Artificial Intelligence Informed Search Instructors: David Suter and Qince Li Course Delivered @ Harbin Institute of Technology [Many slides adapted from those created by Dan Klein and Pieter Abbeel for
More informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop
More informationStack Manipulation. Other Issues. How about larger constants? Frame Pointer. PowerPC. Alternative Architectures
Other Issues Stck Mnipultion support for procedures (Refer to section 3.6), stcks, frmes, recursion mnipulting strings nd pointers linkers, loders, memory lyout Interrupts, exceptions, system clls nd conventions
More informationGraphing Conic Sections
Grphing Conic Sections Definition of Circle Set of ll points in plne tht re n equl distnce, clled the rdius, from fixed point in tht plne, clled the center. Grphing Circle (x h) 2 + (y k) 2 = r 2 where
More informationCS481: Bioinformatics Algorithms
CS481: Bioinformtics Algorithms Cn Alkn EA509 clkn@cs.ilkent.edu.tr http://www.cs.ilkent.edu.tr/~clkn/teching/cs481/ EXACT STRING MATCHING Fingerprint ide Assume: We cn compute fingerprint f(p) of P in
More informationDistributed Systems Principles and Paradigms
Distriuted Systems Principles nd Prdigms Chpter 11 (version April 7, 2008) Mrten vn Steen Vrije Universiteit Amsterdm, Fculty of Science Dept. Mthemtics nd Computer Science Room R4.20. Tel: (020) 598 7784
More information1.5 Extrema and the Mean Value Theorem
.5 Extrem nd the Men Vlue Theorem.5. Mximum nd Minimum Vlues Definition.5. (Glol Mximum). Let f : D! R e function with domin D. Then f hs n glol mximum vlue t point c, iff(c) f(x) for ll x D. The vlue
More informationCSCI 3130: Formal Languages and Automata Theory Lecture 12 The Chinese University of Hong Kong, Fall 2011
CSCI 3130: Forml Lnguges nd utomt Theory Lecture 12 The Chinese University of Hong Kong, Fll 2011 ndrej Bogdnov In progrmming lnguges, uilding prse trees is significnt tsk ecuse prse trees tell us the
More informationSuffix Tries. Slides adapted from the course by Ben Langmead
Suffix Tries Slides dpted from the course y Ben Lngmed en.lngmed@gmil.com Indexing with suffixes Until now, our indexes hve een sed on extrcting sustrings from T A very different pproch is to extrct suffixes
More informationCOMBINATORIAL PATTERN MATCHING
COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized
More informationHDAR: Hole Detection and Adaptive Geographic Routing for Ad Hoc Networks
: Hole Detection nd Adtive Geogrhic Routing for Ad Hoc Networks Jinjun Yng The Lortory for Advnced Networking Dertment of Comuter Science University of Kentucky Lexington, KY 40506-0046, USA Emil:jyng@netl.uky.edu
More information10.5 Graphing Quadratic Functions
0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions
More informationSuffix trees, suffix arrays, BWT
ALGORITHMES POUR LA BIO-INFORMATIQUE ET LA VISUALISATION COURS 3 Rluc Uricru Suffix trees, suffix rrys, BWT Bsed on: Suffix trees nd suffix rrys presenttion y Him Kpln Suffix trees course y Pco Gomez Liner-Time
More informationLecture T1: Pattern Matching
Introduction to Theoreticl CS Lecture T: Pttern Mtchin Two fundmentl questions. Wht cn computer do? Wht cn computer do with limited resources? Generl pproch. Don t tlk out specific mchines or prolems.
More information6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.
6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3-dimensionl oject with two regulr fces seprted
More informationECE 468/573 Midterm 1 September 28, 2012
ECE 468/573 Midterm 1 September 28, 2012 Nme:! Purdue emil:! Plese sign the following: I ffirm tht the nswers given on this test re mine nd mine lone. I did not receive help from ny person or mteril (other
More informationVery sad code. Abstraction, List, & Cons. CS61A Lecture 7. Happier Code. Goals. Constructors. Constructors 6/29/2011. Selectors.
6/9/ Abstrction, List, & Cons CS6A Lecture 7-6-9 Colleen Lewis Very sd code (define (totl hnd) (if (empty? hnd) (+ (butlst (lst hnd)) (totl (butlst hnd))))) STk> (totl (h c d)) 7 STk> (totl (h ks d)) ;;;EEEK!
More informationImplementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona
Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrd-coded using this
More informationReducing a DFA to a Minimal DFA
Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,
More informationThe Greedy Method. The Greedy Method
Lists nd Itertors /8/26 Presenttion for use with the textook, Algorithm Design nd Applictions, y M. T. Goodrich nd R. Tmssi, Wiley, 25 The Greedy Method The Greedy Method The greedy method is generl lgorithm
More informationPARALLEL AND DISTRIBUTED COMPUTING
PARALLEL AND DISTRIBUTED COMPUTING 2009/2010 1 st Semester Teste Jnury 9, 2010 Durtion: 2h00 - No extr mteril llowed. This includes notes, scrtch pper, clcultor, etc. - Give your nswers in the ville spce
More informationAllocator Basics. Dynamic Memory Allocation in the Heap (malloc and free) Allocator Goals: malloc/free. Internal Fragmentation
Alloctor Bsics Dynmic Memory Alloction in the Hep (mlloc nd free) Pges too corse-grined for llocting individul objects. Insted: flexible-sized, word-ligned blocks. Allocted block (4 words) Free block (3
More informationGraph Search. Chris Amato Northeastern University. Some images and slides are used from: Rob Platt, CS188 UC Berkeley, AIMA
Graph Search Chris Amato Northeastern University Some images and slides are used from: Rob Platt, CS188 UC Berkeley, AIMA What is graph search? Start state Goal state Graph search: find a path from start
More information9.1 apply the distance and midpoint formulas
9.1 pply the distnce nd midpoint formuls DISTANCE FORMULA MIDPOINT FORMULA To find the midpoint between two points x, y nd x y 1 1,, we Exmple 1: Find the distnce between the two points. Then, find the
More informationFrom Dependencies to Evaluation Strategies
From Dependencies to Evlution Strtegies Possile strtegies: 1 let the user define the evlution order 2 utomtic strtegy sed on the dependencies: use locl dependencies to determine which ttriutes to compute
More informationCS 343H: Artificial Intelligence
CS 343H: Artificial Intelligence Lecture 4: Informed Search 1/23/2014 Slides courtesy of Dan Klein at UC-Berkeley Unless otherwise noted Today Informed search Heuristics Greedy search A* search Graph search
More informationIntegration. September 28, 2017
Integrtion September 8, 7 Introduction We hve lerned in previous chpter on how to do the differentition. It is conventionl in mthemtics tht we re supposed to lern bout the integrtion s well. As you my
More informationNetwork Interconnection: Bridging CS 571 Fall Kenneth L. Calvert All rights reserved
Network Interconnection: Bridging CS 57 Fll 6 6 Kenneth L. Clvert All rights reserved The Prolem We know how to uild (rodcst) LANs Wnt to connect severl LANs together to overcome scling limits Recll: speed
More informationGreedy Algorithm. Algorithm Fall Semester
Greey Algorithm Algorithm 0 Fll Semester Optimiztion prolems An optimiztion prolem is one in whih you wnt to fin, not just solution, ut the est solution A greey lgorithm sometimes works well for optimiztion
More informationCSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona
CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded
More informationUnit 5 Vocabulary. A function is a special relationship where each input has a single output.
MODULE 3 Terms Definition Picture/Exmple/Nottion 1 Function Nottion Function nottion is n efficient nd effective wy to write functions of ll types. This nottion llows you to identify the input vlue with
More informationGraphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics,
Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics, performance data Pattern DBs? General Tree Search function
More information521495A: Artificial Intelligence
521495A: Artificial Intelligence Informed Search Lectured by Abdenour Hadid Adjunct Professor, CMVS, University of Oulu Slides adopted from http://ai.berkeley.edu Today Informed Search Heuristics Greedy
More informationLECT-10, S-1 FP2P08, Javed I.
A Course on Foundtions of Peer-to-Peer Systems & Applictions LECT-10, S-1 CS /799 Foundtion of Peer-to-Peer Applictions & Systems Kent Stte University Dept. of Computer Science www.cs.kent.edu/~jved/clss-p2p08
More informationTO REGULAR EXPRESSIONS
Suject :- Computer Science Course Nme :- Theory Of Computtion DA TO REGULAR EXPRESSIONS Report Sumitted y:- Ajy Singh Meen 07000505 jysmeen@cse.iit.c.in BASIC DEINITIONS DA:- A finite stte mchine where
More informationCS 321 Programming Languages and Compilers. Bottom Up Parsing
CS 321 Progrmming nguges nd Compilers Bottom Up Prsing Bottom-up Prsing: Shift-reduce prsing Grmmr H: fi ; fi b Input: ;;b hs prse tree ; ; b 2 Dt for Shift-reduce Prser Input string: sequence of tokens
More informationEECS150 - Digital Design Lecture 23 - High-level Design and Optimization 3, Parallelism and Pipelining
EECS150 - Digitl Design Lecture 23 - High-level Design nd Optimiztion 3, Prllelism nd Pipelining Nov 12, 2002 John Wwrzynek Fll 2002 EECS150 - Lec23-HL3 Pge 1 Prllelism Prllelism is the ct of doing more
More informationRational Numbers---Adding Fractions With Like Denominators.
Rtionl Numbers---Adding Frctions With Like Denomintors. A. In Words: To dd frctions with like denomintors, dd the numertors nd write the sum over the sme denomintor. B. In Symbols: For frctions c nd b
More information