Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Week 2 : Assignment 1 (State Space

Example)
Due date: 2023-08-09, 23:59 IST.
Assignment not submitted

IMPORTANT: refer Week 2 Notes and solve the practice assignments before solving this assignment.

The 8-5-3 water jug puzzle was discussed in the lecture. Here, we will work with the 12-8-5 water jug puzzle
covered in the practice assignment.

1 point
What information is available in Week 2 notes (bunch of PDFs) published in the course page?

About node order and tie breaker


How to model a problem as a state space search problem
Some properties of state spaces
DFS, BFS, DBDFS algorithms and ancillary functions
DFID-N, DFID-C algorithms and ancillary functions
Examples of list and tuple operations
Solved lecture examples
Solutions to practice assignment problems
Some problems to demonstrate node order

Based on the options provided, the following information is available in the Week 2 notes (bunch of
PDFs) published in the course page:
• About node order and tie breaker
• How to model a problem as a state space search problem
• Some properties of state spaces
• DFS, BFS, DBDFS algorithms, and ancillary functions
• DFID-N, DFID-C algorithms, and ancillary functions
• Examples of list and tuple operations
• Solved lecture examples
• Solutions to practice assignment problems
• Some problems to demonstrate node order
1 point
Which of the following states satisfy the capacity constraints of the 12-8-5 water jug puzzle?

(5, 6, 1)
(0, 6, 6)
(4, 4, 4)
(8, 2, 2)

The 12-8-5 water jug puzzle involves three jugs with capacities of 12, 8, and 5 units of water. To
determine if the given states satisfy the capacity constraints, we need to check if the sum of water in
each jug in the state is within the respective capacities.
Let's check each state:
1. (5, 6, 1): This state has a total of 12 units, 8 units, and 1 unit of water in the three jugs,
respectively. All the values are within the capacity limits. So, this state satisfies the capacity
constraints.
2. (0, 6, 6): This state has a total of 0 units, 6 units, and 6 units of water in the three jugs,
respectively. The first jug is empty, so it satisfies the capacity constraint. The other two jugs
have more water than their respective capacities. So, this state does not satisfy the capacity
constraints.
3. (4, 4, 4): This state has a total of 4 units, 4 units, and 4 units of water in the three jugs,
respectively. All the values are within the capacity limits. So, this state satisfies the capacity
constraints.
4. (8, 2, 2): This state has a total of 8 units, 2 units, and 2 units of water in the three jugs,
respectively. All the values are within the capacity limits. So, this state satisfies the capacity
constraints.
In summary:
• (5, 6, 1) satisfies the capacity constraints.
• (0, 6, 6) does not satisfy the capacity constraints.
• (4, 4, 4) satisfies the capacity constraints.
• (8, 2, 2) satisfies the capacity constraints.

1 point
From the state (7, 0, 5), which of the following states can we reach in one or more moves?

(3, 4, 5)
(4, 3, 5)
(4, 4, 4)
(5, 4, 3)

To determine which states can be reached from the state (7, 0, 5) in one or more moves, we need to
apply the actions allowed by the puzzle: pouring water from one jug to another until it's empty or
the receiving jug is full. Let's analyze each option:
Starting state: (7, 0, 5)
1. (3, 4, 5): You can pour 4 units from jug 1 to jug 2, resulting in (3, 4, 5). So, this state can be
reached in one move.
2. (4, 3, 5): You can pour 3 units from jug 1 to jug 2, resulting in (4, 3, 5). So, this state can be
reached in one move.
3. (4, 4, 4): You can pour 3 units from jug 1 to jug 2, resulting in (4, 3, 5), and then pour 1 unit
from jug 3 to jug 2, resulting in (4, 4, 4). So, this state can be reached in two moves.
4. (5, 4, 3): You can pour 5 units from jug 1 to jug 2, resulting in (2, 5, 5), and then pour 2 units
from jug 2 to jug 3, resulting in (2, 3, 7), and finally pour 2 units from jug 3 to jug 1, resulting
in (4, 3, 5). So, this state can be reached in three moves.
In summary:
• (3, 4, 5) can be reached in one move.
• (4, 3, 5) can be reached in one move.
• (4, 4, 4) can be reached in two moves.
• (5, 4, 3) can be reached in three moves.

1 point
The water-jug state space in the practice assignment __________ .

is the full state space for the 12-8-5 water-jug puzzle


is the subspace reachable from the state (12,0,0)
satisfies the “reversible state space” property
does not satisfy the “reversible state space” property

The correct completion of the sentence is:


"The water-jug state space in the practice assignment is the subspace reachable from the
state (12, 0, 0)."

1 point
In the water-jug state space covered in the practice assignment __________ .

from the state (12,0,0) there is a unique path to every other state
for every pair of distinct states X and Y, there is a path from X to Y
for every pair of distinct states X and Y, if there is a path from X to Y and if there is a path from Y to X then
both these paths are of the same length
for every state X, MoveGen(X) will return exactly four neighbours
for every state X, MoveGen(X) will return at most four neighbours

The correct completion of the sentence is:


"In the water-jug state space covered in the practice assignment, for every pair of distinct states X
and Y, if there is a path from X to Y and if there is a path from Y to X then both these paths are
of the same length."
1 point
Given the following start states, from which of these start states can we reach (7, 0, 5) in one or more moves?

(3, 4, 5)
(4, 3, 5)
(4, 4, 4)
(5, 4, 3)

o determine which of the given start states can reach the state (7, 0, 5) in one or more moves, let's
analyze each option:
Target state: (7, 0, 5)
1. (3, 4, 5): This start state cannot reach the target state in one or more moves because the total
amount of water is less than what's required in the target state.
2. (4, 3, 5): This start state cannot reach the target state in one or more moves because the total
amount of water is less than what's required in the target state.
3. (4, 4, 4): This start state cannot reach the target state in one or more moves because the total
amount of water is less than what's required in the target state.
4. (5, 4, 3): This start state can reach the target state (7, 0, 5) in one move by pouring 2 units of
water from jug 1 to jug 3, resulting in (3, 4, 5), and then reaching the target state in another
move by pouring 1 unit from jug 1 to jug 2, resulting in (4, 3, 5).
In summary:
• Only the start state (5, 4, 3) can reach the target state (7, 0, 5) in one or more moves.

From the state (12,0,0) the least number of moves required to reach (6,6,0) is __________ .

Enter an integer.
DO NOT ENTER SPACES, TABS, DOTS, BRACKETS OR EXTRANEOUS CHARACTERS.

Answer format: 42
The least number of moves required to reach from the state (12, 0, 0) to the state (6, 6, 0) is **4**.

1 point
From the state (12,0,0) the least number of moves required to reach (3,4,5) is _________ .

Enter an integer.
DO NOT ENTER SPACES, TABS, DOTS, BRACKETS OR EXTRANEOUS CHARACTERS.

The least number of moves required to reach from the state (12, 0, 0) to the state (3, 4, 5) is **6**.

Answer format: 42

6
1 point
From the state (3,4,5) the least number of moves required to reach (12,0,0) is _________ .
Enter an integer.

DO NOT ENTER SPACES, TABS, DOTS, BRACKETS OR EXTRANEOUS CHARACTERS.

Answer format: 42
The least number of moves required to reach from the state (3, 4, 5) to the state (12, 0, 0) is **6**.

1 point
In the 12-8-5 water jug puzzle, is it possible to measure integral volumes 1L, 2L, 3L, …, 12L, where the volume
measured must be present in a single jug?

Yes
No
Cannot be determined

Yes, in the 12-8-5 water jug puzzle, it is possible to measure integral volumes 1L, 2L, 3L, ..., 12L, where
the volume measured must be present in a single jug. This puzzle allows for a variety of pouring and
transferring actions between the jugs, which enables the measurement of various integral volumes in a
single jug.

You might also like