Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 3 subjective questions Greedy Method

ECAP538 20 questions with model answers. Write yours first, then compare.

Read the notes Practice MCQs
  1. Question 1 of 20

    Define the greedy method. State the main components required to design a greedy algorithm.

  2. Question 2 of 20

    Explain the greedy-choice property and optimal substructure with suitable examples.

  3. Question 3 of 20

    Describe the general steps used to develop and prove the correctness of a greedy algorithm.

  4. Question 4 of 20

    Distinguish between greedy algorithms and dynamic programming.

  5. Question 5 of 20

    Formulate the fractional knapsack problem mathematically and describe its greedy solution.

  6. Question 6 of 20

    Solve the fractional knapsack problem for capacity and items equal to , , and . Show all steps.

  7. Question 7 of 20

    Why does the greedy strategy solve fractional knapsack optimally but not necessarily the knapsack problem? Give a counterexample.

  8. Question 8 of 20

    Define a minimum spanning tree and state its important properties.

  9. Question 9 of 20

    Explain the cut property and cycle property used in minimum spanning tree algorithms.

  10. Question 10 of 20

    Describe Prim's algorithm for constructing a minimum spanning tree and analyze its time complexity.

  11. Question 11 of 20

    Apply Prim's algorithm starting at vertex to the graph with weighted edges , , , , , and , . Find the MST and its cost.

  12. Question 12 of 20

    Describe Kruskal's algorithm and explain how the disjoint-set data structure supports it.

  13. Question 13 of 20

    Apply Kruskal's algorithm to the graph with edges , , , , , , and . Show the component changes and find the MST cost.

  14. Question 14 of 20

    Compare Prim's and Kruskal's minimum spanning tree algorithms.

  15. Question 15 of 20

    What happens when Prim's or Kruskal's algorithm is applied to a disconnected graph? Explain the concept of a minimum spanning forest.

  16. Question 16 of 20

    Define the single-source shortest-path problem and distinguish a shortest-path tree from a minimum spanning tree.

  17. Question 17 of 20

    Explain Dijkstra's greedy algorithm for the single-source shortest-path problem and analyze its complexity.

  18. Question 18 of 20

    Apply Dijkstra's algorithm from source to the directed graph with edges , , , , , and . Find all shortest distances and paths.

  19. Question 19 of 20

    Why does Dijkstra's algorithm require nonnegative edge weights? Illustrate its failure using an example.

  20. Question 20 of 20

    Prove the correctness of Dijkstra's algorithm for graphs with nonnegative edge weights.

That's unit 3

Long answers stick best when they're tested again soon. Run the MCQs on this unit, then come back to the questions you found hardest.