0% found this document useful (0 votes)
72 views6 pages

(CS21003: Algorithms-I) Online-Quiz/Test: Question-1: Minimum Spanning Tree (Marks: 6)

The document describes an online quiz for an algorithms course. It provides a sample graph problem to test minimum spanning tree algorithms. Students are asked to: 1) Assign weights to each edge of the graph; 2) Run Prim's algorithm and show the edges selected at each step; 3) Run Kruskal's algorithm and show the edges selected at each step. The student must also provide the total cost of the minimum spanning trees produced by each algorithm.

Uploaded by

Hima Vamsi Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
72 views6 pages

(CS21003: Algorithms-I) Online-Quiz/Test: Question-1: Minimum Spanning Tree (Marks: 6)

The document describes an online quiz for an algorithms course. It provides a sample graph problem to test minimum spanning tree algorithms. Students are asked to: 1) Assign weights to each edge of the graph; 2) Run Prim's algorithm and show the edges selected at each step; 3) Run Kruskal's algorithm and show the edges selected at each step. The student must also provide the total cost of the minimum spanning trees produced by each algorithm.

Uploaded by

Hima Vamsi Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test

[ CS21003 : Algorithms-I ] Online-


Quiz/Test
* Required

Question-1: Minimum Spanning Tree [Marks: 6]

Given a weighted undirected graph G =<V, E, W>, where the vertices are V = {A,B,C,D,E,F} (|V| = 6), the edges
are E = {(A,B), (A,D), (A,E), (B,C), (B,D), (B,E), (B,F), (C,E), (C,F), (D,E), (E,F)} (|E| = 11), the weights form the
set W (not specified and you have to enter). PLEASE REFER TO THE IMAGE (Figure-1) GIVEN BELOW.

Your are asked to do the following:

[i] Define the weights (as a positive number) for each edge to make the example (wighted undirected
graph) complete.
Remember, every edge-weight should be a distinct number.

[ii] Show the step-wise running (as asked below) of Prim's algorithm over the example graph that you
constructed. Assume that, 'A' be the starting vertex/node to initiate this algorithm. [Marks = 3]
More precisely, you shall be notifying the next edge to be added at every step.

[iii] Show the step-wise running (as asked below) of Kruskal's algorithm over the example graph that you
constructed. [Marks = 3]
More precisely, you shall be notifying the next edge to be added at every step.

Figure-1 (for Question-1)

https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 1/6
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test

Are you Attempting Question-1? *

YES

NO

Enter Weight of Edge-(A,B)

Your answer

Enter Weight of Edge-(A,D)

Your answer

Enter Weight of Edge-(A,E)

Your answer

Enter Weight of Edge-(B,C)

Your answer

Enter Weight of Edge-(B,D)

Your answer

https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 2/6
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test

Enter Weight of Edge-(B,E)

Your answer

Enter Weight of Edge-(B,F)

Your answer

Enter Weight of Edge-(C,E)

Your answer

Enter Weight of Edge-(C,F)

Your answer

Enter Weight of Edge-(D,E)

Your answer

Enter Weight of Edge-(E,F)

Your answer

https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 3/6
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test

Prim's Algorithm: Added Edge at Step-1


Let, 'A' be the starting vertex/node to initiate the algorithm.

Choose

Prim's Algorithm: Added Edge at Step-2

Choose

Prim's Algorithm: Added Edge at Step-3

Choose

Prim's Algorithm: Added Edge at Step-4

Choose

Prim's Algorithm: Added Edge at Step-5

Choose

https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 4/6
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test

Prim's Algorithm: What is the total cost of the Minimum Spanning Tree that you
formed?

Your answer

Kruskal's Algorithm: Added Edge at Step-1

Choose

Kruskal's Algorithm: Added Edge at Step-2

Choose

Kruskal's Algorithm: Added Edge at Step-3

Choose

Kruskal's Algorithm: Added Edge at Step-4

Choose

Kruskal's Algorithm: Added Edge at Step-5

Choose

https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 5/6
4/8/2020 [ CS21003 : Algorithms-I ] Online-Quiz/Test

Kruskal's Algorithm: What is the total cost of the Minimum Spanning Tree that
you formed?

Your answer

Page 2 of 4 Back Next

Never submit passwords through Google Forms.

This content is neither created nor endorsed by Google. Report Abuse - Terms of Service - Privacy Policy

 Forms

https://docs.google.com/forms/d/e/1FAIpQLScPtzymuewN0M8BQtUtXI0uVlmBVEF7RUm6hdBz1AkYlqfQuA/formResponse 6/6

You might also like