State-Based Models: MDPs & Games
- 30Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
What is the primary output of a search problem?
What is the primary output of a search problem?
30 questions
- 1
What is the primary output of a search problem?
- A
A set of all possible actions
- B
A sequence of actions
- C
A single action label
- D
A probability distribution over actions
Correct answer
BA sequence of actions
Explanation
Search problems output a sequence of actions (a plan) to achieve a goal, unlike reflex-based models that output a single label.
- A
- 2
Which of the following best describes the key difference between reflex-based models and search-based models?
- A
Reflex models output sequences of actions, search models output single actions
- B
Reflex models consider future consequences, search models do not
- C
Search models consider future consequences of actions, reflex models do not
- D
Search models use gradient descent, reflex models use tree search
Correct answer
CSearch models consider future consequences of actions, reflex models do not
Explanation
In search problems, the output action influences future states, requiring consideration of future consequences. Reflex models map input directly to output without considering future effects.
- A
- 3
Which of the following is NOT a standard component of a search problem?
- A
Learning rate
- B
Cost function
- C
Start state
- D
Actions function
Correct answer
ALearning rate
Explanation
Search problems are defined by start state, actions(s), cost(s,a), successor(s,a), and IsEnd(s). Learning rate is used in learning algorithms, not in search problem definition.
- A
- 4
In the farmer, cabbage, goat, and wolf river crossing problem, what is the cost of each crossing?
- A
Variable depending on items carried
- B
1
- C
0
- D
2
Correct answer
B1
Explanation
The lecture states that every crossing takes a cost of one.
- A
- 5
In the tram problem, what are the two possible actions from state s?
- A
Walk to s+2 (cost 1) or take tram to s+1 (cost 2)
- B
Walk to s-1 (cost 1) or take tram to s/2 (cost 2)
- C
Walk to s+1 (cost 1) or take tram to 2s (cost 2)
- D
Walk to s+1 (cost 2) or take tram to 2s (cost 1)
Correct answer
CWalk to s+1 (cost 1) or take tram to 2s (cost 2)
Explanation
From the lecture: walking goes to s+1 costing 1 minute, tram goes to 2s costing 2 minutes.
- A
- 6
In the tram problem, what is the start state?
- A
It depends on N
- B
1
- C
N
- D
0
Correct answer
B1
Explanation
The start state is block 1, as defined in the lecture.
- A
- 7
What is the time complexity of backtracking search in the worst case?
- A
O(n)
- B
O(b⋅d)
- C
O(d)
- D
O(bd)
Correct answer
DO(bd)
Explanation
Backtracking search explores the entire tree, so time is O(bd) where b is branching factor and d is depth.
- A
- 8
What is the space complexity of backtracking search?
- A
O(bd)
- B
O(b⋅d)
- C
O(n)
- D
O(d)
Correct answer
DO(d)
Explanation
Backtracking search only needs to store the path from root to current node, so space is O(d).
- A
- 9
Under what condition does depth-first search (DFS) stop and return a solution?
- A
When it has explored all nodes at the current depth
- B
When it finds the lowest-cost solution
- C
When it finds any solution
- D
When it has explored all nodes
Correct answer
CWhen it finds any solution
Explanation
DFS stops as soon as it finds a solution because all action costs are zero, so the first solution found is optimal.
- A
- 10
What restriction does depth-first search impose on the cost function?
- A
Costs must be non-negative
- B
Costs must be positive constants
- C
Costs can be any real number
- D
Costs must be zero
Correct answer
DCosts must be zero
Explanation
DFS requires costs to be zero so that the first solution found is optimal (all solutions have equal cost).
- A
- 11
In the worst case, DFS has the same time complexity as backtracking search. What is the reason?
- A
DFS always explores the entire tree even after finding a solution
- B
DFS may need to explore the entire tree if no solution exists early
- C
DFS explores all nodes regardless of solution
- D
DFS has a branching factor of 1
Correct answer
BDFS may need to explore the entire tree if no solution exists early
Explanation
In the worst case, DFS may traverse the entire tree before finding a solution, leading to O(bd) time.
- A
- 12
What is the key advantage of breadth-first search (BFS) over DFS when costs are constant?
- A
BFS has lower space complexity
- B
BFS can handle negative costs
- C
BFS finds the shallowest solution first
- D
BFS does not require storing history
Correct answer
CBFS finds the shallowest solution first
Explanation
BFS explores layer by layer, so it finds the shallowest solution (which has smallest depth) first, which is optimal when costs are constant.
- A
- 13
What is the space complexity of breadth-first search?
- A
O(n)
- B
O(d)
- C
O(b⋅d)
- D
O(bd)
Correct answer
DO(bd)
Explanation
BFS must store all nodes at the current level to expand later, so space is O(bd) in the worst case.
- A
- 14
What is the time complexity of breadth-first search when the solution is at depth d?
- A
O(d)
- B
O(bD) where D is the maximum depth
- C
O(b⋅d)
- D
O(bd)
Correct answer
DO(bd)
Explanation
BFS explores up to depth d, so time is O(bd) where d is the solution depth.
- A
- 15
What restriction does BFS impose on costs?
- A
Costs can be any real number
- B
Costs must be positive constants
- C
Costs must be non-negative
- D
Costs must be zero
Correct answer
BCosts must be positive constants
Explanation
BFS requires all edge costs to be the same positive constant so that the shallowest solution is also the lowest-cost solution.
- A
- 16
How does DFS iterative deepening combine the advantages of BFS and DFS?
- A
It alternates between BFS and DFS at each level
- B
It uses BFS to find the solution depth, then runs DFS
- C
It runs DFS repeatedly with increasing depth limits, stopping when a solution is found
- D
It uses a priority queue to order nodes by depth
Correct answer
CIt runs DFS repeatedly with increasing depth limits, stopping when a solution is found
Explanation
Iterative deepening runs DFS up to a depth limit, increments the limit, and repeats until a solution is found, giving BFS-like optimality with DFS-like space.
- A
- 17
What is the space complexity of DFS iterative deepening?
- A
O(d)
- B
O(b⋅d)
- C
O(n)
- D
O(bd)
Correct answer
AO(d)
Explanation
Each DFS run uses space O(d) (depth of current limit), so overall space is O(d).
- A
- 18
What is the time complexity of DFS iterative deepening when the solution is at depth d?
- A
O(bd)
- B
O(bd) but typically much better than BFS
- C
O(bd) ignoring constant factors
- D
O(d⋅bd)
Correct answer
CO(bd) ignoring constant factors
Explanation
The time is O(bd) because the last DFS dominates, and the extra factor of d is usually negligible compared to exponential.
- A
- 19
What assumption does dynamic programming make about the graph of states?
- A
The branching factor must be constant
- B
It must be acyclic
- C
It must be fully connected
- D
Costs must be positive
Correct answer
BIt must be acyclic
Explanation
Dynamic programming requires an acyclic graph to compute future costs in a topological order. Cycles would prevent deterministic ordering.
- A
- 20
In dynamic programming, what is the recurrence for future cost of state s?
- A
f(s)=0 for all states
- B
f(s)=mina[cost(s,a)+f(succ(s,a))]
- C
f(s)=cost(s,a)+f(succ(s,a)) for the first action
- D
f(s)=maxa[cost(s,a)+f(succ(s,a))]
Correct answer
Bf(s)=mina[cost(s,a)+f(succ(s,a))]
Explanation
The future cost is the minimum over actions of the cost of the action plus the future cost of the resulting state, with base case 0 at end states.
- A
- 21
How does dynamic programming achieve polynomial time?
- A
By exploring the tree in breadth-first order
- B
By assuming all costs are zero
- C
By using a heuristic to prune branches
- D
By using memoization to avoid recomputation of future costs for repeated states
Correct answer
DBy using memoization to avoid recomputation of future costs for repeated states
Explanation
Dynamic programming caches the future cost for each state, so each state's value is computed only once, reducing exponential time to polynomial in number of states.
- A
- 22
What is the key requirement for dynamic programming to work?
- A
The branching factor must be at most 2
- B
All costs must be integer
- C
The state must be a sufficient statistic for optimal future decisions
- D
The graph must be a tree
Correct answer
CThe state must be a sufficient statistic for optimal future decisions
Explanation
Dynamic programming relies on the property that future cost depends only on the current state, so the state must summarize all past information needed for optimal decisions.
- A
- 23
In the route finding problem with constraint 'no three odd cities in a row', what is a minimal state representation?
- A
Current city and previous city
- B
Current city only
- C
Current city and a flag indicating whether the previous city was odd
- D
Current city and the count of odd cities visited so far
Correct answer
CCurrent city and a flag indicating whether the previous city was odd
Explanation
Only the parity of the previous city is needed (odd/even) because the constraint cares about consecutive odds. A flag suffices, reducing state space to 2n instead of n^2.
- A
- 24
What is the minimal state representation for the problem 'visit at least three odd cities' while moving forward?
- A
Current city and previous city
- B
Current city and min(number of odd cities, 3)
- C
Current city and total number of odd cities visited
- D
Current city only
Correct answer
BCurrent city and min(number of odd cities, 3)
Explanation
Only counts up to 3 matter (once you have 3, more don't change anything). So state = (current city, min(oddCount,3)) reduces space to O(3n).
- A
- 25
What is the size of the state space when using (current city, previous parity) for n cities?
- A
n
- B
2n
- C
n2
- D
2n
Correct answer
B2n
Explanation
Current city has n possibilities, previous parity (odd/even) has 2, so total 2n states.
- A
- 26
In uniform cost search, what are the three sets maintained?
- A
Explored, Frontier, Unexplored
- B
Seen, Expanded, Todo
- C
Visited, Processed, Remaining
- D
Open, Closed, Waiting
Correct answer
AExplored, Frontier, Unexplored
Explanation
Uniform cost search uses explored (optimal path known), frontier (seen but not finalized), and unexplored (not yet seen).
- A
- 27
What assumption does uniform cost search make about edge costs?
- A
Costs must be positive integers
- B
Costs must be non-negative
- C
Costs must be constant
- D
Costs must be zero
Correct answer
BCosts must be non-negative
Explanation
Uniform cost search (like Dijkstra's) requires non-negative costs to guarantee optimality when expanding states in order of increasing past cost.
- A
- 28
In uniform cost search, when is a state moved from frontier to explored?
- A
When it is the state with the smallest past cost in the frontier
- B
When it has no successors
- C
When it is first discovered
- D
When all its successors have been explored
Correct answer
AWhen it is the state with the smallest past cost in the frontier
Explanation
The state with the smallest past cost is popped from the frontier and moved to explored, as its optimal path is now known.
- A
- 29
What happens in uniform cost search when a better path to a frontier state is found?
- A
The state's past cost is updated and its entry remains in frontier
- B
The state is immediately moved to explored
- C
The state is moved back to unexplored
- D
The better path is ignored
Correct answer
AThe state's past cost is updated and its entry remains in frontier
Explanation
If a better cost is found for a state already in the frontier, its past cost is updated (the entry is replaced or updated in the priority queue).
- A
- 30
In uniform cost search, what is the initial content of the frontier?
- A
The start state with cost 0
- B
Empty
- C
The start state with cost infinity
- D
All states with infinite cost
Correct answer
AThe start state with cost 0
Explanation
The start state is placed in the frontier with past cost 0, as it requires no cost to reach itself.
- A

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