Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Similar documents
Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

0.1. Exercise 1: the distances between four points in a graph

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

Planar Upward Drawings

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

CS 461, Lecture 17. Today s Outline. Example Run

Section 10.4 Connectivity (up to paths and isomorphism, not including)

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

COMP108 Algorithmic Foundations

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Garnir Polynomial and their Properties

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

CS 241 Analysis of Algorithms

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

1. Determine whether or not the following binary relations are equivalence relations. Be sure to justify your answers.

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

Constructive Geometric Constraint Solving

Chapter 9. Graphs. 9.1 Graphs

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

1 Introduction to Modulo 7 Arithmetic

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

Trees as operads. Lecture A formalism of trees

Weighted graphs -- reminder. Data Structures LECTURE 15. Shortest paths algorithms. Example: weighted graph. Two basic properties of shortest paths

Announcements. These are Graphs. This is not a Graph. Graph Definitions. Applications of Graphs. Graphs & Graph Algorithms

Present state Next state Q + M N

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

This chapter covers special properties of planar graphs.

On Local Transformations in Plane Geometric Graphs Embedded on Small Grids

arxiv: v1 [math.co] 15 Dec 2015

Minimum Spanning Trees

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

12. Traffic engineering

Numbering Boundary Nodes

arxiv: v1 [cs.ds] 20 Feb 2008

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

QUESTIONS BEGIN HERE!

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

Graph Contraction and Connectivity

Chapter 18. Minimum Spanning Trees Minimum Spanning Trees. a d. a d. a d. f c

DUET WITH DIAMONDS COLOR SHIFTING BRACELET By Leslie Rogalski

A 43k Kernel for Planar Dominating Set using Computer-Aided Reduction Rule Discovery

Discovering Pairwise Compatibility Graphs

Problem solving by search

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

learning objectives learn what graphs are in mathematical terms learn how to represent graphs in computers learn about typical graph algorithms

Last time: introduced our first computational model the DFA.

Page 1. Question 19.1b Electric Charge II Question 19.2a Conductors I. ConcepTest Clicker Questions Chapter 19. Physics, 4 th Edition James S.

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata

Section 3: Antiderivatives of Formulas

Seven-Segment Display Driver

Solutions to Homework 5

Steinberg s Conjecture is false

Weighted Graphs. Weighted graphs may be either directed or undirected.

Graph Theory. Simple Graph G = (V, E). V={a,b,c,d,e,f,g,h,k} E={(a,b),(a,g),( a,h),(a,k),(b,c),(b,k),...,(h,k)}

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

SOLVED EXAMPLES. be the foci of an ellipse with eccentricity e. For any point P on the ellipse, prove that. tan

(a) v 1. v a. v i. v s. (b)

Graph Theory. Vertices. Vertices are also known as nodes, points and (in social networks) as actors, agents or players.

Computational Biology, Phylogenetic Trees. Consensus methods

N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f

The University of Sydney MATH 2009

CS September 2018

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

On Contract-and-Refine Transformations Between Phylogenetic Trees

Walk Like a Mathematician Learning Task:

Lecture 20: Minimum Spanning Trees (CLRS 23)

Grade 7/8 Math Circles March 4/5, Graph Theory I- Solutions

arxiv: v1 [math.mg] 5 Oct 2015

IEEE TRANSACTIONS ON COMPUTATIONAL BIOLOGY AND BIOINFORMATICS, VOL. TK, NO. TK, MONTHTK YEARTK 1. Hamiltonian Walks of Phylogenetic Treespaces

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

CS553 Lecture Register Allocation I 3

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

CSI35 Chapter 11 Review

Multipoint Alternate Marking method for passive and hybrid performance monitoring

Transcription:

Grt Thortil Is In Computr Sin Vitor Amhik CS 15-251 Ltur 9 Grphs - II Crngi Mllon Univrsity Grph Isomorphism finition. Two simpl grphs G n H r isomorphi G H if thr is vrtx ijtion V H ->V G tht prsrvs jny n non-jny struturs. Cyly s Formul Th numr of ll trs on n nos is n n-2 Put nothr wy, it ounts th numr of spnning trs of omplt grph K n. 4 3 1 2 5 6 P = 5, 1, 1, 5 W prov it y fining ijtion twn th st of Prϋfr squns n th st of ll trs. Plnr Grphs Thorm: In ny onnt plnr grph with V vrtis, gs n F fs, thn V + F = 2 Thorm: In ny onnt plnr grph with t lst 3 vrtis: 3 V - 6 Lmm: In ny onnt plnr grph with t lst 3 vrtis: 3 F 2 Is K 5 plnr? K 5 hs 5 vrtis n 10 gs, thus = 10 3x5 6 = 9 whih is fls, thrfor K 5 is not plnr. Outlin Biprtit Grphs Kurtowski Thorm Grph Coloring Biprtit Mthing 1

Biprtit Grphs A grph is iprtit if th vrtis n prtition into two sts V 1 n V 2 suh tht ll gs go only twn V 1 n V 2 (no gs go from V 1 to V 1 or from V 2 to V 2 ) Th omplt iprtit grphs K m,n hv th proprty tht two vrtis r jnt if n only if thy o not long togthr in th iprtition susts. Is K 3,3 plnr? Thorm: In ny onnt plnr grph with t lst 3 vrtis: 3 V - 6 K 3,3 hs 5 vrtis n 9 gs, thus = 9 3x6 6 = 12 Not onlusiv! Is K 3,3 plnr? (g, f) 2, sin h g is ssoit with t most 2 fs (g, f) 4 F, sin grph ontins no simpl tringl rgions of 3 gs. From ulr s thorm: V + F = 2 F = 2 + 9 6 = 5. Contrition! It follows, tht 4 F 2 n for K 3,3 w hv 4F 18 F 4.5 Plnr Biprtit Grphs Th prvious xmpl stlish two simpl ritri for tsting whthr givn plnr grph is iprtit. Thorm. In ny iprtit plnr grph with t lst 3 vrtis: 2 V - 4 Lmm: In ny iprtit plnr grph with t lst 3 vrtis: 4 F 2 Kurtowski Thorm (1930) Thorm. A grph is plnr if n only if it ontins no sugrph isomorphi to suivision of K 5 or K 3,3. Suivision n Contrtion finition. Suiviing n g mns insrting nw vrtx (of gr two) into this g. B A Ptrsn grph For ny grph on V vrtis thr r ffiint lgorithms for hking if th grph is plnr. Th st on runs in linr tim O(V) C 2

Thorm. A grph is plnr if n only if it ontins no sugrph isomorphi to suivision of K 5 or K 3,3. B C A Ptrsn grph Rmov B to gt sugrph Thorm. A grph is plnr if n only if it ontins no sugrph isomorphi to suivision of K 5 or K 3,3. A is suiviing (,) A C is suiviing (,) C is suiviing (,) Thorm. A grph is plnr if n only if it ontins no sugrph isomorphi to suivision of K 5 or K 3,3. Suivision n Contrtion finition. Suiviing n g mns insrting nw vrtx (of gr two) into this g. finition. An g ontrtion is n oprtion whih rmovs n g from grph whil simultnously mrging th two vrtis it us to onnt. Wgnr Thorm Thorm. Grph G is plnr if n only if it ontins no sugrph tht n ontrt to on of th two Kurtowski sugrphs. Coloring Plnr Grphs A oloring of grph is n ssignmnt of olor to h vrtx suh tht no nighoring vrtis hv th sm olor Is th Ptrsn grph plnr? 3

Grph Coloring Thorm: Any simpl plnr grph n olor with 6 olors. Proof. (y inution on th numr of vrtis). If G hs six or lss vrtis, thn th rsult is ovious. Suppos tht ll suh grphs with V-1 vrtis r 6-olorl Rmov vrtx of gr lss thn 6, us IH. Put it k, sin it hs t most 5 jnt vrtis, w hv nough olors. Q Grph Coloring Thorm : vry simpl plnr grph hs vrtx of gr t most 5. Proof. g(v k ) = 2 2 (3 V 6) Avrg gr: 1/V g(v k ) 6 12/V < 6 Thus, thr xists vrtx of gr t most 5. Grph Coloring Thorm: Any simpl plnr grph n olor with lss thn or qul to 5 olors. Proof. (rpt th 6-olors proof) Pik vrtx v of gr 5. Ll th vrtis jnt to v s x 1, x 2, x 3, x 4 n x 5. Assum tht x 4 n x 5 r not jnt to h othr. Why w n ssum this? If thy ll jnt, w gt K 5. Rmov gs (v, x 1 ), (v, x 2 ) n (v, x 3 ). Contrt gs (v, x 4 ), (v, x 5 ). Vrtis v, x 4, x 5 will rpl y y, so nighors of v, x 4, x 5 will nighors of y. W otin nw grph H with two lss vrtis. By IH th grph H n olor with 5 olors. Nxt, w ssign y-olor to x 4 n x 5 W giv v olor iffrnt from ll olors us on th four vrtis x 1, x 2, x 3 n y. Q 4 Color Thorm (1976) Thorm: Any simpl plnr grph n olor with lss thn or qul to 4 olors. It ws provn in 1976 y K. Appl n W. Hkn. Thy us spil-purpos omputr progrm. Sin tht tim omputr sintists hv n working on vloping forml progrm proof of orrtnss. Th i is to writ o tht sris not only wht th mhin shoul o, ut lso why it shoul oing it. In 2005 suh proof hs n vlop y Gonthir, using th Coq proof systm. Biprtit Mthing A grph is iprtit if th vrtis n prtition into two isjoint (lso ll inpnnt) sts V 1 n V 2 suh tht ll gs go only twn V 1 n V 2 (no gs go from V 1 to V 1 or from V 2 to V 2 ) Prsonnl Prolm. You r th oss of ompny. Th ompny hs M workrs n N jos. h workr is qulifi to o som jos, ut not othrs. How will you ssign jos to h workr? 4

Biprtit Grphs Thorm. A grph is iprtit iff it os not hv n o lngth yl. Proof. ) If it s iprtit n hs yl, its lngth must vn. Biprtit Grphs Thorm. A grph is iprtit iff it os not hv n o lngth yl. ) Fix vrtx v. fin two sts of vrtis A ={w V vn lngth shortst pth from v to w} B ={w V o lngth shortst pth from v to w} If x n y from A, thy nnot jnt. By ontrition. Thr will n o lngth yl. Th sm rgumnt for B. Ths sts provi iprtition. Biprtit Mthing finition. A sust of gs is mthing if no two gs hv ommon vrtx (mutully isjoint). Is tr lwys iprtit grph? finition. A mximum mthing is mthing with th lrgst possil numr of gs Biprtit Mthing finition. A prft mthing is mthing in whih h no hs xtly on g inint on it. A prft mthing is lik ijtion, whih rquirs tht V 1 = V 2 n in whih s its invrs is lso ijtion. Hll s (mrrig) Thorm Thorm. (without proof) Lt G iprtit with V 1 n V 2. For ny st S V 1, lt N(S) not th st of vrtis jnt to vrtis in S. Thn, G hs prft mthing if n only if S N(S) for vry S V 1. 5

Altrnting Pth A mthing M hs som mth n som unmth vrtis. (y1,x2),(y3,x4) Altrnting pth hs gs ltrnting twn M n - M. Pth x1, y1, x2, y3, x4 is ltrnting. Augmnting Mthing If mthing M (in grn) hs n ugmnting pth, thn w gt lrgr mthing y swpping th gs on th ugmnting pth. An ltrnting pth is ugmnting if oth of its npoints r fr vrtis. x1 x2 x3 x4 x1 x2 x3 x4 x1 x2 x3 x4 Pth x1, y1, x2, y3, x4, y4 is ugmnting. y1 y2 y3 y4 y1 y2 y3 y4 y1 y2 y3 y4 Hungrin Algorithm Th lgorithm strts with ny mthing n onstruts tr vi rth-first srh to fin n ugmnting pth. If th srh sus, thn it yils mthing hving on mor g thn th originl. Thn w srh gin (it most it hppns is V/2) for nw ugmnting pth. If th srh is unsussful, thn th lgorithm trmints n must th lrgst-siz mthing tht xists. Wht is th runtim omplxity of th Hungrin lgorithm? Complxity of BFS O(V+) W run it V/2 tims This, th runtim is O(V ). Proof of Corrtnss Th lgorithm lrly trmints, sin w mth on vrtx pr stp. Suppos tht thr wr nothr mthing M1 tht us mor gs thn M. Ovrlp M n M1 - th rsult is union of yls n pths. Rook Attk This prolm sks us to pl mximum numr of rooks (thy mov horizontlly n vrtilly) on hssor with som squrs ut out (forin positions) Thr is pth tht hv mor M1 gs thn from M. This pth is n ugmnting pth. Contrition. 6

Rook Attk This prolm sks us to pl mximum numr of rooks on hssor with som squrs ut out. r1 r2 1 2 Plnr Grphs Kurtowski Thorm Grph Coloring Biprtit Grphs Biprtit Mthing Th numr of non-ttking rooks quls th numr of gs in mthing. r3 3 Hr s Wht You N to Know 7