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 25 Feb 2024, in the January 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.`
STATE SPACE
One needs to count the number of nodes visited in each cycle of DFID __________ .
to compute the complexity of search
to make sure that the path returned is the shortest
to prevent the algorithm from getting into an infinite loop on an INFINITE graph when a goal node exists in the connected component
to prevent the algorithm from getting into an infinite loop on a FINITE graph when the goal node does not exist in the connected component
Correct answer
to prevent the algorithm from getting into an infinite loop on a FINITE graph when the goal node does not exist in the connected component
STATE SPACE
In the Ant Colony Optimisation algorithm for solving the TSP __________ .
all the ants in the colony start from the same start city and then go in different directions
all ants construct the solution using a collaborative filtering approach
each ant constructs a tour independently
each ant constructs a tour using follow the leader principle
Correct answer
each ant constructs a tour independently
STATE SPACE
(13,NIL,2)
(NIL,3,21)
(1,3,2)
(NIL,NIL,123)
Correct answers
(13,NIL,2)
(NIL,3,21)
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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,A,C,E,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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,H,A
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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,Z,G
Correct answer: S,B,D,E,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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,H,I,D
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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,Z,G
Correct answer: S,H,I,D,E,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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,H,I
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 either two-way edges (shown as undirected edges) or one- way edges (shown with one arrowhead).
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,Z,G
Correct answer: Nil
Genetic Algorithm
A tour of 12 cities is shown below. The edges are bi-directional. Use A,B,...,L 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.
F,I,L,E,H,A,C,K,J,D,B,G
C,K,J,D,B,G,F,I,L,E,H,A
F,I,L,E,H,A,C,K,J,D,B,G,F
C,K,J,D,B,G,F,I,L,E,H,A,C
Correct answers
F,I,L,E,H,A,C,K,J,D,B,G
C,K,J,D,B,G,F,I,L,E,H,A
Genetic Algorithm
A tour of 12 cities is shown below. The edges are bi-directional. Use A,B,...,L 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.
C,G,K,B,H,I,F,A,L,D,J,E
H,D,A,J,L,G,B,E,F,K,C,I
C,G,K,B,J,I,H,A,L,D,F,E
H,D,A,J,L,K,B,G,F,E,C,I
Correct answers
C,G,K,B,H,I,F,A,L,D,J,E
H,D,A,J,L,G,B,E,F,K,C,I
Genetic Algorithm
A tour of 12 cities is shown below. The edges are bi-directional. Use A,B,...,L as the reference (index) sequence to prepare tour representations.
Based on the above data, answer the given subquestions.
Convert the path representation E,A,D,C,J,L,K,F,G,I,H,B to ordinal representation.
5,1,3,2,6,7,6,2,2,3,2,1
6,8,10,5,6,1,2,5,4,2,1,1
5,1,3,2,3,4,3,1,2,3,2,1
5,1,3,2,3,4,3,4,2,1,1,1
Correct answer
5,1,3,2,6,7,6,2,2,3,2,1
Genetic Algorithm
A tour of 12 cities is shown below. The edges are bi-directional. Use A,B,...,L 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.
P1: F,I,L,E,H,A,C,K,J,D,B,G
P2: E,A,D,C,J,L,K,F,G,I,H,B
Enter a comma separated list of cities.
DO NOT ENTER SPACES, TABS, DOTS, BRACKETS OR EXTRANEOUS CHARACTERS.
Correct answer: E,L,D,F,H,A,C,K,G,I,J,B or C,I,A,E,J,L,K,F,H,D,B,G
TSP
The distance matrix for 6 cities and corresponding edge costs (in sorted order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 66 | 32 | 18 | 73 | 40 |
| B | 66 | - | 92 | 14 | 81 | 60 |
| C | 32 | 92 | - | 26 | 16 | 52 |
| D | 18 | 14 | 26 | - | 68 | 80 |
| E | 73 | 81 | 16 | 68 | - | 84 |
| F | 40 | 60 | 52 | 80 | 84 | - |
| BD | CE | AD | CD | AC |
|---|---|---|---|---|
| 14 | 16 | 18 | 26 | 32 |
| AF | CF | BF | AB | DE |
|---|---|---|---|---|
| 40 | 52 | 60 | 66 | 68 |
| AE | DF | BE | EF | BC |
|---|---|---|---|---|
| 73 | 80 | 81 | 84 | 92 |
Based on the above data, answer the given subquestions.
Start from city E and construct a tour using Nearest Neighbour Heuristic. Enter the path representation of the tour starting from city E.
Enter a comma separated list of city names.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: E,X,Y,Z
Correct answer: E,C,D,B,F,A
TSP
The distance matrix for 6 cities and corresponding edge costs (in sorted order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 66 | 32 | 18 | 73 | 40 |
| B | 66 | - | 92 | 14 | 81 | 60 |
| C | 32 | 92 | - | 26 | 16 | 52 |
| D | 18 | 14 | 26 | - | 68 | 80 |
| E | 73 | 81 | 16 | 68 | - | 84 |
| F | 40 | 60 | 52 | 80 | 84 | - |
| BD | CE | AD | CD | AC |
|---|---|---|---|---|
| 14 | 16 | 18 | 26 | 32 |
| AF | CF | BF | AB | DE |
|---|---|---|---|---|
| 40 | 52 | 60 | 66 | 68 |
| AE | DF | BE | EF | BC |
|---|---|---|---|---|
| 73 | 80 | 81 | 84 | 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: 229
TSP
The distance matrix for 6 cities and corresponding edge costs (in sorted order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 66 | 32 | 18 | 73 | 40 |
| B | 66 | - | 92 | 14 | 81 | 60 |
| C | 32 | 92 | - | 26 | 16 | 52 |
| D | 18 | 14 | 26 | - | 68 | 80 |
| E | 73 | 81 | 16 | 68 | - | 84 |
| F | 40 | 60 | 52 | 80 | 84 | - |
| BD | CE | AD | CD | AC |
|---|---|---|---|---|
| 14 | 16 | 18 | 26 | 32 |
| AF | CF | BF | AB | DE |
|---|---|---|---|---|
| 40 | 52 | 60 | 66 | 68 |
| AE | DF | BE | EF | BC |
|---|---|---|---|---|
| 73 | 80 | 81 | 84 | 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 E.
Enter a comma separated list of city names.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: E,X,Y,Z
Correct answer: E,F,B,D,A,C or E,C,A,D,B,F
TSP
The distance matrix for 6 cities and corresponding edge costs (in sorted order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 66 | 32 | 18 | 73 | 40 |
| B | 66 | - | 92 | 14 | 81 | 60 |
| C | 32 | 92 | - | 26 | 16 | 52 |
| D | 18 | 14 | 26 | - | 68 | 80 |
| E | 73 | 81 | 16 | 68 | - | 84 |
| F | 40 | 60 | 52 | 80 | 84 | - |
| BD | CE | AD | CD | AC |
|---|---|---|---|---|
| 14 | 16 | 18 | 26 | 32 |
| AF | CF | BF | AB | DE |
|---|---|---|---|---|
| 40 | 52 | 60 | 66 | 68 |
| AE | DF | BE | EF | BC |
|---|---|---|---|---|
| 73 | 80 | 81 | 84 | 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: 224
TSP
The distance matrix for 6 cities and corresponding edge costs (in sorted order) are provided below. Use this information to construct TSP tours.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| A | - | 66 | 32 | 18 | 73 | 40 |
| B | 66 | - | 92 | 14 | 81 | 60 |
| C | 32 | 92 | - | 26 | 16 | 52 |
| D | 18 | 14 | 26 | - | 68 | 80 |
| E | 73 | 81 | 16 | 68 | - | 84 |
| F | 40 | 60 | 52 | 80 | 84 | - |
| BD | CE | AD | CD | AC |
|---|---|---|---|---|
| 14 | 16 | 18 | 26 | 32 |
| AF | CF | BF | AB | DE |
|---|---|---|---|---|
| 40 | 52 | 60 | 66 | 68 |
| AE | DF | BE | EF | BC |
|---|---|---|---|---|
| 73 | 80 | 81 | 84 | 92 |
Based on the above data, answer the given subquestions.
Take E as the fulcrum node and compute the missing values in the savings list given below. Construct the savings tour. Enter the path representation of the tour starting from city E.
Enter a comma separated list of city names.
NO SPACES, TABS, DOTS, BRACKETS, PARENTHESIS OR UNWANTED CHARACTERS.
Answer format: E,X,Y,Z
Correct answer: E,B,D,A,F,C or E,C,F,A,D,B