Chapter 1 Symmetry Breaking 1: Vertex Coloring

Similar documents
GRAPH THEORY LECTURE 4: TREES

6.852: Distributed Algorithms Fall, Class 2

Distributed Computing over Communication Networks: Maximal Independent Set

The Goldberg Rao Algorithm for the Maximum Flow Problem

Lecture 1: Course overview, circuits, and formulas

Binary Search Trees. Data in each node. Larger than the data in its left child Smaller than the data in its right child

ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015

CMPSCI611: Approximating MAX-CUT Lecture 20

SHARP BOUNDS FOR THE SUM OF THE SQUARES OF THE DEGREES OF A GRAPH

Midterm Practice Problems

Scheduling Shop Scheduling. Tim Nieberg

Analysis of Algorithms, I

Lecture 22: November 10

Data Structures Fibonacci Heaps, Amortized Analysis

Graph Theory Problems and Solutions

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research

System Interconnect Architectures. Goals and Analysis. Network Properties and Routing. Terminology - 2. Terminology - 1

The Butterfly, Cube-Connected-Cycles and Benes Networks

A Log-Star Distributed Maximal Independent Set Algorithm for Growth-Bounded Graphs

Ph.D. Thesis. Judit Nagy-György. Supervisor: Péter Hajnal Associate Professor

Distributed Computing over Communication Networks: Topology. (with an excursion to P2P)

8.1 Min Degree Spanning Tree

An experimental approach for resource allocation problem in a distributed environment

A Note on Maximum Independent Sets in Rectangle Intersection Graphs

Find-The-Number. 1 Find-The-Number With Comps

Load Balancing. Load Balancing 1 / 24

Full and Complete Binary Trees

Network File Storage with Graceful Performance Degradation

Diversity Coloring for Distributed Data Storage in Networks 1

Exponential time algorithms for graph coloring

How To Create A Tree From A Tree In Runtime (For A Tree)

Distance Degree Sequences for Network Analysis

Approximation Algorithms

Lecture 7: NP-Complete Problems

root node level: internal node edge leaf node Data Structures & Algorithms McQuain

Connectivity and cuts

Binary Search Trees CMPSC 122

From Last Time: Remove (Delete) Operation

Approximating Average Distortion of Embeddings into Line

CS 598CSC: Combinatorial Optimization Lecture date: 2/4/2010

Load balancing Static Load Balancing

Load Balancing and Termination Detection

Handout #Ch7 San Skulrattanakulchai Gustavus Adolphus College Dec 6, Chapter 7: Digraphs

CSC2420 Fall 2012: Algorithm Design, Analysis and Theory

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

CSE 4351/5351 Notes 7: Task Scheduling & Load Balancing

Labeling outerplanar graphs with maximum degree three

Algebraic Computation Models. Algebraic Computation Models

Small Maximal Independent Sets and Faster Exact Graph Coloring

A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property

Class One: Degree Sequences

Reliability Guarantees in Automata Based Scheduling for Embedded Control Software

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Broadcasting in Wireless Networks

Tight Bounds for Parallel Randomized Load Balancing (TIK Report Number 324) Revised November 5, 2010 Revised February 26, 2010

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Persistent Data Structures

Static Load Balancing

Best Monotone Degree Bounds for Various Graph Parameters

Plaxton Routing. - From a peer - to - peer network point of view. Lars P. Wederhake

(67902) Topics in Theory and Complexity Nov 2, Lecture 7

COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction

6 March Array Implementation of Binary Trees

Approximated Distributed Minimum Vertex Cover Algorithms for Bounded Degree Graphs

CHAPTER 5 Round-off errors

Social Media Mining. Graph Essentials

Efficient Fault-Tolerant Infrastructure for Cloud Computing

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis

A NOTE ON OFF-DIAGONAL SMALL ON-LINE RAMSEY NUMBERS FOR PATHS

The Minimum Consistent Subset Cover Problem and its Applications in Data Mining

Algorithms and Data Structures

Complexity of Union-Split-Find Problems. Katherine Jane Lai

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Data Structures. Chapter 8

Hagit Attiya and Eshcar Hillel. Computer Science Department Technion

Algorithm Design and Analysis

The Prime Numbers. Definition. A prime number is a positive integer with exactly two positive divisors.

An Empirical Study of Two MIS Algorithms

JUST-IN-TIME SCHEDULING WITH PERIODIC TIME SLOTS. Received December May 12, 2003; revised February 5, 2004

The fat-stack and universal routing in interconnection networks

The chromatic spectrum of mixed hypergraphs

1 Definitions. Supplementary Material for: Digraphs. Concept graphs

The positive minimum degree game on sparse graphs

each college c i C has a capacity q i - the maximum number of students it will admit

On the k-path cover problem for cacti

Analysis of Algorithms I: Binary Search Trees

Generating models of a matched formula with a polynomial delay

A number of tasks executing serially or in parallel. Distribute tasks on processors so that minimal execution time is achieved. Optimal distribution

Interconnection Networks Programmierung Paralleler und Verteilter Systeme (PPV)

Computer Science Department. Technion - IIT, Haifa, Israel. Itai and Rodeh [IR] have proved that for any 2-connected graph G and any vertex s G there

Answer: (a) Since we cannot repeat men on the committee, and the order we select them in does not matter, ( )

Load Balancing and Termination Detection

Offline sorting buffers on Line

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Large induced subgraphs with all degrees odd

CIS 700: algorithms for Big Data

Every tree contains a large induced subgraph with all degrees odd

Previous Lectures. B-Trees. External storage. Two types of memory. B-trees. Main principles

Institut für Informatik Lehrstuhl Theoretische Informatik I / Komplexitätstheorie. An Iterative Compression Algorithm for Vertex Cover

Transcription:

Principles of Distributed Computing Roger Wattenhofer, Summer 2004 Chapter 1 Symmetry Breaking 1: Vertex Coloring Section 1.1: Introduction (Useful toy problem to see style of lecture) (Vertex coloring infamous as tough graph theory problem) Problem 1.1 [Vertex Coloring]: Given undirected Graph G = (V,E). Assign a color c u to each vertex u 2 V such that if e = (v,w) 2 E, then c v c w. Use few colors! Assumption 1.2 [Node Identifiers]: Each node has a unique identifier (the IP-Address, for example). Sometimes we assume that each identifier is only O(log n) bits if the system has n nodes. (Sometimes we might even assume that the nodes exactly have identifiers 1,, n.) Assumption 1.2 solves Problem 1.1, but badly. Definition 1.3 [Chromatic Number]: Given an undirected Graph. The chromatic number χ(g) is the minimum number of colors to solve Problem 1.1. Algorithm 1.4 [Greedy Sequential]: As long as there are uncolored vertices: Take an arbitrary uncolored vertex v, and color it with the minimal color (number) that does not conflict with the already colored neighbors. Definition 1.5 [Degree]: The number of neighbors of a vertex v is called the degree of v δ(v). The maximum degree vertex in a Graph G defines the Graph degree (G) =. Theorem 1.6 [Analysis of Algorithm 1.4]: The algorithm is correct and terminates in O(n) steps. The algorithm uses +1 colors. Proof: Correctness and termination are straight-forward. Since each node has at most neighbors, there is always at least one color free in the range {1,, +1}. Steps For many graphs coloring can be done with much less than +1 colors. This algorithm is not distributed at all; only one processor is active at a time. But: Use idea of Algorithm 1.4 to define local coloring subroutine 1.7 Algorithm 1.7 [First Free]: Color a vertex with the smallest available (not used by neighbors) color. With this subroutine one cannot color two adjacent vertices at the same time. 1

Definition 1.8 [Synchronous Distributed Algorithm]: In a synchronous algorithm, nodes operate in synchronous rounds. In each round, each processor executes the following steps: 1. Do some local computation. ( reasonable complexity) 2. Send messages to neighbors in graph. ( reasonable size) 3. Receive messages (that were sent by neighbors in step 2 of the same round) Any other step ordering is fine. Algorithm 1.9 [Reduce]: Assume that initially the vertices are legally colored with colors in the range {1,, m} (Assumption 1.2). Then each vertex v executes the following code (in parallel) 1. for x from +2 to m do 2. if c v = x then 3. c chooses a free color with Algorithm 1.7 in {1,, +1}. 4. c informs neighbors about its choice Definition 1.10 [Time Complexity]: For synchronous algorithms (Definition 1.8) the time complexity is the number of rounds until the algorithm terminates. The algorithm terminates when the last processor has decided to terminate. With every legal input. Theorem 1.11 [Analysis of Algorithm 1.9]: Algorithm 1.9 is correct and has time complexity m- +1, that is O(n) with m = O(n). The algorithm uses +1 colors. Quite trivial, huh. And also damn slow. Section 1.2: Coloring Trees Lemma 1.12: χ(tree) 2. Constructive Proof: If the distance of a node to the root is odd (even), color it 1 (0). An odd node has only even neighbors and vice versa. If we assume that each node knows its parent (root has no parent) and children in a tree, this constructive proof gives a very simple algorithm. Algorithm 1.13 [Slow tree coloring]: Color the root 0, root sends 0 to children. When receiving a message x (from parent), a node u chooses color c u = 1-x, and sends c u to its children (all neighbors except parent). 2

With the proof of Lemma 1.12, the algorithm 1.13 is correct. How can we determine a root in a tree? (Later!) The time complexity of the algorithm is the height of the tree. When the root was chosen unfortunately, this can be up to the diameter of the tree. Wait a second this algorithm does not need to be synchronous! Definition 1.14 [Asynchronous Distributed Algorithm]: In the asynchronous model, algorithms are event driven ( upon receiving message, do. Processors cannot access a global clock. A message sent from one processor to another will arrive in finite but unbounded time. Probably as unrealistic as the synchronous model (Definition 1.8). There are several models in between synchronous and asynchronous. However, from a theory standpoint the synchronous and the asynchronous model are the most interesting (because every other model is in-between these extremes). Messages that take a longer path may arrive earlier. Definition 1.15 [Time Complexity]: For asynchronous algorithms (Definition 1.14) the time complexity is the number of time units from the start of the execution to its completion in the worst case (every legal input, every execution scenario), assuming that each message occurs a delay of at most one time unit. You cannot use the maximum delay in the algorithm design; in other words: the algorithm has to be correct even if there is no such delay upper bound. Definition 1.16 [Message Complexity]: The message complexity of a synchronous or asynchronous algorithm is determined by the number of messages exchanged (again every legal input, every execution scenario). Theorem 1.17 [Analysis of Algorithm 1.13]: Algorithm 1.13 is correct. If each node knows its parent and its children, the (asynchronous) time complexity is the tree height which is bounded by the diameter of the tree; the message complexity is n-1 in a tree with n nodes. Note that asynchronous time complexity is the same as synchronous time complexity. Nice trees have logarithmic height, that is O(log n) time complexity. This algorithm is not very exciting can we do better than logarithmic?!? (The following algorithm terminates in log * n time. Log-Star? That s the number of logarithms you have to take to get down to at least 2, starting with n. But we need a bit more colors.) (Idea: start with color labels of size O(log n). In each synchronous round: make label of logarithmic size by getting essence out of label by reading it as a bitstring!...?) 3

Algorithm 1.18 [ 6-Color ]: Assume that initially the vertices are legally colored with colors in the range {0,, O(n)} (O(log n) bits; Assumption 1.2). The root assigns itself the label 0 immediately. Each other vertex v executes the following code (in parallel) 1. send c v to all children 2. repeat 3. receive c p from parent 4. interpret c v and c p as little-endian bit-strings: c(k),, c(1), c(0) 5. let i be the smallest index where c v and c p differ 6. the new label is i (as bitstring) followed by the bit c v (i) itself. 7. send c v to all children 8. until new label has as many bits as previous label Example (only part of a tree): Grand-parent 1010110000 10010 Parent 1010010000 1010 111 Child 0110010000 10001 1 Theorem 1.19 [Analysis of Algorithm 1.18]: Algorithm 1.18 terminates in log * n + O(1) time. Proof: [Peleg 7.3] Some nodes might terminate earlier than others Colors 11x (binary, decimal 6 or 7) will not be chosen, because the node will then do another round (since it has reduced the number of bits from 4 to 3). Gives a total of 6 colors. Can one reduce the number of colors in only constant steps? Note that algorithm 1.9 does not work (since the degree of a node can be much higher than 6)! For fewer colors we need to have siblings monochromatic! Algorithm 1.20 [Shift down]: Concurrently at all vertices: Recolor with the color of parent. Root (as an exception) simply chooses any new color. Lemma 1.21: Algorithm 1.20 preserves coloring legality; also siblings are monochromatic. Algorithm 1.22 [Six-2-Three]: For all nodes 1. for x from 4 to 6 do 2. Perform subroutine 1.20 (shift down) 3. A vertex v colored x chooses as new color using subroutine 1.7 (first free) Theorem 1.23: Algorithm 1.22 colors a tree with three colors in time O(log * n). Corollary 1.24: A general graph with constant degree can be colored with +1 colors in O(log * n) time. 4

Algorithm idea: In each step, a vertex compares its label to each of its neighbors, constructing a logarithmic difference-tag as in 6-color. Then the new label is the concatenation of all the difference-tags. For constant degree, this gives a 2 label in O(log * n) steps. Algorithm 1.9 (Reduce) then reduces the number of colors to +1 in 2 2 (still a constant!) steps. One can color a general graph (without constant degree) with a recursive?algorithm with +1 colors in Ο( logn) time. Theorem 1.25: Coloring a ring with three colors costs time Ω(log * n). Proof: [Peleg 7.5] 5