- Hamiltonian path reccurent formula
- 051021
- Chapter 12 - Network Flow Models
- 270729 3-SDU Version 5.10 Release Notes
- 06Jun-D1
- Executive Summary
- matematical rythms.pdf
- Linear Sketches
- BSIT-41-Main
- Rai_1982_A Cutset Approach to Reliability Evaluation
- Cse-IV-Design and Analysis of Algorithms [10cs43]-Notes
- Ada Note Hkyrs
- TabuSearch Example Minimum Spanning Tree
- Paul C. Bressloff and Jack D. Cowan- SO(3) Symmetry Breaking Mechanism for Orientation and Spatial Frequency Tuning in the Visual Cortex
- XXXXjjkjkkj
- i1534-7362-12-11-20
- Topology
- 4.Shamod 4-4 BST Search -Deletion
- Localization in Sensor Networks
- 2361
- NENA Interim VoIP Architecture for E-911 i2
- GitHub - Kdn251_Interviews_ Everything You Need to Know to Get the Job
- DS-KS0070B-V0A
- Sap Pricing
- Dublin Course
- Estimation of the number of biophotons involved in the visual perception of a single-object image: Biophoton intensity can be considerably higher inside cells than outside
- 6mb524 Catalogue Sheet
- Discrete Structures and Graph Theory
- 6414 Graph 01
- Sikimeti Ma'u- Quilted Strips, Graph Associahedra and A-Infinity n-Modules
- 1-DataInterpretationLecture1w7.pdf
- 5-Data Sufficiency LectureWEEK15.pdf
- XAT 2014 paper part 1
- 02CExamples.pdf
- New Bb Tariff 3009
- GK oct 2014 summery part-1
- List of Pokémon Episodes - Wikipedia, The Free Encyclopedia
- 24-TrignometryWEEK15.pdf
- 1 Ancient History (Pre Vedic)
- Analysis of Roof Bolt Systems
- 2-DI-2W8.pdf
- Mid Sem Schedule
- 4-NumberTheoryIw3.pdf
- 4-DI4W9.pdf
- 3-DI3W8.pdf
- Pillar Design in Coal Mines
- Accident Due to Rope Haulages
- Basic HTML Tags
- Chapter00 Subsurface Ventilation Engineering
- 9-Intro to Electric Drives
- ExaminationProgramme Mid(2014 15 Autumn)
- Mid-12
- Sample Letters and Resume
- SemesterRegistrationAutumn2014 15 Notice
- 10605033_thesis
- Bandhuranga Mine
- Statistical1 Statistical Distributions
- ExaminationProgramme Mid(2014 15 Autumn) Copy
- Undrained Triaxial Test
- FEE STRUCTURE

**What is A Spanning Tree?
**

• A spanning tree for an undirected graph G=(V,E) is a subgraph of G that is a tree and contains all the vertices of G • Can a graph have more than one spanning tree?

a

b u e

c

v

f

• Can an unconnected graph have a spanning tree?

d

**Minimal Spanning Tree.
**

• The weight of a subgraph is the sum of the weights of it edges.

b 4 a 4

3

9

u 2 e

• A minimum spanning tree for a weighted graph is a spanning tree with minimum weight.

14 10 c 3 d 8 v

15

f

• Can a graph have more then one minimum spanning tree?

Mst T: w( T )=

(u,v) T

w(u,v ) is minimized

The Problem • Several pins of an electronic circuit must be connected using the least amount of wire. Modeling the Problem • The graph is a complete, undirected graph G = ( V, E ,W ), where V is the set of pins, E is the set of all possible interconnections between the pairs of pins and w(e) is the length of the wire needed to connect the pair of vertices. • Find a minimum spanning tree.

Example of a Problem that Translates into a MST

Greedy Choice

We will show two ways to build a minimum spanning tree. • A MST can be grown from the current spanning tree by adding the nearest vertex and the edge connecting the nearest vertex to the MST. (Prim's algorithm) • A MST can be grown from a forest of spanning trees by adding the smallest edge connecting two spanning trees. (Kruskal's algorithm)

Notation • Tree-vertices: in the tree constructed so far • Non-tree vertices: rest of vertices Prim’s Selection rule • Select the minimum weight edge between a treenode and a non-tree node and add to the tree .

The Prim algorithm Main Idea Select a vertex to be a tree-node while (there are non-tree vertices) { if there is no edge connecting a tree node with a non-tree node return “no spanning tree” select an edge of minimum weight between a tree node and a non-tree node add the selected edge and its new vertex to the tree } return tree .

A 5 B 4 C 3 E 2 6 D 1 4 2 3 2 F Prim's Algorithm .

A B C D E F Prim's Algorithm .

A B C 2 D E Prim's Algorithm F .

A 5 B 4 C 3 E 2 6 D 1 4 2 2 F Prim's Algorithm .

A B 2 C 3 E Prim's Algorithm 2 1 D 2 F 3 .

A B 2 C 3 E Prim's Algorithm 2 1 D 2 F 3 .

A B 2 C 3 E Prim's Algorithm 2 1 D 2 F .

A B 2 C 3 E Prim's Algorithm 2 1 D 2 F .

spanning tree A B 2 C 3 E Prim's Algorithm 2 1 D 2 F .minimum.

then e is added to the MST and the two clusters. Take the edge e with the smallest weight . ignore it 3. which are already in the same cluster. which are connected by e.if e connects two vertices in different clusters.Kruskal„s Algorithm 1.if e connects two vertices. Each vertex is in its own cluster 2. Continue until n-1 edges were selected Kruskal's Algorithm . are merged into a single cluster .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F cycle!! .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

A 5 B 4 C 3 E 2 6 D 1 4 Kruskal's Algorithm 2 3 2 F .

minimum.spanning tree A B 2 C 3 E Kruskal's Algorithm 2 1 D 2 F .

Breadth First Search (BFS) Depth First Search (DFS) .Graph Traversal Traversing a graph means visiting all the vertices in the graph exactly once.

Similar to in-order traversal of a binary search tree Starting from a given node. DFS . this traversal visits all the nodes up to the deepest level and so on.

V5 .V2 v5 v7 .V8 – V6 – V3 .V7 – V4 .v1 v8 v4 DFS v1 v3 v6 v8 v4 v2 v2 v3 v6 v5 v7 DFS : V1 .

V8 – V3 – V6 .V2 v5 v7 v6 .V5 .V7 – V4 .v1 v8 v4 v1 v2 v3 v6 DFS v2 v8 v4 v3 v5 v7 DFS : V1 .

let it be vx . If vx has an immediate adjacent vy then visit it and so on till there is a dead end.Visit the vertex v Visit all the vertices along the path which begins at v Visit the vertex v. . DFS Traversal Dead end: A vertex which does not have an immediate adjacent or its immediate adjacent has been visited. then the vertex immediate adjacent to v.

After coming to an dead end we backtrack to v to see if it has an another adjacent vertex other than vx and then continue the same from it else from the adjacent of the adjacent (which is not visited earlier) and so on. .

Push the starting vertex into the STACK While STACK not empty do POP a vertex V If V is not visited Visit the vertex V Store V in VISIT PUSH all adjacent vertex of V onto STACK End of IF End of While STOP .

K K: E.C.G .C.E J: D.A F D J C E B G K Adjacency List A: F.C C: F D: C E: D.J F: D G: C.B B: G.

DFS of G starting at J [1] Initially push J onto STACK STACK : J VISIT: Ø [2] POP J from the STACK. add it in VISIT and PUSH onto the STACK all neighbor of J STACK: D. K VISIT: J .

C. VISIT: J. K.[3] POP the top element K.G VISIT: J. add it in VISIT and PUSH all neighbor of G onto STACK STACK: D. K [4] POP the top element G.E. E. G .E. add it in VISIT and PUSH all neighbor of K onto STACK STACK: D.

F . K. E. G. add it in VISIT and PUSH all neighbor of F onto STACK STACK: D.E. C [6] POP the top element F. add it in VISIT and PUSH all neighbor of C onto STACK STACK: D. K.E.E. F VISIT: J. G.[5] POP the top element C. D VISIT: J. C.

E. which is already in VISIT STACK: D.[5] POP the top element D. C. E VISIT: J. G. F. G. C. C VISIT: J.D . F.D [6] POP the top element C.E. K. K. add it in VISIT and PUSH all neighbor of D onto STACK STACK: D.E.

F. C. E . C. J VISIT: J. K. F.[5] POP the top element E. C. K.E. add it in VISIT which is already in VISIT and its neighbor onto STACK STACK: D. D. D. D. D which is already in VISIT STACK: VISIT: J. C.E [6] POP the top element J.D. G.E. G.

G.E J: D. C.J F: D G: C. F. K.B B: G.K K: E. E Adjacency List B G K C E A: F.A F D J J.G . D.C.C C: F D: C E: D.C.

BFS Traversal Any vertex in label i will be visited only after the visiting of all the vertices in its preceding level that is at level i – 1 .

[1] Enter the starting vertex v in a queue Q [2] While Q is not empty do Delete an item from Q. say u If u is not in VISIT store u in VISIT Enter all adjacent vertices of u into Q [3] Stop BFS Traversal .

v1 v2 v8 v4 v3 v6 v5 v7 .

[1] Insert the starting vertex V1 in Q Q = V1 VISIT = Ø [2] Delete an item from Q. Store u in VISIT and its adjacent element in Q Q = V2 . V 3 VISIT = V1 . let it be u = V1 u is not in VISIT.

V2 . V4 . V5 VISIT = V1 . V3 . V2 [4] Delete an item from Q.[3] Delete an item from Q. V5 . Store u in VISIT and its adjacent element in Q Q = V3 . V3 . V6 VISIT = V1 . let it be u = V2 u is not in VISIT. V4 . Store u in VISIT and its adjacent element in Q Q = V2 . V4 . let it be u = V3 u is not in VISIT.

V5 . let it be u =V5 u is not in VISIT.[5] Delete an item from Q. V8 VISIT = V1 . Store u in VISIT and its adjacent element in Q Q = V5 . V7 VISIT = V1 . V4 . V2 . V4 [6] Delete an item from Q. let it be u = V4 u is not in VISIT. V6 . V4 . V8 . Store u in VISIT and its adjacent element in Q Q = V4 . V2 . V3 . V5 . V3 . V4 . V6 .

V5 . Store u in VISIT and its adjacent element in Q Q = V6 . V6 . let it be u =V4 u is in VISIT. V3 . V7 VISIT = V1 . V8 . V2 .[7] Delete an item from Q. V8 . V6 . V3 . V4 . V5 [8] Delete an item from Q. V7 VISIT = V1 . V4 . let it be u =V6 u is not in VISIT. Q = V4 . V2 .

V7 . V4 . V2 . V8 [10] Delete an item from Q. let it be u =V8 u is not in VISIT. V6 . V3 . V2 . V1 VISIT = V1 . V3 . V8 . Store u in VISIT and its adjacent element in Q Q = V7 . V1 VISIT = V1 . V7 . V5 . V5 . V4 . Store u in VISIT and its adjacent element in Q Q = V8 . let it be u =V7 u is not in VISIT. V6 .[9] Delete an item from Q.

V2 . Stop Q= VISIT = V1 . V5 . V4 .[11] Delete an item from Q. V3 . V5 . Q = V1 VISIT = V1 . V2 . V 7 [12] Q is empty. V3 . V8 . V8 . let it be u =V1 u is in VISIT. V 7 . V4 . V6 . V6 .

v1 v1 v3 v6 BFS v2 v8 v4 v2 v8 v4 v3 v6 v5 v7 v5 v7 .

- Hamiltonian path reccurent formulaUploaded byAkso Vaxo
- 051021Uploaded bysriashokcute
- Chapter 12 - Network Flow ModelsUploaded byGing66
- 270729 3-SDU Version 5.10 Release NotesUploaded byJohn Fredy Simancas Fierro
- 06Jun-D1Uploaded byJonathan Foster
- Executive SummaryUploaded byakumar_634263
- matematical rythms.pdfUploaded byFelipe Palomo
- Linear SketchesUploaded byHappy Deal
- BSIT-41-MainUploaded byRohit Sharma
- Rai_1982_A Cutset Approach to Reliability EvaluationUploaded byShaina Singh
- Cse-IV-Design and Analysis of Algorithms [10cs43]-NotesUploaded byRajesh Kanna
- Ada Note HkyrsUploaded byPratik Petkar
- TabuSearch Example Minimum Spanning TreeUploaded byKha Trấn Ác
- Paul C. Bressloff and Jack D. Cowan- SO(3) Symmetry Breaking Mechanism for Orientation and Spatial Frequency Tuning in the Visual CortexUploaded byJmasn
- XXXXjjkjkkjUploaded byAvi Sharma
- i1534-7362-12-11-20Uploaded byOsolemio Mer
- TopologyUploaded byBookworm 0_0
- 4.Shamod 4-4 BST Search -DeletionUploaded byrobinpt
- Localization in Sensor NetworksUploaded bygk_gbu
- 2361Uploaded byfpttmm
- NENA Interim VoIP Architecture for E-911 i2Uploaded byNousTekne
- GitHub - Kdn251_Interviews_ Everything You Need to Know to Get the JobUploaded byRaJu SinGh
- DS-KS0070B-V0AUploaded bygvnks90
- Sap PricingUploaded byspb2000
- Dublin CourseUploaded bymardak2953
- Estimation of the number of biophotons involved in the visual perception of a single-object image: Biophoton intensity can be considerably higher inside cells than outsideUploaded byJonathan Robert Kraus (OutofMudProductions)
- 6mb524 Catalogue SheetUploaded bySalvator Fayssal
- Discrete Structures and Graph TheoryUploaded bygdeepthi
- 6414 Graph 01Uploaded byMegan Bell
- Sikimeti Ma'u- Quilted Strips, Graph Associahedra and A-Infinity n-ModulesUploaded bySwertyy

- 1-DataInterpretationLecture1w7.pdfUploaded byadityatheaaa
- 5-Data Sufficiency LectureWEEK15.pdfUploaded byadityatheaaa
- XAT 2014 paper part 1Uploaded byadityatheaaa
- 02CExamples.pdfUploaded byadityatheaaa
- New Bb Tariff 3009Uploaded byadityatheaaa
- GK oct 2014 summery part-1Uploaded byadityatheaaa
- List of Pokémon Episodes - Wikipedia, The Free EncyclopediaUploaded byadityatheaaa
- 24-TrignometryWEEK15.pdfUploaded byadityatheaaa
- 1 Ancient History (Pre Vedic)Uploaded byadityatheaaa
- Analysis of Roof Bolt SystemsUploaded byadityatheaaa
- 2-DI-2W8.pdfUploaded byadityatheaaa
- Mid Sem ScheduleUploaded byadityatheaaa
- 4-NumberTheoryIw3.pdfUploaded byadityatheaaa
- 4-DI4W9.pdfUploaded byadityatheaaa
- 3-DI3W8.pdfUploaded byadityatheaaa
- Pillar Design in Coal MinesUploaded byadityatheaaa
- Accident Due to Rope HaulagesUploaded byadityatheaaa
- Basic HTML TagsUploaded byadityatheaaa
- Chapter00 Subsurface Ventilation EngineeringUploaded byadityatheaaa
- 9-Intro to Electric DrivesUploaded byadityatheaaa
- ExaminationProgramme Mid(2014 15 Autumn)Uploaded byadityatheaaa
- Mid-12Uploaded byadityatheaaa
- Sample Letters and ResumeUploaded byadityatheaaa
- SemesterRegistrationAutumn2014 15 NoticeUploaded byadityatheaaa
- 10605033_thesisUploaded byadityatheaaa
- Bandhuranga MineUploaded byadityatheaaa
- Statistical1 Statistical DistributionsUploaded byadityatheaaa
- ExaminationProgramme Mid(2014 15 Autumn) CopyUploaded byadityatheaaa
- Undrained Triaxial TestUploaded byadityatheaaa
- FEE STRUCTUREUploaded byadityatheaaa