User:Nsamcsmun/sandbox

Algorithm description
Cole-Vishkin algorithm Richard Cole and Uzi Vishkin[1] developed an algorithm for coloring simple types of graphs such as paths, cycles and trees using maximum of three colors. They applied a reduction color technique to develop this algorithm. The reduction technique means that the graph is already colored, but this algorithm performs a reduction of the number of colors that are used to the minimum. As the algorithm stated, any tree of size n can be colored using this technique in O(log* n) rounds to generate only 6 color-graph. ( Log* n is the number of logarithms to the base of 2 needed to get down n to at least 2) The algorithms was first published in : “Deterministic coin tossing with applications to optimal parallel list ranking." research paper in 1986. The original paper is about parallel algorithms and linked list data structures; however, the same technique used in distributed algorithms, path graphs and coloring problems. This algorithms applied to a directed graphs where each node has at most one successor. A directed paths, rooted trees and directed cycles are examples of such graphs. Each node in the graph should have a unique identifier in its local input. Node identifiers are integers subset of 1,2,..., poly(n)

Algorithm
A- Cole Vishkin algorithm can perfrom a reduction of k-coloring to O(log k) coloring in one iteration.

Example: k=100, log k=~ 6.6, f(k) =2×7=14 Therefore, k colors 0,1,...,99 can be represented in 7 bits. The index is in the set [0,1,...,6] Value is in the set [0,1]

B- Applying iteration repeatedly on the graph can reduce the the number of colors to 6 colors.

Let us assume that we have nodes X,Y connected to each other in oriented tree, and Y is a parent of X. In order to color the this tree we follow the steps: 1- Fom X, receive the color of the successor Y. 2- Compare the binary bits of the already assigned id of C(X) to the successor's color id of C(Y) 3- Find the rightmost bit that is different. 4- A new color of C'(X) is represented as pair (index, value). Index is the different bit between C(X) and C(Y), and the value is the bit status (1,0). The color value of the node can be represented either by binay or decimal numbers. 5- We repeate the iteration unitl the result becomes k=6, which means that we mimimized the colors require for the graph to 6. 6- If the node to be colored does not have a successor, we can continue with the iteration with asumption that it has successor with different color.

C- Reducing from 6-colored graph to 3-colored graph using simple algorithm.

1- First step is to shift all the colors on the graph. The new color of C'(X) of node X= old color of C(Y) which is its successor. 2- For the root node, we choose another new color. Sibling children should have the same color. 3- Each node X with color k-1 chooses a new color from the set [0,1,2]. Neighbours of X must have at most 2 different colors because the maximum number of colors we can use only three colors. 4- Largest color k-1 eliminated. Then we repeate the same steps unitl we have only 3 colors for the graph.

Cole and Vishkin algorithm reduced k colors to O(log k) in one step resulting in k=6. The simple algorithm reduced k to k-1 colors in one step resulting in k=3. Therefore, when we combine both algorithms we can reduce colors from k to 3 in 3+log* k, and that can be applied only on specific types of graph such as directed paths, cycles, trees.

Example
Consider a rooted tree. The algorithm assumes that initially the color of each node is its id. Also, each non-root node v should be aware of its parent p(v). As shown in the figure below, each node has an id which represents a color. For this example we assuming that each color is represented by a number. When we apply the algorithms we follow the steps : Step 1: The root node labeled by 0 followed by bit 0 of its old color. For the colors more than 6, the new color of the child consists of the bit that differ from the parent in addiition to the bits from the child. By applying A and B we get the graph in the tree below A --> B

Step 2: We perform the shift down operation as follows: The root node chooses new color from the available color set (0,..,5) Every child inherits the color directly from its parent in an iterative opration. When we reach the leafs, we go back to the root and repeat A until we get the minimum number of colors for the tree. Therefore the result will be as shown in the result below, the colors will be reduced in ever iteration from A to C.

Complexity
Cole and Vishkin algorithm is a distributed algorithm which colors a specific types of simple graphs on n vertices with 3 colours and runs in O(log* n)

Proof of correctness
In order to prove the correctness of this algorithms, we should get smaller color values after the first iteration and ensure that proper coloring is applied to the graph. Therefore, If we could show that the successor of the current node will choose a different color, then the algorithms is correct. In the graph of subject each node in the graph receives the color of its successor C(Y) and every node should have an identification number represented in binary and it is split into (index, value). To start the coloring of the graph we begin by comparing the current color C(X) with the successor C(Y) by finding the rightmost bit that is different between them. Then, we identify the value and order of the bit that is different for the new chosen color C'(X), the pair of values can be represented in binary or decimal. Correctness: Case 1: When the successor Y chooses the same index of X, in this case X will choose different color value not matching with the successor's color and therefore, X and Y will have different colors. Case 2: When the index is different. Obviously in this case that X and Y have different colors. The step of comparing the values of both colors continues until we reach 6 colors for the graph. After that we use shifting-down operation (shown in the Pseudo code) to bring the number of used colors to only three.

Applications
There are many application that can benefit from this algorithm specialy in the areas where distributed graph coloring algorithms is used: 1 - TIGRA: Timely Sensor Data Collection Using Distributed Graph Coloring : TIGRA is a distributed heuristic for graph coloring that is used to provide a transmission schedule that guarantees near-optimal delay on sensor data collection on the network.[8] 2 - Distributed Graph Coloring for Self-Organization in LTE Networks: the work investigates the possibility to solve Primary Component Carrier Selection and Physical Cell ID Assignment problems in a distributive manner using a graph coloring approach. These two important self-configuration problems pertinent to LTE-Advanced.[9]

Variations
Goldberg, Plotkin and Shannon [11]worked on parallel (Δ + 1)-coloring algorithms. They adapted the original Cole–Vishkin 3-coloring algorithm for directed rooted trees and pseudo forests,. They also developed a (Δ + 1)-coloring algorithm for bounded-degree graphs in the PRAM model. The algorithm is based on the basic Cole–Vishkin bit manipulation technique to first color the graph with 2O(log) colors. A (Δ+ 1)-coloring is then accomplished by computing maximal independents sets in sequence and coloring each such set with a different color.

Related algorithms
Goldberg, Plotkin and Shannon [12] have created faster (Δ+ 1) coloring algorithm that uses the 3-coloring algorithm for pseuodoforests. The algorithm first partitions the graph into disjoint pseudo forests with 3-colored in parallel each. After that these colorings used to recolor the graph with (Δ+ 1) colors. In the distributed model, this algorithm requires O(2 + log* n) communication rounds.

Schneider et al. [10] could color a growth bounded graphs optimally in O(log* n) Time. He also showed that many classic combinatorial problems of coloring can be solved in log* time in growth bounded and other restricted graphs.

The basic technique of the log* algorithm is by Cole and Vishkin[1]. The technique can be generalized and extended, for example a ring topology or to graphs with constant degree.