0% found this document useful (0 votes)
153 views5 pages

DAA Group Assignment PDF

1) Apply Dijkstra's algorithm to find the shortest paths from vertex V1 to all other vertices in a directed graph. 2) Use Prim's algorithm to find the minimum spanning tree and its cost of an undirected weighted graph, starting from vertex V1. 3) Find the minimum spanning tree and its cost of an undirected weighted graph using Kruskal's algorithm. 4) Apply Floyd-Warshall's algorithm to find the shortest paths between all vertices in a directed weighted graph. 5) Use the 0/1 knapsack problem to determine the maximum profit items that can be carried in a knapsack of total weight 6, given the weights and benefits of

Uploaded by

Mebratu Asrat
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)
153 views5 pages

DAA Group Assignment PDF

1) Apply Dijkstra's algorithm to find the shortest paths from vertex V1 to all other vertices in a directed graph. 2) Use Prim's algorithm to find the minimum spanning tree and its cost of an undirected weighted graph, starting from vertex V1. 3) Find the minimum spanning tree and its cost of an undirected weighted graph using Kruskal's algorithm. 4) Apply Floyd-Warshall's algorithm to find the shortest paths between all vertices in a directed weighted graph. 5) Use the 0/1 knapsack problem to determine the maximum profit items that can be carried in a knapsack of total weight 6, given the weights and benefits of

Uploaded by

Mebratu Asrat
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/ 5

Group assignment

1. Apply Dijkstra’s algorithm to find the shortest path from V1 to all other vertices
of the following directed graph by showing the necessary steps. (4 points)

V2 4
9 V5 6
4 V8 4
7
V1 V3 V6 V10
7
V9 5
V4 V7 5

1
2. Consider the following undirected weighted graph. Find the minimum
spanning tree (MST) and the cost of the MST using Prim’s algorithm. Draw
each step and consider node V1 as starting node. (3 points)
1 2
V1 V2 V3
6 6
4 4 6
3 8 V6
V4 V5

7
4 3
V7

2
3. Find the minimum spanning tree and its costs of the following undirected
weighted graph using Kruskal’s algorithm. (2 points)

C
A 7 8

5 B 7
9
E
D
8 9

6
F 11 G

3
4. Apply Floyd-Warshall’s algorithm to find the shortest paths between each
vertices in the following directed weighted graph. (4 points)

6
6
1
14

4
5. Finds the max possible items that can be carried in the knapsack to achieve maximum
Profit and find actual Knapsack Items using 0/1 Knapsack problem. Assume you have 5
number of items, the knapsack total weight is 6 and the Weight(wi) and benefit(bi) are as
shown in the following table. (3 points)

Item Weight (wi) Benefit (bi)


1 1 3
2 2 4
3 5 6
4 3 5
5 6 8

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy