8 self-learning (special graphs and graph iso morph ism)

Upload: xxx

Post on 05-Apr-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    1/26

    1

    Special Graphs (Self-learning)Complete Graphs

    n-Cube

    Complete bipartite Graphs

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    2/26

    2

    Complete Graphs

    Complete Graphs:

    The complete graph onn vertices, denoted byKn, is the

    simple graph that contains exactly one edge between eachpair of distinct vertices.

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    3/26

    3

    Complete Graphs

    K1 K2 K3

    K4 K5 K6

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    4/264

    n-Cubes

    Then-cube, denoted by Qn (n1), is the graph that has vertices

    representing the 2n

    bit strings of length n. Two vertices are adjacentif and only if the bit strings that they represent differ in exactly one

    bit position.

    Q2Q3

    000 001

    011010

    100

    110 111

    101

    00 01

    10 11Q1

    0 1

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    5/265

    Bipartite Graphs

    A simple graph G=(V,E) is calledbipartite, ifVcan be

    partitioned into two disjoint nonempty sets V1 and V2 (i.e. V=V1V2 and V1V2 = ) such that every edge in the graph

    connects a vertex in V1 and a vertex in V2 (so that no edge in G

    connects either two vertices in V1 or two vertices in V2)

    V1 V2

    v1

    v2

    v3

    v4

    v5

    v6

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    6/266

    Bipartite Graphs

    Is C6 bipartite?

    Can we partition V={v1, v2, v3, v4, v5, v6}into non-empty sets V1 and V2 such that

    every edge in C6 connects a vertex in V1

    and a vertex V2 ?

    Yes!

    v1

    v2

    v3

    v4

    v5

    v6

    V1 V2

    v1 v2

    v3 v4

    v5 v6

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    7/267

    V1 V2

    Bipartite Graphs

    Is K3 bipartite?

    Can we partition V={v1, v2, v3} intonon-empty sets V1 and V2 such that

    every edge in K3 connects a vertex in

    V1 and a vertex V2 ?

    No!

    v1 v2

    v3

    v1

    v2v3

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    8/26

    8

    Complete Bipartite Graphs

    Thecomplete bipartite graph Km,n (m, n 1) is the graph with

    m+n vertices that has its vertex set partitioned into two subsets of

    m and n vertices, respectively.There is an edge between two vertices if and only ifone vertex is

    in the first subset and the other vertex is in the second subset.

    K2,3

    m

    n

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    9/26

    9

    Bipartite VS. Complete Bipartite

    If a graph can be partitioned into two

    parts such that there is no intra-connections in either part, the graph is

    bipartite.If every vertex in a bipartite graph hasinterconnections with all the vertices inits counterpart, this graph is completebipartite

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    10/26

    10

    Complete Bipartite Graphs

    K3,3

    K2,6

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    11/26

    11

    Graph Isomorphism : Introduction

    v1

    v2

    e1

    v1

    v2

    e1e2v3

    e2

    v3

    e3

    v4

    e5

    e3

    v4 e4v5

    e4

    v5 e5

    The same graph can be drawn in many different ways:

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    12/26

    12

    Introduction

    v1v

    2v3v4v5

    Vertices

    ofG v1v

    2v3v4v5

    Vertices

    ofG

    G and G denote the same graph.

    Can be shown formally by using a function.

    v1

    v2v5

    v3v4

    v1

    v3v2

    v5v4

    G:

    G:

    One-to-one?

    Onto?

    Yes!

    Yes!

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    13/26

    13

    DefinitionThe simple graphs G1=(V1,E1) and G2=(V2,E2) are isomorphic

    if there is a one-to-one and onto function ffrom V1 to V2 withthe property that

    for all vertices a, b V1:

    {a, b} is an edge in G1 {f(a),f(b)} is an edge in G2

    Such a functionfis called an isomorphism.

    In other words: two simple graphs are isomorphic, if there is

    a one-to-one correspondence between the vertices of the two

    graphs that preserves the adjacency relationship.

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    14/26

    14

    Example 1

    u1 u2

    v3 v4u3 u4

    v1 v2

    Show that thesegraphs are

    isomorphic:

    u1u2

    u3u4

    v1v2

    v3v4

    G H

    Find one-to-one

    correspondencef

    between the vertices:

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    15/26

    15

    Example 1

    0 1 1 0

    1 0 0 1

    1 0 0 1

    0 1 1 0

    u1u2

    u3u4

    u1 u2 u3 u4

    AG =

    v1v4

    v3v2

    v1 v4 v3 v2

    0 1 1 0

    1 0 0 1

    1 0 0 10 1 1 0

    AH

    =

    SinceAG =AH, it follows thatfpreserves adjacency, so

    u1 u2

    v3 v4u3 u4

    v1 v2

    GH

    Rewrite the adjacency

    matrix of the secondgraph using the order

    of the vertex index of

    the preimages of the

    functionf,

    u1

    u2u3u4

    v1

    v2v3v4

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    16/26

    16

    Example 2e.g. Justify if t G and

    Hare isomorphic.

    G

    e d

    a c

    b

    H

    e d

    a c

    b

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    17/26

    17

    Isomorphic InvariantA property P is called isomorphic invariant , if and only if

    given any simple graphs G andH, ifG has property P and

    His isomorphic to G, thenHhas property P.

    Some typical isomorphic invariants:

    1. Same number of vertices

    2. Same number of edges

    3. Same degrees of vertices (that is, a vertex v of degree d

    in G must correspond to a vertexf(v) of degree dinH)

    4. Simple circuit of length k, where k>2

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    18/26

    18

    Example 2e.g. Justify if t G and

    Hare isomorphic.

    G

    e d

    a c

    b

    H

    e d

    a c

    b

    Number of vertices: both 5

    Number of edges: both 6

    Degrees of vertices: deg(e)=1 inH, but G has no such a vertex.

    So, NOT isomorphic

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    19/26

    19

    How to justify IsomorphismSTEP 1: Check I somorphic I nvariants.

    If there is any difference, conclude they are not isomorphic.

    STEP 2: Const ruct 1-2-1 Correspondence.If you hardly find such a function, you may need more invariance analyses (see the optional example).

    STEP 3: Check New Adj acency Mat r ices.Rewrite the adjacency matrix of the second graph using the order of the index of the vertex preimages of the functionf, to see if

    the two adjacency matrices are identical. If yes,they are isomorphic, if no, the difference between the two graphs can beseen from the matrices.

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    20/26

    20

    Isomorphism

    Show that these

    graphs are

    isomorphic:

    Find one-to-one correspondencefbetween the vertices which

    preserves adjacency :

    u1u2u3u4

    u5

    v1

    v2v3v4

    v5

    Tips: Start with a special pair of vertices, consider connections when building up

    mapping for the rest of the vertices.

    u1

    u2

    u5

    G u3

    u4

    v2

    v4v5

    H

    v1 v3

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    21/26

    21

    Isomorphismu1u2

    u3u4u5

    v1v2

    v3v4v5

    Compare adjacency matrices:

    u1u2

    u5u4

    v1

    v2

    v3

    v4v5

    G

    H

    u3

    u1

    u2u3u4

    u5

    u1 u2 u3 u4 u5

    0 1 1 1 1

    1 0 0 0 11 0 0 1 0

    1 0 1 0 0

    1 1 0 0 0

    AG =

    v2

    v3v1v5

    v4

    v2 v3 v1 v5 v4

    0 1 1 1 1

    1 0 0 0 1

    1 0 0 1 0

    1 0 1 0 0

    1 1 0 0 0

    AH=

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    22/26

    22

    Exercise 1Are these graphs

    isomorphic?

    u1 u2

    u3

    u5

    u6

    u4

    v1

    v2 v6

    v4v5

    v3

    G H

    Find one-to-one correspondence

    fbetween the vertices which

    preserves adjacency :

    u1u2u3u

    4u5u6

    v1v2v3v

    4v5v6

    D.I.Y.!

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    23/26

    23

    Exercise 2

    u1

    u2 u3

    u4

    u5u6

    v1

    v2 v3

    v4

    v5v6

    Are these graphs isomorphic?

    G H

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    24/26

    24

    Exercise 3Are these Graphs Isomorphic?

    u1

    u2

    u3

    u5 u4

    G H

    v1

    v2

    v3v4

    v5

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    25/26

    25

    Are these

    GraphsIsomorphic?

    u1 u2 u3 u5 u6 u8

    u4 u7

    v1 v2 v4 v5 v6 v8

    v3 v7

    Check typical Invariants:

    Number of vertices: both 8

    Number of edges: both 7

    Degrees of vertices: 4 deg=1, 2 deg=2, 2 deg=3

    G H

    More Invariance Analyses (Optional)

    Simple circuits: both 0

  • 8/2/2019 8 Self-Learning (Special Graphs and Graph Iso Morph Ism)

    26/26

    26

    More Invariance Analyses (Optional)

    u1 u2 u3 u5 u6 u8

    u4 u7

    v1 v2 v4 v5 v6

    v3 v7

    v8

    since deg(u2)=2 in G, u2 must correspond to v4 or v5 inH,

    since these are the vertices of degree 2 inH

    Although, invariants are the same, there is still a difference!

    G H

    u2 is adjacent u1, a vertex of degree 1

    but neither v4 or v5 is adjacent to a vertex of degree 1 inH

    deg(u1)=1