Hamiltonian and Eulerian

Embed Size (px)

Citation preview

  • 7/24/2019 Hamiltonian and Eulerian

    1/141

    Copyright ZephGrunschlag, 2001-2002.

    Euler and Hamilton Cycles;lanar Graphs; Coloring.

    Zeph Grunschlag

  • 7/24/2019 Hamiltonian and Eulerian

    2/141

    !2" 2

    #gendaEuler paths and cycles

    Hamilton paths and cycles

    lanar graphs $egions Euler characteristic Edge-%ace Handsha&ing Girth

    Graph Coloring 'ual Graph (cheduling

  • 7/24/2019 Hamiltonian and Eulerian

    3/141

    !2" )

    Euler and Hamilton aths-*oti+ation

    #n pictorial ay to moti+ate thegraph theoretic concepts o

    Eulerian and Hamiltonian pathsand circuits is ith to pules/

    he pencil draing prolem

    he taica prolem

  • 7/24/2019 Hamiltonian and Eulerian

    4/141

    !2" 3

    encil 'raing rolem-Euler aths

    4hich o the olloing pictures cane dran on paper ithout e+erliting the pencil and ithout

    retracing o+er any segment5

  • 7/24/2019 Hamiltonian and Eulerian

    5/141

    !2" "

    encil 'raing rolem-Euler aths

    Graph heoretically/ 4hich o theolloing graphs has an Eulerpath5

  • 7/24/2019 Hamiltonian and Eulerian

    6/141

    !2" 6

    encil 'raing rolem-Euler aths

    #nser/ the let ut not the right.

    start 7nish

    1 2

    )

    3

    "

    6

  • 7/24/2019 Hamiltonian and Eulerian

    7/141

    !2" 8

    Euler aths and Circuits'e7nition

    'E%/ #n Euler pathin a graph G isa simple path containing e+ery

    edge in G. #n Euler circuit 9orEuler cycle: is a cycle hich is anEuler path.

  • 7/24/2019 Hamiltonian and Eulerian

    8/141

    !2" =

    aica rolem-Hamilton aths

    Can a taica dri+er mil& his haplesscustomer y +isiting e+eryintersection eactly once, hen

    dri+ing rom point # to point > 5#

    >

  • 7/24/2019 Hamiltonian and Eulerian

    9/141

    !2" ?

    aica rolem-Hamilton aths

    Graph heoretically/ @s there aHamilton path rom # to > in theolloing graph5

    9< in this case:#

    >

  • 7/24/2019 Hamiltonian and Eulerian

    10/141

    !2" 10

    Circuits'e7nition

    'E%/ # Hamilton pathin a graph G isa path hich +isits e+er +erte in Geactly once. # Hamilton circuit 9or

    Hamilton cycle: is a cycle hich+isits e+ery +erte eactly once,except for the rst vertex, hich is

    also +isited at the end o the cycle.

  • 7/24/2019 Hamiltonian and Eulerian

    11/141

    !2" 11

    @mplications to C(

    %inding Hamilton paths is a +eryimportant prolem in C(.

    EG/ Aisit e+ery city 9+erte: in aregion using the least trips 9edges:as possile.

    EG/ Encode all it strings o a certain

    length as economically as possileso that only change one it at atime. 9Gray codes:.

  • 7/24/2019 Hamiltonian and Eulerian

    12/141

    !2" 12

    @mplications to C(

    #nalying diBculty o Euler +s.Hamilton paths is a great C( case

    study.%inding Euler paths can e done inO 9n: time

    %inding Hamilton paths is NP-

    complete(light change in de7nition can result in

    dramatic algorithmic iurcation

  • 7/24/2019 Hamiltonian and Eulerian

    13/141

    !2" 1)

    %inding Euler aths

    o 7nd Euler paths, eDll 7rst gi+e analgorithm or 7nding Euler cycles andthen modiy it to gi+e Euler paths.

    H*/ #n undirected graph Ghas anEuler circuit i it is connected ande+ery +erte has e+en degree.

  • 7/24/2019 Hamiltonian and Eulerian

    14/141

    !2" 13

    %inding Euler Circuits

    F/ 4hy does the olloing graphha+e no Euler circuit5

  • 7/24/2019 Hamiltonian and Eulerian

    15/141

    !2" 1"

    %inding Euler Circuits

    #/ @t contains a +erte o odddegree.

  • 7/24/2019 Hamiltonian and Eulerian

    16/141

    !2" 16

    %inding Euler Circuits

    !etDs pro+e the theorem constructively.Constructi+e means that the proo illactually contain an algorithm or constructing

    the Euler path, hen it eists.art 1: (uppose Gis connected and each

    +erte has e+en degree. Construct an Eulercycle. 4e pro+e this y strong induction onm the numer o edges in G.

    >ase case m 0/ (ince G is connected andcontains no edges, it must consist o a single+erte. he empty path is an Euler cycle.1

  • 7/24/2019 Hamiltonian and Eulerian

    17/141

    !2" 18

    %inding Euler Circuits@nduction step or mI1 edges,

    assuming pro+ed this up to m 0.

    C!#@*/ Gcontains a simple cycle.

    Consider an edge e9since mI1 J 0:.@ eis a sel-loop, then is a simplecycle. (o can assume that e is a

    loopless edge/ v v(ince deg9v : J 1 9all degrees are

    e+en:, another edge e must e

    incident ith v /v v

    e

  • 7/24/2019 Hamiltonian and Eulerian

    18/141

    !2" 1=

    %inding Euler Circuits(o can continue adding edges until e

    7nd an edge hose ne endpointhas already een encountered during

    the process. his endpoint is a+erte hich is seen tice so athich a simple cycle is ased

    9his pro+es claim:Simplecycle

  • 7/24/2019 Hamiltonian and Eulerian

    19/141

    !2" 1?

    %inding Euler Circuits

    Gi+es rise to a recursi+e prooKalgorithm/

    1: %ind a simple cycle in connected graph ithmI1 edges.

    2: 'elete all the edges rom the cycle and 7ndEuler cycles in each resulting component

    ): #malgamate Euler cycles together using thesimple cycle otaining anted Euler cycle.

    !etDs see ho the amalgamation process or&s/

  • 7/24/2019 Hamiltonian and Eulerian

    20/141

    !2" 20

    %inding Euler Circuits*ohammedDs (cimitars

  • 7/24/2019 Hamiltonian and Eulerian

    21/141

    !2" 21

    %inding Euler Circuits*ohammedDs (cimitars

    %ound a cycle ater starting rommiddle +erte.

    'elete the cycle/

  • 7/24/2019 Hamiltonian and Eulerian

    22/141

    !2" 22

    %inding Euler Circuits*ohammedDs (cimitars

    %ound a cycle ater starting rommiddle +erte.

    'elete the cycle/

  • 7/24/2019 Hamiltonian and Eulerian

    23/141

    !2" 2)

    %inding Euler Circuits*ohammedDs (cimitars

    %ound a cycle ater starting rommiddle +erte.

    'elete the cycle/

  • 7/24/2019 Hamiltonian and Eulerian

    24/141

    !2" 23

    %inding Euler Circuits*ohammedDs (cimitars

    %ound a cycle ater starting rommiddle +erte.

    'elete the cycle/

  • 7/24/2019 Hamiltonian and Eulerian

    25/141

    !2" 2"

    %inding Euler Circuits*ohammedDs (cimitars

    %ound a cycle ater starting rommiddle +erte.

    'elete the cycle/

    i di l i i

  • 7/24/2019 Hamiltonian and Eulerian

    26/141

    !2" 26

    %inding Euler Circuits*ohammedDs (cimitars

    o try again 9say rom middle+erte:/

    i di l Ci i

  • 7/24/2019 Hamiltonian and Eulerian

    27/141

    !2" 28

    %inding Euler Circuits*ohammedDs (cimitars

    his time, ound a cycle starting andending at middle +erte/

    #malgamate these cycles togetherrom a point o intersection, anddelete rom graph/

    %i di E l Ci i

  • 7/24/2019 Hamiltonian and Eulerian

    28/141

    !2" 2=

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    1

    %i di E l Ci i

  • 7/24/2019 Hamiltonian and Eulerian

    29/141

    !2" 2?

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    30/141

    !2" )0

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12)

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    31/141

    !2" )1

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    32/141

    !2" )2

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    33/141

    !2" ))

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    6

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    34/141

    !2" )3

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    6

    8

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    35/141

    !2" )"

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    6

    8=

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    36/141

    !2" )6

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    6

    8=?

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    37/141

    !2" )8

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    6

    8=?

    10

    %i di E l Ci it

  • 7/24/2019 Hamiltonian and Eulerian

    38/141

    !2" )=

    %inding Euler Circuits*ohammedDs (cimitars

    %ind another cycle rom middle+erte/

    12) 3 "

    6

    8=?

    10

    11

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    39/141

    !2" )?

    %inding Euler Circuits*ohammedDs (cimitars

    #malgamate it to Euler cycle o deletedgraph, and delete it. eed to insertcycle eteen ormer edges 10 L 11/

    12) 3 "

    6

    8=?

    10

    11

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    40/141

    !2" 30

    %inding Euler Circuits*ohammedDs (cimitars

    %inally, need to add the triangle.

    Mse same naN+e approach loo&ing orcycle in remaining component/

    12) 3 "

    6

    8=?

    10

    55

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    41/141

    !2" 31

    %inding Euler Circuits*ohammedDs (cimitars

    %inally, need to add the triangle.

    Mse same naN+e approach loo&ing orcycle in remaining component/

    12) 3 "

    6

    8=?

    10

    55 11

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    42/141

    !2" 32

    %inding Euler Circuits*ohammedDs (cimitars

    %inally, need to add the triangle.

    Mse same naN+e approach loo&ing orcycle in remaining component/

    12) 3 "

    6

    8=?

    10

    55 1112

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    43/141

    !2" 3)

    %inding Euler Circuits*ohammedDs (cimitars

    %inally, need to add the triangle.

    Mse same naN+e approach loo&ing orcycle in remaining component/

    12) 3 "

    6

    8=?

    10

    55 1112

    1)

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    44/141

    !2" 33

    %inding Euler Circuits*ohammedDs (cimitars

    %inally, need to add the triangle.

    Mse same naN+e approach loo&ing orcycle in remaining component/

    12) 3 "

    6

    8=?

    10

    55 1112

    1)13

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    45/141

    !2" 3"

    %inding Euler Circuits*ohammedDs (cimitars

    %inally, need to add the triangle.

    Mse same naN+e approach loo&ing orcycle in remaining component/

    12) 3 "

    6

    8=?

    10

    1" 1112

    1)13

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    46/141

    !2" 36

    %inding Euler Circuits*ohammedDs (cimitars

    #malgamate the triangle cycleeteen edges ormerly laeled ?L 10/

    12) 3 "

    6

    8=?

    10

    1" 1112

    1)13

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    47/141

    !2" 38

    %inding Euler Circuits*ohammedDs (cimitars

    #malgamate the triangle cycleeteen edges ormerly laeled ?L 10/

    12) 3 "

    6

    8=?

    55

    55 5555

    5555

    %inding Euler Circuits

  • 7/24/2019 Hamiltonian and Eulerian

    48/141

    !2" 3=

    %inding Euler Circuits*ohammedDs (cimitars

    4e ound the Euler circuit

    12) 3 "

    6

    8=?

    1)

    1= 131"

    161810

    11 12

    Euler Circuit

  • 7/24/2019 Hamiltonian and Eulerian

    49/141

    !2" 3?

    Euler Circuit #ll 'egrees E+en

    2ndhal o theorem says that an Euler circuitin a graph implies that all degrees are e+en/

    @n a simple cycle, hene+er path enters+erte, must come out on dierent edge.

    hus e+ery +isit o vcontriutes 2 to deg9v:.hus, i &eep only edges hich ere on thesimple cycle, degrees o resulting graph areall e+en. >ut in an Eulerian graph G, can

    7nd a simple cycle containing all +erticesand conseOuently graph resulting rom cycleis G itsel

  • 7/24/2019 Hamiltonian and Eulerian

    50/141

    !2" "0

    Generaliing to Euler aths

    F/ 'oes the olloing ha+e an Eulercircuit5

  • 7/24/2019 Hamiltonian and Eulerian

    51/141

    !2" "1

    Generaliing to Euler aths

    #/ o, +ertices o odd degree/

    F/ >ut hy does it ha+e an Euler path5

  • 7/24/2019 Hamiltonian and Eulerian

    52/141

    !2" "2

    Generaliing to Euler aths#/ PE( >ecause eactly 2 +ertices o odd

    degree.

    (o can add a phantom edge eteen odddegree +ertices/

  • 7/24/2019 Hamiltonian and Eulerian

    53/141

    !2" ")

    Generaliing to Euler aths

    #ll degrees no e+en so 7nd Eulercycle/

  • 7/24/2019 Hamiltonian and Eulerian

    54/141

    !2" "3

    Generaliing to Euler aths

    o remo+e phantom edge otaining/

    1 2

    )

    3

    "

    68

  • 7/24/2019 Hamiltonian and Eulerian

    55/141

    !2" ""

    Generaliing to Euler aths

    Generalie/

    1 2

    )

    3

    "

    6

  • 7/24/2019 Hamiltonian and Eulerian

    56/141

    !2" "6

    Generaliing to Euler aths

    H*/ #n undirected connectedgraph has an Euler path i thereare eactly to +ertices o odd

    degree.

  • 7/24/2019 Hamiltonian and Eulerian

    57/141

    !2" "8

    >lac&oard Eercises or8."

    1: ro+e y induction that Qnalayshas a Hamilton cycle or n J 1.

    9his gi+es a Gray code:.2: ro+e that the olloing graph

    has no Hamilton cycle/

  • 7/24/2019 Hamiltonian and Eulerian

    58/141

    !2" "=

    lanar Graphs

    Planar graphsare graphs that can e dranin the plane ithout edges ha+ing to cross.

    Mnderstanding planar graph is important/

    #ny graph representation o mapsKtopographical inormation is planar. graph algorithms oten specialied to planar

    graphs 9e.g. tra+eling salesperson:

    Circuits usually represented y planargraphs

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    59/141

    !2" "?

    -Common*isunderstanding

    Qust ecause a graph is dran ithedges crossing doesnDt mean its

    not planar.F/ 4hy canDt e conclude that the

    olloing is non-planar5

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    60/141

    !2" 60

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    61/141

    !2" 61

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    62/141

    !2" 62

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    63/141

    !2" 6)

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    64/141

    !2" 63

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    65/141

    !2" 6"

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    66/141

    !2" 66

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    67/141

    !2" 68

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

    -Common

  • 7/24/2019 Hamiltonian and Eulerian

    68/141

    !2" 6=

    Common*isunderstanding

    #/ >ecause it is isomorphic to agraph hich isplanar/

  • 7/24/2019 Hamiltonian and Eulerian

    69/141

    !2" 6?

    ro+ing lanarity

    o pro+e that a graph is planaramounts to redraing the edges in

    a ay that no edges ill cross.*ay need to mo+e +ertices aroundand the edges may ha+e to edran in a +ery indirect ashion.

    E.G. sho that the )-cue is planar/

    ro+ing lanarity

  • 7/24/2019 Hamiltonian and Eulerian

    70/141

    !2" 80

    ro+ing lanarity)-Cue

    ro+ing lanarity5

  • 7/24/2019 Hamiltonian and Eulerian

    71/141

    !2" 81

    ro+ing lanarity53-Cue

    (eemingly not planar, ut hoould one pro+e this

  • 7/24/2019 Hamiltonian and Eulerian

    72/141

    !2" 82

    'ispro+ing lanarity

    he oo& gi+es se+eral methods. @Dlldescrie one method that ill alaysor& in eamples that youDll get onthe 7nal. Pou may also use any othe methods that the oo& mentions.

    9

  • 7/24/2019 Hamiltonian and Eulerian

    73/141

    !2" 8)

    'ispro+ing lanarity

    he idea is to try to 7nd someinvariantOuantities possessed y

    graphs hich are constrained tocertain +alues, or planar graphs.hen to sho that a graph is non-planar, compute the Ouantities andsho that they do not satisy theconstraints on planar graphs.

  • 7/24/2019 Hamiltonian and Eulerian

    74/141

    !2" 83

    $egions

    he 7rst in+ariant o a planar graph ill e thenumer o regionsthat the graph de7nes inthe plane. # region is a part o the planecompletely disconnected o rom other partso the plane y the edges o the graph.

    EG/ the car graph has 3 regions/

    21

    )3

  • 7/24/2019 Hamiltonian and Eulerian

    75/141

    !2" 8"

    $egions

    F/ Ho many regions does the )-cue ha+e5

  • 7/24/2019 Hamiltonian and Eulerian

    76/141

    !2" 86

    $egions

    #/ 6 regions

    1 2

    )

    36

    "

  • 7/24/2019 Hamiltonian and Eulerian

    77/141

    !2" 88

    $egions

    H*/ he numer o regions de7ned y aconnected planar graph is in+ariant o hoit is dran in the plane and satis7es theormula in+ol+ing edges and +ertices/

    r SE S - SV S I 2EG/ Aeriy ormula or car and )-cue/

    1 2

    )

    3612-=I2"

    21

    )36-3I2

  • 7/24/2019 Hamiltonian and Eulerian

    78/141

    !2" 8=

    Euler Characteristic

    he ormula is pro+ed y shoing thatthe Ouantity 9chi: r- SE S I SV Smust eOual 2 or planar graphs. iscalled the Euler characteristic. heidea is that any connected planargraph can e uilt up rom a +erte

    through a seOuence o +erte andedge additions. %or eample, uild )-cue as ollos/

  • 7/24/2019 Hamiltonian and Eulerian

    79/141

    !2" 8?

    Euler Characteristic

  • 7/24/2019 Hamiltonian and Eulerian

    80/141

    !2" =0

    Euler Characteristic

    hus to pro+e that is alays 2 orplanar graphs, one calculate or

    the tri+ial +erte graph/ 1-0I1 2

    and then chec&s that each possile

    mo+e does not change .

  • 7/24/2019 Hamiltonian and Eulerian

    81/141

    !2" =1

    Euler Characteristic

    Chec& that mo+es donDt change /1: #dding a degree 1 +erte/

    r is unchanged. SE S increases y 1. S

    V S increases y 1. I 90-1I1:2: #dding an edge eteen pre-

    eisting +ertices/

    r increases y 1. SE S increases y 1. SV S unchanged. I 91-1I0:

    EG/

    EG/

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    82/141

    !2" =2

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    1 0 1 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    83/141

    !2" =)

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    2 1 1 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    84/141

    !2" =3

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    ) 2 1 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    85/141

    !2" ="

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    3 ) 1 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    86/141

    !2" =6

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    3 3 2 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    87/141

    !2" =8

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    " " 2 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    88/141

    !2" ==

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    6 6 2 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    89/141

    !2" =?

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    8 8 2 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    90/141

    !2" ?0

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    = = 2 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    91/141

    !2" ?1

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    = ? ) 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    92/141

    !2" ?2

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    = 10 3 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    93/141

    !2" ?)

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    = 11 " 2

    #nimated @n+ariance o

  • 7/24/2019 Hamiltonian and Eulerian

    94/141

    !2" ?3

    Euler Characteristic

    SV S SE S r

    r- SE S I SVS

    = 12 6 2

  • 7/24/2019 Hamiltonian and Eulerian

    95/141

    %ace-Edge Handsha&ing

    %or allgraphs handsha&ing theorem relatesdegrees o verticesto numer o edges.

    %or planargraphs, can relate regions toedgesin similar ashion/

    EG/ here are to ays to count thenumer o edges in )-cue/

    1: Count directly/ 12

    2: Count no. o edges aroundeach region; di+ide y 2/

    93I3I3I3I3I3:K2 12 92 triangles peredge:

  • 7/24/2019 Hamiltonian and Eulerian

    96/141

    !2" ?6

    %ace-Edge Handsha&ing

    'E%/ he degreeof a regionF isthe numer o edges at itsoundary, and is denoted y

    deg9F :.H*/ !et Ge a planar graph ith

    region set R. hen/

    =

    RF

    FE )deg(2

    1||

  • 7/24/2019 Hamiltonian and Eulerian

    97/141

    !2" ?8

    Girth

    he girtho a graph is the length othe smallest simple cycle in the

    graph.F/ 4hat the girth o each o the

    olloing5

  • 7/24/2019 Hamiltonian and Eulerian

    98/141

    !2" ?=

    Girth

    #/g 2 g 3 g 3

    F/ 4hat the smallest possile girth or

    simple ipartite graphs5

  • 7/24/2019 Hamiltonian and Eulerian

    99/141

    !2" ??

    Girth

    #/ g 3 is the smallest possile girth/#ny cycle must start and end in thesame color, so must ha+e e+en

    length. (ince simple, cannot ha+e a2-cycle, so 3-cycle is shortestpossile.

    ro+ing that Q3is on-

  • 7/24/2019 Hamiltonian and Eulerian

    100/141

    !2" 100

    lanar

    o e ha+e enough in+ariants to pro+ethat the 3-cue is non-planar.

    1: Count the numer o +ertices and edges/

    SVS 16 9tice the numer or )-cue:SES )2 9tice the numer or )-cue plus

    numer o +ertices in )-cue:

    2: (uppose 3-cue ere planar so y EulerDs

    ormula numer o regions ould e/r )2-16I21=

    ro+ing that Q3is on-

  • 7/24/2019 Hamiltonian and Eulerian

    101/141

    !2" 101

    lanar

    ): Calculate the girth/ g 33: #pply handsha&ing theorem to get a

    loer ound on the numer o edges,

    since the degree o each ace muste at least as large as the girth/

    @n our case, this gi+e SE S TU1=U3)6contradicting SE S )2

    hus 3-cue cannot e planar.

    rggFE

    RFRF 2

    1

    2

    1)deg(

    2

    1|| ==

    >lac&oard eercises or

  • 7/24/2019 Hamiltonian and Eulerian

    102/141

    !2" 102

    >lac&oard eercises or8.8

    (ho that the olloing graphs arenon-planar/

    1: K"2: K),)): Qnor n 3

    h l i

  • 7/24/2019 Hamiltonian and Eulerian

    103/141

    !2" 10)

    Graph Coloring

    Consider a 7ctional continent.

    C l i

  • 7/24/2019 Hamiltonian and Eulerian

    104/141

    !2" 103

    *ap Coloring

    (uppose remo+ed all orders utstill anted to see all thecountries. 1 color insuBcient.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    105/141

    !2" 10"

    *ap Coloring

    (o add another color. ry to 7ll ine+ery country ith one o the tocolors.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    106/141

    !2" 106

    *ap Coloring

    (o add another color. ry to 7ll ine+ery country ith one o the tocolors.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    107/141

    !2" 108

    *ap Coloring

    (o add another color. ry to 7ll ine+ery country ith one o the tocolors.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    108/141

    !2" 10=

    *ap Coloring

    (o add another color. ry to 7ll ine+ery country ith one o the tocolors.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    109/141

    !2" 10?

    *ap Coloring

    $!E*/ o adVacent countriesorced to ha+e same color. >orderunseen.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    110/141

    !2" 110

    *ap Coloring

    (o add another color/

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    111/141

    !2" 111

    *ap Coloring

    @nsuBcient. eed 3 colors ecauseo this country.

    * C l i

  • 7/24/2019 Hamiltonian and Eulerian

    112/141

    !2" 112

    *ap Coloring

    4ith 3 colors, could do it.

    3 C l h

  • 7/24/2019 Hamiltonian and Eulerian

    113/141

    !2" 11)

    3-Color heorem

    H*/ #ny planar map o regions cane depicted using 3 colors so that

    no to regions that share apositi+e-length order ha+e thesame color.

    roo y Haa&en and #ppel usedehausti+e computer search.

    %rom *ap Coloringt G h C l i

  • 7/24/2019 Hamiltonian and Eulerian

    114/141

    !2" 113

    to Graph Coloring

    he prolem o coloring a map, cane reduced to a graph-theoreticprolem/

    %rom *ap Coloringt G h C l i

  • 7/24/2019 Hamiltonian and Eulerian

    115/141

    !2" 11"

    to Graph Coloring

    %or each region introduce a +erte/

    %rom *ap Coloringt G h C l i

  • 7/24/2019 Hamiltonian and Eulerian

    116/141

    !2" 116

    to Graph Coloring

    %or each pair o regions ith apositi+e-length common orderintroduce an edge/

    %rom *aps to Graphst ' l G h

  • 7/24/2019 Hamiltonian and Eulerian

    117/141

    !2" 118

    to 'ual Graphs

    $eally, could thin& o original map asa graph, and e are loo&ing at dualgraph/

    %rom *aps to Graphst ' l G h

  • 7/24/2019 Hamiltonian and Eulerian

    118/141

    !2" 11=

    to 'ual Graphs

    ual Graphs /1: ut +erte inside each region/

    %rom *aps to Graphst ' l G h

  • 7/24/2019 Hamiltonian and Eulerian

    119/141

    !2" 11?

    to 'ual Graphs

    ual Graphs /2: Connect +ertices across common

    edges/

    'e7nition o 'ual Graph

  • 7/24/2019 Hamiltonian and Eulerian

    120/141

    !2" 120

    'e7nition o 'ual Graph

    'E%/ he dual graphG Wo aplanar graph G 9V! E! R:XAertices, Edges, $egionsY is the

    graph otained y setting Aertices o G W/ V 9G W: R Edges o G W/ E 9G W: set o edges

    o the orm F1,F2[ here F1andF2share a common edge.

    %rom *aps to Graphsto 'ual Graphs

  • 7/24/2019 Hamiltonian and Eulerian

    121/141

    !2" 121

    to 'ual Graphs

    (o ta&e dual graph/

    %rom *ap Coloringto Graph Coloring

  • 7/24/2019 Hamiltonian and Eulerian

    122/141

    !2" 122

    to Graph Coloring

    Coloring regions is eOui+alent tocoloring +ertices o dual graph.

    'e7nition o Colorale

  • 7/24/2019 Hamiltonian and Eulerian

    123/141

    !2" 12)

    'e7nition o Colorale

    'E%/ !et n e a positi+e numer. #simple graph is n -colorable i the+ertices can e colored using ncolorsso that no to adVacent +ertices ha+ethe same color.

    he chromatic number o a graph issmallest numer nor hich it is n

    -colorale.EG/ # graph is ipartite i it is 2-

    colorale.

    %rom *ap Coloringto Graph Coloring

  • 7/24/2019 Hamiltonian and Eulerian

    124/141

    !2" 123

    to Graph Coloring

    *ap not 2-colorale, so dual graphnot 2-colorale/

    %rom *ap Coloringto Graph Coloring

  • 7/24/2019 Hamiltonian and Eulerian

    125/141

    !2" 12"

    to Graph Coloring

    *ap not )-colorale, so graph not )-colorale/

    %rom *ap Coloringto Graph Coloring

  • 7/24/2019 Hamiltonian and Eulerian

    126/141

    !2" 126

    to Graph Coloring

    Graph is 3-colorale, so map is asell/

    3-Color heoremGraph heory Aersion

  • 7/24/2019 Hamiltonian and Eulerian

    127/141

    !2" 128

    Graph heory Aersion

    H*/ #ny planar graph is 3-colorale.

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    128/141

    !2" 12=

    (chedules

    EG/ (uppose ant to schedule some 7nal eams or C(courses ith olloing call numers/1008, )1)8, )1"8, )20), )261, 311", 311=, 31"6(uppose also that there are no common students in the

    olloing pairs o courses ecause o prereOuisites/

    1008-)1)81008-)1"8, )1)8-)1"81008-)20)1008-)261, )1)8-)261, )20)-)2611008-311", )1)8-311", )20)-311", )261-311"

    1008-311=, )1)8-311=1008-31"6, )1)8-31"6, )1"8-31"6Ho many eam slots are necessary to schedule

    eams5

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    129/141

    !2" 12?

    (chedules

    urn this into a graph coloring prolem.Aertices are courses, and edges arecourses hich cannote scheduledsimultaneously ecause o possile

    students in common/

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6

    311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    130/141

    !2" 1)0

    (chedules

  • 7/24/2019 Hamiltonian and Eulerian

    131/141

    !2" 1)1

    (chedules

    \and then compute thecomplementary graph/

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6

    311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    132/141

    !2" 1)2

    (chedules

    \and then compute thecomplementary graph/

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6

    311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    133/141

    !2" 1))

    (chedules

    $edra/

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    134/141

    !2" 1)3

    (chedules

    ot 1-colorale ecause o edge

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Suppose wanschedule some

    exams or CS co

    with ollowingnumbers:1007 !1!7 !1"7!#$1 %11" %11&

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    135/141

    !2" 1)"

    (chedules

    ot 2-colorale ecause o triangle

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    136/141

    !2" 1)6

    (chedules

    @s )-colorale. ry to color y $ed,Green, >lue.

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    137/141

    !2" 1)8

    (chedules

    4!

  • 7/24/2019 Hamiltonian and Eulerian

    138/141

    !2" 1)=

    (chedules

    (o 31"6 must e >lue/

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    139/141

    !2" 1)?

    (chedules

    (o )261 and 311" must e $ed.

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    140/141

    !2" 130

    (chedules

    )1)8 and 1008 easy to color.

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    Graph Coloring and(chedules

  • 7/24/2019 Hamiltonian and Eulerian

    141/141

    (chedules

    (o need ) eam slots/

    1008

    )1)8

    )1"8

    )20)

    311"

    )261

    31"6 311=

    (lot 1

    (lot 2

    (lot )