Search: Cost & Heuristics

Size: px
Start display at page:

Download "Search: Cost & Heuristics"

Transcription

1 9/9/ CSE 7: Artiiil Intelligene Autumn 0 Pizz? Announements Serh: Cost & Heuristis Dn Wel Projet : Serh online tomorrow ue Mony 0/ ue We / Strt! With slies rom Dn Klein, Sturt Russell, Anrew Moore, Luke Zettlemoyer Serh thru Prolem Se / Stte Se Inut: Set o sttes Oertors [n osts] Strt stte Gol stte [test] Outut: Pth: strt stte stisying gol test [My reuire shortest th] [Sometimes just nee stte ssing test] Grution? Getting BS in CSE s serh rolem? (on t think too hr) Se o Sttes Oertors Initil Stte Gol Stte Serh Methos Blin serh Deth irst serh (DFS) Breth irst serh (BFS) Itertive eeening eth-irst serh (IDS) 6 Serh Methos Deth irst serh (DFS) Breth irst serh (BFS) Itertive eeening eth-irst serh (IDS) Best irst serh Uniorm ost serh (UCS) Greey serh A* Itertive Deeening A* (IDA*) Bem serh 7 Hill liming Heuristi serh

2 9/9/ Deth First Serh Mintin stk o noes to visit Chek th to root to rune ulites Evlution Not or ininite ses O( m ) Se Comlexity? O(m) e g h m Breth First Serh Mintin ueue o noes to visit Evlution Yes O( ) Se Comlexity? O( ) e g h Memory Limittion? Suose: GHz CPU 6 GB min memory 00 instrutions / exnsion 0 ytes / noe 00,000 exnsions / se Memory ille in 00 se < 7 min Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Se Comlexity? Dniel S. Wel 0 Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Se Comlexity? Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Se Comlexity? e i g h l k j

3 9/9/ Itertive Deeening Serh DFS with limit; inrementlly grow limit Evlution Yes O( ) Se Comlexity? O( ) e Cost o Itertive Deeening rtio ID to DFS See 8 Puzzle xx Ruik s 0 6. se 5 Puzzle xx Ruik s k yrs Puzzle Why the ierene? Assuming 0M noes/se & suiient memory BFS Noes Time se 0 6 ys 0 5 B yrs Ruik hs higher rnh tor 5 uzzle hs greter eth Mx 8x # o ulites Iter. Dee. Noes Time se 0 6. se 0 7 0k yrs k yrs yrs Slie te rom Rihr Kor resenttion START Costs on Ations 8 e 9 8 h 5 r Ojetive: Pth with smllest overll ost GOAL START Costs on Ations 8 e 9 8 h 5 GOAL r Best-First Serh Generliztion o reth-irst serh Fringe = Priority ueue o noes to e exlore Cost untion (n) lie to eh noe Wht will BFS return? ins the shortest th in terms o numer o trnsitions. It oes not in the lest-ost th. 9

4 9/9/.ush(key, vlue).o() Priority Queue Reresher A riority ueue is t struture in whih you n insert n retrieve (key, vlue) irs with the ollowing oertions: inserts (key, vlue) into the ueue. returns the key with the lowest vlue, n removes it rom the ueue. You n erese key s riority y ushing it gin Unlike regulr ueue, insertions ren t onstnt time, usully O(log n) We ll nee riority ueues or ost-sensitive serh methos Best-First Serh Generliztion o reth-irst serh Fringe = Priority ueue o noes to e exlore Cost untion (n) lie to eh noe A initil stte to riority ueue While ueue not emty Noe = he(ueue) I gol?(noe) then return noe A hilren o noe to ueue exning the noe Breth First = Best First with (n) = eth(n) Ol Friens Dijkstr s Algorithm (Uniorm ost) = Best First with (n) = the sum o ege osts rom strt to n Uniorm Cost Serh Best irst, where (n) = ost rom strt to n START h e GOAL r k Dijkstr s Algorithm Exnsion orer: Uniorm Cost Serh S,,,, e,, r,, e, G S Cost ontours (not ll shown) 6 S 0 e 9 e 5 h r 7 8 G 0 G 8 e 9 h 8 r 5 h 7 r G 6 Uniorm Cost Serh Algorithm Comlete Otiml Time Se DFS BFS UCS w/ Pth Cheking C* = Otiml ost C*/ε tiers ε = Minimum ost o n tion Y i inite N O( m ) O(m) Y Y* O( ) O( ) Y* Y O( C*/ε ) O( C*/ε )

5 9/9/ Uniorm Cost Issues Uniorm Cost: P-Mn Rememer: exlores inresing ost ontours The goo: UCS is omlete n otiml! Cost o or eh tion Exlores ll o the sttes, ut one The : Exlores otions in every iretion No inormtion out gol lotion Strt Gol Wht is Heuristi? An estimte o how lose stte is to gol Designe or rtiulr serh rolem Wht is Heuristi? An estimte o how lose stte is to gol Designe or rtiulr serh rolem Exmles: Mnhttn istne: 0+5 = 5 Eulien istne:. 5 Atul istne to gol: ++++8= Greey Serh Best irst with (n) = heuristi estimte o istne to gol Greey Serh Exn the noe tht seems losest A strt B gol Wht n go wrong? 5

6 9/9/ A ommon se: Best-irst tkes you stright to (suotiml) gol Worst-se: like lyguie DFS in the worst se Cn exlore everything Cn get stuk in loos i no yle heking Like DFS in omleteness (i inite # sttes w/ yle heking) Greey Serh A* Serh Hrt, Nilsson & Rel 968 Best irst serh with (n) = g(n) + h(n) g(n) = sum o osts rom strt to n h(n) = estimte o lowest ost th n gol h(gol) = 0 I h(n) is missile n monotoni then A* is otiml Unerestimtes ost o rehing gol rom } noe { vlues inrese rom noe to esennts (tringle ineulity) A* Serh Hrt, Nilsson & Rel 968 Best irst serh with (n) = g(n) + h(n) g(n) = sum o osts rom strt to n h(n) = estimte o lowest ost th n gol h(gol) = 0 Cn view s ross-ree: g(n) ~ uniorm ost serh h(n) ~ greey serh Best o oth worls Is Mnhttn istne missile? Unerestimte? S G 6 Is Mnhttn istne monotoni? vlues inrese rom noe to hilren (tringle ineulity) Amissile? Monotoni? Eulien Distne S S G G 7 8 6

7 9/9/ A* Exmle A* Exmle 9 0 A* Exmle A* Exmle A* Exmle A* Exmle 7

8 9/9/ strt Euroen Exmle Otimlity o A* 5 en 5 6 Otimlity Continue A* Summry Pros Proues otiml ost solution! Does so uite uikly (ouse) Cons Mintins riority ueue Whih n get exonentilly ig L 7 8 8

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificil Intelligence Spring 2007 Lecture 3: Queue-Bsed Serch 1/23/2007 Srini Nrynn UC Berkeley Mny slides over the course dpted from Dn Klein, Sturt Russell or Andrew Moore Announcements Assignment

More information

Uninformed Search Lecture 4

Uninformed Search Lecture 4 Lecture 4 Wht re common serch strtegies tht operte given only serch problem? How do they compre? 1 Agend A quick refresher DFS, BFS, ID-DFS, UCS Unifiction! 2 Serch Problem Formlism Defined vi the following

More information

Announcements. CS 188: Artificial Intelligence Fall Today. Reflex Agents. Goal Based Agents. Search Problems

Announcements. CS 188: Artificial Intelligence Fall Today. Reflex Agents. Goal Based Agents. Search Problems C 88: Atiiil Intllign Fll 009 Ltu : Quu-Bs 9//009 Dn Klin UC Bkly Multil slis om tut Russll, Anw Moo Announmnts Pojt 0: Pyton Tutoil Du tomoow! T is l tomoow om m-3m in o 75 T l tim is otionl, ut P0 itsl

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements C 188: Atiiil Intllign ing 2006 Ltu 2: Quu-Bs 8/31/2006 Dn Klin UC Bkly Mny slis om it tut Russll o Anw Moo Announmnts L Fiy 1-5m in o 275 Ln Pyton tt on Pojt 1.1: Mzwol Com o wtv tims you lik No stions

More information

Lecture 3. XML Into RDBMS. XML and Databases. Memory Representations. Memory Representations. Traversals and Pre/Post-Encoding. Memory Representations

Lecture 3. XML Into RDBMS. XML and Databases. Memory Representations. Memory Representations. Traversals and Pre/Post-Encoding. Memory Representations Leture XML into RDBMS XML n Dtses Sestin Mneth NICTA n UNSW Leture XML Into RDBMS CSE@UNSW -- Semester, 00 Memory Representtions Memory Representtions Fts DOM is esy to use, ut memory hevy. in-memory size

More information

Outline. CSE 473: Artificial Intelligence Spring Types of Agents

Outline. CSE 473: Artificial Intelligence Spring Types of Agents 9/9/7 CE 7: Atiiil Intllign ing 07 Polms Outlin Polm s & Dit Fox Uninom Mtos Dt-Fist Bt-Fist Uniom-Cost Wit slis om Dn Wl, Pit Al, Dn Klin, tut Russll, Anw Moo, Luk Zttlmoy Agnt vs. Envionmnt Tys o Agnts

More information

Announcements. CS 188: Artificial Intelligence Fall Reflex Agents. Today. Goal Based Agents. Search Problems

Announcements. CS 188: Artificial Intelligence Fall Reflex Agents. Today. Goal Based Agents. Search Problems Announmnts Pojt 0: Pyton Tutoil Du tomoow! T is l Wnsy om 3m-5m in o 75 T l tim is otionl, ut P0 itsl is not On sumit, you soul gt mil om t utog Pojt : On t w toy tt ly n sk ustions. It s long tn most!

More information

CS 188: Artificial Intelligence Fall Announcements

CS 188: Artificial Intelligence Fall Announcements C 188: Atiiil Intllign Fll 007 Ltu : Quu-Bs 8/31/007 Dn Klin UC Bkly Mny slis om it tut Russll o Anw Moo Announmnts Nxt wk Nw oom is 105 Not Gt, stts Tusy Ck w g o stions (nw oming) L Fiy 10m to 5m in

More information

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt

More information

CS 188: Artificial Intelligence Fall Announcements

CS 188: Artificial Intelligence Fall Announcements C 188: Atiiil Intllign Fll 2009 Ltu 2: Quu-Bs 9/1/2009 Dn Klin UC Bkly Multil slis om tut Russll, Anw Moo Announmnts Pojt 0: Pyton Tutoil Du tomoow! T is l tomoow om 1m-3m in o 275 T l tim is otionl, ut

More information

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA Common intervls of genomes Mthieu Rffinot CNRS LIF Context: omprtive genomis. set of genomes prtilly/totlly nnotte Informtive group of genes or omins? Ex: COG tse Mny iffiulties! iology Wht re two similr

More information

Problem solving by search

Problem solving by search Prolm solving y srh Tomáš voo Dprtmnt o Cyrntis, Vision or Roots n Autonomous ystms Mrh 5, 208 / 3 Outlin rh prolm. tt sp grphs. rh trs. trtgis, whih tr rnhs to hoos? trtgy/algorithm proprtis? Progrmming

More information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 Announmnts Pojt 0: Pyton Tutoil Du tomoow! T is l Wnsy om 3m-5m in o 275 T l tim is otionl, ut P0 itsl is not On sumit, you soul gt mil om t utog Pojt 1: On t w toy tt ly n sk ustions. It s long tn most!

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

CSC2542 State-Space Planning

CSC2542 State-Space Planning CSC2542 Stte-Spe Plnning Sheil MIlrith Deprtment of Computer Siene University of Toronto Fll 2010 1 Aknowlegements Some the slies use in this ourse re moifitions of Dn Nu s leture slies for the textook

More information

SIMPLE NONLINEAR GRAPHS

SIMPLE NONLINEAR GRAPHS S i m p l e N o n l i n e r G r p h s SIMPLE NONLINEAR GRAPHS www.mthletis.om.u Simple SIMPLE Nonliner NONLINEAR Grphs GRAPHS Liner equtions hve the form = m+ where the power of (n ) is lws. The re lle

More information

Lecture 11 Binary Decision Diagrams (BDDs)

Lecture 11 Binary Decision Diagrams (BDDs) C 474A/57A Computer-Aie Logi Design Leture Binry Deision Digrms (BDDs) C 474/575 Susn Lyseky o 3 Boolen Logi untions Representtions untion n e represente in ierent wys ruth tle, eqution, K-mp, iruit, et

More information

Informed Search. Day 3 of Search. Chap. 4, Russel & Norvig. Material in part from

Informed Search. Day 3 of Search. Chap. 4, Russel & Norvig. Material in part from Informed Search Day 3 of Search Chap. 4, Russel & Norvig Material in part from http://www.cs.cmu.edu/~awm/tutorials Uninformed Search Complexity N = Total number of states B = Average number of successors

More information

I 3 2 = I I 4 = 2A

I 3 2 = I I 4 = 2A ECE 210 Eletril Ciruit Anlysis University of llinois t Chigo 2.13 We re ske to use KCL to fin urrents 1 4. The key point in pplying KCL in this prolem is to strt with noe where only one of the urrents

More information

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018 DATA620006 魏忠钰 Serch I Mrch 7 th, 2018 Outline Serch Problems Uninformed Serch Depth-First Serch Bredth-First Serch Uniform-Cost Serch Rel world tsk - Pc-mn Serch problems A serch problem consists of:

More information

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example Connetiit in Grphs CSH: Disrete Mthemtis Grph Theor II Instrtor: Işıl Dillig Tpil qestion: Is it possile to get from some noe to nother noe? Emple: Trin netork if there is pth from to, possile to tke trin

More information

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point

Numbers and indices. 1.1 Fractions. GCSE C Example 1. Handy hint. Key point GCSE C Emple 7 Work out 9 Give your nswer in its simplest form Numers n inies Reiprote mens invert or turn upsie own The reiprol of is 9 9 Mke sure you only invert the frtion you re iviing y 7 You multiply

More information

State Complexity of Union and Intersection of Binary Suffix-Free Languages

State Complexity of Union and Intersection of Binary Suffix-Free Languages Stte Complexity of Union nd Intersetion of Binry Suffix-Free Lnguges Glin Jirásková nd Pvol Olejár Slovk Ademy of Sienes nd Šfárik University, Košie 0000 1111 0000 1111 Glin Jirásková nd Pvol Olejár Binry

More information

03. Early Greeks & Aristotle

03. Early Greeks & Aristotle 03. Erly Greeks & Aristotle I. Erly Greeks Topis I. Erly Greeks II. The Method of Exhustion III. Aristotle. Anximnder (. 60 B.C.) to peiron - the unlimited, unounded - fundmentl sustne of relity - underlying

More information

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

Informed Search. Chap. 4. Breadth First. O(Min(N,B L )) BFS. Search. have same cost BIBFS. Bi- Direction. O(Min(N,2B L/2 )) BFS. have same cost UCS

Informed Search. Chap. 4. Breadth First. O(Min(N,B L )) BFS. Search. have same cost BIBFS. Bi- Direction. O(Min(N,2B L/2 )) BFS. have same cost UCS Informed Search Chap. 4 Material in part from http://www.cs.cmu.edu/~awm/tutorials Uninformed Search Complexity N = Total number of states B = Average number of successors (branching factor) L = Length

More information

Formal Methods in Software Engineering

Formal Methods in Software Engineering Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt

More information

CS 360 Exam 2 Fall 2014 Name

CS 360 Exam 2 Fall 2014 Name CS 360 Exm 2 Fll 2014 Nme 1. The lsses shown elow efine singly-linke list n stk. Write three ifferent O(n)-time versions of the reverse_print metho s speifie elow. Eh version of the metho shoul output

More information

10. AREAS BETWEEN CURVES

10. AREAS BETWEEN CURVES . AREAS BETWEEN CURVES.. Ares etween curves So res ove the x-xis re positive nd res elow re negtive, right? Wrong! We lied! Well, when you first lern out integrtion it s convenient fiction tht s true in

More information

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points. Prole 3: Crnot Cyle of n Idel Gs In this prole, the strting pressure P nd volue of n idel gs in stte, re given he rtio R = / > of the volues of the sttes nd is given Finlly onstnt γ = 5/3 is given You

More information

Search: The Core of Planning

Search: The Core of Planning Serch: The Core of Plnning Dr. Neil T. Dntm CSCI-498/598 RPM, Colordo School of Mines Spring 208 Dntm (Mines CSCI, RPM) Serch Spring 208 / 75 Outline Plnning nd Serch Problems Bsic Serch Depth-First Serch

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 8 Mx. lteness ont d Optiml Ching Adm Smith 9/12/2008 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne Sheduling to Minimizing Lteness Minimizing

More information

Factorising FACTORISING.

Factorising FACTORISING. Ftorising FACTORISING www.mthletis.om.u Ftorising FACTORISING Ftorising is the opposite of expning. It is the proess of putting expressions into rkets rther thn expning them out. In this setion you will

More information

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ Running n NFA & the suset lgorithm (NFA->DFA) CS 350 Fll 2018 gilry.org/lsses/fll2018/s350/ 1 NFAs operte y simultneously exploring ll pths nd epting if ny pth termintes t n ept stte.!2 Try n exmple: L

More information

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths Intermedite Mth Cirles Wednesdy 17 Otoer 01 Geometry II: Side Lengths Lst week we disussed vrious ngle properties. As we progressed through the evening, we proved mny results. This week, we will look t

More information

Algebra 2 Semester 1 Practice Final

Algebra 2 Semester 1 Practice Final Alger 2 Semester Prtie Finl Multiple Choie Ientify the hoie tht est ompletes the sttement or nswers the question. To whih set of numers oes the numer elong?. 2 5 integers rtionl numers irrtionl numers

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of: 22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)

More information

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

On Determinisation of History-Deterministic Automata.

On Determinisation of History-Deterministic Automata. On Deterministion of History-Deterministic Automt. Denis Kupererg Mich l Skrzypczk University of Wrsw YR-ICALP 2014 Copenhgen Introduction Deterministic utomt re centrl tool in utomt theory: Polynomil

More information

9.1 Day 1 Warm Up. Solve the equation = x x 2 = March 1, 2017 Geometry 9.1 The Pythagorean Theorem 1

9.1 Day 1 Warm Up. Solve the equation = x x 2 = March 1, 2017 Geometry 9.1 The Pythagorean Theorem 1 9.1 Dy 1 Wrm Up Solve the eqution. 1. 4 2 + 3 2 = x 2 2. 13 2 + x 2 = 25 2 3. 3 2 2 + x 2 = 5 2 2 4. 5 2 + x 2 = 12 2 Mrh 1, 2017 Geometry 9.1 The Pythgoren Theorem 1 9.1 Dy 2 Wrm Up Use the Pythgoren

More information

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 5 Supplement Greedy Algorithms Cont d Minimizing lteness Ching (NOT overed in leture) Adm Smith 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov,

More information

= x x 2 = 25 2

= x x 2 = 25 2 9.1 Wrm Up Solve the eqution. 1. 4 2 + 3 2 = x 2 2. 13 2 + x 2 = 25 2 3. 3 2 2 + x 2 = 5 2 2 4. 5 2 + x 2 = 12 2 Mrh 7, 2016 Geometry 9.1 The Pythgoren Theorem 1 Geometry 9.1 The Pythgoren Theorem 9.1

More information

Module 6 Value Iteration. CS 886 Sequential Decision Making and Reinforcement Learning University of Waterloo

Module 6 Value Iteration. CS 886 Sequential Decision Making and Reinforcement Learning University of Waterloo Module 6 Vlue Itertion CS 886 Sequentil Decision Mking nd Reinforcement Lerning University of Wterloo Mrkov Decision Process Definition Set of sttes: S Set of ctions (i.e., decisions): A Trnsition model:

More information

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4 Am Blnk Leture 13 Winter 2016 CSE 332 CSE 332: Dt Astrtions Sorting Dt Astrtions QuikSort Cutoff 1 Where We Are 2 For smll n, the reursion is wste. The onstnts on quik/merge sort re higher thn the ones

More information

Finite state automata

Finite state automata Finite stte utomt Lecture 2 Model-Checking Finite-Stte Systems (untimed systems) Finite grhs with lels on edges/nodes set of nodes (sttes) set of edges (trnsitions) set of lels (lhet) Finite Automt, CTL,

More information

Announcements. CS 188: Artificial Intelligence Spring More Announcements. Today. From Last Time: Reflex Agents.

Announcements. CS 188: Artificial Intelligence Spring More Announcements. Today. From Last Time: Reflex Agents. C 88: Atiiil Intllign ing 009 Ltu : Quu-Bs //008 Jon DNo UC Bkly Mny slis om Dn Klin, tut Russll o Anw Moo Announmnts Pojt 0: Pyton Tutoil Post onlin now Du nxt Wnsy, Jn 8 T is l toy om m-3m in o 75 T

More information

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence C 188: Atiiil Intllign Toy Agnts tt Pln A Polms Instuto: Mo Alvz Univsity o Ro Isln (Ts slis w t/moii y Dn Klin, Pit Al, An Dgn o C188 t UC Bkly) Uninom Mtos Dt-Fist Bt-Fist Uniom-Cost Agnts tt Pln Rlx

More information

The DOACROSS statement

The DOACROSS statement The DOACROSS sttement Is prllel loop similr to DOALL, ut it llows prouer-onsumer type of synhroniztion. Synhroniztion is llowe from lower to higher itertions sine it is ssume tht lower itertions re selete

More information

6. Suppose lim = constant> 0. Which of the following does not hold?

6. Suppose lim = constant> 0. Which of the following does not hold? CSE 0-00 Nme Test 00 points UTA Stuent ID # Multiple Choie Write your nswer to the LEFT of eh prolem 5 points eh The k lrgest numers in file of n numers n e foun using Θ(k) memory in Θ(n lg k) time using

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements C 188: Atiiil Intllign ing 2010 Ltu 2: Quu-Bs 1/21/2010 Pit Al UC Bkly Mny slis om Dn Klin Announmnts Pojt 0: Pyton Tutoil Out toy. Du nxt wk Tusy. L sssions in 271 o: Mony 2-3m Wnsy 4-5m T l tim is otionl,

More information

PYTHAGORAS THEOREM,TRIGONOMETRY,BEARINGS AND THREE DIMENSIONAL PROBLEMS

PYTHAGORAS THEOREM,TRIGONOMETRY,BEARINGS AND THREE DIMENSIONAL PROBLEMS PYTHGORS THEOREM,TRIGONOMETRY,ERINGS ND THREE DIMENSIONL PROLEMS 1.1 PYTHGORS THEOREM: 1. The Pythgors Theorem sttes tht the squre of the hypotenuse is equl to the sum of the squres of the other two sides

More information

CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computation 1. Graphs and Digraphs CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

GEOMETRY OF THE CIRCLE TANGENTS & SECANTS

GEOMETRY OF THE CIRCLE TANGENTS & SECANTS Geometry Of The ircle Tngents & Secnts GEOMETRY OF THE IRLE TNGENTS & SENTS www.mthletics.com.u Tngents TNGENTS nd N Secnts SENTS Tngents nd secnts re lines tht strt outside circle. Tngent touches the

More information

CS 188: Artificial Intelligence Spring 2009

CS 188: Artificial Intelligence Spring 2009 C 188: Atiiil Intllign ing 009 Ltu : Quu-Bs 1//008 Jon DNo UC Bkly Mny slis om Dn Klin, tut Russll o Anw Moo Announmnts Pojt 0: Pyton Tutoil Post onlin now Du nxt Wnsy, Jn 8 T is l toy om 1m-3m in o 75

More information

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4 58487 Dt Compressio Tehiques (Sprig 0) Moel Solutios for Exerise 4 If you hve y fee or orretios, plese ott jro.lo t s.helsii.fi.. Prolem: Let T = Σ = {,,, }. Eoe T usig ptive Huffm oig. Solutio: R 4 U

More information

Implication Graphs and Logic Testing

Implication Graphs and Logic Testing Implition Grphs n Logi Testing Vishwni D. Agrwl Jmes J. Dnher Professor Dept. of ECE, Auurn University Auurn, AL 36849 vgrwl@eng.uurn.eu www.eng.uurn.eu/~vgrwl Joint reserh with: K. K. Dve, ATI Reserh,

More information

Section 1.3 Triangles

Section 1.3 Triangles Se 1.3 Tringles 21 Setion 1.3 Tringles LELING TRINGLE The line segments tht form tringle re lled the sides of the tringle. Eh pir of sides forms n ngle, lled n interior ngle, nd eh tringle hs three interior

More information

Linear Algebra Introduction

Linear Algebra Introduction Introdution Wht is Liner Alger out? Liner Alger is rnh of mthemtis whih emerged yers k nd ws one of the pioneer rnhes of mthemtis Though, initilly it strted with solving of the simple liner eqution x +

More information

19 Optimal behavior: Game theory

19 Optimal behavior: Game theory Intro. to Artificil Intelligence: Dle Schuurmns, Relu Ptrscu 1 19 Optiml behvior: Gme theory Adversril stte dynmics hve to ccount for worst cse Compute policy π : S A tht mximizes minimum rewrd Let S (,

More information

Inspiration and formalism

Inspiration and formalism Inspirtion n formlism Answers Skills hek P(, ) Q(, ) PQ + ( ) PQ A(, ) (, ) grient ( ) + Eerise A opposite sies of regulr hegon re equl n prllel A ED i FC n ED ii AD, DA, E, E n FC No, sies of pentgon

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Atiiil Intllign Sing 2011 Ltu 2: Quu-Bs S 1/24/2010 Pit Al UC Bkly Mny slis om Dn Klin Announmnts Pojt 0: Pyton Tutoil Du Fiy 5m. L sssion Wnsy 3-5m in 271 So T l tim is otionl, ut P0 itsl is not

More information

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)} Grph Theory Simple Grph G = (V, E). V ={verties}, E={eges}. h k g f e V={,,,,e,f,g,h,k} E={(,),(,g),(,h),(,k),(,),(,k),...,(h,k)} E =16. 1 Grph or Multi-Grph We llow loops n multiple eges. G = (V, E.ψ)

More information

MA10207B: ANALYSIS SECOND SEMESTER OUTLINE NOTES

MA10207B: ANALYSIS SECOND SEMESTER OUTLINE NOTES MA10207B: ANALYSIS SECOND SEMESTER OUTLINE NOTES CHARLIE COLLIER UNIVERSITY OF BATH These notes hve been typeset by Chrlie Collier nd re bsed on the leture notes by Adrin Hill nd Thoms Cottrell. These

More information

CS241 Week 6 Tutorial Solutions

CS241 Week 6 Tutorial Solutions 241 Week 6 Tutoril olutions Lnguges: nning & ontext-free Grmmrs Winter 2018 1 nning Exerises 1. 0x0x0xd HEXINT 0x0 I x0xd 2. 0xend--- HEXINT 0xe I nd ER -- MINU - 3. 1234-120x INT 1234 INT -120 I x 4.

More information

CS 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

More information

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

More information

Lumpability and Absorbing Markov Chains

Lumpability and Absorbing Markov Chains umbility nd Absorbing rov Chins By Ahmed A.El-Sheih Dertment of Alied Sttistics & Econometrics Institute of Sttisticl Studies & Reserch (I.S.S.R Ciro University Abstrct We consider n bsorbing rov Chin

More information

Prefix-Free Regular-Expression Matching

Prefix-Free Regular-Expression Matching Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

More information

1 Introduction to Modulo 7 Arithmetic

1 Introduction to Modulo 7 Arithmetic 1 Introution to Moulo 7 Arithmti Bor w try our hn t solvin som hr Moulr KnKns, lt s tk los look t on moulr rithmti, mo 7 rithmti. You ll s in this sminr tht rithmti moulo prim is quit irnt rom th ons w

More information

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

Automatic Synthesis of New Behaviors from a Library of Available Behaviors

Automatic Synthesis of New Behaviors from a Library of Available Behaviors Automti Synthesis of New Behviors from Lirry of Aville Behviors Giuseppe De Giomo Università di Rom L Spienz, Rom, Itly degiomo@dis.unirom1.it Sestin Srdin RMIT University, Melourne, Austrli ssrdin@s.rmit.edu.u

More information

Deterministic Finite Automata

Deterministic Finite Automata Finite Automt Deterministic Finite Automt H. Geuvers nd J. Rot Institute for Computing nd Informtion Sciences Version: fll 2016 J. Rot Version: fll 2016 Tlen en Automten 1 / 21 Outline Finite Automt Finite

More information

Momentum and Energy Review

Momentum and Energy Review Momentum n Energy Review Nme: Dte: 1. A 0.0600-kilogrm ll trveling t 60.0 meters per seon hits onrete wll. Wht spee must 0.0100-kilogrm ullet hve in orer to hit the wll with the sme mgnitue of momentum

More information

1 nonlinear.mcd Find solution root to nonlinear algebraic equation f(x)=0. Instructor: Nam Sun Wang

1 nonlinear.mcd Find solution root to nonlinear algebraic equation f(x)=0. Instructor: Nam Sun Wang nonlinermc Fin solution root to nonliner lgebric eqution ()= Instructor: Nm Sun Wng Bckgroun In science n engineering, we oten encounter lgebric equtions where we wnt to in root(s) tht stisies given eqution

More information

8Similarity UNCORRECTED PAGE PROOFS. 8.1 Kick off with CAS 8.2 Similar objects 8.3 Linear scale factors. 8.4 Area and volume scale factors 8.

8Similarity UNCORRECTED PAGE PROOFS. 8.1 Kick off with CAS 8.2 Similar objects 8.3 Linear scale factors. 8.4 Area and volume scale factors 8. 8.1 Kick off with S 8. Similr ojects 8. Liner scle fctors 8Similrity 8. re nd volume scle fctors 8. Review U N O R R E TE D P G E PR O O FS 8.1 Kick off with S Plese refer to the Resources t in the Prelims

More information

Forces on curved surfaces Buoyant force Stability of floating and submerged bodies

Forces on curved surfaces Buoyant force Stability of floating and submerged bodies Stti Surfe ores Stti Surfe ores 8m wter hinge? 4 m ores on plne res ores on urved surfes Buont fore Stbilit of floting nd submerged bodies ores on Plne res Two tpes of problems Horizontl surfes (pressure

More information

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx

for all x in [a,b], then the area of the region bounded by the graphs of f and g and the vertical lines x = a and x = b is b [ ( ) ( )] A= f x g x dx Applitions of Integrtion Are of Region Between Two Curves Ojetive: Fin the re of region etween two urves using integrtion. Fin the re of region etween interseting urves using integrtion. Desrie integrtion

More information

Homework 2 solutions

Homework 2 solutions Sectio 2.1: Ex 1,3,6,11; AP 1 Sectio 2.2: Ex 3,4,9,12,14 Homework 2 solutios 1. Determie i ech uctio hs uique ixed poit o the speciied itervl. gx = 1 x 2 /4 o [0,1]. g x = -x/2, so g is cotiuous d decresig

More information

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power

CS S-12 Turing Machine Modifications 1. When we added a stack to NFA to get a PDA, we increased computational power CS411-2015S-12 Turing Mchine Modifictions 1 12-0: Extending Turing Mchines When we dded stck to NFA to get PDA, we incresed computtionl power Cn we do the sme thing for Turing Mchines? Tht is, cn we dd

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

More information

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1. Mth Anlysis CP WS 4.X- Section 4.-4.4 Review Complete ech question without the use of grphing clcultor.. Compre the mening of the words: roots, zeros nd fctors.. Determine whether - is root of 0. Show

More information

Boolean Algebra cont. The digital abstraction

Boolean Algebra cont. The digital abstraction Boolen Alger ont The igitl strtion Theorem: Asorption Lw For every pir o elements B. + =. ( + ) = Proo: () Ientity Distriutivity Commuttivity Theorem: For ny B + = Ientity () ulity. Theorem: Assoitive

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

MAT 403 NOTES 4. f + f =

MAT 403 NOTES 4. f + f = MAT 403 NOTES 4 1. Fundmentl Theorem o Clulus We will proo more generl version o the FTC thn the textook. But just like the textook, we strt with the ollowing proposition. Let R[, ] e the set o Riemnn

More information

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

Area and Perimeter. Area and Perimeter. Solutions. Curriculum Ready.

Area and Perimeter. Area and Perimeter. Solutions. Curriculum Ready. Are n Perimeter Are n Perimeter Solutions Curriulum Rey www.mthletis.om How oes it work? Solutions Are n Perimeter Pge questions Are using unit squres Are = whole squres Are = 6 whole squres = units =

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Chapter Gauss Quadrature Rule of Integration

Chapter Gauss Quadrature Rule of Integration Chpter 7. Guss Qudrture Rule o Integrtion Ater reding this hpter, you should e le to:. derive the Guss qudrture method or integrtion nd e le to use it to solve prolems, nd. use Guss qudrture method to

More information

Graph Algorithms. Vertex set = { a,b,c,d } Edge set = { {a,c}, {b,c}, {c,d}, {b,d}} Figure 1: An example for a simple graph

Graph Algorithms. Vertex set = { a,b,c,d } Edge set = { {a,c}, {b,c}, {c,d}, {b,d}} Figure 1: An example for a simple graph Inin Institute of Informtion Tehnology Design n Mnufturing, Knheepurm, Chenni 00, Ini An Autonomous Institute uner MHRD, Govt of Ini http://www.iiitm..in COM 0T Design n Anlysis of Algorithms -Leture Notes

More information

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim's Alorithm Introution Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #33 3 Alorithm Gnrl Constrution Mik Joson (Univrsity o Clry)

More information

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information