SlideShare a Scribd company logo
1 of 20
Download to read offline
CONTENTS
 Tree
 Minimum spanning tree
 Definition
 Properties
 Example
 Applications
Tree
A tree is a graph with the following properties:
 The graph is connected (can go from anywhere to anywhere)
 There are no cycles(acyclic)
Graphs that are not trees
Tree
Minimum Spanning Tree (MST)
4
• It is a tree (i.e., it is acyclic)
• It covers all the vertices V
• contains |V| - 1 edges
• A single graph can have many different spanning
trees.
Let G=(V,E) be an undirected connected graph.
A sub graph T=(V,E’) of G is a spanning tree of G iff T is
a tree.
Connected undirected graph Spanning trees
 A minimum cost spanning tree is a spanning tree which has a
minimum total cost.
 A minimum spanning tree (MST) or minimum weight spanning
tree is then a spanning tree with weight less than or equal to the
weight of every other spanning tree.
 Addition of even one single edge results in the spanning tree losing its
property of acyclicity and removal of one single edge results in its
losing the property of connectivity.
 It is the shortest spanning tree .
 The length of a tree is equal to the sum of the length of the arcs on the
tree.
Properties
Possible multiplicity
 There may be several minimum spanning trees of the same weight
having a minimum number of edges
 if all the edge weights of a given graph are the same, then every
spanning tree of that graph is minimum.
 If there are n vertices in the graph, then each tree has n-1 edges.
Uniqueness
 If each edge has a distinct weight then there will be only one, unique
minimum spanning tree.
Cycle Property:
 Let T be a minimum spanning tree of a weighted graph G
 Let e be an edge of G that is not in T and let C be the cycle formed
by e with T
 For every edge f of C, weight(f)  weight(e)
 If weight(f) > weight(e) we can get a spanning tree of smaller weight
by replacing e with f
8
4
2 3
6
7
7
9
8
e
C
f
8
4
2 3
6
7
7
9
8
C
e
f
Replacing f with e
yields
a better spanning tree
Partition Property:
 Consider a partition of the vertices
of G into subsets U and V
 Let e be an edge of minimum weight
across the partition
 There is a minimum spanning tree
of G containing edge e
Proof:
 Let T be an MST of G
 If T does not contain e, consider the
cycle C formed by e with T and let f
be an edge of C across the partition
 By the cycle property,
weight(f)  weight(e)
 Thus, weight(f) = weight(e)
 We obtain another MST by replacing
f with e
U V
7
4
2
8
5
7
3
9
8 e
f
7
4
2
8
5
7
3
9
8 e
f
Replacing f with e
yields
another MST
U V
Minimum-cost spanning trees
 If we have a connected undirected graph with a weight (or cost)
associated with each edge
 The cost of a spanning tree would be the sum of the costs of its edges
 A minimum-cost spanning tree is a spanning tree that has the lowest
cost
A B
E D
F C
16
19
21 11
33 14
18
10
6
5
A connected, undirected
graph
A B
E D
F C
16
11
18
6
5
A minimum-cost spanning tree
Applications of minimum spanning trees
 Consider an application where n stations are to be linked using a
communication network.
 The laying of communication links between any two stations involves a
cost.
 The problem is to obtain a network of communication links which
while preserving the connectivity between stations does it with
minimum cost.
 The ideal solution to the problem would be to extract a sub graph
termed minimum cost spanning tree.
 It preserves the connectedness of the graph yields minimum cost.
Applications cont’d
• Suppose you want to supply a set of houses with:
 electric power
 water
 sewage lines
 telephone lines
• To keep costs down, you could connect these houses with
a spanning tree ( for example, power lines)
•However, the houses are not all equal distances apart
• To reduce costs even further, you could connect the
houses with a minimum-cost spanning tree
Applications cont’d
• Constructing highways or railroads spanning several
cities
• Designing local access network
• Making electric wire connections on a control panel
• Laying pipelines connecting offshore drilling sites,
refineries, and consumer markets
Applications cont’d
 The phone company task is to provide phone lines to a village with 10
houses, each labeled H1 through H10.
 A single cable must connects each home. The cable must run through
houses H1, H2, and so forth, up through H10.
 Each node is a house, and the edges are the means by which one house
can be wired up to another.
 The weights of the edges dictate the distance between the homes.
 Their task is to wire up all ten houses using the least amount of
telephone wiring possible.
Graphical representation of hooking up a 10-home village with
phone lines
 The two valid spanning trees from the above graph.
 The edges forming the spanning tree are bolded.
Problem: Laying Telephone Wire
Central office
Wiring: Naïve Approach
Central office
Expensive!
Wiring: Better Approach
Central office
Minimize the total length of wire connecting the customers
Thank you

More Related Content

Similar to spanningtreesapplications-120903115339-phpapp02 (1).pdf

Minimum spanning tree
Minimum spanning treeMinimum spanning tree
Minimum spanning treeSTEFFY D
 
Applied Graph Theory Applications
Applied Graph Theory ApplicationsApplied Graph Theory Applications
Applied Graph Theory Applicationsvipin3195
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra Sahil Kumar
 
Trees amd properties slide for presentaton
Trees amd properties slide for presentatonTrees amd properties slide for presentaton
Trees amd properties slide for presentatonSHARANSASI1
 
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...KUSHDHIRRA2111026030
 
Mithfh lecturenotes 9
Mithfh lecturenotes 9Mithfh lecturenotes 9
Mithfh lecturenotes 9Praveen Kumar
 
Algorithm chapter 9
Algorithm chapter 9Algorithm chapter 9
Algorithm chapter 9chidabdu
 
The Total Strong Split Domination Number of Graphs
The Total Strong Split Domination Number of GraphsThe Total Strong Split Domination Number of Graphs
The Total Strong Split Domination Number of Graphsinventionjournals
 
Hamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmHamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmMahesh Singh Madai
 
Ireducible core and equal remaining obligations rule for mcst games
Ireducible core and equal remaining obligations rule for mcst gamesIreducible core and equal remaining obligations rule for mcst games
Ireducible core and equal remaining obligations rule for mcst gamesvinnief
 
Comparative Report Ed098
Comparative Report Ed098Comparative Report Ed098
Comparative Report Ed098mikebrowl
 
euler paths and circuit theorem.pptx
euler paths and circuit theorem.pptxeuler paths and circuit theorem.pptx
euler paths and circuit theorem.pptxMArunyNandinikkutty
 

Similar to spanningtreesapplications-120903115339-phpapp02 (1).pdf (20)

Daa chapter13
Daa chapter13Daa chapter13
Daa chapter13
 
Minimum spanning tree
Minimum spanning treeMinimum spanning tree
Minimum spanning tree
 
Weighted graphs
Weighted graphsWeighted graphs
Weighted graphs
 
Applied Graph Theory Applications
Applied Graph Theory ApplicationsApplied Graph Theory Applications
Applied Graph Theory Applications
 
7. Spanning trees
7. Spanning trees7. Spanning trees
7. Spanning trees
 
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
ADA - Minimum Spanning Tree Prim Kruskal and Dijkstra
 
Trees amd properties slide for presentaton
Trees amd properties slide for presentatonTrees amd properties slide for presentaton
Trees amd properties slide for presentaton
 
Lecture3
Lecture3Lecture3
Lecture3
 
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
APznzaZLM_MVouyxM4cxHPJR5BC-TAxTWqhQJ2EywQQuXStxJTDoGkHdsKEQGd4Vo7BS3Q1npCOMV...
 
Mithfh lecturenotes 9
Mithfh lecturenotes 9Mithfh lecturenotes 9
Mithfh lecturenotes 9
 
Chapter 24 aoa
Chapter 24 aoaChapter 24 aoa
Chapter 24 aoa
 
Algorithm chapter 9
Algorithm chapter 9Algorithm chapter 9
Algorithm chapter 9
 
The Total Strong Split Domination Number of Graphs
The Total Strong Split Domination Number of GraphsThe Total Strong Split Domination Number of Graphs
The Total Strong Split Domination Number of Graphs
 
Hamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's AlgorithmHamilton Path & Dijkstra's Algorithm
Hamilton Path & Dijkstra's Algorithm
 
Ireducible core and equal remaining obligations rule for mcst games
Ireducible core and equal remaining obligations rule for mcst gamesIreducible core and equal remaining obligations rule for mcst games
Ireducible core and equal remaining obligations rule for mcst games
 
Data structure
Data structureData structure
Data structure
 
Comparative Report Ed098
Comparative Report Ed098Comparative Report Ed098
Comparative Report Ed098
 
euler paths and circuit theorem.pptx
euler paths and circuit theorem.pptxeuler paths and circuit theorem.pptx
euler paths and circuit theorem.pptx
 
Graph clustering
Graph clusteringGraph clustering
Graph clustering
 
Unit V - ppt.pptx
Unit V - ppt.pptxUnit V - ppt.pptx
Unit V - ppt.pptx
 

Recently uploaded

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Recently uploaded (20)

Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

spanningtreesapplications-120903115339-phpapp02 (1).pdf

  • 1.
  • 2. CONTENTS  Tree  Minimum spanning tree  Definition  Properties  Example  Applications
  • 3. Tree A tree is a graph with the following properties:  The graph is connected (can go from anywhere to anywhere)  There are no cycles(acyclic) Graphs that are not trees Tree
  • 4. Minimum Spanning Tree (MST) 4 • It is a tree (i.e., it is acyclic) • It covers all the vertices V • contains |V| - 1 edges • A single graph can have many different spanning trees. Let G=(V,E) be an undirected connected graph. A sub graph T=(V,E’) of G is a spanning tree of G iff T is a tree.
  • 5. Connected undirected graph Spanning trees
  • 6.  A minimum cost spanning tree is a spanning tree which has a minimum total cost.  A minimum spanning tree (MST) or minimum weight spanning tree is then a spanning tree with weight less than or equal to the weight of every other spanning tree.  Addition of even one single edge results in the spanning tree losing its property of acyclicity and removal of one single edge results in its losing the property of connectivity.  It is the shortest spanning tree .  The length of a tree is equal to the sum of the length of the arcs on the tree.
  • 7. Properties Possible multiplicity  There may be several minimum spanning trees of the same weight having a minimum number of edges  if all the edge weights of a given graph are the same, then every spanning tree of that graph is minimum.  If there are n vertices in the graph, then each tree has n-1 edges. Uniqueness  If each edge has a distinct weight then there will be only one, unique minimum spanning tree.
  • 8. Cycle Property:  Let T be a minimum spanning tree of a weighted graph G  Let e be an edge of G that is not in T and let C be the cycle formed by e with T  For every edge f of C, weight(f)  weight(e)  If weight(f) > weight(e) we can get a spanning tree of smaller weight by replacing e with f 8 4 2 3 6 7 7 9 8 e C f 8 4 2 3 6 7 7 9 8 C e f Replacing f with e yields a better spanning tree
  • 9. Partition Property:  Consider a partition of the vertices of G into subsets U and V  Let e be an edge of minimum weight across the partition  There is a minimum spanning tree of G containing edge e Proof:  Let T be an MST of G  If T does not contain e, consider the cycle C formed by e with T and let f be an edge of C across the partition  By the cycle property, weight(f)  weight(e)  Thus, weight(f) = weight(e)  We obtain another MST by replacing f with e U V 7 4 2 8 5 7 3 9 8 e f 7 4 2 8 5 7 3 9 8 e f Replacing f with e yields another MST U V
  • 10. Minimum-cost spanning trees  If we have a connected undirected graph with a weight (or cost) associated with each edge  The cost of a spanning tree would be the sum of the costs of its edges  A minimum-cost spanning tree is a spanning tree that has the lowest cost A B E D F C 16 19 21 11 33 14 18 10 6 5 A connected, undirected graph A B E D F C 16 11 18 6 5 A minimum-cost spanning tree
  • 11. Applications of minimum spanning trees  Consider an application where n stations are to be linked using a communication network.  The laying of communication links between any two stations involves a cost.  The problem is to obtain a network of communication links which while preserving the connectivity between stations does it with minimum cost.  The ideal solution to the problem would be to extract a sub graph termed minimum cost spanning tree.  It preserves the connectedness of the graph yields minimum cost.
  • 12. Applications cont’d • Suppose you want to supply a set of houses with:  electric power  water  sewage lines  telephone lines • To keep costs down, you could connect these houses with a spanning tree ( for example, power lines) •However, the houses are not all equal distances apart • To reduce costs even further, you could connect the houses with a minimum-cost spanning tree
  • 13. Applications cont’d • Constructing highways or railroads spanning several cities • Designing local access network • Making electric wire connections on a control panel • Laying pipelines connecting offshore drilling sites, refineries, and consumer markets
  • 14. Applications cont’d  The phone company task is to provide phone lines to a village with 10 houses, each labeled H1 through H10.  A single cable must connects each home. The cable must run through houses H1, H2, and so forth, up through H10.  Each node is a house, and the edges are the means by which one house can be wired up to another.  The weights of the edges dictate the distance between the homes.  Their task is to wire up all ten houses using the least amount of telephone wiring possible.
  • 15. Graphical representation of hooking up a 10-home village with phone lines
  • 16.  The two valid spanning trees from the above graph.  The edges forming the spanning tree are bolded.
  • 17. Problem: Laying Telephone Wire Central office
  • 18. Wiring: Naïve Approach Central office Expensive!
  • 19. Wiring: Better Approach Central office Minimize the total length of wire connecting the customers