Algo final (1)
Algo final (1)
Your Answer:
Your Answer:
1.Assume the map has 3 vertices V= (Tampa, Miami, Orlando} E=
[Tampa. Miami).(Tampa, Miami).(Orlando, Tampal]and edges
w(Tampa, Miami) 250,w(Miami, orlando),=350,w (Orlando,
Tarnpa)- 480
75°F Mostl
1.(2 Points) Definea greedy algorithmn and what are the 6steps
used to develop agreedy algorithm.
2.(2 Points) What is the difference between greedy and dynanic
programming. Explain using 0-1 knapsack problern and fractional
knapsack problem.
3.(2 Points) Prove that the fractional knapsack problem has the
greedy choice property.
Your Answer:
1. Greedy algorithmobtains an optimal solution to a problem by
making sequence of choices. Six steps used to develop greedy
algorithm:
a. Determine the optimal substructure of the problem.
b. Develop the recursive solution.
1. (2 Points) Define what is an articulion point.
2. (2 Points) For the following graph, list the articulation
points.
3. (2 Points) List the bi-connected
components of the graph.
8
9
Your Answer:
Ouestion I 11/ll DS
ptS