Looking for FIT2004 Algorithms and data structures - S2 2025 test answers and solutions? Browse our comprehensive collection of verified answers for FIT2004 Algorithms and data structures - S2 2025 at learning.monash.edu.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
Consider the following two problems of circulation with demands, in which the demands are indicated in each vertex, and the capacity in each edge.
Problem 1:
Problem 2:
Which of those problems have feasible solutions?
Consider the following flow network with source node s, sink node t, and in which the capacities are indicated in each edge.
A cut partitions the vertices into two disjoint sets, S and T, where S contains all the vertices on the source side of the cut, and T contains all the vertices on the sink side of the cut. Consider the minimum cut of the above flow network and select the option that corresponds to the set S in that cut.
Consider the following variant of the Bellman-Ford algorithm
and the following weighted directed graph
Let S be the source node for the execution of the Bellman-Ford algorithm. If the edges are relaxed in the following order (S, A), (B, C), (S, C), (S, B), (D, C), (E, D), (A, B), (S, E), what is the distance estimate of node C after two iterations of the outer loop of the algorithm are finished? Just type the numerical answer.
Recall the unbounded knapsack dynamic programming problem you have learnt from your lecture, with the following recurrence relation:
You have run the algorithm on the following items:
| Item | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Weight | 8 | 7 | 5 | 4 | 2 |
| Value | 600 | 350 | 200 | 190 | 110 |
| Capacity | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MaxValue | 0 | 0 | 110 | 110 | 220 | 220 | 330 | 350 | 600 | 600 | 710 | 710 | 820 | 820 |
| Decision | None | None | 5 | 5 | 5 | 5 | 5 | 2 | 1 | 1 | 1 | 1 | 1 | 1 |
Using the optimal substructure stated below for a Dynamic Programming solution to the Coins Change Problem:
Complete the MinCoins array given the following values:
Consider the following variant of the Bellman-Ford algorithm
and the following weighted directed graph
Let S be the source node for the execution of the Bellman-Ford algorithm. If the edges are relaxed in the following order (S, A), (B, C), (S, C), (S, B), (D, C), (E, D), (A, B), (S, E), what is the distance estimate of node C after two iterations of the outer loop of the algorithm are finished? Just type the numerical answer.
Recall the unbounded knapsack dynamic programming problem you have learnt from your lecture, with the following recurrence relation:
You have run the algorithm on the following items:
| Item | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Weight | 9 | 5 | 6 | 2 | 3 |
| Value | 550 | 350 | 180 | 90 | 40 |
| Capacity | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MaxValue | 0 | 0 | 90 | 90 | 180 | 350 | 350 | 440 | 440 | 550 | 700 | 700 | 790 | 790 |
| Decision | None | None | 4 | 4 | 4 | 2 | 2 | 2 | 2 | 1 | 2 | 2 | 2 | 2 |
Using the optimal substructure stated below for a Dynamic Programming solution to the Coins Change Problem:
Complete the MinCoins array given the following values:
Recall the unbounded knapsack dynamic programming problem you have learnt from your lecture, with the following recurrence relation:
You have run the algorithm on the following items:
| Item | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Weight | 8 | 7 | 5 | 4 | 2 |
| Value | 600 | 500 | 200 | 190 | 110 |
| Capacity | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| MaxValue | 0 | 0 | 110 | 110 | 220 | 220 | 330 | 500 | 600 | 610 | 710 | 720 | 820 | 830 |
| Decision | None | None | 5 | 5 | 5 | 5 | 5 | 2 | 1 | 2 | 1 | 2 | 1 | 2 |
Using the optimal substructure stated below for a Dynamic Programming solution to the Coins Change Problem:
Complete the MinCoins array given the following values: