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 MCQs Greedy Method

ECAP538 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 General method Easy

    What does a greedy algorithm choose at each step?

  2. Question 2 of 60 General method Easy

    Which property means that a globally optimal solution can be reached through locally optimal choices?

  3. Question 3 of 60 General method Easy

    How does a typical greedy algorithm treat a choice after making it?

  4. Question 4 of 60 General method Easy

    Which statement about greedy algorithms is correct?

  5. Question 5 of 60 Knapsack problem Easy

    In the fractional knapsack problem, which quantity is commonly used to order items?

  6. Question 6 of 60 Knapsack problem Easy

    What is allowed in the fractional knapsack problem?

  7. Question 7 of 60 Knapsack problem Easy

    What distinguishes the 0/1 knapsack problem from the fractional knapsack problem?

  8. Question 8 of 60 Knapsack problem Easy

    An item has value and weight . What is its value-to-weight ratio?

  9. Question 9 of 60 Minimal spanning trees: Prim's algorithm Easy

    How does Prim's algorithm construct a minimum spanning tree?

  10. Question 10 of 60 Minimal spanning trees: Prim's algorithm Easy

    Which edge does Prim's algorithm select next?

  11. Question 11 of 60 Minimal spanning trees: Prim's algorithm Easy

    Prim's algorithm is primarily used to find which structure?

  12. Question 12 of 60 Minimal spanning trees: Prim's algorithm Easy

    For which type of graph is a spanning tree normally defined?

  13. Question 13 of 60 Minimal spanning trees: Kruskal's algorithm Easy

    What is the first major step in Kruskal's algorithm?

  14. Question 14 of 60 Minimal spanning trees: Kruskal's algorithm Easy

    When does Kruskal's algorithm reject an edge?

  15. Question 15 of 60 Minimal spanning trees: Kruskal's algorithm Easy

    Which data structure is commonly used to detect cycles in Kruskal's algorithm?

  16. Question 16 of 60 Minimal spanning trees: Kruskal's algorithm Easy

    What does Kruskal's algorithm maintain before the minimum spanning tree is complete?

  17. Question 17 of 60 Single-source shortest paths Easy

    What does the single-source shortest-path problem compute?

  18. Question 18 of 60 Single-source shortest paths Easy

    Which condition is required by the standard Dijkstra's algorithm?

  19. Question 19 of 60 Single-source shortest paths Easy

    What is the initial shortest-path distance from the source vertex to itself?

  20. Question 20 of 60 Single-source shortest paths Easy

    Which algorithm can handle negative edge weights when no reachable negative cycle exists?

  21. Question 21 of 60 General method Medium

    Which two properties are typically required to prove that a greedy algorithm produces an optimal solution?

  22. Question 22 of 60 General method Medium

    A greedy coin-change algorithm repeatedly selects the largest coin not exceeding the remaining amount. For denominations and amount , what does the algorithm produce?

  23. Question 23 of 60 General method Medium

    In the activity-selection problem, activities are sorted by finishing time. Which next activity should be selected after choosing an activity that finishes at time ?

  24. Question 24 of 60 General method Medium

    Consider activities , , , , , and . How many activities are selected by the earliest-finish-time greedy method?

  25. Question 25 of 60 Knapsack problem Medium

    A fractional knapsack has capacity . Items have values , , and . What maximum profit is obtained?

  26. Question 26 of 60 Knapsack problem Medium

    For the fractional knapsack problem, which quantity should be used to order items greedily?

  27. Question 27 of 60 Knapsack problem Medium

    A fractional knapsack has capacity and items , , and . What maximum profit can be obtained?

  28. Question 28 of 60 Knapsack problem Medium

    For a knapsack of capacity , items have values , , and . Why does the profit-to-weight greedy rule fail?

  29. Question 29 of 60 Minimal spanning trees: Prim's algorithm Medium

    An undirected graph has edges , , , , and . Starting Prim's algorithm at , what is the total weight of the resulting MST?

  30. Question 30 of 60 Minimal spanning trees: Prim's algorithm Medium

    Suppose Prim's algorithm has already included vertices . Which edge is eligible to be selected next?

  31. Question 31 of 60 Minimal spanning trees: Prim's algorithm Medium

    If a connected weighted graph has several equal-weight edges, what can happen when Prim's algorithm resolves ties differently?

  32. Question 32 of 60 Minimal spanning trees: Prim's algorithm Medium

    Using adjacency lists and a binary min-heap, what is the typical time complexity of Prim's algorithm on a connected graph?

  33. Question 33 of 60 Minimal spanning trees: Kruskal's algorithm Medium

    An undirected graph has edges , , , , , and . What is the MST weight produced by Kruskal's algorithm?

  34. Question 34 of 60 Minimal spanning trees: Kruskal's algorithm Medium

    Why does Kruskal's algorithm skip an edge whose endpoints are already in the same disjoint-set component?

  35. Question 35 of 60 Minimal spanning trees: Kruskal's algorithm Medium

    Which data structure most efficiently supports cycle detection in Kruskal's algorithm?

  36. Question 36 of 60 Minimal spanning trees: Kruskal's algorithm Medium

    What does Kruskal's algorithm produce when it is applied to a disconnected undirected graph?

  37. Question 37 of 60 Single-source shortest paths Medium

    A directed graph has edges , , , , and . What shortest distance from to does Dijkstra's algorithm find?

  38. Question 38 of 60 Single-source shortest paths Medium

    During edge relaxation, , edge weight , and the current . What is the updated value of ?

  39. Question 39 of 60 Single-source shortest paths Medium

    Why can standard Dijkstra's algorithm give an incorrect result on a graph containing a reachable negative-weight edge?

  40. Question 40 of 60 Single-source shortest paths Medium

    A graph has edges , , , , and . In what order are vertices settled by Dijkstra's algorithm?

  41. Question 41 of 60 General method Hard

    Let be a finite independence system. A greedy algorithm processes elements in nonincreasing order of nonnegative weight and adds an element whenever feasibility is preserved. Under which condition is this algorithm guaranteed to return a maximum-weight feasible set for every weight assignment?

  42. Question 42 of 60 General method Hard

    In an exchange-argument proof, a greedy algorithm first chooses . Which statement most directly establishes that this first choice is safe?

  43. Question 43 of 60 General method Hard

    For coin denominations and target value , what does the largest-denomination-first greedy rule demonstrate?

  44. Question 44 of 60 General method Hard

    Five unit-time jobs have values , , , , and . Using the greedy rule that processes jobs by decreasing profit and places each job in its latest available slot, which schedule is produced?

  45. Question 45 of 60 Knapsack problem Hard

    A fractional knapsack of capacity has items , , , and , where each pair is . What solution is obtained by density-ordered greedy selection?

  46. Question 46 of 60 Knapsack problem Hard

    A knapsack has capacity and items , , and . What is the outcome of selecting items by decreasing value-to-weight ratio?

  47. Question 47 of 60 Knapsack problem Hard

    Assume all weights are positive and values are nonnegative. Why can an optimal basic solution of the fractional knapsack contain at most one partially selected item?

  48. Question 48 of 60 Knapsack problem Hard

    A fractional knapsack uses the constraint that total weight is at most . Its items are , , and . What is the optimal value?

  49. Question 49 of 60 Minimal spanning trees: Prim's algorithm Hard

    An undirected graph has edges , , , , , , and . Starting Prim's algorithm at , which edges are selected in order?

  50. Question 50 of 60 Minimal spanning trees: Prim's algorithm Hard

    A connected undirected graph contains negative edge weights but no other unusual constraints. Which statement about Prim's algorithm is correct?

  51. Question 51 of 60 Minimal spanning trees: Prim's algorithm Hard

    What happens if standard Prim's algorithm is started in a graph that has multiple connected components?

  52. Question 52 of 60 Minimal spanning trees: Prim's algorithm Hard

    All edge weights in a connected undirected graph are distinct. How can Prim's output depend on its starting vertex?

  53. Question 53 of 60 Minimal spanning trees: Kruskal's algorithm Hard

    An undirected graph has edges , , , , , , and . Which edge set does Kruskal's algorithm select?

  54. Question 54 of 60 Minimal spanning trees: Kruskal's algorithm Hard

    Edge is the unique heaviest edge on some cycle of a connected undirected graph. What can Kruskal's cycle property conclude?

  55. Question 55 of 60 Minimal spanning trees: Kruskal's algorithm Hard

    Using comparison sorting and disjoint sets with union by rank and path compression, what is Kruskal's running time on a graph with vertices and edges?

  56. Question 56 of 60 Minimal spanning trees: Kruskal's algorithm Hard

    A graph has MST edges , , and non-tree edges , , . What is the weight of the minimum spanning tree whose weight is strictly greater than the MST weight?

  57. Question 57 of 60 Single-source shortest paths Hard

    A directed graph has edges , , , , , , and . What settled-vertex order and final distances does Dijkstra's algorithm produce?

  58. Question 58 of 60 Single-source shortest paths Hard

    Consider edges , , and . Why can standard Dijkstra's algorithm, which never revisits settled vertices, fail?

  59. Question 59 of 60 Single-source shortest paths Hard

    Which edge-weight condition is sufficient for the standard correctness proof of Dijkstra's single-source shortest-path algorithm?

  60. Question 60 of 60 Single-source shortest paths Hard

    For a dense graph with and nonnegative edge weights, which implementation gives the better asymptotic bound for Dijkstra's algorithm?

That's unit 3

Answer a few questions and your score shows up here.