1. Home
  2. Explore
  3. Computer Science
  4. Search Algorithms and Intuition

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Search Algorithms and Intuition

  • 51Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Search Foundations

What does the British Museum approach do when searching for a path?

51 questions

  1. 1

    What does the British Museum approach do when searching for a path?

    Model answer

    It finds every possible path rather than stopping after finding one.

    Explanation

    Because it must enumerate all paths, cleverness cannot avoid the work of finding them all.

  2. 2

    Why does the lecture emphasize that search is about choice rather than maps?

    Model answer

    Maps are only an illustration; search concerns the choices made while exploring possibilities or making decisions.

    Explanation

    The same kinds of choices can arise when exploring things other than maps, including problems in humanities.

  3. 3

    When constructing a search tree for a quiz, what convention is used to order a node’s children?

    Model answer

    List the children in lexical, or alphabetical, order.

    Explanation

    Lexical ordering provides an orderly and consistent way to develop the search tree.

  4. 4

    What restriction prevents a path from “biting its own tail”?

    Model answer

    A path cannot revisit a place that is already on that path.

    Explanation

    For example, once a path has reached a node, it cannot return to that node later in the same path.

  5. 5

    How did the lecture contrast a thief’s route, a beginner’s route, and a physics Ph.D.’s route?

    Model answer

    The thief’s route was poor, the beginner found a reasonably good but nonoptimal route, and the physics Ph.D. found an optimal route.

    Explanation

    The comparison illustrated that different search approaches can produce paths of different quality.

  6. 6

    Why did the lecture set aside explaining how people find paths visually?

    Model answer

    The visual system can help people find good paths, but the lecture said its contribution to problem solving was not yet understood well enough to explain.

    Explanation

    A complete theory of human intelligence would need to account for visual problem solving, but the lecture focused on methods that were understood.

  7. 7

    Why might a computer program need a different way to find a path from the one a person uses by sight?

    Model answer

    The programs discussed do not have eyes or visually grounded algorithms, so they must search using other procedures.

    Explanation

    People may quickly perceive a good route, whereas the programs systematically explore choices.

  8. 8

    How does Depth-first Search choose which branch to explore first in the illustrated example?

    Model answer

    It follows one branch as far as it can, using the left branch first under the stated ordering convention.

    Explanation

    Depth-first Search makes a single-minded plunge down the tree before considering alternatives.

  9. 9

    What does Depth-first Search do when it reaches a dead end and backtracking is enabled?

    Model answer

    It returns to the most recent point where a choice was made and tries another branch.

    Explanation

    This process is called backing up or backtracking; in the example, the search returned to the choice between branches and tried the other one.

  10. 10

    Is backtracking necessarily part of Depth-first Search?

    Model answer

    No. The lecture treats backtracking as an optional addition and says a problem should specify whether to use it.

    Explanation

    Textbooks may present Depth-first Search with or without backtracking, although backtracking is useful when a search may otherwise miss the goal.

  11. 11

    Why is backtracking not useful for the British Museum approach?

    Model answer

    The British Museum approach must find every possible path, so finding one path is not a reason to backtrack or stop.

    Explanation

    Backtracking is useful when exploring alternatives to find a route, but the British Museum approach already requires complete enumeration.

  12. 12

    How does Breadth-first Search organize its exploration?

    Model answer

    It explores the search tree level by level, scanning paths at one depth before moving to the next.

    Explanation

    In the example, the search continued to the next level when no goal appeared at the current one.

  13. 13

    What kind of path does Breadth-first Search find first in the unweighted illustrated search?

    Model answer

    It finds a path with the fewest steps, because it reaches goals at the shallowest level first.

    Explanation

    The lecture’s middle-start example produced a shorter path when the goal was nearby, though the search still explored irrelevant areas.

  14. 14

    Why can Breadth-first Search spend time exploring in an apparently unhelpful direction?

    Model answer

    It follows levels of the tree without judging whether a node is closer to the goal.

    Explanation

    In the illustrated example, it explored far to the left even though a person using sight would not have chosen that direction.

  15. 15

    Does Breadth-first Search use backtracking in the lecture’s comparison of search options?

    Model answer

    No. Backtracking is not used with Breadth-first Search in that comparison.

    Explanation

    The lecture says backtracking cannot help Breadth-first Search, which proceeds level by level.

  16. 16

    What is the basic role of a queue in the search algorithm described?

    Model answer

    The queue stores paths that are under consideration; the algorithm removes a path, checks it, extends it if needed, and adds the resulting paths back to the queue.

    Explanation

    The search repeatedly processes a path from the queue and tests whether it has reached the goal.

  17. 17

    How does the queue placement of newly extended paths produce Depth-first Search?

    Model answer

    Place the newly generated paths at the front of the queue so the search pursues them before older alternatives.

    Explanation

    Putting the extensions at the front makes the search continue down the branch it has just begun exploring.

  18. 18

    How does the queue placement of newly extended paths produce Breadth-first Search?

    Model answer

    Place the newly generated paths at the back of the queue.

    Explanation

    Older paths are then processed before the newly generated ones, producing level-by-level exploration.

  19. 19

    What key change is needed to switch the basic queue algorithm from Depth-first Search to Breadth-first Search?

    Model answer

    Change where extended paths are added: use the front for Depth-first Search and the back for Breadth-first Search.

    Explanation

    The lecture presents the two searches as using the same basic algorithm with a change to one queue operation.

  20. 20

    What does the search algorithm do after removing a path from the queue if that path is not a winner?

    Model answer

    It extends the path, adds the resulting paths to the queue according to the search method, and continues.

    Explanation

    If the path cannot be extended, the queue simply becomes shorter; otherwise, its extensions are considered later.

  21. 21

    What inefficiency occurs when the search extends paths that end at nodes already extended before?

    Model answer

    It repeats work by exploring the same node again through another path.

    Explanation

    The lecture identifies such repeated extensions as wasteful, as the node has already been expanded.

  22. 22

    How does the extended-node list reduce repeated work?

    Model answer

    Keep track of nodes that have already been the final node of an extended path, and do not extend a later path ending at one of those nodes.

    Explanation

    The filter prevents the search from expanding the same final node repeatedly.

  23. 23

    Which search methods can benefit from the extended-node list, and does it help the British Museum approach?

    Model answer

    It can help Depth-first and Breadth-first Search, but not the British Museum approach.

    Explanation

    The lecture says the list avoids redundant expansions in Depth-first and Breadth-first Search, while nothing can save the British Museum method from enumerating everything.

  24. 24

    Why might the extended-node list make no difference to a particular Hill Climbing run?

    Model answer

    If the search moves directly toward the goal without revisiting an already extended node, the list filters out nothing.

    Explanation

    In the lecture’s example, Hill Climbing was already driving directly toward the goal, so the extension list did not reduce the number of enqueues.

  25. 25

    What makes a search informed?

    Model answer

    It uses heuristic information, such as an estimate of how close a node is to the goal, to guide its choices.

    Explanation

    The lecture classifies the British Museum, Depth-first, and Breadth-first methods as uninformed, while Hill Climbing uses distance information.

  26. 26

    How does Hill Climbing differ from Depth-first Search in choosing among branches?

    Model answer

    Like Depth-first Search, it pursues one branch, but it chooses the branch whose node appears closest to the goal rather than relying on lexical order.

    Explanation

    Heuristic distance information determines the preferred branch, with lexical order available to break ties.

  27. 27

    When two choices in Hill Climbing appear equally close to the goal, how does the illustrated procedure break the tie?

    Model answer

    It uses lexical order.

    Explanation

    The lecture first orders children lexically and uses that convention when their estimated distances are equal.

  28. 28

    Why can a distance heuristic make a search more efficient?

    Model answer

    It can direct the search toward choices that appear closer to the goal, reducing exploration of less promising paths.

    Explanation

    In the illustrated comparison, Hill Climbing produced a more direct path and fewer enqueues than the corresponding Depth-first search.

  29. 29

    Does Hill Climbing always find the optimal path?

    Model answer

    No. It can find a nonoptimal path even when it avoids backtracking in a particular example.

    Explanation

    The lecture distinguishes finding a direct or pretty good route from guaranteeing the best route.

  30. 30

    How does Beam Search combine Breadth-first Search with a heuristic?

    Model answer

    It proceeds level by level like Breadth-first Search but keeps only a fixed number of the most promising paths at each level.

    Explanation

    The number retained is the beam width, and the paths are selected according to which are closest to the goal.

  31. 31

    What does a beam width of two mean in Beam Search?

    Model answer

    At each level, the search keeps only the two paths judged best by the heuristic.

    Explanation

    The lecture’s example trims the other paths after comparing their estimated distances to the goal.

  32. 32

    How are newly generated paths arranged for Hill Climbing in the queue-based implementation?

    Model answer

    They are placed at the front and sorted by heuristic value, with the most promising path first.

    Explanation

    This is described as putting the paths at the front in sorted order.

  33. 33

    How are paths managed in the queue-based description of Beam Search?

    Model answer

    Keep the www best paths, where www is the beam width.

    Explanation

    Because the search discards all but the best fixed number of paths, their location in the queue is not the defining feature.

  34. 34

    What is Best-first Search, as described in the lecture?

    Model answer

    It repeatedly works on whichever leaf node in the search tree is closest to the goal.

    Explanation

    Unlike a search that stays on one branch, Best-first Search may switch among paths as their promise changes.

  35. 35

    How can Best-first Search move differently from a search that follows one path deeply?

    Model answer

    It can skip between different parts of the search tree, choosing the most promising leaf even if it lies on another path.

    Explanation

    The lecture relates this behavior to an integration program that works on the easiest remaining problem in an AND/OR tree.

  36. 36

    How might continuous-space Hill Climbing choose its next move when searching for a higher point?

    Model answer

    It can test nearby directions, such as north, east, west, and south, and move in the direction that appears to increase elevation the most.

    Explanation

    The procedure repeats this local comparison at each new position.

  37. 37

    What is a local maximum, and why can it cause trouble for Hill Climbing?

    Model answer

    A local maximum is a point higher than its nearby alternatives but not necessarily the highest point overall; Hill Climbing can stop there instead of reaching the global maximum.

    Explanation

    The method follows locally improving moves, so a locally best point can trap it.

  38. 38

    What is the telephone-pole, or flat-area, problem for Hill Climbing?

    Model answer

    On a flat region, nearby moves provide no clear direction of improvement, so the search cannot determine which way leads uphill.

    Explanation

    The lecture uses broad, flat shoulders on a mountain as an example where testing nearby directions does not guide a climber toward the summit.

  39. 39

    How can a narrow ridge cause Hill Climbing to mistakenly conclude that it has reached the top?

    Model answer

    If every tested direction moves off the ridge and appears to descend, the algorithm may conclude it is at a peak even though the ridge continues upward.

    Explanation

    The lecture illustrates this with a sharp bridge along a diagonal: moving north, south, east, or west appears to go downhill.

  40. 40

    Why is the ridge problem especially relevant in high-dimensional spaces?

    Model answer

    A narrow ridge may not align with the limited directions the algorithm tests, making all tested moves appear worse even when progress is possible along another direction.

    Explanation

    The lecture notes that the issue is particularly acute in high-dimensional spaces, although it demonstrates it with a two-dimensional contour map.

  41. 41

    What common limitation connects local maxima, flat areas, and narrow ridges?

    Model answer

    Each can prevent local comparisons from reliably identifying a path toward the global goal or optimum.

    Explanation

    Hill Climbing relies on nearby evaluations, which can be misleading or uninformative in these kinds of spaces.

  42. 42

    Why does the lecture suggest that search is relevant to human planning?

    Model answer

    Making a plan involves evaluating choices and considering how they might work.

    Explanation

    The lecture presents search as a useful model for at least some of the processes involved in human problem solving.

  43. 43

    What is an elaboration graph in the story-understanding system described?

    Model answer

    It is a graph the system builds from a story together with background and reflective-level knowledge.

    Explanation

    The system uses this graph to represent story information and to search for patterns and relationships.

  44. 44

    How can the Genesis system identify revenge in a story?

    Model answer

    It searches the elaboration graph for a pattern that matches its description of revenge.

    Explanation

    Explicit story information and inferences produced by if/then rules can instantiate enough of the graph for the pattern to be found.

  45. 45

    What does the Macbeth example illustrate about identifying higher-level concepts in a story?

    Model answer

    A system can search a story’s elaboration graph for patterns representing concepts such as revenge or a Pyrrhic victory.

    Explanation

    These concepts are not simply individual plot events; they are higher-level patterns found across the graph.

  46. 46

    What is a Pyrrhic victory in the Macbeth example?

    Model answer

    It is an apparent success that ultimately leads to a bad outcome: Macbeth becomes king but is eventually killed as a consequence.

    Explanation

    The example treats Macbeth’s attainment of kingship as a success that turns against him.

  47. 47

    How does the story system answer questions at the common-sense level?

    Model answer

    It looks locally at connections in the goal tree to find explanations for the event being asked about.

    Explanation

    The system uses those local relationships to produce answers such as why Macduff killed Macbeth.

  48. 48

    How does the story system answer questions at the reflective level?

    Model answer

    It reports higher-level thoughts found by searches and identifies which of those thoughts include the event in question.

    Explanation

    For instance, it can explain an event in terms of patterns such as revenge or a Pyrrhic victory.

  49. 49

    What is the role of common-sense knowledge in constructing the story system’s explanations?

    Model answer

    Common-sense knowledge supplies inferences, such as the rule that if someone is killed, they are dead, that can help elaborate the story graph.

    Explanation

    The system combines explicitly stated information with such if/then inferences when searching for higher-level patterns.

  50. 50

    How did the lecture describe the two ways of preparing stories for the system?

    Model answer

    People can rewrite a story in simplified language or annotate a more natural adult version so the system can process it.

    Explanation

    The lecture notes that making a story usable requires human effort in either simplifying it or adding annotations.

  51. 51

    How does the system produce its English answers from its internal results?

    Model answer

    It uses a language-generation system connected to a parser running in reverse to generate English.

    Explanation

    The lecture describes this connection as enabling the system to express answers based on its search results in English.

1 of 51
Question 1 of 51

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent