quantitative methods minimal spanning tree and dijkstra [compatibility mode]

24
BITS Pilani, Pilani Campus Technique to connect all the points of a network while minimizing the distance between them. Input: Fully connected graph with distances known between the nodes. Output: Tree which gives minimum distance that connects all the nodes. MINIMAL- SPANNING TREE

Upload: adarsh

Post on 22-Nov-2014

505 views

Category:

Documents


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

Technique to connect all the points of a network while minimizing the distance between them.

Input: Fully connected graph with distances known between the nodes.

Output: Tree which gives minimum distance that connects all the nodes.

MINIMAL- SPANNING TREE

Page 2: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

Algorithm:

1. Select any node in the network

2. Connect this node to the nearest node that minimizestotal distance.

3. Find and connect the nearest node that is notconnected. In case of tie, select arbitrary and proceed.

4. Repeat step 3 until all nodes are connected.

MINIMAL- SPANNING TREE

Page 3: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

Launderdale Construction Company, Which is currentlydeveloping a luxurious housing project in Panama citybeach, Florida.

Melvin Launderdale, owner and president of LauderdaleConstruction, must determine the least expensive way toprovide water and power to each house.

The network of the House is given in the figure.

Minimal Spanning Tree-Problem

Page 4: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

Problem :

Each number depicts-Dist ance in hundreds of feet

34

2

1

4

8

7

5

6

3

3

3

3

5

6

5

7

1

2

2

2

Page 5: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956

MINIMAL- SPANNING TREE

34

2

1

4

8

7

5

6

3

3

3

3

5

6

5

7

1

2

2

Solution:

2

Page 6: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

Network design.– Telephone, electrical, hydraulic, TV cable, computer, road

Phone network design Problems-

Business with several offices ,

Lease phone lines to connect them up with each other,

Phone company charges different amounts of money to connect different pairs of cities.

Set of lines that connects all your offices with a minimum total cost.

- Spanning tree, since if a network isn’t a tree you can always remove some edges and save money

Application of Minimal Spanning Tree

Page 7: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

A graph search algorithm that solves the single-source shortest path problem.

Input: fully connected graph with distances known between the nodes.

Output: For a source node in the graph, the algorithm finds the path with lowest cost between that vertex and every other vertex.

Can also be used for finding costs of shortest paths from a single vertex to a single destination

DIJKSTRA ALGORITHM

Page 8: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 9: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 10: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 11: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 12: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 13: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 14: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 15: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 16: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 17: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 18: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 19: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 20: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 21: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 22: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 23: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

DIJKSTRA ALGORITHM

Page 24: Quantitative methods minimal spanning tree and dijkstra [compatibility mode]

BITS Pilani, Pilani Campus

1.) http://optlab-server.sce.carleton.ca/POAnimations2007/DijkstrasAlgo.html

2.) Wikipedia.org

3.) http://www.cs.princeton.edu/~rs/AlgsDS07/14MST.pdf

References