1. Home
  2. Explore
  3. Computer Science
  4. Search Algorithms Lecture

Study methods

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

Search Algorithms Lecture

  • 26Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Search Algorithm Review
In the city block problem, depth-first search cannot be used because the edge costs are not
.

26 questions

  1. 1
    In the city block problem, depth-first search cannot be used because the edge costs are not
    _____
    .
    Hint

    Depth-first search requires a specific cost value for all edges to allow stopping early.

    Answer

    0

  2. 2
    Breadth-first search requires that all edge costs are
    _____
    .
    Hint

    BFS works by exploring level by level; what property must costs share to make that optimal?

    Answer

    equal

  3. 3
    In the city block problem, dynamic programming can be used even with cycles by extending the state to include both the city and the
    _____
    .
    Hint

    You need to break the cycle by tracking something extra about your movement.

    Answer

    direction

  4. 4
    A state is defined as a summary of all past actions that are
    _____
    for choosing future actions optimally.
    Hint

    The state should contain all necessary information to make optimal decisions without needing the full history.

    Answer

    sufficient

  5. 5
    In uniform cost search, the data structure used for the frontier is a
    _____
    .
    Hint

    You need to efficiently extract the state with the smallest past cost.

    Answer

    priority queue

  6. 6
    In uniform cost search, when a state is popped from the frontier, it is moved to the
    _____
    set.
    Hint

    This set contains states whose optimal cost has been determined.

    Answer

    explored

  7. 7
    The runtime of uniform cost search is O(nlog⁡n)O(n \log n)O(nlogn), where nnn is the number of
    _____
    states.
    Hint

    The complexity depends on the states that have been processed, not all possible states.

    Answer

    explored

  8. 8
    The main difference between uniform cost search and Dijkstra's algorithm is that UCS stops when it reaches the
    _____
    state.
    Hint

    Dijkstra's algorithm continues until all states are explored.

    Answer

    goal

  9. 9
    The correctness theorem for uniform cost search states that when a state is popped from the frontier, its priority equals the
    _____
    cost to that state.
    Hint

    The priority is the past cost, and it is guaranteed to be the best possible.

    Answer

    minimum

  10. 10
    Dynamic programming has complexity O(n)O(n)O(n), while uniform cost search has complexity O(nlog⁡n)O(n \log n)O(nlogn), but DP cannot handle
    _____
    .
    Hint

    UCS can handle cycles, but DP requires a certain graph structure.

    Answer

    cycles

  11. 11
    Uniform cost search requires costs to be
    _____
    to guarantee correctness.
    Hint

    If costs could be negative, the algorithm might fail.

    Answer

    non-negative

  12. 12
    In learning, the inverse of search is: given an optimal sequence of actions, find the
    _____
    .
    Hint

    Search finds actions from costs; learning does the opposite.

    Answer

    costs

  13. 13
    In the structured perceptron algorithm, weights are updated by subtracting 1 for each action in the true path and adding 1 for each action in the
    _____
    path.
    Hint

    The update rule tries to make the true path cheaper and the predicted path more expensive.

    Answer

    predicted

  14. 14
    In the structured perceptron, if the true path consists only of walks and the predicted path includes a tram, the weight of tram will be
    _____
    .
    Hint

    The algorithm penalizes actions that appear in the prediction but not in the truth.

    Answer

    increased

  15. 15
    In the more general form of structured perceptron, weights are updated by subtracting the
    _____
    of the true path and adding the features of the predicted path.
    Hint

    Instead of just counting actions, you use feature vectors.

    Answer

    features

  16. 16
    A* search orders states by past cost plus
    _____
    .
    Hint

    This additional term estimates the remaining cost to the goal.

    Answer

    heuristic

  17. 17
    A* is equivalent to uniform cost search applied to a transformed graph where the edge costs are modified by subtracting the heuristic of the current state and adding the heuristic of the
    _____
    .
    Hint

    The transformation involves the heuristic values of two consecutive states.

    Answer

    successor

  18. 18
    A consistent heuristic must satisfy h(s)≤c(s,a)+h(s′)h(s) \leq c(s,a) + h(s')h(s)≤c(s,a)+h(s′) and $h(\text{goal}) =
    _____
    $.
    Hint

    The heuristic at the goal should be exactly the future cost, which is zero.

    Answer

    0

  19. 19
    If a heuristic is consistent, then A* is
    _____
    and returns the optimal solution.
    Hint

    This property ensures that the transformed costs are non-negative and that the algorithm finds the optimal path.

    Answer

    correct

  20. 20
    A* is more efficient than uniform cost search because it explores states with past cost less than past cost of goal minus
    _____
    .
    Hint

    The heuristic allows A* to prune states that are not promising.

    Answer

    heuristic

  21. 21
    An admissible heuristic satisfies h(s)≤h(s) \leqh(s)≤
    _____
    .
    Hint

    It should never overestimate the true remaining cost.

    Answer

    futurecost(s)

  22. 22
    Consistency implies
    _____
    .
    Hint

    One property can be derived from the other.

    Answer

    admissibility

  23. 23
    A common method to design heuristics is to
    _____
    the problem by removing constraints.
    Hint

    Make the problem easier to solve, and use its solution as a heuristic.

    Answer

    relax

  24. 24
    For a grid navigation problem with walls, one relaxation is to remove walls and use
    _____
    distance as a heuristic.
    Hint

    This is the straight-line distance along grid lines.

    Answer

    Manhattan

  25. 25
    For the tram problem with the constraint that more trams than walks are not allowed, a relaxation is to remove that constraint, resulting in a problem with only
    _____
    state.
    Hint

    The constraint involved a counter; removing it simplifies the state space.

    Answer

    location

  26. 26
    For the 8-puzzle, a relaxation is to allow tiles to
    _____
    each other, making each tile independent.
    Hint

    This removes the constraint that tiles cannot occupy the same space.

    Answer

    overlap

1 of 26
Question 1 of 26

Ask anything

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

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent