Question 1
Printed graph sheets were provided on time.
Printed graph sheets were provided late.
Printed graph sheets were not provided.
I used the graph sheets.
I did not use graph sheets.

The IIT Madras BS AI: Search Methods for Problem Solving (AI Search Methods) Quiz 1 paper sat on 23 Feb 2025, in the January 2025 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 on time.
Printed graph sheets were provided late.
Printed graph sheets were not provided.
I used the graph sheets.
I did not use graph sheets.
Correct answers
Printed graph sheets were provided on time.
I used the graph sheets.
STATE SPACE
Select the algorithms that find the shortest path (measured in number of hops).
Breadth-First Search
Best-First Search
Depth-First Search
DFID-N (opens only new nodes)
DFID-C (reopens closed nodes)
Hill Climbing
Correct answers
Breadth-First Search
DFID-C (reopens closed nodes)
STATE SPACE
Correct answer
STATE SPACE
Every move is reversible.
There is at least one move that is not reversible.
There is a path from every state to every other state.
Every state has two neighbours.
Correct answers
Every move is reversible.
There is a path from every state to every other state.
Every state has two neighbours.
SEARCH
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,B,A,C
SEARCH
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,B,C,F,G
SEARCH
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,B,D,E
SEARCH
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,E,I,G
SEARCH
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,D,H,F
SEARCH
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,D,H,F,G
SEARCH
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,D,H
SEARCH
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
Genetic Algorithm
A tour of 10 cities is shown below. The edges are bi-directional. Use D, E, F,..., M 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.
J, G, F, I, L, M, E, D, H, K
J, G, F, I, L, M, E, D, H, K, J
M, E, D, H, K, J, G, F, I, L
M, E, D, H, K, J, G, F, I, L, M
Correct answers
J, G, F, I, L, M, E, D, H, K
M, E, D, H, K, J, G, F, I, L
Genetic Algorithm
A tour of 10 cities is shown below. The edges are bi-directional. Use D, E, F,..., M 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.
F, D, I, M, K, L, G, J, H, E
H, D, I, F, K, L, G, J, M, E
E, M, D, J, L, F, K, H, I, G
E, M, G, J, D, F, K, H, I, L
Correct answers
H, D, I, F, K, L, G, J, M, E
E, M, G, J, D, F, K, H, I, L
Genetic Algorithm
A tour of 10 cities is shown below. The edges are bi-directional. Use D, E, F,..., M as the reference (index) sequence to prepare tour representations.
Based on the above data, answer the given subquestions.
Convert the path representation I, L, G, D, F, H, J, E, K, M to ordinal representation.
7, 4, 3, 4, 5, 5, 2, 1, 1, 1
6, 8, 4, 1, 2, 2, 2, 1, 1, 1
6, 4, 8, 2, 1, 5, 2, 1, 1, 1
7, 3, 6, 4, 2, 3, 3, 3, 2, 1
Correct answer
6, 8, 4, 1, 2, 2, 2, 1, 1, 1
Genetic Algorithm
A tour of 10 cities is shown below. The edges are bi-directional. Use D, E, F,..., M 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 Cycle Crossover. 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: J,L,G,I,F,M,E,D,H,K or I,G,F,D,L,H,J,E,K,M
TSP
The distance matrix for 5 cities and corresponding edge costs (in ascending order) is provided below. Use this information to construct TSP tours.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | - | 58 | 92 | 34 | 81 |
| B | 58 | - | 20 | 46 | 70 |
| C | 92 | 20 | - | 28 | 53 |
| D | 34 | 46 | 28 | - | 12 |
| E | 81 | 70 | 53 | 12 | - |
| DE | BC | CD | AD | BD |
|---|---|---|---|---|
| 12 | 20 | 28 | 34 | 46 |
| CE | AB | BE | AE | AC |
|---|---|---|---|---|
| 53 | 58 | 70 | 81 | 92 |
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,B,D,E,A
TSP
The distance matrix for 5 cities and corresponding edge costs (in ascending order) is provided below. Use this information to construct TSP tours.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | - | 58 | 92 | 34 | 81 |
| B | 58 | - | 20 | 46 | 70 |
| C | 92 | 20 | - | 28 | 53 |
| D | 34 | 46 | 28 | - | 12 |
| E | 81 | 70 | 53 | 12 | - |
| DE | BC | CD | AD | BD |
|---|---|---|---|---|
| 12 | 20 | 28 | 34 | 46 |
| CE | AB | BE | AE | AC |
|---|---|---|---|---|
| 53 | 58 | 70 | 81 | 92 |
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: 251
TSP
The distance matrix for 5 cities and corresponding edge costs (in ascending order) is provided below. Use this information to construct TSP tours.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | - | 58 | 92 | 34 | 81 |
| B | 58 | - | 20 | 46 | 70 |
| C | 92 | 20 | - | 28 | 53 |
| D | 34 | 46 | 28 | - | 12 |
| E | 81 | 70 | 53 | 12 | - |
| DE | BC | CD | AD | BD |
|---|---|---|---|---|
| 12 | 20 | 28 | 34 | 46 |
| CE | AB | BE | AE | AC |
|---|---|---|---|---|
| 53 | 58 | 70 | 81 | 92 |
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,D,E,A,B or C,B,A,E,D
TSP
The distance matrix for 5 cities and corresponding edge costs (in ascending order) is provided below. Use this information to construct TSP tours.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | - | 58 | 92 | 34 | 81 |
| B | 58 | - | 20 | 46 | 70 |
| C | 92 | 20 | - | 28 | 53 |
| D | 34 | 46 | 28 | - | 12 |
| E | 81 | 70 | 53 | 12 | - |
| DE | BC | CD | AD | BD |
|---|---|---|---|---|
| 12 | 20 | 28 | 34 | 46 |
| CE | AB | BE | AE | AC |
|---|---|---|---|---|
| 53 | 58 | 70 | 81 | 92 |
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: 199
TSP
The distance matrix for 5 cities and corresponding edge costs (in ascending order) is provided below. Use this information to construct TSP tours.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| A | - | 58 | 92 | 34 | 81 |
| B | 58 | - | 20 | 46 | 70 |
| C | 92 | 20 | - | 28 | 53 |
| D | 34 | 46 | 28 | - | 12 |
| E | 81 | 70 | 53 | 12 | - |
| DE | BC | CD | AD | BD |
|---|---|---|---|---|
| 12 | 20 | 28 | 34 | 46 |
| CE | AB | BE | AE | AC |
|---|---|---|---|---|
| 53 | 58 | 70 | 81 | 92 |
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,B,A,D,E or C,E,D,A,B