1 / 15

Introduction to Graph Theory

Introduction to Graph Theory. Lecture 18: Graph Coloring Algorithms and Tree Codes. Graph Coloring Algorithms. Brook’s Theorem: If G is a connected graph and is neither complete nor an odd cycle, then . But could be much greater than .

lsalter
Télécharger la présentation

Introduction to Graph Theory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Graph Theory Lecture 18: Graph Coloring Algorithms and Tree Codes

  2. Graph Coloring Algorithms • Brook’s Theorem: If G is a connected graph and is neither complete nor an odd cycle, then . • But could be much greater than . • In the textbook, it discusses two approximation algorithms • Sequential coloring • Maximum Color-Degree Coloring

  3. Sequential Coloring • Assumptions: • Vertices are labeled and vertex labels are colored • Possible colors are also ordered from lowest to highest. • Algorithm • Color the first vertex by 1 • Color each subsequent vertex by the lowest color not used by any of its neighbors that have already been colored

  4. Example e a d b g a f g h c h b f c d e (A) (B) Different labeling results in different n-coloring

  5. Maximum Color-Degree Coloring • Ideas: • Try to color vertices of high degree early • Simultaneously try to color a vertex whose neighbors have already received many distinct colors. • Color degree (cd) of v: is the number of distinct colors that have been assigned to neighbors of v.

  6. Algorithm • Initialization • The Algorithm starts with a list U containing sorted, but uncolored, vertices of descending degree. • Color the 1st vertex v of U by 1 • i=1//keeps track of # of colored vertices • Delete v from U • Do the following until i=N //N=V(G)

  7. (cont) • Select a vertex w from U with max cd and appears earliest on U • J=1; found=false; • While !found do • If some has color j then j=j+1 • Else • found=true • color w by j • i=i+1 //another vertex has been colored • remove w from U

  8. Example e d k c f i j g h a b

  9. Tree Coding • Here we deal with 2 problems: • Assigning a code to a tree that uniquely describes the tree • Addressing, i.e. label each vertex with a binary vector, so that the distance between two vertices can be ascertained directly from their labels.

  10. Prufer Codes • Let V(T)={1,2,…,n} ( a labeled tree) • The Prufer code is an ordered (n-2)-tuple of integers with • T can be reconstructed from the Prufer code. • is reconstructed with another set of code • But reconstruction takes only

  11. Constructing • Repeat the following steps until the labeled tree T becomes K2 • Let be the end vertex with the smallest label. • Let be the unique neighbor of . • Deleting vertex (and also edge ) from T, yielding a new tree T1 • T=T1

  12. Example 7 1 3 4 5 2 6 8

  13. Reconstructing Tree • Extend the sequence by setting • We first reconstruct • For each , is the smallest vertex not in and for • The edges of the tree are simply • Let’s reconstruct our previous example.

  14. Binary Addressing of a Tree • Hamming distance: given two binary vectors, the number of bit positions that differ in the two vectors. • We want to assign each vertex a binary label, such that the distance between the vertices is the hamming distance. (0,1,0,0) (1,0,0,0) (0,0,1,0) (0,0,0,0) (0,0,0,1)

  15. (cont) • Theorem 8.5: Let T be a nontrivial tree of order n. Then the vertices of T binary addressing using (n-1)-tuples. • The rest of the material is fairly easy to follow. So I’ll leave it as self-study. (We’ll work on one example if the time allows)

More Related