SlideShare ist ein Scribd-Unternehmen logo
1 von 37
Downloaden Sie, um offline zu lesen
Graphs



         www.tudorgirba.com
G = (V, E)
E = { {u,v} | u,v ∈ V}

 a                       e




           c         d       g



 b                       f
G = (V, E)
E = { {u,v} | u,v ∈ V}

  a                                      e




               c              d                      g



  b                                      f



V = { a, b, c, d, e, f, g }

E = { {a,b}, {a,c}, {b,c}, {c,d}, {d,e}, {d,f}, {e,g}, {f,g} }
G = (V, E)
E = { {u,v} | u,v ∈ V}

  a                                      e




               c              d                      g



  b                                      f



V = { a, b, c, d, e, f, g }

E = { {a,b}, {a,c}, {b,c}, {c,d}, {d,e}, {d,f}, {e,g}, {f,g} }
a   b   c   d   e   f   g

a   0   1   1   0   0   0   0

b   0   0   1   0   0   0   0   a           e
c   0   0   0   1   0   0   0
                                    c   d       g
d   0   0   0   0   1   1   0

e   0   0   0   0   0   0   1   b           f

f   0   0   0   0   0   0   1

g   0   0   0   0   0   0   0
a   b   c   d   e   f   g

a   0   1   1   0   0   0   0

b   1   0   1   0   0   0   0   a           e
c   1   1   0   1   0   0   0
                                    c   d       g
d   0   0   1   0   1   1   0

e   0   0   0   1   0   0   1   b           f

f   0   0   0   1   0   0   1

g   0   0   0   0   1   1   0
a   b   c   d   e   f   g

a   0   1   1   0   0   0   0   2                 2
b   1   0   1   0   0   0   0   a                 e
c   1   1   0   1   0   0   0
                                    c      d           g
d   0   0   1   0   1   1   0
                                    3      3           2
e   0   0   0   1   0   0   1   b                 f

f   0   0   0   1   0   0   1                     2

g   0   0   0   0   1   1   0

    2   2   3   3   2   2   2       Degree of a node
a   b   c   d   e   f   g

a   0   2   3   0   0   0   0

b   0   0   1   0   0   0   0   a                       e
                                    3               5       3
c   0   0   0   2   0   0   0               2
                                2       c       d               g
d   0   0   0   0   5   4   0
                                    1               4       3
e   0   0   0   0   0   0   3   b                       f

f   0   0   0   0   0   0   3

g   0   0   0   0   0   0   0


                                        Weighted graphs
Not complete   Complete

  a            a

        c            c

  b            b


  a            a

        c            c

  b            b
G = (V, E)
∀ e={v,w} ∈ E, v ∈ V and w ∈ W.



    Bipartite                     Not bipartite
Path                       Cycle

     a                         e

             c        d                 g

     b                         f



Path: (b, a, c); Length (b, a, c) = 2
Path: (b, d, f)
Cycle: (f, g, e, d, f); Length (f, g, e, d, f) = 4
Path                       Cycle

     a                         e

             c        d                 g

     b                         f



Path: (b, a, c); Length (b, a, c) = 2
Path: (b, d, f)
Cycle: (f, g, e, d, f); Length (f, g, e, d, f) = 4
Path                       Cycle

     a                         e

             c        d                 g

     b                         f



Path: (b, a, c); Length (b, a, c) = 2
Path: (b, d, f)
Cycle: (f, g, e, d, f); Length (f, g, e, d, f) = 4
Loop-free                   Loop


a                   e       a              e

    c      d            g       c    d         g

b                   f       b              f
a           e

    c   d       g

b           f
Eulerian path


a           e       a                   e

    c   d       g       c     d             g

b           f       b                   f
Hamiltonian path           Eulerian path


a                  e       a                   e

     c      d          g       c     d             g

b                  f       b                   f
Spanning tree               Components

                                    e
a                   e

                            d                g
     c      d           g

                                    f
b                   f

                            a
     G = (V, E).
     T ⊆ E.                         c
a   Critical node   e

    c          d        g

b   Critical edge   f
Biconnected components

a                    e

     c         d         g

b                    f
G = (V, E)
G1 = (V1, E1)
E1 = {{u,v}∈ E | u,v ∈ V1} ⊆ E.



            a                         e

Subgraph            c             d       g   Not subgraph

            b                         f
Weakly reachable = exists undirected path



     a                     e

            c      d              g

     b                     f



Strongly reachable = exists directed path
9           F
                  E
                                                     6
                            2
                                          11             D
             14                     C
                        9
                                                15
                                    10
               A
                            7               B
                                                                           ithm
                                                          i  jkstr a algor
                                            Exa mple: D
http://scg.unibe.ch/download/lectures/ei/01ComputationalThinking.pptx
9         F
     E
                                    6
             2
                          11            D
14                   C
         9
                               15
                     10
 A
             7             B
                                                          ithm
                                     i      jkstr a algor
                          Exa mple: D
∞
                     9         F
∞        E
                                            6
                 2                                   ∞
                     ∞
                              11                D
    14                   C
             9
                                   15
                         10
0
     A
                 7             B        ∞
                                                                  ithm
                                         i          jkstr a algor
                              Exa mple: D
∞
                     9         F
14       E
                                            6
                 2                                   ∞
                         9
                              11                D
    14                   C
             9
                                   15
                         10
0
     A
                 7             B        7
                                                                  ithm
                                         i          jkstr a algor
                              Exa mple: D
∞
                     9             F
14       E
                                                6
                 2                                        7 + 15 = 22
                         9 < 7 + 10
                                  11                D
    14                   C
             9
                                       15
                         10
0
     A
                 7                B         7
                                                                      ithm
                                             i          jkstr a algor
                                  Exa mple: D
∞
                           9         F
14 > 9 + 2     E
                                                  6
                       2                                   22 > 9 + 11
                               9
                                    11                D
          14                   C
                   9
                                         15
                               10
      0
             A
                       7             B        7
                                                                        ithm
                                               i          jkstr a algor
                                    Exa mple: D
20
                      9         F
11        E
                                             6
                  2                                    20
                          9
                               11                D
     14                   C
              9
                                    15
                          10
0
      A
                  7             B        7
                                                                   ithm
                                          i          jkstr a algor
                               Exa mple: D
20 < 20 + 6
                      9         F
11        E
                                             6
                  2                                    20
                          9
                               11                D
     14                   C
              9
                                    15
                          10
0
      A
                  7             B        7
                                                                   ithm
                                          i          jkstr a algor
                               Exa mple: D
a b c d e f g
                                    a 0 2 3 0 0 0 0
a                       e           b 0 0 1 0 0 0 0
    3               5       3
            2                       c 0 0 0 2 0 0 0
2       c       d               g
                                    d 0 0 0 0 5 4 0
    1               4       3       e 0 0 0 0 0 0 3
b                       f
                                    f 0 0 0 0 0 0 3
                                    g 0 0 0 0 0 0 0




                                                     Warshall
                                             : Floyd
                                     Example
a b c d e f g
                                        a 0 2 3 0 0 0 0
 a                       e              b 0 0 1 0 0 0 0
     3               5       3
             2                          c 0 0 0 2 0 0 0
2        c       d               g
                                        d 0 0 0 0 5 4 0
     1               4       3          e 0 0 0 0 0 0 3
 b                       f
                                        f 0 0 0 0 0 0 3
                                        g 0 0 0 0 0 0 0

procedure FloydWarshall ()
   for k := 1 to n
       for i := 1 to n
          for j := 1 to n
             path[i][j] = min ( path[i][j], path[i][k]+path[k][j] );


                                                           Warshall
                                                   : Floyd
                                          E xample
ing sa lesman
                l
        : Trave
Example
Tudor Gîrba
        www.tudorgirba.com




creativecommons.org/licenses/by/3.0/

Weitere ähnliche Inhalte

Ähnlich wie Graph Theory Concepts Explained

Ähnlich wie Graph Theory Concepts Explained (20)

Taocp 2.3
Taocp 2.3Taocp 2.3
Taocp 2.3
 
Graph
GraphGraph
Graph
 
Approximation Algorithms
Approximation AlgorithmsApproximation Algorithms
Approximation Algorithms
 
Gabarito vestibular
Gabarito vestibularGabarito vestibular
Gabarito vestibular
 
Ph2100 exam answers
Ph2100 exam answersPh2100 exam answers
Ph2100 exam answers
 
Discrete maths assignment
Discrete maths assignmentDiscrete maths assignment
Discrete maths assignment
 
Worked examples projects unit 1
Worked examples projects unit 1Worked examples projects unit 1
Worked examples projects unit 1
 
Graphs In Data Structure
Graphs In Data StructureGraphs In Data Structure
Graphs In Data Structure
 
Graphs In Data Structure
Graphs In Data StructureGraphs In Data Structure
Graphs In Data Structure
 
Matrix Representation Of Graph
Matrix Representation Of GraphMatrix Representation Of Graph
Matrix Representation Of Graph
 
Gabaritos ok
Gabaritos okGabaritos ok
Gabaritos ok
 
Csr2011 june16 12_00_wagner
Csr2011 june16 12_00_wagnerCsr2011 june16 12_00_wagner
Csr2011 june16 12_00_wagner
 
XXL Graph Algorithms__HadoopSummit2010
XXL Graph Algorithms__HadoopSummit2010XXL Graph Algorithms__HadoopSummit2010
XXL Graph Algorithms__HadoopSummit2010
 
Graphs
GraphsGraphs
Graphs
 
Ficha trab solidos1 resolução
Ficha trab solidos1 resoluçãoFicha trab solidos1 resolução
Ficha trab solidos1 resolução
 
Claves guias
Claves guiasClaves guias
Claves guias
 
Bndes0109 tecnico
Bndes0109 tecnicoBndes0109 tecnico
Bndes0109 tecnico
 
graph.pptx
graph.pptxgraph.pptx
graph.pptx
 
Gabaritos Pebii
Gabaritos PebiiGabaritos Pebii
Gabaritos Pebii
 
Ca8e Ppt 6 1
Ca8e Ppt 6 1Ca8e Ppt 6 1
Ca8e Ppt 6 1
 

Mehr von Tudor Girba

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismTudor Girba
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Tudor Girba
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Tudor Girba
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Tudor Girba
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cardsTudor Girba
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingTudor Girba
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks laterTudor Girba
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Tudor Girba
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomTudor Girba
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeTudor Girba
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Tudor Girba
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systemsTudor Girba
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Tudor Girba
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Tudor Girba
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Tudor Girba
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaserTudor Girba
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Tudor Girba
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Tudor Girba
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Tudor Girba
 

Mehr von Tudor Girba (20)

Beyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalismBeyond software evolution: Software environmentalism
Beyond software evolution: Software environmentalism
 
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
Software craftsmanship meetup (Zurich 2015) on solving real problems without ...
 
GT Spotter
GT SpotterGT Spotter
GT Spotter
 
Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)Don't demo facts. Demo stories! (handouts)
Don't demo facts. Demo stories! (handouts)
 
Don't demo facts. Demo stories!
Don't demo facts. Demo stories!Don't demo facts. Demo stories!
Don't demo facts. Demo stories!
 
Humane assessment on cards
Humane assessment on cardsHumane assessment on cards
Humane assessment on cards
 
Underneath Scrum: Reflective Thinking
Underneath Scrum: Reflective ThinkingUnderneath Scrum: Reflective Thinking
Underneath Scrum: Reflective Thinking
 
1800+ TED talks later
1800+ TED talks later1800+ TED talks later
1800+ TED talks later
 
Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)Software assessment by example (lecture at the University of Bern)
Software assessment by example (lecture at the University of Bern)
 
Humane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development roomHumane assessment: Taming the elephant from the development room
Humane assessment: Taming the elephant from the development room
 
Moose: how to solve real problems without reading code
Moose: how to solve real problems without reading codeMoose: how to solve real problems without reading code
Moose: how to solve real problems without reading code
 
Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)Software Environmentalism (ECOOP 2014 Keynote)
Software Environmentalism (ECOOP 2014 Keynote)
 
The emergent nature of software systems
The emergent nature of software systemsThe emergent nature of software systems
The emergent nature of software systems
 
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)Presenting is storytelling at Uni Zurich - slides (2014-03-05)
Presenting is storytelling at Uni Zurich - slides (2014-03-05)
 
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
Presenting is storytelling at Uni Zurich - handouts (2014-03-05)
 
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
Underneath Scrum: Reflective Thinking (talk at Scrum Breakfast Bern, 2013)
 
Demo-driven innovation teaser
Demo-driven innovation teaserDemo-driven innovation teaser
Demo-driven innovation teaser
 
Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)Software assessment essentials (lecture at the University of Bern 2013)
Software assessment essentials (lecture at the University of Bern 2013)
 
Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)Demo-driven innovation (University of Zurich, June 2013)
Demo-driven innovation (University of Zurich, June 2013)
 
Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011Humane assessment with Moose at GOTO Aarhus 2011
Humane assessment with Moose at GOTO Aarhus 2011
 

Kürzlich hochgeladen

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 

Kürzlich hochgeladen (20)

How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 

Graph Theory Concepts Explained

  • 1. Graphs www.tudorgirba.com
  • 2.
  • 3.
  • 4.
  • 5. G = (V, E) E = { {u,v} | u,v ∈ V} a e c d g b f
  • 6. G = (V, E) E = { {u,v} | u,v ∈ V} a e c d g b f V = { a, b, c, d, e, f, g } E = { {a,b}, {a,c}, {b,c}, {c,d}, {d,e}, {d,f}, {e,g}, {f,g} }
  • 7. G = (V, E) E = { {u,v} | u,v ∈ V} a e c d g b f V = { a, b, c, d, e, f, g } E = { {a,b}, {a,c}, {b,c}, {c,d}, {d,e}, {d,f}, {e,g}, {f,g} }
  • 8. a b c d e f g a 0 1 1 0 0 0 0 b 0 0 1 0 0 0 0 a e c 0 0 0 1 0 0 0 c d g d 0 0 0 0 1 1 0 e 0 0 0 0 0 0 1 b f f 0 0 0 0 0 0 1 g 0 0 0 0 0 0 0
  • 9. a b c d e f g a 0 1 1 0 0 0 0 b 1 0 1 0 0 0 0 a e c 1 1 0 1 0 0 0 c d g d 0 0 1 0 1 1 0 e 0 0 0 1 0 0 1 b f f 0 0 0 1 0 0 1 g 0 0 0 0 1 1 0
  • 10. a b c d e f g a 0 1 1 0 0 0 0 2 2 b 1 0 1 0 0 0 0 a e c 1 1 0 1 0 0 0 c d g d 0 0 1 0 1 1 0 3 3 2 e 0 0 0 1 0 0 1 b f f 0 0 0 1 0 0 1 2 g 0 0 0 0 1 1 0 2 2 3 3 2 2 2 Degree of a node
  • 11. a b c d e f g a 0 2 3 0 0 0 0 b 0 0 1 0 0 0 0 a e 3 5 3 c 0 0 0 2 0 0 0 2 2 c d g d 0 0 0 0 5 4 0 1 4 3 e 0 0 0 0 0 0 3 b f f 0 0 0 0 0 0 3 g 0 0 0 0 0 0 0 Weighted graphs
  • 12. Not complete Complete a a c c b b a a c c b b
  • 13. G = (V, E) ∀ e={v,w} ∈ E, v ∈ V and w ∈ W. Bipartite Not bipartite
  • 14. Path Cycle a e c d g b f Path: (b, a, c); Length (b, a, c) = 2 Path: (b, d, f) Cycle: (f, g, e, d, f); Length (f, g, e, d, f) = 4
  • 15. Path Cycle a e c d g b f Path: (b, a, c); Length (b, a, c) = 2 Path: (b, d, f) Cycle: (f, g, e, d, f); Length (f, g, e, d, f) = 4
  • 16. Path Cycle a e c d g b f Path: (b, a, c); Length (b, a, c) = 2 Path: (b, d, f) Cycle: (f, g, e, d, f); Length (f, g, e, d, f) = 4
  • 17. Loop-free Loop a e a e c d g c d g b f b f
  • 18. a e c d g b f
  • 19. Eulerian path a e a e c d g c d g b f b f
  • 20. Hamiltonian path Eulerian path a e a e c d g c d g b f b f
  • 21. Spanning tree Components e a e d g c d g f b f a G = (V, E). T ⊆ E. c
  • 22. a Critical node e c d g b Critical edge f
  • 24. G = (V, E) G1 = (V1, E1) E1 = {{u,v}∈ E | u,v ∈ V1} ⊆ E. a e Subgraph c d g Not subgraph b f
  • 25. Weakly reachable = exists undirected path a e c d g b f Strongly reachable = exists directed path
  • 26. 9 F E 6 2 11 D 14 C 9 15 10 A 7 B ithm i jkstr a algor Exa mple: D http://scg.unibe.ch/download/lectures/ei/01ComputationalThinking.pptx
  • 27. 9 F E 6 2 11 D 14 C 9 15 10 A 7 B ithm i jkstr a algor Exa mple: D
  • 28. 9 F ∞ E 6 2 ∞ ∞ 11 D 14 C 9 15 10 0 A 7 B ∞ ithm i jkstr a algor Exa mple: D
  • 29. 9 F 14 E 6 2 ∞ 9 11 D 14 C 9 15 10 0 A 7 B 7 ithm i jkstr a algor Exa mple: D
  • 30. 9 F 14 E 6 2 7 + 15 = 22 9 < 7 + 10 11 D 14 C 9 15 10 0 A 7 B 7 ithm i jkstr a algor Exa mple: D
  • 31. 9 F 14 > 9 + 2 E 6 2 22 > 9 + 11 9 11 D 14 C 9 15 10 0 A 7 B 7 ithm i jkstr a algor Exa mple: D
  • 32. 20 9 F 11 E 6 2 20 9 11 D 14 C 9 15 10 0 A 7 B 7 ithm i jkstr a algor Exa mple: D
  • 33. 20 < 20 + 6 9 F 11 E 6 2 20 9 11 D 14 C 9 15 10 0 A 7 B 7 ithm i jkstr a algor Exa mple: D
  • 34. a b c d e f g a 0 2 3 0 0 0 0 a e b 0 0 1 0 0 0 0 3 5 3 2 c 0 0 0 2 0 0 0 2 c d g d 0 0 0 0 5 4 0 1 4 3 e 0 0 0 0 0 0 3 b f f 0 0 0 0 0 0 3 g 0 0 0 0 0 0 0 Warshall : Floyd Example
  • 35. a b c d e f g a 0 2 3 0 0 0 0 a e b 0 0 1 0 0 0 0 3 5 3 2 c 0 0 0 2 0 0 0 2 c d g d 0 0 0 0 5 4 0 1 4 3 e 0 0 0 0 0 0 3 b f f 0 0 0 0 0 0 3 g 0 0 0 0 0 0 0 procedure FloydWarshall () for k := 1 to n for i := 1 to n for j := 1 to n path[i][j] = min ( path[i][j], path[i][k]+path[k][j] ); Warshall : Floyd E xample
  • 36. ing sa lesman l : Trave Example
  • 37. Tudor Gîrba www.tudorgirba.com creativecommons.org/licenses/by/3.0/