SlideShare a Scribd company logo
1 of 31
INTERESTING APPLICATIONS OF
                GRAPHS

03/09/2012                          1
 Graph.
 Vertex.
 Edge.
 Undirected Graph.
 Directed Graph.
 Path.
 Cycle.
 Eulerian Cycle and
 Hamiltonian Cycle.


03/09/2012             2
 A graph G consists of a finite set of ordered pairs, called edges
  E, of certain entities called vertices V. Edges are also called as
  arcs or links. Vertices are also called as nodes or points.

 G=(V,E)

 A graph is a set of vertices and edges. A vertex may represent
  a state or a condition while the edge may represent a relation
  between two vertices.



03/09/2012                                                             3
 Directed Graph
       Directed Graphs or DIGRAPHS make reference to edges which are
        directed (i.e.) edges which are ordered pairs of vertices.
 Undirected Graph
       A graph whose definition makes reference to unordered pairs of
        vertices as edges is known as an undirected graph

 Path
       A simple path is a path in which all the vertices except possibly the
        first and last vertices are distinct




03/09/2012                                                                      4
 Cycle
       A cycle is a simple path in which the first and last vertices are the same
        . A cycle is also known as a circuit, elementary cycle, circular path or
        polygon.


 Eulerian Graph
       A walk starting at any vertex going through each edge exactly once
        and terminating at the start vertex is called an Eulerian walk or line.
 A Hamiltonian path in a graph is a path that visits each vertex
  in the graph exactly once.
 A Hamiltonian cycle is a cycle that visits each vertex in the
  graph exactly once and returns to the starting vertex.
03/09/2012                                                                           5
 Let G = (V, E) be an undirected connected graph. A subgraph
  T = (V, E’) of G is a spanning tree of G iff T is a tree
 Given G = (V, E) to be a connected, weighted undirected graph
  where each edge involves a cost, the extraction of a spanning
  tree extends itself to the extraction of a minimum cost
  spanning tree.
 A minimum cost spanning tree is a spanning tree which has a
  minimum total cost.




03/09/2012                                                        6
2             24                           3                   2                                          3
             4                                                              4
       1                                                                1
                                      23                    9                                                          9
                 6                             18                               6
                             6                                                              6
                                  5                 4                                           5              4
             16                                11                                                        11
                     8                5                                             8               5
                                                        7                                                          7
                                 10         14
                     7                21                        8                   7                                      8

                                  G = (V, E)                                                    T = (V, F) w(T) = 50




03/09/2012                                                                                                                     7
 Select an arbitrary node as the initial tree (T)
 Augment T in an iterative fashion by adding the outgoing edge
  (u,v), (i.e., u  T and v  G-T ) with minimum cost (i.e.,
  weight)
 The algorithm stops after |V | - 1 iterations
 Computational complexity = O (|V|2)




03/09/2012                                                    8
 The algorithm then finds, at each stage, a new vertex to add
  to the tree by choosing the edge (u, v) such that the cost of (u,
  v) is the smallest among all edges where u is in the tree and v
  is not.
 Algorithm would build the minimum spanning tree, starting
  from v1. Initially, v1 is in the tree as a root with no edges.
 Each step adds one edge and one vertex to the tree.




03/09/2012                                                        9
procedure PRIM(G)
    E’ = ;                /* Initialize E’ to a null set */
    Select a minimum cost edge (u,v) from E;
    V’ = {u}              Include u in V’ 
    while V’ not equal to V do
      Let (u, v) be the lowest cost edge such that         u is in V’ and v is in V
       – V’;
     Add edge (u,v) to set E’;
     Add v to set V’;
    endwhile
    end PRIM


03/09/2012                                                                        10
V2           3   V3
                  1
                                        2
                               3            V6
             V1                    1

                  4
                           1            4
                      V4           V5




03/09/2012                                       11
V2
                                    1
             V1
                            V1
         Algorithm starts
                            After the 1st
                            iteration




03/09/2012                                  12
V3
                                          V2          3
                     V2          V3
                             3            1
                                                      3
               1                                               1
                             3        V
                V1
                                      1

             After the 2nd                                V5
             iteration
                                      After the 3rd
                                      iteration




03/09/2012
                                                                   13
V3
             V2              3                 V2            3   V3
             1                                 1
                                                                      2
                                      1                          1
       V1                                 V1
                         1                                                V6
                                                         1
                 V4              V5                V4            V5

         After the 4th                         After the 5th
         iteration                             iteration




03/09/2012
                                                                               14
 The Travelling Salesman Problem (TSP) is an NP-hard problem
  studied in OR(Operational Research) and theoretical
  computer science.
 You are given a set of n cities
 You are given the distances between the cities.
 You start and terminate your tour at your home city.
 You must visit each other city exactly once.
 Your mission is to determine the shortest tour.




03/09/2012                                                      15
 The TSP is easy to state, takes no math background to
  understand, and no great talent to find feasible solutions. It’s
  fun, and invites recreational problem solvers.
 It inturn has many practical applications.
 Many hard problems, such as job shop scheduling, can be
  converted algebraically to and from the TSP.
 A good TSP algorithm will be good for other hard problems.




03/09/2012                                                           16
 Nearest Neighbour Algorithm.
 Lower Bound Algorithm.
 Tour Improvement Algorithm.
 Christofide’s Algorithm.
  Etc.,




03/09/2012                       17
 It works only on undirected graphs.

 Step 1, minimum spanning tree: we construct a minimum cost
  spanning tree T for graph G

 Step 2, Creating a Cycle:Now that we have our MST M , we
  can create a cycle W from it. In order to do this, we walk
  along the nodes in a depth first search, revisiting vertices as
  ascend. Graphically, this means outlining the tree.



03/09/2012                                                          18
 Step 3, Removing Redundant Visits: In order to create a
  plausible solution for the TSP, we must visit vertices exactly
  once.
  Since we used an MST, we know that each vertex is visited at
  least once, so we need only remove duplicates in such a way
  that does not increase the weight.

 Algorithm complexity is O(n3).




03/09/2012                                                         19
Example: G(V,E):
                                        6              Belmont
                    Arlington

                                        7                        4
                                                   3
                      8

                                            Fantsila     4
                                                                 Cambridge
                                5

                                              8
                   Everett                                   7
                                    6


                                             Denmolt
 03/09/2012                                                                  20
Minimum Hamiltonian Cycle
                                6               B
                    A

                                7                       4
                                            3
                8

                                        F       4
                                                            C
                        5

                                    8
                E                                   7
                            6
Cost = 34
                                            D
 03/09/2012                                                     21
Step 1:
                              6           B
                  A

                                              4
                                      3


                                  F
                                                  C
                      5


              E
                          6


                                      D
 03/09/2012                                           22
Step 2:
                                     6           B
                         A

                                                     4
                                             3


                                         F
                                                         C
                             5


                     E
                                 6

Cycle: ABCBFEDEFBA                                           Cost : 48
                                             D
  03/09/2012                                                        23
Step 3:
                                    6           B
                        A

                                                    4
                                            3


                                        F
                                                        C
                            5


                    E
                                6

Shortcut: FBA FA                                           Saving : 2
                                            D
  03/09/2012                                                       24
Step 3:
                                    6           B
                        A

                                                    4
                                            3

                    8
                                        F
                                                        C
                            5


                    E
                                6

Shortcut: EFA EA                                           Saving : 4
                                            D
  03/09/2012                                                       25
Step 3:
                                6           B
                        A

                                                4
                                        3

                    8
                                    F
                                                    C


                                    8
                    E
                            6

Shortcut: FED FD                                       Saving : 3
                                        D
  03/09/2012                                                   26
Step 3:
                                6           B
                        A

                                                4


                    8
                                            4
                                    F
                                                    C


                                    8
                    E
                            6

Shortcut: CBF CF                                       Saving : 3
                                        D
  03/09/2012                                                   27
End:
                                  6           B
                          A

                                                  4


                      8
                                              4
                                      F
                                                      C


                                      8
                      E
                              6

Cycle     : ABCFDEA
Cost      : 36                            D
  03/09/2012                                              28
Knight’s Path:




 03/09/2012      29
 Applying graph theory to a system means using a graph-
  theoretic representation
 Representing a problem as a graph can provide a different
  point of view.
 Representing a problem as a graph can make a problem much
  simpler.
       More accurately, it can provide the appropriate tools for solving the
        problem.




03/09/2012                                                                      30
03/09/2012   31

More Related Content

What's hot

Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph TheoryYosuke Mizutani
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network systemManikanta satyala
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabatinabati
 
Real life application
Real life applicationReal life application
Real life applicationumadeviR3
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graphumair khan
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphsTech_MX
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory IntroductionMANISH T I
 
Graph theory and life
Graph theory and lifeGraph theory and life
Graph theory and lifeMilan Joshi
 
Graph coloring and_applications
Graph coloring and_applicationsGraph coloring and_applications
Graph coloring and_applicationsmohammad alkhalil
 
Dijkstra's Algorithm
Dijkstra's AlgorithmDijkstra's Algorithm
Dijkstra's AlgorithmArijitDhali
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theoryArvindBorge
 
Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring Darwish Ahmad
 

What's hot (20)

Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Introduction to Graph Theory
Introduction to Graph TheoryIntroduction to Graph Theory
Introduction to Graph Theory
 
Graph theory in network system
Graph theory in network systemGraph theory in network system
Graph theory in network system
 
Graph theory concepts complex networks presents-rouhollah nabati
Graph theory concepts   complex networks presents-rouhollah nabatiGraph theory concepts   complex networks presents-rouhollah nabati
Graph theory concepts complex networks presents-rouhollah nabati
 
Real life application
Real life applicationReal life application
Real life application
 
Graph theory
Graph  theoryGraph  theory
Graph theory
 
Isomorphic graph
Isomorphic graphIsomorphic graph
Isomorphic graph
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
Graph Theory Introduction
Graph Theory IntroductionGraph Theory Introduction
Graph Theory Introduction
 
Graph coloring
Graph coloringGraph coloring
Graph coloring
 
Graph theory and life
Graph theory and lifeGraph theory and life
Graph theory and life
 
Graph coloring and_applications
Graph coloring and_applicationsGraph coloring and_applications
Graph coloring and_applications
 
Dijkstra's Algorithm
Dijkstra's AlgorithmDijkstra's Algorithm
Dijkstra's Algorithm
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Connectivity of graph
Connectivity of graphConnectivity of graph
Connectivity of graph
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Shortest path
Shortest pathShortest path
Shortest path
 
Network flow problems
Network flow problemsNetwork flow problems
Network flow problems
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring Introduction to Graph and Graph Coloring
Introduction to Graph and Graph Coloring
 

Similar to Interesting applications of graph theory

AlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe PaulAlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe PaulAlgoPerm 2012
 
Diagrama de motores 12 pontas
Diagrama de motores 12 pontasDiagrama de motores 12 pontas
Diagrama de motores 12 pontasReativa Service
 
Vescovato Calendrier
Vescovato CalendrierVescovato Calendrier
Vescovato Calendrierpam vescovato
 
Graphs, Edges & Nodes: Untangling the Social Web
Graphs, Edges & Nodes: Untangling the Social WebGraphs, Edges & Nodes: Untangling the Social Web
Graphs, Edges & Nodes: Untangling the Social WebConFoo
 
Nov 24 Parallel And Perpendicular
Nov 24 Parallel And PerpendicularNov 24 Parallel And Perpendicular
Nov 24 Parallel And PerpendicularDMCI
 
Transformations sailing boat v2.1
Transformations   sailing boat v2.1Transformations   sailing boat v2.1
Transformations sailing boat v2.1alan brown
 
Data envelopment analysis
Data envelopment analysisData envelopment analysis
Data envelopment analysisAjit Kumar Ray
 
Parallel And Perpendicular Nov 24
Parallel And Perpendicular Nov 24Parallel And Perpendicular Nov 24
Parallel And Perpendicular Nov 24DMCI
 

Similar to Interesting applications of graph theory (16)

Avltrees
AvltreesAvltrees
Avltrees
 
AlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe PaulAlgoPerm2012 - 04 Christophe Paul
AlgoPerm2012 - 04 Christophe Paul
 
Diagrama de motores 12 pontas
Diagrama de motores 12 pontasDiagrama de motores 12 pontas
Diagrama de motores 12 pontas
 
Carte 1 2010.Jpg
Carte 1 2010.JpgCarte 1 2010.Jpg
Carte 1 2010.Jpg
 
Groupe Avance.Jpg
Groupe Avance.JpgGroupe Avance.Jpg
Groupe Avance.Jpg
 
Calendrier Am
Calendrier AmCalendrier Am
Calendrier Am
 
Vescovato Calendrier
Vescovato CalendrierVescovato Calendrier
Vescovato Calendrier
 
Dislocation
DislocationDislocation
Dislocation
 
Graphs, Edges & Nodes: Untangling the Social Web
Graphs, Edges & Nodes: Untangling the Social WebGraphs, Edges & Nodes: Untangling the Social Web
Graphs, Edges & Nodes: Untangling the Social Web
 
Nov 24 Parallel And Perpendicular
Nov 24 Parallel And PerpendicularNov 24 Parallel And Perpendicular
Nov 24 Parallel And Perpendicular
 
Transformations sailing boat v2.1
Transformations   sailing boat v2.1Transformations   sailing boat v2.1
Transformations sailing boat v2.1
 
Data envelopment analysis
Data envelopment analysisData envelopment analysis
Data envelopment analysis
 
Percentile
PercentilePercentile
Percentile
 
Hook's law experiment (student)
Hook's law experiment (student)Hook's law experiment (student)
Hook's law experiment (student)
 
Parallel And Perpendicular Nov 24
Parallel And Perpendicular Nov 24Parallel And Perpendicular Nov 24
Parallel And Perpendicular Nov 24
 
Topic 2 fractions
Topic 2   fractionsTopic 2   fractions
Topic 2 fractions
 

More from Tech_MX

Virtual base class
Virtual base classVirtual base class
Virtual base classTech_MX
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimationTech_MX
 
Templates in C++
Templates in C++Templates in C++
Templates in C++Tech_MX
 
String & its application
String & its applicationString & its application
String & its applicationTech_MX
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2Tech_MX
 
Stack data structure
Stack data structureStack data structure
Stack data structureTech_MX
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application Tech_MX
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applicationsTech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2Tech_MX
 
Set data structure
Set data structure Set data structure
Set data structure Tech_MX
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Tech_MX
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pcTech_MX
 
More on Lex
More on LexMore on Lex
More on LexTech_MX
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbmsTech_MX
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)Tech_MX
 
Memory dbms
Memory dbmsMemory dbms
Memory dbmsTech_MX
 

More from Tech_MX (20)

Virtual base class
Virtual base classVirtual base class
Virtual base class
 
Uid
UidUid
Uid
 
Theory of estimation
Theory of estimationTheory of estimation
Theory of estimation
 
Templates in C++
Templates in C++Templates in C++
Templates in C++
 
String & its application
String & its applicationString & its application
String & its application
 
Statistical quality__control_2
Statistical  quality__control_2Statistical  quality__control_2
Statistical quality__control_2
 
Stack data structure
Stack data structureStack data structure
Stack data structure
 
Stack Data Structure & It's Application
Stack Data Structure & It's Application Stack Data Structure & It's Application
Stack Data Structure & It's Application
 
Spss
SpssSpss
Spss
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
 
Set data structure
Set data structure Set data structure
Set data structure
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Parsing
ParsingParsing
Parsing
 
Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)Mouse interrupts (Assembly Language & C)
Mouse interrupts (Assembly Language & C)
 
Motherboard of a pc
Motherboard of a pcMotherboard of a pc
Motherboard of a pc
 
More on Lex
More on LexMore on Lex
More on Lex
 
MultiMedia dbms
MultiMedia dbmsMultiMedia dbms
MultiMedia dbms
 
Merging files (Data Structure)
Merging files (Data Structure)Merging files (Data Structure)
Merging files (Data Structure)
 
Memory dbms
Memory dbmsMemory dbms
Memory dbms
 

Recently uploaded

Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 

Recently uploaded (20)

Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 

Interesting applications of graph theory

  • 1. INTERESTING APPLICATIONS OF GRAPHS 03/09/2012 1
  • 2.  Graph.  Vertex.  Edge.  Undirected Graph.  Directed Graph.  Path.  Cycle.  Eulerian Cycle and  Hamiltonian Cycle. 03/09/2012 2
  • 3.  A graph G consists of a finite set of ordered pairs, called edges E, of certain entities called vertices V. Edges are also called as arcs or links. Vertices are also called as nodes or points.  G=(V,E)  A graph is a set of vertices and edges. A vertex may represent a state or a condition while the edge may represent a relation between two vertices. 03/09/2012 3
  • 4.  Directed Graph  Directed Graphs or DIGRAPHS make reference to edges which are directed (i.e.) edges which are ordered pairs of vertices.  Undirected Graph  A graph whose definition makes reference to unordered pairs of vertices as edges is known as an undirected graph  Path  A simple path is a path in which all the vertices except possibly the first and last vertices are distinct 03/09/2012 4
  • 5.  Cycle  A cycle is a simple path in which the first and last vertices are the same . A cycle is also known as a circuit, elementary cycle, circular path or polygon.  Eulerian Graph  A walk starting at any vertex going through each edge exactly once and terminating at the start vertex is called an Eulerian walk or line.  A Hamiltonian path in a graph is a path that visits each vertex in the graph exactly once.  A Hamiltonian cycle is a cycle that visits each vertex in the graph exactly once and returns to the starting vertex. 03/09/2012 5
  • 6.  Let G = (V, E) be an undirected connected graph. A subgraph T = (V, E’) of G is a spanning tree of G iff T is a tree  Given G = (V, E) to be a connected, weighted undirected graph where each edge involves a cost, the extraction of a spanning tree extends itself to the extraction of a minimum cost spanning tree.  A minimum cost spanning tree is a spanning tree which has a minimum total cost. 03/09/2012 6
  • 7. 2 24 3 2 3 4 4 1 1 23 9 9 6 18 6 6 6 5 4 5 4 16 11 11 8 5 8 5 7 7 10 14 7 21 8 7 8 G = (V, E) T = (V, F) w(T) = 50 03/09/2012 7
  • 8.  Select an arbitrary node as the initial tree (T)  Augment T in an iterative fashion by adding the outgoing edge (u,v), (i.e., u  T and v  G-T ) with minimum cost (i.e., weight)  The algorithm stops after |V | - 1 iterations  Computational complexity = O (|V|2) 03/09/2012 8
  • 9.  The algorithm then finds, at each stage, a new vertex to add to the tree by choosing the edge (u, v) such that the cost of (u, v) is the smallest among all edges where u is in the tree and v is not.  Algorithm would build the minimum spanning tree, starting from v1. Initially, v1 is in the tree as a root with no edges.  Each step adds one edge and one vertex to the tree. 03/09/2012 9
  • 10. procedure PRIM(G) E’ = ; /* Initialize E’ to a null set */ Select a minimum cost edge (u,v) from E; V’ = {u}  Include u in V’  while V’ not equal to V do Let (u, v) be the lowest cost edge such that u is in V’ and v is in V – V’; Add edge (u,v) to set E’; Add v to set V’; endwhile end PRIM 03/09/2012 10
  • 11. V2 3 V3 1 2 3 V6 V1 1 4 1 4 V4 V5 03/09/2012 11
  • 12. V2 1 V1 V1 Algorithm starts After the 1st iteration 03/09/2012 12
  • 13. V3 V2 3 V2 V3 3 1 3 1 1 3 V V1 1 After the 2nd V5 iteration After the 3rd iteration 03/09/2012 13
  • 14. V3 V2 3 V2 3 V3 1 1 2 1 1 V1 V1 1 V6 1 V4 V5 V4 V5 After the 4th After the 5th iteration iteration 03/09/2012 14
  • 15.  The Travelling Salesman Problem (TSP) is an NP-hard problem studied in OR(Operational Research) and theoretical computer science.  You are given a set of n cities  You are given the distances between the cities.  You start and terminate your tour at your home city.  You must visit each other city exactly once.  Your mission is to determine the shortest tour. 03/09/2012 15
  • 16.  The TSP is easy to state, takes no math background to understand, and no great talent to find feasible solutions. It’s fun, and invites recreational problem solvers.  It inturn has many practical applications.  Many hard problems, such as job shop scheduling, can be converted algebraically to and from the TSP.  A good TSP algorithm will be good for other hard problems. 03/09/2012 16
  • 17.  Nearest Neighbour Algorithm.  Lower Bound Algorithm.  Tour Improvement Algorithm.  Christofide’s Algorithm. Etc., 03/09/2012 17
  • 18.  It works only on undirected graphs.  Step 1, minimum spanning tree: we construct a minimum cost spanning tree T for graph G  Step 2, Creating a Cycle:Now that we have our MST M , we can create a cycle W from it. In order to do this, we walk along the nodes in a depth first search, revisiting vertices as ascend. Graphically, this means outlining the tree. 03/09/2012 18
  • 19.  Step 3, Removing Redundant Visits: In order to create a plausible solution for the TSP, we must visit vertices exactly once. Since we used an MST, we know that each vertex is visited at least once, so we need only remove duplicates in such a way that does not increase the weight.  Algorithm complexity is O(n3). 03/09/2012 19
  • 20. Example: G(V,E): 6 Belmont Arlington 7 4 3 8 Fantsila 4 Cambridge 5 8 Everett 7 6 Denmolt 03/09/2012 20
  • 21. Minimum Hamiltonian Cycle 6 B A 7 4 3 8 F 4 C 5 8 E 7 6 Cost = 34 D 03/09/2012 21
  • 22. Step 1: 6 B A 4 3 F C 5 E 6 D 03/09/2012 22
  • 23. Step 2: 6 B A 4 3 F C 5 E 6 Cycle: ABCBFEDEFBA Cost : 48 D 03/09/2012 23
  • 24. Step 3: 6 B A 4 3 F C 5 E 6 Shortcut: FBA FA Saving : 2 D 03/09/2012 24
  • 25. Step 3: 6 B A 4 3 8 F C 5 E 6 Shortcut: EFA EA Saving : 4 D 03/09/2012 25
  • 26. Step 3: 6 B A 4 3 8 F C 8 E 6 Shortcut: FED FD Saving : 3 D 03/09/2012 26
  • 27. Step 3: 6 B A 4 8 4 F C 8 E 6 Shortcut: CBF CF Saving : 3 D 03/09/2012 27
  • 28. End: 6 B A 4 8 4 F C 8 E 6 Cycle : ABCFDEA Cost : 36 D 03/09/2012 28
  • 30.  Applying graph theory to a system means using a graph- theoretic representation  Representing a problem as a graph can provide a different point of view.  Representing a problem as a graph can make a problem much simpler.  More accurately, it can provide the appropriate tools for solving the problem. 03/09/2012 30