Question 1
Printed graph sheets were provided to me.
Printed graph sheets were not provided to me.
I did not use graph sheets.

The IIT Madras BS AI: Search Methods for Problem Solving (AI Search Methods) Quiz 1 paper sat on 7 Jul 2024, in the May 2024 term: 21 questions for 25 marks in 120 minutes. Every question is below with its answer. Take it as a timed mock test to be marked, or read it through first.
Printed graph sheets were provided to me.
Printed graph sheets were not provided to me.
I did not use graph sheets.
Correct answer
Printed graph sheets were provided to me.
Which of the following is/are guaranteed in any state space?
Each move is reversible.
Each state is reachable from every other state.
The goal state is reachable from the start state.
None of these.
Correct answer
None of these.
Consider the 3-2-1 Water Jug puzzle with three jugs A, B and C of capacities 3L, 2L and 1L, respectively.
A state is uniquely represented by the amount of water present in the three jugs, for example, the tuple (3,0,0) describes the state where jug A contains 3L of water and jugs B and C are empty. Two basic (atomic) moves are allowed: (1.) pick up a jug and fill up (top up) another jug, and (2.) pick up a jug and empty it into another jug, without spilling any water in the process. Start from (3,0,0) and construct the state space graph of this puzzle.
Which of the following states occur in the state space graph?
Correct answers
Which of the following is true about the 3-2-1 Water Jug state space?
Every move is reversible.
Every state is reachable from every other state.
From (3,0,0) there is a path to (1,1,1).
Correct answers
Every state is reachable from every other state.
From (3,0,0) there is a path to (1,1,1).
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
List the first 4 nodes inspected by Depth First Search. List the nodes in the order they were inspected. If the algorithm terminates early then list the nodes inspected up until termination. Enter a comma separated list of node labels.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,Z
Correct answer: S,A,E,D
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
What is the path found by Depth First Search?
Enter the path as a comma separated list of node labels.
Enter NIL if there is no path.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,G
Correct answer: S,A,E,D,G
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
List the first 4 nodes inspected by Breadth First Search. List the nodes in the order they were inspected. If the algorithm terminates early then list the nodes inspected up until termination. Enter a comma separated list of node labels.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,Z
Correct answer: S,A,B,C
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
What is the path found by Breadth First Search?
Enter the path as a comma separated list of node labels.
Enter NIL if there is no path.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,G
Correct answer: S,B,D,G
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
List the first 4 nodes inspected by Best First Search. List the nodes in the order they were inspected. If the algorithm terminates early then list the nodes inspected up until termination. Enter a comma separated list of node labels.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,Z
Correct answer: S,C,E,H
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
What is the path found by Best First Search?
Enter the path as a comma separated list of node labels.
Enter NIL if there is no path.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,G
Correct answer: S,C,E,D,G
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
List the first 4 nodes inspected by Hill Climbing. List the nodes in the order they were inspected. If the algorithm terminates early then list the nodes inspected up until termination.
Enter a comma separated list of node labels.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,Z
Correct answer: S,C,E,H
The figure shows a map with several locations on a grid where each tile is 1x1 in size. The locations are at grid points and are connected by two-way edges.
Take S as the start node and G as the goal node.
The MoveGen function returns neighbours in alphabetical order.
The RemoveSeen procedure removes neighbours already present in OPEN/CLOSED lists. Use Manhattan distance when needed.
When we say a node is inspected/expanded/refined it means: the node is picked up from OPEN, and goal test is called, if goal test fails then MoveGen is called and depending on the algorithm the neighbours are selectively placed in OPEN.
Based on the above data, answer the given subquestions.
What is the path found by Hill Climbing?
Enter the path as a comma separated list of node labels.
Enter NIL if there is no path.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer Format: S,X,Y,G
Correct answer: NIL
A tour of 12 cities is shown below. The edges are bi-directional. Use K,L,M,...,V as the reference (index) sequence to prepare tour representations.
Based on the above data, answer the given subquestions.
Select the valid path representations of the tour.
M,U,S,K,O,V,R,T,P,L,N,Q
K,S,U,M,Q,N,L,P,T,R,V,O
M,U,S,K,O,V,R,T,P,L,N,Q,M
K,S,U,M,Q,N,L,P,T,R,V,O,K
Correct answers
M,U,S,K,O,V,R,T,P,L,N,Q
K,S,U,M,Q,N,L,P,T,R,V,O
A tour of 12 cities is shown below. The edges are bi-directional. Use K,L,M,...,V as the reference (index) sequence to prepare tour representations.
Based on the above data, answer the given subquestions.
Select the valid adjacency representations of the tour.
O,N,U,Q,V,L,M,T,K,P,S,R
S,P,Q,L,K,T,N,V,U,R,M,O
P,N,U,Q,V,L,O,T,K,M,S,R
S,P,T,L,Q,K,N,V,U,R,M,O
Correct answers
O,N,U,Q,V,L,M,T,K,P,S,R
S,P,Q,L,K,T,N,V,U,R,M,O
A tour of 12 cities is shown below. The edges are bi-directional. Use K,L,M,...,V as the reference (index) sequence to prepare tour representations.
Based on the above data, answer the given subquestions.
Convert the path representation O,T,M,L,U,P,K,N,R,V,S,Q to ordinal representation.
Correct answer
A tour of 12 cities is shown below. The edges are bi-directional. Use K,L,M,...,V as the reference (index) sequence to prepare tour representations.
Based on the above data, answer the given subquestions.
Two tours in path representation are given below. Generate offspring using Partially Mapped Crossover (PMX), use the locations from 5 to 8 as the mapping segment. Enter one of the child tours in the textbox.
Enter a comma separated list of cities.
DO NOT ENTER SPACES, TABS, DOTS, BRACKETS OR EXTRANEOUS CHARACTERS.
Correct answer: U,N,M,L,O,V,R,T,K,P,S,Q or M,O,S,R,U,P,K,N,V,L,T,Q
The distance matrix for 6 cities and corresponding edge costs (in ascending order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 75 | 96 | 13 | 77 | 59 |
| B | 75 | - | 74 | 15 | 26 | 22 |
| C | 96 | 74 | - | 60 | 29 | 54 |
| D | 13 | 15 | 60 | - | 25 | 50 |
| E | 77 | 26 | 29 | 25 | - | 52 |
| F | 59 | 22 | 54 | 50 | 52 | - |
| AD | BD | BF | DE | BE |
|---|---|---|---|---|
| 13 | 15 | 22 | 25 | 26 |
| CE | DF | EF | CF | AF |
|---|---|---|---|---|
| 29 | 50 | 52 | 54 | 59 |
| CD | BC | AB | AE | AC |
|---|---|---|---|---|
| 60 | 74 | 75 | 77 | 96 |
Based on the above data, answer the given subquestions.
Start from city C and construct a tour using Nearest Neighbour Heuristic. Enter the path representation of the tour starting from city C. Use the same order in which cities were added to the tour.
Enter a comma separated list of city names.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: C,X,Y,Z
Correct answer: C,E,D,A,F,B
The distance matrix for 6 cities and corresponding edge costs (in ascending order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 75 | 96 | 13 | 77 | 59 |
| B | 75 | - | 74 | 15 | 26 | 22 |
| C | 96 | 74 | - | 60 | 29 | 54 |
| D | 13 | 15 | 60 | - | 25 | 50 |
| E | 77 | 26 | 29 | 25 | - | 52 |
| F | 59 | 22 | 54 | 50 | 52 | - |
| AD | BD | BF | DE | BE |
|---|---|---|---|---|
| 13 | 15 | 22 | 25 | 26 |
| CE | DF | EF | CF | AF |
|---|---|---|---|---|
| 29 | 50 | 52 | 54 | 59 |
| CD | BC | AB | AE | AC |
|---|---|---|---|---|
| 60 | 74 | 75 | 77 | 96 |
Based on the above data, answer the given subquestions.
What is the cost of the tour generated by Nearest Neighbour Heuristic?
Enter a number.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: 17
Correct answer: 222
The distance matrix for 6 cities and corresponding edge costs (in ascending order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 75 | 96 | 13 | 77 | 59 |
| B | 75 | - | 74 | 15 | 26 | 22 |
| C | 96 | 74 | - | 60 | 29 | 54 |
| D | 13 | 15 | 60 | - | 25 | 50 |
| E | 77 | 26 | 29 | 25 | - | 52 |
| F | 59 | 22 | 54 | 50 | 52 | - |
| AD | BD | BF | DE | BE |
|---|---|---|---|---|
| 13 | 15 | 22 | 25 | 26 |
| CE | DF | EF | CF | AF |
|---|---|---|---|---|
| 29 | 50 | 52 | 54 | 59 |
| CD | BC | AB | AE | AC |
|---|---|---|---|---|
| 60 | 74 | 75 | 77 | 96 |
Based on the above data, answer the given subquestions.
Construct a tour using Greedy Heuristic. Enter the path representation of the tour starting from city C.
Enter a comma separated list of city names.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: C,X,Y,Z
Correct answer: C,E,F,B,D,A or C,A,D,B,F,E
The distance matrix for 6 cities and corresponding edge costs (in ascending order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 75 | 96 | 13 | 77 | 59 |
| B | 75 | - | 74 | 15 | 26 | 22 |
| C | 96 | 74 | - | 60 | 29 | 54 |
| D | 13 | 15 | 60 | - | 25 | 50 |
| E | 77 | 26 | 29 | 25 | - | 52 |
| F | 59 | 22 | 54 | 50 | 52 | - |
| AD | BD | BF | DE | BE |
|---|---|---|---|---|
| 13 | 15 | 22 | 25 | 26 |
| CE | DF | EF | CF | AF |
|---|---|---|---|---|
| 29 | 50 | 52 | 54 | 59 |
| CD | BC | AB | AE | AC |
|---|---|---|---|---|
| 60 | 74 | 75 | 77 | 96 |
Based on the above data, answer the given subquestions.
What is the cost of the tour generated by Greedy Heuristic?
Enter a number.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: 17
Correct answer: 227
The distance matrix for 6 cities and corresponding edge costs (in ascending order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 75 | 96 | 13 | 77 | 59 |
| B | 75 | - | 74 | 15 | 26 | 22 |
| C | 96 | 74 | - | 60 | 29 | 54 |
| D | 13 | 15 | 60 | - | 25 | 50 |
| E | 77 | 26 | 29 | 25 | - | 52 |
| F | 59 | 22 | 54 | 50 | 52 | - |
| AD | BD | BF | DE | BE |
|---|---|---|---|---|
| 13 | 15 | 22 | 25 | 26 |
| CE | DF | EF | CF | AF |
|---|---|---|---|---|
| 29 | 50 | 52 | 54 | 59 |
| CD | BC | AB | AE | AC |
|---|---|---|---|---|
| 60 | 74 | 75 | 77 | 96 |
Based on the above data, answer the given subquestions.
Take C as the fulcrum node and compute the two missing values in the savings list (full list) given below. Construct the savings tour. Enter the path representation of the tour starting from city C.
Enter a comma separated list of city names.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: C,X,Y,Z
Correct answer: C,E,A,D,B,F or C,F,B,D,A,E