Report on On-line Graph Coloring

Similar documents
The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

Parallelism for Nested Loops with Non-uniform and Flow Dependences

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1)

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Problem Set 3 Solutions

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

CHAPTER 2 DECOMPOSITION OF GRAPHS

An Optimal Algorithm for Prufer Codes *

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound

Brave New World Pseudocode Reference

GSLM Operations Research II Fall 13/14

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Private Information Retrieval (PIR)

Smoothing Spline ANOVA for variable screening

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points;

A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS

CS1100 Introduction to Programming

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

Mathematics 256 a course in differential equations for engineering students

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array

Learning the Kernel Parameters in Kernel Minimum Distance Classifier

F Geometric Mean Graphs

Solving two-person zero-sum game by Matlab

CE 221 Data Structures and Algorithms

CMPS 10 Introduction to Computer Science Lecture Notes

Helsinki University Of Technology, Systems Analysis Laboratory Mat Independent research projects in applied mathematics (3 cr)

A Binarization Algorithm specialized on Document Images and Photos

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm

1 Dynamic Connectivity

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Ramsey numbers of cubes versus cliques

Load Balancing for Hex-Cell Interconnection Network

A New Approach For the Ranking of Fuzzy Sets With Different Heights

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University

Sorting. Sorting. Why Sort? Consistent Ordering

Life Tables (Times) Summary. Sample StatFolio: lifetable times.sgp

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort

5 The Primal-Dual Method

CS 534: Computer Vision Model Fitting

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

Programming in Fortran 90 : 2017/2018

Hermite Splines in Lie Groups as Products of Geodesics

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming

Intro. Iterators. 1. Access

3D vector computer graphics

Performance Evaluation of Information Retrieval Systems

A mathematical programming approach to the analysis, design and scheduling of offshore oilfields

Virtual Machine Migration based on Trust Measurement of Computer Node

Module Management Tool in Software Development Organizations

Cordial and 3-Equitable Labeling for Some Star Related Graphs

Machine Learning. Topic 6: Clustering

X- Chart Using ANOM Approach

EECS 730 Introduction to Bioinformatics Sequence Alignment. Luke Huan Electrical Engineering and Computer Science

Shared Running Buffer Based Proxy Caching of Streaming Sessions

On Two Segmentation Problems

Lecture 5: Multilayer Perceptrons

International Journal of Scientific & Engineering Research, Volume 7, Issue 5, May ISSN Some Polygonal Sum Labeling of Bistar

Biostatistics 615/815

b * -Open Sets in Bispaces

Algorithm To Convert A Decimal To A Fraction

ON SOME ENTERTAINING APPLICATIONS OF THE CONCEPT OF SET IN COMPUTER SCIENCE COURSE

Optimal Workload-based Weighted Wavelet Synopses

Greedy Technique - Definition

A Topology-aware Random Walk

S1 Note. Basis functions.

K-means and Hierarchical Clustering

NOVEL CONSTRUCTION OF SHORT LENGTH LDPC CODES FOR SIMPLE DECODING

NUMERICAL SOLVING OPTIMAL CONTROL PROBLEMS BY THE METHOD OF VARIATIONS

On a Local Protocol for Concurrent File Transfers

Machine Learning: Algorithms and Applications

11. APPROXIMATION ALGORITHMS

Parallel matrix-vector multiplication

Hierarchical clustering for gene expression data analysis

User Authentication Based On Behavioral Mouse Dynamics Biometrics

Array transposition in CUDA shared memory

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints

Type-2 Fuzzy Non-uniform Rational B-spline Model with Type-2 Fuzzy Data

Clustering on antimatroids and convex geometries

Random Variables and Probability Distributions

On Some Entertaining Applications of the Concept of Set in Computer Science Course

NGPM -- A NSGA-II Program in Matlab

A Fast Visual Tracking Algorithm Based on Circle Pixels Matching

Fast Computation of Shortest Path for Visiting Segments in the Plane

An Iterative Solution Approach to Process Plant Layout using Mixed Integer Optimisation

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

The Shortest Path of Touring Lines given in the Plane

Cluster Analysis of Electrical Behavior

Analysis of Collaborative Distributed Admission Control in x Networks

Support Vector Machines

A New Exact Algorithm for Traveling Salesman Problem with Time Complexity Interval (O(n^4), O(n^3 2^n))

Classifier Selection Based on Data Complexity Measures *

UNIT 2 : INEQUALITIES AND CONVEX SETS

Quality Improvement Algorithm for Tetrahedral Mesh Based on Optimal Delaunay Triangulation

1 Introducton Effcent and speedy recovery of electrc power networks followng a major outage, caused by a dsaster such as extreme weather or equpment f

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Constructing Minimum Connected Dominating Set: Algorithmic approach

Transcription:

2003 Fall Semester Comp 670K Onlne Algorthm Report on LO Yuet Me (00086365) cndylo@ust.hk Abstract Onlne algorthm deals wth data that has no future nformaton. Lots of examples demonstrate that onlne algorthm s mportant n the real lfe. To nvestgate performance, adversary s added to play wth the algorthm. There are three knds of adversary, and they gve dfferent result for the game. A proper colorng graph s a graph that for each vertex, whch color s not the same as any neghbors colors. Graph colorng s sad to be on-lne f there s no knowledge on future vertces and colored vertces cannot be changed. Ths s useful for some applcatons that share certan resources, but collson (dfferent applcatons usng same porton of the shared resources at the same tme) s not allowed. Performance rato s a measure of on-lne graph colorng. By ths, t shows exstng on-lne graph colorng algorthm cannot acheve a constant performance rato to make t not compettve.

Content 1 Introducton -------------------------------------------------------------------------------1 2 General defntons on onlne algorthm ---------------------------------------------1 2.1 Onlne algorthm---------------------------------------------------------------------1 2.2 Determnstc onlne algorthm ----------------------------------------------------1 2.3 Randomzed onlne algorthm------------------------------------------------------1 2.4 Adversary -----------------------------------------------------------------------------2 3 Basc Informaton on Graph colorng------------------------------------------------3 3.1 Defnton -----------------------------------------------------------------------------3 3.2 Offlne/Optmal Framework--------------------------------------------------------3 3.3 Onlne problem ----------------------------------------------------------------------3 3.4 Performance rato -------------------------------------------------------------------4 4 Applcaton --------------------------------------------------------------------------------4 5 Frst-Ft onlne algorthm --------------------------------------------------------------4 6 Randomzed onlne graph colorng algorthm--------------------------------------7 6.1 General dea--------------------------------------------------------------------------7 6.2 Algorthm -----------------------------------------------------------------------------8 6.3 An upper bound proof------------------------------------------------------------- 10 7 Performance rato---------------------------------------------------------------------- 11 7.1 Framework and defntons------------------------------------------------------- 11 7.2 Adversaral strategy--------------------------------------------------------------- 12 7.3 Lower bound of Determnstc algorthm--------------------------------------- 13 7.4 Lower bound of Randomzed algorthm ---------------------------------------- 13 7.5 Summary ---------------------------------------------------------------------------- 14 8 Concluson------------------------------------------------------------------------------- 15 9 Reference -------------------------------------------------------------------------------- 16 HKUST CS Dept LO Yuet Me

1 Introducton Onlne algorthm s an nterestng research topc because of three reasons.[3] Frst, t s appled naturally n the real world, as the constrants for onlne algorthm are the condtons of the events happenng n the world. Second, many well-studed algorthmc frameworks, such as dynamc algorthms, are well complemented by onlne algorthms. Last, onlne computaton forms an elegant framework for analyzng algorthms wth ncomplete nformaton or access to the nput. Wth the dffcultes n understandng the power of polynomal-tme computablty, t may be worthwhle to study the lmtatons of classes of algorthms defned by ther lmted use of other resources. Graph colorng s exactly used for the algorthms that have lmted resources and so need to share wth each other. Snce sharng may let collson, whch means same resources used by dfferent shared partes at the same tme, graph colorng s the soluton to avod ths phenomenon happens. Ths report s lke a survey or ntroductory on onlne graph colorng. The objectve s to make t as trval as possble so that a reader wth lttle knowledge can understand. Therefore, general defntons on onlne algorthm are frst showed. Secton 2 onwards s the dscusson on onlne graph colorng. 2 General defntons on onlne algorthm 2.1 Onlne algorthm Onlne algorthm s an algorthm wth ncomplete nformaton. Ths means the algorthm s appled wthout any knowledge on future nput. It can be compared wth correspondng optmal algorthm, whch refers to offlne algorthm here. The algorthm used when there s complete nformaton s sad as optmal/offlne algorthm. There s a rato as the result of comparson, and ths s called compettve rato. Therefore, onlne algorthm s also a specal approxmate algorthm. 2.2 Determnstc onlne algorthm Algorthm s determnstc when t makes a predctable choce wth gven nput. For determnstc onlne, t s a seres of functons that gves a fnte set of answer wth a set of request.[1] A set of request, or gven nput, s a sequence of request/nput. 2.3 Randomzed onlne algorthm A randomzed onlne algorthm s a dstrbuton over determnstc onlne HKUST CS Dept LO Yuet Me 1

algorthms.[1] It wll make a gven choce wth a predctable probablty wth gven nput. 2.4 Adversary Adversary s a theoretcal agent that uses nformaton about the past moves of an on-lne algorthm to choose nputs that force the worst-case cost of the algorthm.[2] Therefore, we could say t s a two player game between onlne algorthm and adversary. For a formal defnton, t can be wrtten as: An adversary s an ordered par of algorthms (Q, S), such that Q determnes the sequence of requests σ and S serve σ.[1] There are three knds of adversary: oblvous, adaptve offlne and adaptve onlne. Below s ther defnton. [1] 2.4.1 Oblvous adversary Adversary cannot see the actons of a randomzed onlne algorthm. Formal defnton: A (Q, S) adversary s oblvous f Q determnes σ only as a functon of a randomzed onlne algorthm. In ths case, S s an optmal offlne algorthm for σ. 2.4.2 Adaptve offlne adversary It generates requests whle observng the actons of a randomzed onlne algorthm, and whch serves the sequence of requests that generated n an offlne, optmal manner (n hndsght). And there s a theorem stated that adaptve offlne s the same as determnstc. Formal defnton: A (Q, S) adversary s offlne adaptve whenever: Q s a seres of functons q : A 1 A 2 A -1 R {stop}, 0 d Q where R s a set of request and A n s a fnte set of answer. d Q s a constant that depends on the random onlne algorthm, and the product A 1 A 2 A -1 pertans to the answers of the algorthm. Note that each functon q may mplctly consder the requests generated by q 0,, q -1. S s an optmal offlne algorthm for σ. 2.4.3 Adaptve onlne adversary It generates requests whle observng the actons of a randomzed onlne algorthm, and whch serve the sequence of requests that generated n an onlne manner. HKUST CS Dept LO Yuet Me 2

Formal defnton: A (Q, S) adversary s onlne adaptve f: Q s as defned for offlne adaptve adversares. S s a seres of functons P : R A 1 A 2 A -1 A The product A 1 A 2 A -1 pertans to the answers of the randomzed onlne algorthm. 3 Basc Informaton on Graph colorng 3.1 Defnton For a graph, each vertex n the graph must be assgned dfferent color from ts neghbors color. Fgure 1 shows two dentcal graphs that are both proper colorng. The left one used maxmum colors to color the graph. But the graph on the rght used mnmum colors, we cannot use any fewer colors to color the same graph properly. In ths case, the left one s sad as the worst color graph, and the rght one s the optmal. Number of colors s used to measure the soluton. Fgure 1 : Examples of proper colorng graph. Left s the worst. Rght s optmal. 3.2 Offlne/Optmal Framework In an offlne manner, optmal way to color a graph s select hgh degree vertces and then recursvely color ther neghbors. From the example above [Fgure 1], the center vertex s chosen and color from ths vertex recursvely.[5] 3.3 Onlne problem When n onlne mode, nput s a vertex and the edges lnkng ths vertex wth the exstng vertces n the graph. And onlne colorng algorthm s to mmedately color the vertces of a graph wthout lookng ahead or changng colors already assgned. As a result, offlne framework cannot be used. The am for the onlne algorthm s to HKUST CS Dept LO Yuet Me 3

acheve mnmum performance rato, whch acts the same as compettve rato, but n many papers talkng onlne graph colorng, performance rato s mentoned nstead. 3.4 Performance rato An onlne algorthm gves varous solutons due to dfference nput sequences. Wth a best sequence of nputs to an onlne algorthm, the soluton s the same as offlne one. Ths cannot gve any measure to the algorthm. Therefore, wth an onlne algorthm A, the maxmum color used among all possble sequence on a graph G, denoted as χ A (G), s found. Ths number s dvded by the optmal/offlne chromatc number of graph G, denoted as χ(g) or smply χ. The formula for performance rato of algorthm A on graph G s χ A (G)/ χ(g). Ths s the measurement of the onlne algorthm. Later, we can see that no performance rato can be bounded by a constant. 4 Applcaton For some applcatons used lmted resources and as a result, share the resources. To avod any collson on the resources, onlne graph colorng s useful. Imagne that there are several networks, and they broadcast to some of the networks mutually and smultaneously. There s a great chance of collson f they use the same frequency/bandwdth. Graph colorng can make sure the usage of network channel s low. Ths s broadcast problem, an example of onlne graph colorng. Another example can be dynamc storage allocaton. Most of partton and allocaton problems are n heart a graph colorng queston. For these problems, there s no fxed resource lke broadcast problem (fxed frequency). So, nterval graph s ntroduced to be the graph appled colorng algorthm. Vertex set of nterval graph s represented by a collecton of closed ntervals V of the real numbers. Two ntervals are allowed to have the same endponts. To say a vertex s adjacent to another vertex j, f and only f, j V, j φ.[6] 5 Frst-Ft onlne algorthm Frst-Ft can gve a very good performance on many types of graph. It s powerful and mportant, but smple. Frst-Ft works by assgnng the smallest possble nteger as color to the current vertex of the graph. Tree s a rather smple structure graph. Below, tree s used to prove that Frst-Ft s the best algorthm for any tree. The frst task s to show the lower bound of chromatc number used by any onlne colorng algorthm on tree. Then prove the upper bound of Frst-Ft on tree s the lower bound just showed. HKUST CS Dept LO Yuet Me 4

Theorem 1. For every postve nteger k there exsts a tree T k on 2 k-1 vertces such that for every onlne colorng algorthm A, χ A (T k ) k.[3] 4 th 4 3 rd 2 nd 3 2 2 1 st 1 1 1 1 Fgure 2 : A tree T4 colored by Frst-Ft. To show the dea of the proof, a T 4 tree s used. In Fgure 2, the nput sequence s from the leaves to the root as shown above. If the sequence s reversed, the root vertex s gven frst, then the number colors used s just two, whch s mnmum. But wth the nput sequence shown, by usng Frst-Ft, t used 4 dfferent colors to color T 4. For the thrd nput set, the vertex s lnked to two vertces wth dfferent colors, so a thrd color s assgned. The root s assgned 4 th color due to smlar reason. Usng mathematcal nducton (MI), base step s trval, T 1 has one color only. So, assume T 1 to T k-1 are true,.e. for T where 1 k-1, χ A (T ), and each tree roots are n dfferent color. For an addton vertex that lnked to the root of T 1 to T k-1, then one more s used,.e. χ A (T k ) (k-1)+1. Ths s shown n Fgure 3 below. k T k k-1 T k-1 2 1 k-2 T k-1 T 1 T 2 T 1 T k-2 T 1 T k-1 T k-2 Fgure 3 : Wth the roots of T 1 to T k-1 are n k-1 dfferent color, root of T k tree s assgned a new color HKUST CS Dept LO Yuet Me 5

Questons may appear from the MI proof s that, why addng one vertex to connect T 1 to T k-1 becomes a T k tree. And how to say each root of T 1 to T k-1 trees are dfferent n colors. Soluton of frst queston s smple. Agan usng MI, assume T k -1 s true,.e. by connectng one addtonal vertex to T 1 to T k-2 trees, t gves T k-1 tree. Imagne that T 1 to T k-1 trees are here, and the addtonal vertex s frst lnked to T 1 to T k-2, a T k-1 tree s obtaned as the assumpton sad. Then there are T k-1 trees. And T k-1 tree has 2 k-2 vertces. By lnkng the roots of the two T k-1 trees, we get T k tree wth 2(2 k-2 ) = 2 k-1 vertces. Look at Fgure 3 to have a clear pcture. For the second queston. As there s assumpton that for T where 1 k-1, χ A (T ), the vertex wth th color can act as the root of T, whch does not change any structure of the tree. Thus, the roots of T 1 to T k-1 trees are all n dfferent color. Theorem 2. For any tree T, χ ol (T) = χ FF (T), where ol stands for optmal onlne algorthm and FF stands for Frst-Ft onlne algorthm.[3] Frst s to prove that for any tree T, f Frst-Ft colors a vertex of v of T wth color k, then T contans a copy of T k wth root v. By MI, the base step s trval, T 1 has only one color. So, assume T k case s true,.e. any tree T usng Frst-Ft to color, a vertex v s color s k, then T contans a copy of T k wth root v. Consder that a vertex u s colored wth k+1 by Frst-Ft, so u must be adjacent to k vertces that all are n dfferent colors,.e. k, v s adjacent to a vertex v that Frst - Ft has colored. And by the assumpton, v s a root of a copy U of T n T v. Dstnct U are n dstnct components of T v, because T s acyclc. Hence, U k U {v} s a copy of T k+1. Wth the above proof, just lookng at T k tree constructed n Theorem 1 can represent any tree. The maxmum degree of T k s k-1. Ths can be observed from the root whch s lnked to k-1 trees/vertces. No mater what s the nput sequence, wth maxmum degree of a graph s k-1, the maxmum chromatc number used by Frst-Ft must be (k-1)+1=k,.e. χ FF (T k ) k. Together wth Theorem 1, χ A (T k ) k for any onlne algorthm A, χ FF (T k ) = k, whch s optmal. If the tree contans n vertces, a T k tree whch has 2 k-1 vertces, so k s then equal to log 2 n + 1,.e. χ FF (T k ) = log 2 n + 1. Chromatc number of offlne algorthm χ s 2. The log n 1 performance rato for Frst-Ft on tree s then equal to 2 +. Ths s not 2 compettve as the performance rato s not bounded by a constant. HKUST CS Dept LO Yuet Me 6

6 Randomzed onlne graph colorng algorthm 6.1 General dea In randomzed manner, the technque s to gradually reduce the problem. Then recursvely apply the algorthm to solve the problem. The technque s reles on a crucal property of k-colorable graphs. The property states that f a graph G s k-colorable (can be colored by k number of colors), the neghbor of any node n G s (k-1)-colorable. Fgure 4 below s an example to show the dea. The hghlghted vertex n G s removed to form G. G G 5-colorable 4-colorable Fgure 4 : A 5-colorable graph G reduced to 4-colorable graph G Usng the algorthm, frst assumng that number of vertces n the graph, denoted as n, and the chromatc number χ are know n advance. In each teraton, a lmted number of colors, denoted as s, s used. For the vertces assgned wth the same color are put nto a bn, denoted as B,.e. there are s bns. Snce lmted colors are used, there are vertces cannot be assgned wth any color. These vertces are put nto resdue bn set. To partton these vertces to dfferent resdue bn, frst randomly choose one bn, partton bn, from B where 1 s, say B j. Every vertex n resdue bn set must be adjacent to at least one vertex n B j, otherwse vertex n resdue bn set can be colored wth color j. Therefore, partton the vertces accordng vertex n B j that s frst found adjacent to, say v. Vertces n resdue bn set adjacent to v are put nto R v bn. Each R v bn s k-1 colorable, and so the same algorthm s used to color the vertces nsde R v, whch may also cause further partton. Ths s a recursve algorthm. Fgure 5 has llustrated the dea descrbed above. Termnate the recurson, when the bn s 2-colorable. For 2-colorable graphs usually are bpartte graphs. As mentoned before, Frst-Ft s the best for many knds of graph but not all, bpartte graph s a case. Frst-Ft uses n/2 colors, but there s an algorthm that colors bpartte graphs on n 2 vertces wth at most 2 log 2 n colors (All the log afterwards are base 2). For the detals of ths algorthm and proof, please refer to [8]. If the bn s k-colorable where k>2, Frst-Ft s used (be formal, t s called Partal Frst-Ft, as lmted number colors used). HKUST CS Dept LO Yuet Me 7

# of color used = 5 V 1 V 2 V 3 V V 4 7 V 5 V 8 V 6 B 1 B 2 B 3 B 4 B 5 V 1 V 3 V 2 V 4 V 5 V 6 Assume B 1 s randomly selected for partton Resdue bn sets: R v1 R v3 V 7 V 8 Fgure 5 : Randomzed onlne graph colorng 6.2 Algorthm Below s a text-base algorthm.[9] Algorthm Onlne_color(n, χ): 1. If χ 2, then use a bpartte colorng algorthm that uses at most 2 log n colors (mentoned n secton 6.1). 2. Set s to be S(n, χ) = χ (χ-2) / (χ-1) 1/ (χ-1) 2 n (log n). 3. Choose a random nteger r unformly from {1,, s}. 4. Repeat untl there are no more vertces a. Get the next vertex v. b. If v can be colored usng the greedy set of colors 1,, s, color t. For every new vetex colored r nvoke a copy of Onlne_color(s, χ-1). Skp c. c. Now v s n the resdue bn set. Determne whch bn R the vertex falls nto. If the number of vertces n R exceeds s, nvoke a new copy of Onlne_color(s, χ-1). In any case, nput ths vertex to the copy of Onlne_color correspondng to R. Fgure 6 : Onlne_color(n,χ) algorthm HKUST CS Dept LO Yuet Me 8

Ths s newer verson of randomzed onlne graph colorng algorthm n pseudo form. K-Color-Onlne(T, v) {Re-entrant procedure.} {Assgn a color to vertex v usng colorng tree T.} {Return success or falure} begn wth T do f (χ 2) then return (BpartteColor(T, v)) f (N n) then T New-Colorng-Tree(2n, χ) N N + 1 for j 1 to s do f (v s non-adjacent to all vertces n B[j]) then Assgn v the color B[j] (or COLOR[v] B[j]) return (Success) {v must now be adjacent to some node n each color class} Non-determnstcally choose a neghbor w of v n parttonng bn B[part] f (R[w] s unntalzed) then R[w] New-Colorng-Tree(1, χ-1) return (K-Color-Onlne(R[w], v)) end New-Colorng-Tree(n 0, χ 0 ) {Create and return a new colorng tree wth capacty n and chromatc upper bound χ} begn wth T do n n 0 end χ χ 0 s S(n, χ) = (2 c ( χ-2)/( χ-1) n / (χ-2)) B[1,, s] a new set of colors part Random nteger between 1 and s N 0 return T Fgure 7 : Pseudo code of an randomzed onlne graph colorng algorthm [6] HKUST CS Dept LO Yuet Me 9

S(n, χ ), a functon n both algorthms s to calculate how many colors can be used, denoted as s. Varable N n Fgure 7 means the current number of vertces n the subtree. Other varables represent the same throughout Secton 6. A text-base algorthm n Fgure 6 may not easy to computerzed. 6.3 An upper bound proof Algorthm presented n Fgure 6 s used to have a look of upper bound. To show the upper bound, the maxmum expected number of colors used by the algorthm overall n vertces graphs of chromatc number χ, s denoted as A(n, χ). The depth of recurson s χ-1. Theorem 3. For χ 2, A(n, χ) χ (χ-2) / (χ-1) 1/ (χ-1) χ 2 n (log n).[9] By MI on χ. For χ = 2, A(n, χ) 2 log n 2 2 2 n 0 log n = 8 log n. Before dong the nductve step, A(n, χ) must related to A(y, χ) for certan y. Assume the partton bn chosen s B, and the resdue bn set can be parttoned nto R 1,..., R ' n, where n ' = B. Further parttonng of the resdue bns may be needed to lmtng the sze of each bn to s, and at most n/s extra bns are added. Then let the resdue bn set be parttoned nto G 1,..., G ' n, where n n + n/s. Each choce of I from {1,, s} s unformly, so the probablty s all 1/s. Over subsequent rolls of the de, let E[ G j] s denoted as the expected number of colors used by the algorthm to color the graph G j. Also note that G js are χ-1 and the sze of each G s at most s. Hence E[ G ] A(s, χ-1). j 1 s A(n, χ) = s + (E[G ] +... + E[G = 1 s s A(s, χ -1) s + n s A(s, χ -1) s + s = 1 2n s + A(s, χ -1) s s = 1 (n ; j + n/s) s = 1 n ; n 1 Q n ]) For smplcty, let c = Assume A(s, χ-1) s true,.e. n ( (log n). χ 2 and s = s/c = χ-2) / (χ-1) 1/ (χ-1) χ-1 (χ-3) / (χ-2) 1/ (χ-2) A(s, χ -1) (χ -1) 2 s (log s). HKUST CS Dept LO Yuet Me 10

A(n, χ) 2n s + A(s, χ -1) s 2n χ-1 s + (χ -1) 2 s s n = s + (χ -1) s s' s + < s + c (χ = s + c (χ = s + c (χ = s + c (χ = s + (χ = χs = χ 2 n (χ -1) c s' χ n -1) n s' -1) n -1) n -1) s' -1) s (χ-2) / (χ-1) (χ-3) / (χ-2) (χ-3) / (χ-2) -1/ (χ-2) 1-1 / (χ-1) (χ-2) / (χ-1) (log n) (χ-3) / (χ-2) (log s) s' (χ-3) / (χ-2) (log n) (log n) (log n) 1/ (χ-1) (log s) 1/ (χ-2) 1/ (χ-2) 1/ (χ-2) -1/ (χ-2)(χ-1) 1/ (χ-1) 1/ (χ-2) (log n) 1/ (χ-2) The upper bound s proved. Ths upper bound of expected number of colors can yeld a Ο (n / log n ) performance guarantee, whch s stated n [5]. 7 Performance rato For the performance rato of randomzed algorthm, one man pont dfferent from the one of determnstc s that the number of colors used by the algorthm s an expected value nstead of a true value. Ths s because the number of colors s a random varable n randomzed manner and only expected value can be determned. 7.1 Framework and defntons In Secton 2.4, t mentoned onlne problem s a two player game between an algorthm, say B, and an adversary, say C. The game s an undetermned number of request and answer transactons. The framework s lke follow: 1. At tme t, C poses a par of vertex v and vertces that adjacent to v and are already n the graph..e. gven par (v t, Adj(v t )) where Adj(v t ) {v 1, v t-1 }. 2. B answers wth an nteger Bn(v t ), a proper colorng of v t. 3. C responds wth an nteger Col(v t ), a proper colorng of v t. Adj(v t ) s the adjacent lst of v t, restrcted to the prevous vertces. A proper colorng s a functon f(v t ) f v j Adj(v t ) then f(v j ) f(v t ). Let have some new defntons. At tme t, bns used by the algorthm s denoted as B t = {b 1, b 2,, b m }. HKUST CS Dept LO Yuet Me 11

Each bn b j contans the vertces assgned to that bn, that s b j = {v : Bn(v ) = j}. Defne the hue of a bn to be the set of colors of the vertces n the bn..e. Hue(bj) = {Col(v ) : v b j } The collecton C t of hues s smply {Hue(b j ) : b j B t }. HUECOUNT t hues denote the sum of szes of the bn hues, h C t h. For a vertex v t, ts hue Hue(vt) s the set of colors that are not used by ts neghbors. Snce adjacent vertces cannot be colored wth the same color, the hue represents the choce of colors that the adversary has for that vertex. Number of vertces n the graph s represented by n. Chromatc number of the graph s represented by k. The descrpton above can be pctured t as Fgure 8 shown below. v 1 v 3 v 2 Color by on-lne algorthm b 1 b 2 v 1 v 3 v 2 Hue(v 2 ) v 1 v 2 Hue(b 1 ) Hue(b 2 ) HUECOUNT = Hue(b 1 ) v 3 Color by adversary + Hue(b 2 ) = 3 Fgure 8 : Pcture for algorthm and adversary game. 7.2 Adversaral strategy Adversary has some strateges to base on. To color a vertex v t, adversary must obey the rule: A vertex v t wll be non-adjacent to a prevous vertex v, f and only f the color of v s n the hue selected,.e. Hue(v t ).The goal s to use as many bns as possble. The hue sze of each bn cannot exceed the number of colors n use. And a fact that bn hue must be a subset of the vertex hue, otherwse bn would contan a vertex adjacent to the current vertex v t. Ths mples that at tme t, at least HUECOUNT t / (max <t Hue(v ) ) bns have been used. The objectve s then to ncrease the HUECOUNT wth every new vertex f possble. HKUST CS Dept LO Yuet Me 12

7.3 Lower bound of Determnstc algorthm In ths case, adaptve constructon s used as below. Fnd any vertex hue Hue(v t ) not contaned n bn hue collecton C t. Let Adj(v t ) = {v : Col(v ) Hue(v t ) and < t}. Assume the algorthm color v t wth color j,.e. j = Bn(v t ). Let adversary color the vertex wth color s that s not n the bn hue but contans n vertex hue,.e. Col(v t ) be any s Hue(v t ) Hue(b j ). Theorem 4. The performance rato of any determnstc on-lne colorng algorthm s at least 2n / log 2 n (1-o(1)). [4] k Let n = k/2. k/2 k As long as the number of vertces s less than k/2, we can always get a k/2-set k/2 vertex hue not found n any hue collecton C. The vertex s adjacent to k/2 dfferent colors, so there are k/2 dfferent colors left. Hence, the bn the vertex s places n contans fewer than k/2 colors, snce bn hue must be a subset of the vertex hue. Thus, there s a vald color to make the HUECOUNT t+1 = HUECOUNT t + 1, ths acton s sad to make progress. Snce each vertex ncreases the number of colors n some bn,.e. HUECOUNT = n, and each bn contans no more than k/2 colors, the algorthm must use at least n k = bns. And the number of colors used by the adversary s k, or k/2 k/2 log n (1+o(1)), therefore the performance rato s at least 2n/k 2 = 2n / log 2 n (1-o(1)). 7.4 Lower bound of Randomzed algorthm Oblvous constructon s used. Frst assume a functon Random that takes a fnte set and selects one tem wth a unform probablty, and let [k] denote {1, 2,, k}. The constructon s lke below: Randomly choose a vertex hue Hue(v t ). Color the vertex v t wth a random color n Hue(v t ),.e. Col(v t ) = Random(Hue(v t )). If the randomly guessed color s not contaned n the bn hue whch the bn chosen by the algorthm, t makes progress. For all the bn hues contaned n the gven vertex hue are a constant fracton smaller than the vertex hue, then the random color whch makes progress s wth a fxed constant probablty regardless of the algorthm s bn HKUST CS Dept LO Yuet Me 13

choce. The probablty s proportonal to the rato of the dfference n the number of avalable colors, Hue(v t ), and the number of colors used by the bn t s placed nto, Hue(b j ), to the number of avalable colors,.e. ( Hue(v t ) - Hue(b j ) ) / k. By usng a relatvely small graph, say n = 2 k/4, one thng can be ensured that the bn hue collecton remans relatvely sparse. Then s to prove dstance property, from a randomly selected k/2-set vertex hue, to an arbtrary collecton of no more than n sets. The am s to show that the expected dstance s large, and the probablty of a short dstance s very low. For a k/2-set vertex hue p, and a collecton C of subsets of [k] bn hues, defne dst(p,c) = mn{ p - h : h C { } and h p}. Lemma 1. Let C be any collecton of subsets of [k] bn hues, and let p be a randomly chosen subset of vertex hues of sze k/2. If C 2 k/4 and k s large enough, then E[dst(p,C)] k/4 and Pr[dst(p,C) k/4] 1.0434 -k.[4] Wth the lemma above, we can prove the lower bound of randomzed algorthm. Theorem 5. The performance rato of any randomzed on-lne colorng algorthm s at least n/(16 log 2 n).[4] Let n = 2 k/4. The probablty that makng progress s at least the rato of dst to the number of dst k/4 1 avalable colors, or =. Thus, the expected HUECOUNT s at least n (1/2) p k/2 2 = n/2. Snce each bn can contan only k/2 colors, sze of vertex hue p and what we assumed, the algorthm uses at least expected n/k bns. Snce n = 2 k/4, k = 4 log n. Then the performance rato s at least n/k 2 = n/(16 log 2 n). 7.5 Summary On-lne determnstc On-lne randomzed Upper bounds Ο(n / log*n) [8] Ο (n / log n ) [9] Proved!!! Ο(n / log n) [6] Lower bounds Ω(n / log 2 n) [4] Proved!!! Ω(n / log 2 n) [4] Proved!!! HKUST CS Dept LO Yuet Me 14

8 Concluson In the real world, there are many stuatons to share lmted resources. Number of sharng s changng whle tme goes by. To avod a same resource shared wth dfferent users at the same tme, onlne graph colorng s a good soluton. To measure graph colorng algorthm, compettve rato s not used nstead performance rato s called. And n fact, they work n smlar way. Both ratos are comparng the cost of the onlne algorthm and the cost of offlne/optmal algorthm. In determnstc manner, the cost of onlne algorthm s a true value, but f t s n randomzed manner, the cost s then a random varable. There s no way to confrm the true value of the cost, so expected s used for the calculaton. From the varous dscussons above, there s a powerful algorthm used n both determnstc and randomzed manners, Frst-Ft. It gves best performance n many graphs, but stll there are some exceptons, bpartte graph s an example. Ths mples that there should be other algorthm somehow can do better than Frst-Ft, and ths s the motvaton for the researcher to thnk. Randomzed algorthm wll then be benefted. All the proofs above, we assume number of vertces and chromatc number of optmal soluton are known. Chromatc number must be needed n the randomzed algorthms shown to calculate the number of colored used by the Partal Frst-Ft, and n the real lfe, ths s not gong to happen, as we do not know what the graph wll be. From the table n Secton 7.5, an observaton s that all the performance ratos shown are not bounded by a constant, all are related to the number of vertces. Ths phenomenon s called not compettve. It concludes that onlne graph colorng problem s very hard, and ths s also a reason for the researcher to work on graph colorng. HKUST CS Dept LO Yuet Me 15

9 Reference [1] Lecture notes of Onlne Algorthms and Compettve Analyss n Technon - Israel Insttute of Technology. {downloaded at: http://www.cs.technon.ac.l/users/adro/ teachng/onlne0102a/l5.ps} [2] Dctonary of Algorthms and Data Structures home page {appear at: http://www.nst.gov/ dads/html/adversary.html} [3] A. Gyárás and J. Lehel. On-lne and frst-ft colorngs of graphs. Journal of Graph Theory, 12:217-277, 1988. [4] M. M. Halldórsson and M. Szegedy. Lower bounds for on-lne graph colorng. Theoret. Comput. Sc. 130:163-174, 1994 [5] M. M. Halldórsson. Improved performance guarantee for randomzed on-lne graph colorng. DIMACS, May 1991. [6] M. M. Halldórsson. Parallel and on-lne graph colorng. Journal of Algorthms. 23:265-280, 1997. [7] H. A. Kerstead. The lnearty of frst-ft colorng of nterval graphs. SIAM Journal on Dscrete Math, 1:526-530, 1988 [8] L. Lovász, M. Sakes, and W. T. Trotter. An onlne graph colorng algorthm wth sublnear performance rato. Dsrete Mathematcs, 75:319-325, 1989. [9] S. Vshwanathan. Randomzed onlne graph colorng. Journal of Algorthms. 13:657-669, 1992. Also n Proc. 31 st IEEE Symposum on Foundatons of Computer Scence. 464-469, 1990. HKUST CS Dept LO Yuet Me 16