Docsity

Graded Quiz Unit 6 Prim’s Algorithm, Minimum Spanning Trees & Simplex Linear Programming, Exams of Nursing

Toggle sidebar
bg1
Graded Quiz Unit 6 - Prim's Algorithm, Minimum Spanning
Trees & Simplex Linear Programming 6-Question Practice
Exam with Answers and Review 100 Questions
EXAM INFORMATION
Subject: Algorithms and Linear Programming: Prim's Algorithm, Minimum Spanning Trees, and the
Simplex Method
Questions: 100 | Format: Multiple choice
Duration: 3 hours
Passing score: 91%
ABOUT THIS EXAM
This exam assesses mastery of Prim's algorithm for minimum spanning trees and the simplex method
for linear programming, including correctness, complexity, sensitivity analysis, and duality.
Questions require multi-step reasoning, proof techniques, and application to novel graph and LP
scenarios.
WHAT THIS COVERS
1. Prove correctness and analyze the complexity of Prim's algorithm under different data structures
and graph models.
2. Formulate and solve linear programs using the simplex method, including two-phase and revised
simplex variants.
3. Interpret LP duality, shadow prices, and sensitivity analysis in economic and network contexts.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28

Partial preview of the text

Download Graded Quiz Unit 6 Prim’s Algorithm, Minimum Spanning Trees & Simplex Linear Programming and more Exams Nursing in PDF only on Docsity!

Graded Quiz Unit 6 - Prim's Algorithm, Minimum Spanning

Trees & Simplex Linear Programming 6-Question Practice

Exam with Answers and Review 100 Questions

EXAM INFORMATION

Subject: Algorithms and Linear Programming: Prim's Algorithm, Minimum Spanning Trees, and the Simplex Method Questions: 100 | Format: Multiple choice Duration: 3 hours Passing score: 91%

ABOUT THIS EXAM

This exam assesses mastery of Prim's algorithm for minimum spanning trees and the simplex method for linear programming, including correctness, complexity, sensitivity analysis, and duality. Questions require multi-step reasoning, proof techniques, and application to novel graph and LP scenarios.

WHAT THIS COVERS

  1. Prove correctness and analyze the complexity of Prim's algorithm under different data structures and graph models.
  2. Formulate and solve linear programs using the simplex method, including two-phase and revised simplex variants.
  3. Interpret LP duality, shadow prices, and sensitivity analysis in economic and network contexts.

Detailed Explanations

Q Prim's algorithm on a graph with negative edge weights but no negative cycles: which statement is true?

A (^) It fails to find an MST because negative weights break the cut property.

B (^) It finds an MST if initialized with any vertex, since the cut property holds for all real weights.

CORRECT

C (^) It requires Kruskal's algorithm as a preprocessing step to handle negative weights.

D (^) It finds an MST only if all edge weights are nonnegative; otherwise it may cycle.

EXPLANATION The cut property holds for any real edge weights, so Prim's algorithm correctly finds an MST regardless of negative weights, provided the graph is connected. Negative weights do not invalidate the greedy choice; they only affect the total weight. Options A, C, and D are false because the cut property is weight-agnostic and no preprocessing is needed.

Detailed Explanations

Q In the two-phase simplex method, if the Phase I optimal objective is positive, what does this imply?

A (^) The original LP is unbounded.

B (^) The original LP is infeasible. CORRECT

C (^) The original LP has multiple optima.

D (^) The original LP is degenerate.

EXPLANATION Phase I minimizes the sum of artificial variables; a positive minimum means no feasible solution exists with all artificials zero, hence the original LP is infeasible. Unboundedness (A) and multiple optima (C) are properties of feasible LPs; degeneracy (D) refers to basic solutions, not feasibility.

Detailed Explanations

Q For a connected graph with V vertices and E edges, Prim's algorithm using a binary heap runs in which time?

A (^) O(V^2)

B (^) O(E log V) CORRECT

C (^) O(E + V log V)

D (^) O(V log V + E log E)

EXPLANATION With a binary heap and adjacency list, each edge causes at most one decrease-key (O(log V)) and each vertex one extract-min (O(log V)), giving O(E log V). Option A is the array-based implementation; C is for Fibonacci heaps; D is unnecessarily loose and not the standard bound.

Detailed Explanations

Q For a connected graph, which statement about the cut property and Prim's algorithm is correct?

A (^) The cut property guarantees that every safe edge chosen by Prim's is in some MST.

CORRECT

B (^) Prim's algorithm may choose an edge not in any MST if ties are broken arbitrarily.

C (^) The cut property holds only for graphs with distinct edge weights.

D (^) Prim's algorithm requires the graph to be a tree to apply the cut property.

EXPLANATION The cut property states that the minimum-weight edge crossing any cut is safe, i.e., belongs to some MST; Prim's always selects such an edge. Ties (B) still yield some MST; distinct weights (C) are not required; and the graph need not be a tree (D false).

Detailed Explanations

Q In a transportation LP, a basic feasible solution with fewer than m+n-1 positive allocations is called:

A (^) Infeasible

B (^) Degenerate CORRECT

C (^) Unbounded

D (^) Optimal

EXPLANATION A basic feasible solution in a transportation problem should have exactly m+n- positive allocations; fewer indicates degeneracy. Infeasibility (A) means no solution exists; unboundedness (C) is impossible in transportation due to fixed supplies/demands; optimality (D) is unrelated to the count of positive allocations.

Detailed Explanations

Q In the simplex method, a basic variable with value zero in the current basic feasible solution indicates:

A (^) The LP is infeasible.

B (^) The LP is unbounded.

C (^) Degeneracy. CORRECT

D (^) Multiple optimal solutions.

EXPLANATION A basic feasible solution with at least one zero-valued basic variable is degenerate, which can cause cycling in simplex. Infeasibility (A) and unboundedness (B) are unrelated to zero basic variables; multiple optima (D) relate to reduced costs, not basic variable values.

Detailed Explanations

Q Which of the following is a valid dual constraint for a primal maximization LP with a constraint?

A (^) The dual variable is unrestricted in sign.

B (^) The dual constraint is.

C (^) The dual variable is 0. CORRECT

D (^) The dual constraint is =.

EXPLANATION In the standard dual of a maximization primal with constraints, the corresponding dual variables are nonnegative (0) and the dual constraints are. Option A applies to equality constraints; B and D are incorrect for constraints.

Detailed Explanations

Q A cut property states: for any cut, the minimum-weight edge crossing it belongs to some MST. Which statement is necessarily true?

A (^) The minimum-weight crossing edge is in every MST.

B (^) If it is the unique minimum-weight crossing edge, it is in every MST.

CORRECT

C (^) Every edge crossing the cut belongs to some MST.

D (^) The maximum-weight crossing edge cannot be in any MST.

EXPLANATION Uniqueness of the lightest crossing edge forces it into every MST; with ties, different MSTs may choose different light edges. The other options overgeneralize the cut property.

Detailed Explanations

Q In the simplex method, a basic feasible solution is degenerate when which condition holds?

A (^) At least one basic variable equals zero. CORRECT

B (^) At least one nonbasic variable equals zero.

C (^) The objective row has a zero reduced cost.

D (^) The ratio test yields multiple minimum ratios.

EXPLANATION Degeneracy means a basic variable is zero, so the basis has fewer than m positive components. Multiple minimum ratios can cause degeneracy but are not its definition; zero reduced cost signals alternative optima.

Detailed Explanations

Q In a transportation LP solved by simplex, a zero reduced cost for a nonbasic variable at optimality implies which?

A (^) The solution is degenerate.

B (^) The problem is unbounded.

C (^) Alternative optimal solutions exist. CORRECT

D (^) The variable must enter the basis.

EXPLANATION A zero reduced cost on a nonbasic variable at optimality permits pivoting it in without changing the objective, yielding an alternative optimum. It does not imply degeneracy, unboundedness, or a required pivot.

Detailed Explanations

Q Using the ratio test in simplex, which leaving variable is selected when multiple rows attain the minimum ratio?

A (^) The row with the smallest index among ties. CORRECT

B (^) The row with the largest basic variable value.

C (^) The row with the most negative coefficient.

D (^) The row with the largest index among ties.

EXPLANATION Bland's rule breaks ties by choosing the smallest-index leaving variable to prevent cycling. The other choices are not standard anti-cycling rules.

Detailed Explanations

Q In simplex, after introducing an artificial variable with the big-M method, a very large M primarily serves to do what?

A (^) Guarantee integer solutions.

B (^) Penalize artificial variables in the objective. CORRECT

C (^) Ensure the initial basis is optimal.

D (^) Eliminate the need for a ratio test.

EXPLANATION Big-M assigns a large penalty to artificial variables so they are driven to zero in any optimal solution. It does not enforce integrality, ensure optimality, or remove the ratio test.

Detailed Explanations

Q For a graph with negative edge weights but no negative cycles, which statement about finding an MST is correct?

A (^) Prim's algorithm fails because it assumes nonnegative weights.

B (^) Kruskal's algorithm fails on negative weights.

C (^) Both Prim's and Kruskal's still correctly find an MST. CORRECT

D (^) No MST exists when negative weights are present.

EXPLANATION MST algorithms rely on the cut property, which holds for any real weights, so negative weights do not break Prim's or Kruskal's. Negative cycles are irrelevant to MSTs, which are trees.