structures and strategies for space state search
TRANSCRIPT
![Page 1: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/1.jpg)
George F Luger
ARTIFICIAL INTELLIGENCE 6th edition
Structures and Strategies for Complex Problem Solving
Structures and Strategies For Space
State Search
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
3.0 Introduction
3.1 Graph Theory
3.2 Strategies for Space State Search
3.3 Using Space State to Represent
Reasoning with the Predicate
Calculus
3.4 Epilogue and References
3.5 Exercises
1
![Page 2: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/2.jpg)
Figure 3.1: The city of Königsberg.
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
2
![Page 3: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/3.jpg)
Figure 3.2: Graph of the Königsberg bridge system.
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
3
![Page 4: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/4.jpg)
Figure 3.3: A labeled directed graph.
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
4
![Page 5: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/5.jpg)
Figure 3.4: A rooted tree, exemplifying family relationships.
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
5
![Page 6: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/6.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
6
![Page 7: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/7.jpg)
Fig 3.5 (a) The finite state graph for a flip flop and
(b) its transition matrix.
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
7
![Page 8: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/8.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.6 (a) The finite state graph and (b) the transition
matrix for string recognition example
8
![Page 9: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/9.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
9
![Page 10: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/10.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.8 State space of the 8-puzzle generated by “move blank” operations
10
![Page 11: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/11.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.9 An instance of the travelling salesperson problem
11
![Page 12: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/12.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.10 Search for the travelling salesperson problem. Each arc is marked with
the total weight of all paths from the start node (A) to its endpoint.
12
![Page 13: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/13.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.11 An instance of the travelling salesperson problem with the nearest
neighbor path in bold. Note this path (A, E, D, B, C, A), at a cost of 550,
is not the shortest path. The comparatively high cost of arc (C, A)
defeated the heuristic.
13
![Page 14: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/14.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.12 State space in which goal-directed search effectively prunes
extraneous search paths.
14
![Page 15: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/15.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.13 State space in which data-directed search prunes irrelevant data and
their consequents and determines one of a number of possible goals.
15
![Page 16: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/16.jpg)
Function backtrack algorithm
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
16
![Page 17: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/17.jpg)
A trace of backtrack on the graph of figure 3.12
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
17
![Page 18: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/18.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.14 Backtracking search of a hypothetical state space space.
18
![Page 19: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/19.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.15 Graph for breadth - and depth - first search examples.
19
![Page 20: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/20.jpg)
Function breadth_first search algorithm
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
20
![Page 21: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/21.jpg)
A trace of breadth_first_search on the graph of Figure 3.13
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
21
![Page 22: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/22.jpg)
Fig 3.16 Graph of Fig 3.15 at iteration 6 of breadth-first search. States on
open and closed are highlighted.
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
22
![Page 23: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/23.jpg)
Function depth_first_search algorithm
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
23
![Page 24: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/24.jpg)
A trace of depth_first_search on the graph of Figure 3.13
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
24
![Page 25: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/25.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.17 Breadth-first search of the 8-puzzle, showing order in which states
were removed from open.
25
![Page 26: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/26.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.18 Graph of fig 3.15 at iteration 6 of depth-first search. States on
open and closed are highlighted.
26
![Page 27: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/27.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.19 Depth-first search of the 8-puzzle with a depth bound of 5.
27
![Page 28: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/28.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.20 State space graph of a set of implications in the propositional
calculus.
28
![Page 29: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/29.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.21 And/or graph of the expression q Λ r → p.
29
![Page 30: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/30.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
30
![Page 31: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/31.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.22 And/or graph of the expression q v r → p
31
![Page 32: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/32.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.23 And/or graph of a set of propositional calculus expressions.
32
![Page 33: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/33.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.24 And/or graph of part of the state space for integrating a function, from
Nilsson (1971).
33
![Page 34: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/34.jpg)
The facts and rules of this example are given as English sentences followed by
their predicate calculus equivalents:
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
34
![Page 35: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/35.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.25 The solution subgraph showing that Fred is at the museum.
35
![Page 36: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/36.jpg)
Five rules for a simple subset of English grammar are:
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
36
![Page 37: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/37.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.26 And/or graph searched by the financial advisor.
37
![Page 38: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/38.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.27 And/or graph for the grammar of Example 3.3.6. Some of the
nodes (np, art, etc) have been written more than once to simplify
drawing the graph.
38
![Page 39: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/39.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.28 Parse tree for the sentence “The dog bites the man.” Note this is a
subtree of the graph of fig 3.27.
39
![Page 40: Structures and Strategies For Space State Search](https://reader034.vdocuments.net/reader034/viewer/2022050500/627171bb3aabe10a9207b985/html5/thumbnails/40.jpg)
Luger: Artificial Intelligence, 6th edition. © Pearson Education Limited, 2009
Fig 3.29 A graph to be searched.
40