📗 Enter your ID (the wisc email ID without @wisc.edu) here: and click (or hit enter key) 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25m22
📗 If the questions are not generated correctly, try refresh the page using the button at the top left corner.
📗 The same ID should generate the same set of questions. Your answers are not saved when you close the browser. You could print the page: , solve the problems, then enter all your answers at the end.
📗 Please do not refresh the page: your answers will not be saved.
📗 [4 points] Imagine a world where each person has friends. Alice and Bob are \(d\) = "friendship links" away (i.e. if \(d\) = 1, Alice and Bob are friends; if \(d\) = 2, there is a third person X such that Alice and X are friends, and Bob and X are friends; and so on). Imagine a algorithm that has access to the friendship links. The algorithm starts at Alice and the goal is to find Bob. In the worst case, how many people the algorithm needs to visit (including Alice and Bob)?
📗 Answer: .
📗 [2 points] A search tree has levels (the root is at level 0, a tree with only the root has 0 levels), and every internal node has children. Suppose there is no goal node. How many goal checks (we perform a goal check every time we expand a node) will depth first search perform? Include the initial node (the root).
📗 Answer: .
📗 [4 points] Imagine a world where each person has friends. Alice and Bob are \(d\) = "friendship links" away (i.e. if \(d\) = 1, Alice and Bob are friends; if \(d\) = 2, there is a third person X such that Alice and X are friends, and Bob and X are friends; and so on). Imagine a breadth first search (BFS) algorithm that has access to the friendship links. The algorithm starts at Alice and the goal is to find Bob. In the worst case, how many people (the same person visited multiple times are counted as multiple visits) the algorithm needs to visit (including Alice and Bob)?
📗 Answer: .
📗 [1 points] people with one flashlight (torch) want to go across a river. The bridge can hold two people at a time, and they must cross with the flashlight. The time it takes for each person to cross the river:
A
B
C
D
What is the minimum total time required for everyone to cross the river?
📗 Answer: .
📗 [3 points] Consider Depth First Search on a tree, where the nodes are denoted by numbers. Write down the sequence depth first search visited in the order they are expanded (i.e. expansion path). \(0\) is the initial state and is the goal state.
📗 Note: use the convention used in the lectures, push the rightmost successor into the stack first (i.e. expand the leftmost successor first).
📗 Answer (comma separated vector): .
📗 [3 points] Consider Iterative Deepening Search on a tree, where the nodes are denoted by numbers. Write down the sequence IDS visited in the order they are expanded (i.e. expansion path). 0 is the initial state and is the goal state. Start with depth limit 0, include the root, and include repeated nodes.
📗 Note: use the convention used in the lectures, push the rightmost successor into the stack first (i.e. expand the leftmost successor first).
📗 Answer (comma separated vector): .
📗 [3 points] Consider Iterative Deepening Search on a tree, where the nodes are denoted by numbers. Write down the sequence IDS visited in the order they are expanded (i.e. expansion path). 0 is the initial state and is the goal state. Start with depth limit 0, include the root, and include repeated nodes.
📗 Note: use the convention used in the lectures, push the rightmost (in the diagram) successor into the stack first or enqueue the leftmost (in the diagram) successor into the queue first.
📗 Answer (comma separated vector): .
📗 [3 points] Let the search space be integers. Each state \(n\) has successors . Write down the shortest path (i.e. the sequence of states) from the initial state 1 to the goal state .
📗 Answer (comma separated vector): .
📗 [4 points] Suppose the states are integers between and . The initial state is , and the goal state is . The successors of a state \(i\) are \(2 i\) and \(2 i + 1\), if exist. How many states are expanded using a Breadth First Search? Include both the initial and goal states.
📗 Note: use the convention used in the lectures, enqueue the states with smaller index into the queue first.
📗 Answer: .
📗 [4 points] Suppose the states are integers between and . The initial state is , and the goal state is . The successors of a state \(i\) are \(2 i\) and \(2 i + 1\), if exist. How many states are expanded using a Depth First Search? Include both the initial and goal states.
📗 Note: use the convention used in the lectures, push the states with larger index into the stack first (i.e. expand the states with the smaller index first).
📗 Answer: .
📗 [4 points] Suppose the states are integers between and . The initial state is , and the goal state is . The successors of a state \(i\) are \(2 i\) and \(2 i + 1\), if exist. How many states are expanded using a ? Include both the initial and goal states.
📗 Note: use the convention used in the lectures, push the states with larger index into the stack first (i.e. expand the states with the smaller index first).
📗 Answer: .
📗 [4 points] Suppose the states are integers between and . The initial state is , and the goal state is . The successors of a state \(i\) are \(2 i\) and \(2 i + 1\), if exist. How many states are expanded using a ? Include both the initial and goal states.
📗 Note: use the convention used in the lectures, push the states with larger index into the stack first (i.e. expand the states with the smaller index first).
📗 Answer: .
📗 [2 points] Consider a 3-puzzle where, like in the usual 8-puzzle game, a tile can only move to an adjacent empty space. Tiles cannot move diagonally. Which of the following initial states can reach the goal state (0 means "no tile")?
📗 You could save the text in the above text box to a file using the button or copy and paste it into a file yourself .
📗 You could load your answers from the text (or txt file) in the text box below using the button . The first two lines should be "##m: 22" and "##id: your id", and the format of the remaining lines should be "##1: your answer to question 1" newline "##2: your answer to question 2", etc. Please make sure that your answers are loaded correctly before submitting them.
📗 You can find videos going through the questions on Link.