SlideShare uma empresa Scribd logo
1 de 43
1



       GRAPH THEORY
       BASIC TERMINOLOGY
       PART I




9/3/2012
Basic Graph Definitions
2

         A data structure that consists of a set of
          nodes (vertices) and a set of edges that
          relate the nodes to each other
         The set of edges describes relationships
          among the vertices. Some Examples,
           Car  navigation system
           Efficient database
           Build a bot to retrieve info off WWW
           Representing computational models



                                       9/3/2012
Applications
3

                                                   CS16
       electronic circuits



     networks (roads, flights,
    communications)
                                                   JFK

                             LAX         STL
                    HNL
                                   DFW
                                       9/3/2012
                                             FTL
Classic Graph Theory Problems
4

    Graph theory started from a mathematical curiosity.

    "The Seven Bridges of Königsberg is a problem inspired
    by an actual place and situation. The city of Kaliningrad,
    Russia (at the time, Königsberg, Germany) is set on the
    Pregolya River, and included two large islands which
    were connected to each other and the mainland by seven
    bridges. The question is whether it is possible to walk
    with a route that crosses each bridge exactly once, and
    return to the starting point. In 1736, Leonhard Euler
    proved that it was not possible."
                                          9/3/2012
Seven Bridges of Königsberg
5   "In proving the result, Euler formulated the problem in terms of
    graph theory, by abstracting the case of Königsberg -- first, by
    eliminating all features except the landmasses and the bridges
    connecting them; second, by replacing each landmass with a dot,
    called a vertex or node, and each bridge with a line, called an edge
    or link. The resulting mathematical structure is called a graph."




                                                  9/3/2012
Seven Bridges of Königsberg
6
    "The shape of a graph may be distorted in any way without
    changing the graph itself, so long as the links between nodes are
    unchanged. It does not matter whether the links are straight or
    curved, or whether one node is to the left of another.

    Euler realized that the problem could be solved in terms of the
    degrees of the nodes. The degree of a node is the number of edges
    touching it; in the Königsberg bridge graph, three nodes have
    degree 3 and one has degree 5. Euler proved that a circuit of the
    desired form is possible if and only if there are no nodes of odd
    degree. Such a walk is called an Eulerian circuit or an Euler
    tour. Since the graph corresponding to Königsberg has four
    nodes of odd degree, it cannot have an Eulerian circuit."
                                                 9/3/2012
Euler‟s Theory
7


    Euler path:
     A graph is said to be containing an Euler path if it
      can be traced in 1 sweep without lifting the pencil
      from the paper and without tracing the same edge
      more than once. Vertices may be passed through
      more than once. The starting and ending points need
      not be the same.
    Euler circuit:
     An Euler circuit is similar to an Euler path, except
      that the starting and ending points must be the same.

                                          9/3/2012
Euler‟s Theory
8


    Graph   Number of odd vertices   Number of even vertices   What does the path
            (vertices connected to    (vertices connected to       contain?
              an odd number of          an even number of
                                                                (Euler path = P;
                    edges)                    edges)
                                                                Euler circuit = C;

                                                                  Neither = N)




      1               0                        10                       C

      2               0                        6                        C

      3               2                        6                        P

      4               2                        4                        P

      5               4                        1                        N

      6               8                        0                        N

                                                    9/3/2012
Euler‟s Theory
9


       From the above table, we can observe that:
        A  graph with all vertices being even contains an
          Euler circuit.
         A graph with 2 odd vertices and some even
          vertices contains an Euler path.
         A graph with more than 2 odd vertices does not
          contain any Euler path or circuit.




                                           9/3/2012
Seven Bridges of Königsberg
10




     "The problem can be modified to ask for a path
     that traverses all bridges but does not have the
     same starting and ending point. Such a walk is
     called an Eulerian trail or Euler walk. Such a
     path exists if and only if the graph has exactly two
     nodes of odd degree, those nodes being the
     starting and ending points. (So this too was
     impossible for the seven bridges of Königsberg.)"
                                        9/3/2012
Formal Definition:
11

        A graph, G=(V, E), consists of two sets:
           a finite non empty set of vertices(V), and

           a finite set (E) of unordered pairs of distinct vertices
            called edges.
           V(G) and E(G) represent the sets of vertices and
            edges of G, respectively.
        Vertex: In graph theory, a vertex (plural vertices) or
         node or points is the fundamental unit out of which
         graphs are formed.
        Edge or Arcs or Links: Gives the relationship between
         the Two vertices.

                                                 9/3/2012
Examples for Graph
        0                             0                        0

   1         2                1                2
                                                               1
        3
                          3       4        5       6
       G1                                                      2
                                      G2
                                                               G3
V(G1)={0,1,2,3}         E(G1)={(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)}
V(G2)={0,1,2,3,4,5,6}   E(G2)={(0,1),(0,2),(1,3),(1,4),(2,5),(2,6)}
V(G3)={0,1,2}           E(G3)={<0,1>,<1,0>,<1,2>}



                                               9/3/2012   12
Graph Terminology
13


        Two vertices joined by an edge are called the
         end vertices or endpoints of the edge.

        If an edge is directed its first endpoint is called
         the origin and the other is called the
         destination.

        Two vertices are said to be adjacent if they are
         endpoints of the same edge.
                                            9/3/2012
Graph Terminology
14



         a       B       b       h

             d                                  j
     A                       D       F
                                 i
                         e
         c

                             g
             C
                     f

                             E



                                     9/3/2012
Graph Terminology
15



                     a    B       b       h

                          d                              j
                A                     D       F
                                          i
                                  e
                    c

                                      g
                          C
Vertices A and B              f
are endpoints of edge a
                                      E



                                              9/3/2012
Graph Terminology
16



                       a   B       b       h

                           d                              j
                   A                   D       F
                                           i
                                   e
                       c

                                       g
                           C
Vertex A is the                f
origin of edge a
                                       E



                                               9/3/2012
Graph Terminology
17



                        a   B       b       h

                            d                              j
                A                       D       F
                                            i
                                    e
                        c

                                        g
                            C
Vertex B is the                 f
destination of edge a
                                        E



                                                9/3/2012
Graph Terminology
18



                       a   B       b       h

                           d                              j
                A                      D       F
                                           i
                                   e
                       c

                                       g
                           C
Vertices A and B are           f
adjacent as they are
endpoints of edge a                    E



                                               9/3/2012
Graph Terminology
19


        An edge is said to be incident on a vertex if the
         vertex is one of the edges endpoints.

        The outgoing edges of a vertex are the
         directed edges whose origin is that vertex.

        The incoming edges of a vertex are the
         directed edges whose destination is that
         vertex.
                                          9/3/2012
Graph Terminology
20



         a   V       b        h

     U       d                                      j
                         X     i
                                        Z
                     e
         c

                         g   Edge 'a' is incident on vertex V
             W               Edge 'h' is incident on vertex Z
                             Edge 'g' is incident on vertex Y
                 f

                         Y



                                         9/3/2012
Graph Terminology
21



         a   V       b        h

     U       d                                     j
                         X     i
                                       Z
                     e
         c

                         g   The outgoing edges of vertex W
             W               are the edges with vertex W as
                             origin {d, e, f}
                 f

                         Y



                                        9/3/2012
Graph Terminology
22



         a   V       b        h

     U       d                                     j
                         X     i
                                       Z
                     e
         c

                         g   The incoming edges of vertex X
             W               are the edges with vertex X as
                             destination {b, e, g, i}
                 f

                         Y



                                        9/3/2012
23




     Types of Graph


              9/3/2012
Null graph, Trivial Graph
24


        A graph G=(V,E) where E=0 is said to be Null
         or Empty graph



     A graph with One vertex
     and no edge is called as a trivial graph.

                          v1



                                       9/3/2012
Directed Graph
25


     A directed graph is one in which every edge
      (u, v) has a direction, so that (u, v) is different
      from (v, u)
     There are two possible situations that can arise
      in a directed graph between vertices u and v.
        i) only one of (u, v) and (v, u) is present.

        ii) both (u, v) and (v, u) are present.


                                            9/3/2012
Directed Graph
26



                 a    V       b       h

             U       d                                  j
                                  X   i
                                            Z
                              e
                 c                        Here (u,v) is possible
                                  g
                                          where as (v,u) is not
                      W                         possible.
                          f

                                  Y
 In a directed edge, u is said to be adjacent to v and v is said
 to be adjacent from u.
 The edge <u,v> is incident to both u and v.
                                             9/3/2012
Directed Graph
27


        Directed Graphs are also called as Digraph.
        Directed graph or the digraph make reference
         to edges which are directed (i.e) edges which
         are Ordered pairs of vertices.
        The edge(uv) is referred to as <u,v> which is
         distinct from <v,u> where u,v are distinct
         vertices.



                                        9/3/2012
Undirected Graph
28




      In an undirected graph, there is no distinction
       between (u, v) and (v, u).
     • An edge (u, v) is said to be directed from u to v if
       the pair (u, v) is ordered with u preceding v.
                       E.g. A Flight Route
     • An edge (u, v) is said to be undirected if the pair
       (u, v) is not ordered
                          E.g. Road Map
                                         9/3/2012
Undirected Graph
29



         a   B       b           h

             d                                     j
     A                   D             F
                                  i
                     e
         c

                         g
             C               Here (u,v) and (v,u)
                 f           both are possible.
                         E



                                        9/3/2012
Undirected Graph
30


        A graph whose definition makes reference to
         Unordered pairs of vertices as Edges is known
         as undirected graph.
        Thus an undirected edge (u,v) is equivalent to
         (v,u) where u and v are distinct vertices.
        In the case of undirected edge(u,v) in a graph,
         the vertices u,v are said to be adjacent or the
         edge(u,v) is said to be incident on vertices u,v.


                                          9/3/2012
Complete Graph
31

        In a complete graph: Every node should be
         connected to all other nodes.
        The above means “ Every node is adjacent to
         all other nodes in that graph”.
        The degree of all the vertices must be same.


         K1        K2       K3   K4   K5

         Kn = Denotes a complete with n number of
         vertices.                     9/3/2012
              9/3/2012
Complete Undirected Graph
32

      An undirected graph with „n‟ number of vertices is
      said to be complete ,if each vertices has (n-1)
      number of edges.


                 v1                   Number of vertices=3
                                 v2   Degree of Each vertices
                                                 =(n-1)
                                                 =(3-1)
                  v3
                                                 =2

                                        9/3/2012
Complete Undirected Graph
33


        An n vertex undirected graph with exactly (n.(n-
         1))/2 edges is said to be complete.
                                   v1          Here we have 4
                                            number of vertices and
                                            hence
                          v2                   v4
                                            (4.(4-1))/2= (4.3)/2
                                                      =6


                                    v3
                   Hence the graph has 6 number of edges and it is a
                   Complete Undirected graph.



                                                    9/3/2012
Complete Directed Graph
34


        An directed graph with „n‟ number of vertices is
         said to be complete ,if each vertices has (n-1)
         number of in-coming and out-going edges.
         •   In case of a digraph with n vertices, maximum
             number of edges is given by n.(n-1).Such a graph
             with exactly n.(n-1) edges is said to be Complete
             digraph.




                                             9/3/2012
Complete Directed Graph
35
                Example:
                                     Hence the graph has 6
                                        number of edges and it is
                           v1
                                        a Complete directed
                                                  graph.



                           v2




                            v3
        Here we have 3 number of vertices and hence
          n.(n-1)= 3.(3-1)
          =6

                                         9/3/2012
Sub Graph
   A graph whose vertices and edges are subsets
     of another graph.
   A subgraph G‟=(V‟,E‟) of a graph G = (V,E)
    such that V‟ ⊆ V and E‟ ⊆ E , Then G is a
    supergraph for G‟.




              (G)               (G1)
..Sub Graph

     A            B       A
                                             A          B


C             D       C                  D
                                                        D

          E
                                     E


    (G)                       (G1)               (G2)
Spanning Subgraph
   A spanning subgraph is a subgraph that
    contains all the vertices of the original graph.
Induced-Subgraph
   Vertex-Induced Subgraph:
       A vertex-induced subgraph is one that consists of
       some of the vertices of the original graph and all of the
       edges that connect them in the original.




A            B                                             B
                              C
       C                                            C

                        D           E          D          E
D            E
Induced-Subgraph

   Edge-Induced Subgraph:
      An    edge-induced subgraph consists of some of the
          edges of the original graph and the vertices that are at
          their endpoints.
      A                                                A


B          C           B           C
                                                   B


D           E          D           E               D

     F                                                     F
MultiGraph(Without Self Edge)
   The term multigraph refers to a graph in
    which multiple edges between vertices are
    permitted.
    A multigraph G = (V, E) is a graph which has
    the set of vetrices and multiple edges between
    vertices.
                         2



                  1             3
MultiGraph(With Self Edge)
   A multidigraph is a directed graph which is
    permitted to have multiple edges, i.e., edges
    with the own,source and target vertices.



                          2



                  1              3
Conclusions
43
     Graph theory enables us to study and model networks and
     solve some difficult problems inherently capable of being
     modelled using networks.

     Various terms e.g. vertex and edge, are associated with graph
     theory which gives these terms special meanings. These
     meanings need to be understood and remembered in order to
     apply graph theoretic approaches to solving problems.

     When solving a problem by developing a graph-based
     program, careful attention must be given at the design stage to
     the structuring of data to help make solving the problem
     tractable, to enable linkages to be traced efficiently and to
     avoid duplication of data.
                                               9/3/2012

Mais conteúdo relacionado

Mais procurados

GRAPH COLORING AND ITS APPLICATIONS
GRAPH COLORING AND ITS APPLICATIONSGRAPH COLORING AND ITS APPLICATIONS
GRAPH COLORING AND ITS APPLICATIONSManojit Chakraborty
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - SamyMark Arokiasamy
 
Graphs (Models & Terminology)
Graphs (Models & Terminology)Graphs (Models & Terminology)
Graphs (Models & Terminology)zunaira saleem
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theoryArvindBorge
 
Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)sobia1122
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphsTech_MX
 
introduction to graph theory
introduction to graph theoryintroduction to graph theory
introduction to graph theoryChuckie Balbuena
 
Graph theory
Graph theoryGraph theory
Graph theoryKumar
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptishan743441
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphsNabeel Ahsen
 
Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graphRounak Biswas
 

Mais procurados (20)

GRAPH COLORING AND ITS APPLICATIONS
GRAPH COLORING AND ITS APPLICATIONSGRAPH COLORING AND ITS APPLICATIONS
GRAPH COLORING AND ITS APPLICATIONS
 
Graph theory introduction - Samy
Graph theory  introduction - SamyGraph theory  introduction - Samy
Graph theory introduction - Samy
 
graph theory
graph theory graph theory
graph theory
 
Graphs (Models & Terminology)
Graphs (Models & Terminology)Graphs (Models & Terminology)
Graphs (Models & Terminology)
 
Ppt of graph theory
Ppt of graph theoryPpt of graph theory
Ppt of graph theory
 
Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)Introduction to graph theory (All chapter)
Introduction to graph theory (All chapter)
 
Applications of graphs
Applications of graphsApplications of graphs
Applications of graphs
 
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
Graph theoryGraph theory
Graph theory
 
Chapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).pptChapter 5 Graphs (1).ppt
Chapter 5 Graphs (1).ppt
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Graph theory
Graph theoryGraph theory
Graph theory
 
Shortest path
Shortest pathShortest path
Shortest path
 
Graph terminologies & special type graphs
Graph terminologies & special type graphsGraph terminologies & special type graphs
Graph terminologies & special type graphs
 
Matrix representation of graph
Matrix representation of graphMatrix representation of graph
Matrix representation of graph
 
Graphs - Discrete Math
Graphs - Discrete MathGraphs - Discrete Math
Graphs - Discrete Math
 
Graph
GraphGraph
Graph
 
graph.ppt
graph.pptgraph.ppt
graph.ppt
 
trees-and-forest.pdf
trees-and-forest.pdftrees-and-forest.pdf
trees-and-forest.pdf
 

Destaque

Constants
ConstantsConstants
ConstantsTech_MX
 
14.jun.2012
14.jun.201214.jun.2012
14.jun.2012Tech_MX
 
09 binary-trees
09 binary-trees09 binary-trees
09 binary-treesTech_MX
 
Trends and technologies in system softwares
Trends and technologies in system softwaresTrends and technologies in system softwares
Trends and technologies in system softwaresTech_MX
 
Mutable and immutable classes
Mutable and  immutable classesMutable and  immutable classes
Mutable and immutable classesTech_MX
 
More on Lex
More on LexMore on Lex
More on LexTech_MX
 
What are interpersonal skills
What are interpersonal skillsWhat are interpersonal skills
What are interpersonal skillsTech_MX
 
Linear programming problem
Linear programming problemLinear programming problem
Linear programming problemTech_MX
 
Investment problem
Investment problemInvestment problem
Investment problemTech_MX
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2Tech_MX
 
Buddy system final
Buddy system finalBuddy system final
Buddy system finalTech_MX
 
Set data structure
Set data structure Set data structure
Set data structure Tech_MX
 
Graph data structure
Graph data structureGraph data structure
Graph data structureTech_MX
 
Inline function
Inline functionInline function
Inline functionTech_MX
 
E post office system
E post office systemE post office system
E post office systemTech_MX
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentationTech_MX
 

Destaque (19)

Constants
ConstantsConstants
Constants
 
14.jun.2012
14.jun.201214.jun.2012
14.jun.2012
 
09 binary-trees
09 binary-trees09 binary-trees
09 binary-trees
 
Trends and technologies in system softwares
Trends and technologies in system softwaresTrends and technologies in system softwares
Trends and technologies in system softwares
 
Mutable and immutable classes
Mutable and  immutable classesMutable and  immutable classes
Mutable and immutable classes
 
More on Lex
More on LexMore on Lex
More on Lex
 
What are interpersonal skills
What are interpersonal skillsWhat are interpersonal skills
What are interpersonal skills
 
Linear programming problem
Linear programming problemLinear programming problem
Linear programming problem
 
Investment problem
Investment problemInvestment problem
Investment problem
 
Set data structure 2
Set data structure 2Set data structure 2
Set data structure 2
 
Buddy system final
Buddy system finalBuddy system final
Buddy system final
 
Set data structure
Set data structure Set data structure
Set data structure
 
Graph data structure
Graph data structureGraph data structure
Graph data structure
 
Inline function
Inline functionInline function
Inline function
 
E post office system
E post office systemE post office system
E post office system
 
Combined paging and segmentation
Combined paging and segmentationCombined paging and segmentation
Combined paging and segmentation
 
Linkers
LinkersLinkers
Linkers
 
Uid
UidUid
Uid
 
Spss
SpssSpss
Spss
 

Semelhante a Graph theory

Graph theory 1
Graph theory 1Graph theory 1
Graph theory 1Tech_MX
 
koningsbergproblem-140215072342-phpapp02 (1).pptx
koningsbergproblem-140215072342-phpapp02 (1).pptxkoningsbergproblem-140215072342-phpapp02 (1).pptx
koningsbergproblem-140215072342-phpapp02 (1).pptxAlpa Rajput
 
Koningsberg bridge problem
Koningsberg  bridge  problemKoningsberg  bridge  problem
Koningsberg bridge problemSudiksha Joshi
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Robert Almazan
 
ISOMORFISME, CONNECTIVITY EULER HAMILTON.pdf
ISOMORFISME, CONNECTIVITY EULER HAMILTON.pdfISOMORFISME, CONNECTIVITY EULER HAMILTON.pdf
ISOMORFISME, CONNECTIVITY EULER HAMILTON.pdfmurniatimurni9
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphsUma mohan
 
distructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdfdistructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdfansariparveen06
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringSaurabh Kaushik
 
A glimpse to topological graph theory
A glimpse to topological graph theoryA glimpse to topological graph theory
A glimpse to topological graph theoryANJU123MOHANAN
 
The Age of EulerRarely has the world seen a mathematician as pro.docx
The Age of EulerRarely has the world seen a mathematician as pro.docxThe Age of EulerRarely has the world seen a mathematician as pro.docx
The Age of EulerRarely has the world seen a mathematician as pro.docxmehek4
 
algorithm_3graphs.pdf
algorithm_3graphs.pdfalgorithm_3graphs.pdf
algorithm_3graphs.pdfHsuChi Chen
 
358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13sumitbardhan
 
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATIONFREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATIONcscpconf
 
Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...appasami
 

Semelhante a Graph theory (20)

Graph theory 1
Graph theory 1Graph theory 1
Graph theory 1
 
Graph theory
Graph theoryGraph theory
Graph theory
 
nossi ch 6
nossi ch 6nossi ch 6
nossi ch 6
 
ch10.5.pptx
ch10.5.pptxch10.5.pptx
ch10.5.pptx
 
koningsbergproblem-140215072342-phpapp02 (1).pptx
koningsbergproblem-140215072342-phpapp02 (1).pptxkoningsbergproblem-140215072342-phpapp02 (1).pptx
koningsbergproblem-140215072342-phpapp02 (1).pptx
 
Koningsberg bridge problem
Koningsberg  bridge  problemKoningsberg  bridge  problem
Koningsberg bridge problem
 
Unit 2: All
Unit 2: AllUnit 2: All
Unit 2: All
 
Graph Theory
Graph TheoryGraph Theory
Graph Theory
 
Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)Distruct week 15 graphs theory (updated)
Distruct week 15 graphs theory (updated)
 
ISOMORFISME, CONNECTIVITY EULER HAMILTON.pdf
ISOMORFISME, CONNECTIVITY EULER HAMILTON.pdfISOMORFISME, CONNECTIVITY EULER HAMILTON.pdf
ISOMORFISME, CONNECTIVITY EULER HAMILTON.pdf
 
Data structure graphs
Data structure  graphsData structure  graphs
Data structure graphs
 
distructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdfdistructweek15graphstheoryupdated-160227143444.pdf
distructweek15graphstheoryupdated-160227143444.pdf
 
Graph
GraphGraph
Graph
 
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph ColouringGraph Theory,Graph Terminologies,Planar Graph & Graph Colouring
Graph Theory,Graph Terminologies,Planar Graph & Graph Colouring
 
A glimpse to topological graph theory
A glimpse to topological graph theoryA glimpse to topological graph theory
A glimpse to topological graph theory
 
The Age of EulerRarely has the world seen a mathematician as pro.docx
The Age of EulerRarely has the world seen a mathematician as pro.docxThe Age of EulerRarely has the world seen a mathematician as pro.docx
The Age of EulerRarely has the world seen a mathematician as pro.docx
 
algorithm_3graphs.pdf
algorithm_3graphs.pdfalgorithm_3graphs.pdf
algorithm_3graphs.pdf
 
358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13358 33 powerpoint-slides_13-graphs_chapter-13
358 33 powerpoint-slides_13-graphs_chapter-13
 
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATIONFREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
FREQUENT SUBGRAPH MINING ALGORITHMS - A SURVEY AND FRAMEWORK FOR CLASSIFICATION
 
Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...Cs6702 graph theory and applications Anna University question paper apr may 2...
Cs6702 graph theory and applications Anna University question paper apr may 2...
 

Mais de 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
 
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
 
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
 
Linear regression
Linear regressionLinear regression
Linear regressionTech_MX
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interruptTech_MX
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loadersTech_MX
 
Interpersonal communication
Interpersonal communicationInterpersonal communication
Interpersonal communicationTech_MX
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipeliningTech_MX
 

Mais de Tech_MX (20)

Virtual base class
Virtual base classVirtual base class
Virtual base class
 
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
 
Spanning trees & applications
Spanning trees & applicationsSpanning trees & applications
Spanning trees & applications
 
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
 
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
 
Linear regression
Linear regressionLinear regression
Linear regression
 
Keyboard interrupt
Keyboard interruptKeyboard interrupt
Keyboard interrupt
 
Introduction to loaders
Introduction to loadersIntroduction to loaders
Introduction to loaders
 
Interpersonal communication
Interpersonal communicationInterpersonal communication
Interpersonal communication
 
Instruction pipelining
Instruction pipeliningInstruction pipelining
Instruction pipelining
 

Último

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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Graph theory

  • 1. 1 GRAPH THEORY BASIC TERMINOLOGY PART I 9/3/2012
  • 2. Basic Graph Definitions 2  A data structure that consists of a set of nodes (vertices) and a set of edges that relate the nodes to each other  The set of edges describes relationships among the vertices. Some Examples,  Car navigation system  Efficient database  Build a bot to retrieve info off WWW  Representing computational models 9/3/2012
  • 3. Applications 3 CS16  electronic circuits  networks (roads, flights, communications) JFK LAX STL HNL DFW 9/3/2012 FTL
  • 4. Classic Graph Theory Problems 4 Graph theory started from a mathematical curiosity. "The Seven Bridges of Königsberg is a problem inspired by an actual place and situation. The city of Kaliningrad, Russia (at the time, Königsberg, Germany) is set on the Pregolya River, and included two large islands which were connected to each other and the mainland by seven bridges. The question is whether it is possible to walk with a route that crosses each bridge exactly once, and return to the starting point. In 1736, Leonhard Euler proved that it was not possible." 9/3/2012
  • 5. Seven Bridges of Königsberg 5 "In proving the result, Euler formulated the problem in terms of graph theory, by abstracting the case of Königsberg -- first, by eliminating all features except the landmasses and the bridges connecting them; second, by replacing each landmass with a dot, called a vertex or node, and each bridge with a line, called an edge or link. The resulting mathematical structure is called a graph." 9/3/2012
  • 6. Seven Bridges of Königsberg 6 "The shape of a graph may be distorted in any way without changing the graph itself, so long as the links between nodes are unchanged. It does not matter whether the links are straight or curved, or whether one node is to the left of another. Euler realized that the problem could be solved in terms of the degrees of the nodes. The degree of a node is the number of edges touching it; in the Königsberg bridge graph, three nodes have degree 3 and one has degree 5. Euler proved that a circuit of the desired form is possible if and only if there are no nodes of odd degree. Such a walk is called an Eulerian circuit or an Euler tour. Since the graph corresponding to Königsberg has four nodes of odd degree, it cannot have an Eulerian circuit." 9/3/2012
  • 7. Euler‟s Theory 7 Euler path:  A graph is said to be containing an Euler path if it can be traced in 1 sweep without lifting the pencil from the paper and without tracing the same edge more than once. Vertices may be passed through more than once. The starting and ending points need not be the same. Euler circuit:  An Euler circuit is similar to an Euler path, except that the starting and ending points must be the same. 9/3/2012
  • 8. Euler‟s Theory 8 Graph Number of odd vertices Number of even vertices What does the path (vertices connected to (vertices connected to contain? an odd number of an even number of (Euler path = P; edges) edges) Euler circuit = C; Neither = N) 1 0 10 C 2 0 6 C 3 2 6 P 4 2 4 P 5 4 1 N 6 8 0 N 9/3/2012
  • 9. Euler‟s Theory 9  From the above table, we can observe that: A graph with all vertices being even contains an Euler circuit.  A graph with 2 odd vertices and some even vertices contains an Euler path.  A graph with more than 2 odd vertices does not contain any Euler path or circuit. 9/3/2012
  • 10. Seven Bridges of Königsberg 10 "The problem can be modified to ask for a path that traverses all bridges but does not have the same starting and ending point. Such a walk is called an Eulerian trail or Euler walk. Such a path exists if and only if the graph has exactly two nodes of odd degree, those nodes being the starting and ending points. (So this too was impossible for the seven bridges of Königsberg.)" 9/3/2012
  • 11. Formal Definition: 11  A graph, G=(V, E), consists of two sets:  a finite non empty set of vertices(V), and  a finite set (E) of unordered pairs of distinct vertices called edges.  V(G) and E(G) represent the sets of vertices and edges of G, respectively.  Vertex: In graph theory, a vertex (plural vertices) or node or points is the fundamental unit out of which graphs are formed.  Edge or Arcs or Links: Gives the relationship between the Two vertices. 9/3/2012
  • 12. Examples for Graph 0 0 0 1 2 1 2 1 3 3 4 5 6 G1 2 G2 G3 V(G1)={0,1,2,3} E(G1)={(0,1),(0,2),(0,3),(1,2),(1,3),(2,3)} V(G2)={0,1,2,3,4,5,6} E(G2)={(0,1),(0,2),(1,3),(1,4),(2,5),(2,6)} V(G3)={0,1,2} E(G3)={<0,1>,<1,0>,<1,2>} 9/3/2012 12
  • 13. Graph Terminology 13  Two vertices joined by an edge are called the end vertices or endpoints of the edge.  If an edge is directed its first endpoint is called the origin and the other is called the destination.  Two vertices are said to be adjacent if they are endpoints of the same edge. 9/3/2012
  • 14. Graph Terminology 14 a B b h d j A D F i e c g C f E 9/3/2012
  • 15. Graph Terminology 15 a B b h d j A D F i e c g C Vertices A and B f are endpoints of edge a E 9/3/2012
  • 16. Graph Terminology 16 a B b h d j A D F i e c g C Vertex A is the f origin of edge a E 9/3/2012
  • 17. Graph Terminology 17 a B b h d j A D F i e c g C Vertex B is the f destination of edge a E 9/3/2012
  • 18. Graph Terminology 18 a B b h d j A D F i e c g C Vertices A and B are f adjacent as they are endpoints of edge a E 9/3/2012
  • 19. Graph Terminology 19  An edge is said to be incident on a vertex if the vertex is one of the edges endpoints.  The outgoing edges of a vertex are the directed edges whose origin is that vertex.  The incoming edges of a vertex are the directed edges whose destination is that vertex. 9/3/2012
  • 20. Graph Terminology 20 a V b h U d j X i Z e c g Edge 'a' is incident on vertex V W Edge 'h' is incident on vertex Z Edge 'g' is incident on vertex Y f Y 9/3/2012
  • 21. Graph Terminology 21 a V b h U d j X i Z e c g The outgoing edges of vertex W W are the edges with vertex W as origin {d, e, f} f Y 9/3/2012
  • 22. Graph Terminology 22 a V b h U d j X i Z e c g The incoming edges of vertex X W are the edges with vertex X as destination {b, e, g, i} f Y 9/3/2012
  • 23. 23 Types of Graph 9/3/2012
  • 24. Null graph, Trivial Graph 24  A graph G=(V,E) where E=0 is said to be Null or Empty graph A graph with One vertex and no edge is called as a trivial graph. v1 9/3/2012
  • 25. Directed Graph 25 A directed graph is one in which every edge (u, v) has a direction, so that (u, v) is different from (v, u) There are two possible situations that can arise in a directed graph between vertices u and v.  i) only one of (u, v) and (v, u) is present.  ii) both (u, v) and (v, u) are present. 9/3/2012
  • 26. Directed Graph 26 a V b h U d j X i Z e c Here (u,v) is possible g where as (v,u) is not W possible. f Y In a directed edge, u is said to be adjacent to v and v is said to be adjacent from u. The edge <u,v> is incident to both u and v. 9/3/2012
  • 27. Directed Graph 27  Directed Graphs are also called as Digraph.  Directed graph or the digraph make reference to edges which are directed (i.e) edges which are Ordered pairs of vertices.  The edge(uv) is referred to as <u,v> which is distinct from <v,u> where u,v are distinct vertices. 9/3/2012
  • 28. Undirected Graph 28  In an undirected graph, there is no distinction between (u, v) and (v, u). • An edge (u, v) is said to be directed from u to v if the pair (u, v) is ordered with u preceding v. E.g. A Flight Route • An edge (u, v) is said to be undirected if the pair (u, v) is not ordered E.g. Road Map 9/3/2012
  • 29. Undirected Graph 29 a B b h d j A D F i e c g C Here (u,v) and (v,u) f both are possible. E 9/3/2012
  • 30. Undirected Graph 30  A graph whose definition makes reference to Unordered pairs of vertices as Edges is known as undirected graph.  Thus an undirected edge (u,v) is equivalent to (v,u) where u and v are distinct vertices.  In the case of undirected edge(u,v) in a graph, the vertices u,v are said to be adjacent or the edge(u,v) is said to be incident on vertices u,v. 9/3/2012
  • 31. Complete Graph 31  In a complete graph: Every node should be connected to all other nodes.  The above means “ Every node is adjacent to all other nodes in that graph”.  The degree of all the vertices must be same. K1 K2 K3 K4 K5  Kn = Denotes a complete with n number of vertices. 9/3/2012 9/3/2012
  • 32. Complete Undirected Graph 32 An undirected graph with „n‟ number of vertices is said to be complete ,if each vertices has (n-1) number of edges. v1 Number of vertices=3 v2 Degree of Each vertices =(n-1) =(3-1) v3 =2 9/3/2012
  • 33. Complete Undirected Graph 33  An n vertex undirected graph with exactly (n.(n- 1))/2 edges is said to be complete. v1 Here we have 4 number of vertices and hence v2 v4 (4.(4-1))/2= (4.3)/2 =6 v3 Hence the graph has 6 number of edges and it is a Complete Undirected graph. 9/3/2012
  • 34. Complete Directed Graph 34  An directed graph with „n‟ number of vertices is said to be complete ,if each vertices has (n-1) number of in-coming and out-going edges. • In case of a digraph with n vertices, maximum number of edges is given by n.(n-1).Such a graph with exactly n.(n-1) edges is said to be Complete digraph. 9/3/2012
  • 35. Complete Directed Graph 35 Example: Hence the graph has 6 number of edges and it is v1 a Complete directed graph. v2 v3  Here we have 3 number of vertices and hence  n.(n-1)= 3.(3-1)  =6 9/3/2012
  • 36. Sub Graph  A graph whose vertices and edges are subsets of another graph.  A subgraph G‟=(V‟,E‟) of a graph G = (V,E) such that V‟ ⊆ V and E‟ ⊆ E , Then G is a supergraph for G‟. (G) (G1)
  • 37. ..Sub Graph A B A A B C D C D D E E (G) (G1) (G2)
  • 38. Spanning Subgraph  A spanning subgraph is a subgraph that contains all the vertices of the original graph.
  • 39. Induced-Subgraph  Vertex-Induced Subgraph:  A vertex-induced subgraph is one that consists of some of the vertices of the original graph and all of the edges that connect them in the original. A B B C C C D E D E D E
  • 40. Induced-Subgraph  Edge-Induced Subgraph:  An edge-induced subgraph consists of some of the edges of the original graph and the vertices that are at their endpoints. A A B C B C B D E D E D F F
  • 41. MultiGraph(Without Self Edge)  The term multigraph refers to a graph in which multiple edges between vertices are permitted.  A multigraph G = (V, E) is a graph which has the set of vetrices and multiple edges between vertices. 2 1 3
  • 42. MultiGraph(With Self Edge)  A multidigraph is a directed graph which is permitted to have multiple edges, i.e., edges with the own,source and target vertices. 2 1 3
  • 43. Conclusions 43 Graph theory enables us to study and model networks and solve some difficult problems inherently capable of being modelled using networks. Various terms e.g. vertex and edge, are associated with graph theory which gives these terms special meanings. These meanings need to be understood and remembered in order to apply graph theoretic approaches to solving problems. When solving a problem by developing a graph-based program, careful attention must be given at the design stage to the structuring of data to help make solving the problem tractable, to enable linkages to be traced efficiently and to avoid duplication of data. 9/3/2012