A Linear Algorithm for Minimum Dominator Colorings of Orientations of Paths
aa r X i v : . [ c s . D M ] J u l A Linear Algorithm for Minimum DominatorColorings of Orientations of Paths
Michael Cary ∗ Division of Resource Economics and Management, West VirginiaUniversityJuly 25, 2019
Abstract
In this paper we present an algorithm for finding a minimum domina-tor coloring of orientations of paths. To date this is the first algorithmfor dominator colorings of digraphs in any capacity. We prove that thealgorithm always provides a minimum dominator coloring of an orientedpath and show that it runs in O ( n ) time. The algorithm is available at https://github.com/cat-astrophic/MDC-orientations_of_paths/ . Keywords: dominator coloring, digraph, domination, algorithm
Let G = ( V, E ) be a graph. A set S ⊂ V is called a dominating set if every vertexof V is either in S or adjacent to at least one member of S . The dominationnumber of a graph, γ ( G ), is the size of a smallest dominating set of G . Adominator coloring of a graph is a proper vertex coloring of the graph whichadditionally satisfies the property that every vertex dominates some color classin the dominator coloring. Dominator colorings of graphs were first studied byGera in [6–8]. Dominating sets and dominator colorings are useful for a myriadof problems and have been applied to studying electric power grids [9] and tosensors in networks [2].Since the purpose of this paper is to introduce an algorithm for minimumdominator colorings of digraphs, it is important to know what algorithms existfor this problem in the undirected setting. A linear algorithm which finds thedomination number of trees was introduced in [5]. Building from this result, [11]established a polynomial time algorithm that provides a minimum dominator ∗ [email protected] χ d ( G ), cannot be found in polynomial time in general for manyelementary families of graphs including bipartite and planar graphs.The first results on dominator colorings of digraphs were the dominatorchromatic number of paths and cycles [4], and that the dominator chromaticnumber of digraphs is that the dominator chromatic number of a tree is invariantunder reversal of orientation [3]. Other interesting results established in [4] ondominator colorings of digraphs include the fact that the dominator chromaticnumber of a subgraph H ⊂ G can be larger than the dominator chromaticnumber of G , as well as that lim sup n →∞ χ d ( D )∆( D ) = ∞ . That these results differfrom virtually every other vertex coloring problem makes dominator coloringsof digraphs of particular interest in graph theory.One of the major results from that paper was the following theorem whichprovides the minimum dominator chromatic number over all orientations ofpaths. In the proof, many important structural characterizations relating ori-entations of paths and dominator colorings were established. Theorem 1.
The minimum dominator chromatic number over all orientationsof the path P n is given by χ d ( P n ) = k + 2 if n = 4 kk + 2 if n = 4 k + 1 k + 3 if n = 4 k + 2 k + 3 if n = 4 k + 3 for k ≥ with the exception χ d ( P ) = 3 . To conclude the introduction, an example of an oriented path of length five ispresented below, and a minimum dominator coloring is provided in the caption.The reader is referred to [10] as the standard reference for domination. v v v v v Figure 1: An orientation of the path P which has dominator chromatic number3. The color classes of P in a minimum dominator coloring may be given by C = { v , v } , C = { v , v } , and C = { v } . The purpose of this paper is to present the first algorithm which provides aminimum dominator coloring of a directed graph. In particular, we presentan algorithm which provides a minimum dominator coloring of orientations ofpaths. After providing the algorithm, we will prove that it runs in O ( n ) time.2he algorithm works by sequentially through the vertex set, from v through v n , and colors each vertex in such a a way as to minimize the number of colorsused in a proper dominator coloring. From Theorem 1 in [4] we know that allvertices with in-degree equal to zero must belong to the same color class. Forthis reason, the first thing the algorithm checks for is precisely this. Assumingthis is not the case, another immediately guaranteed coloring results is thatany vertex that is dominated by a vertex of out-degree one must be uniquelycolored. Once these two cases are checked for, all that remains in an orientationof a path are vertices whose entire in-neighborhood consists of vertices without-degree equal to two (notice that this may include vertices with out-degreezero or out-degree one).It is easy to see that, for oriented paths, after removing all vertices with withat least one in-neighbor having out-degree one, what remains are subpaths inwhich every vertex has either out-degree zero or out-degree two, i.e., subpathswhich have the following out-degree sequence pattern: { , , , . . . , , , } (it ispossible that one or both of the end vertices of such a subpath do not haveout-degree zero, but since all of the out-degree two vertices are assigned thesame color, and since such an end vertex would have out-degree two in the fullpath, we may ignore end vertices of these subpaths that do not have out-degreezero). From Theorem 1 in [4] we know that such oriented paths are minimizedin terms of dominator colorings precisely when the first vertex is assigned a color C ⋆ which is used for all vertices of out-degree zero that are not uniquely colored,and when this color is assigned to every other vertex with out-degree zero (everyfourth vertex in the path). For convenience, we refer to these paths as 2-chainssince they are maximal subpaths with respect to the density of vertices without-degree two. Also, 2-chains of length three are an exception to this coloringscheme as they may have both vertices of out-degree zero belong to the samecolor class. This case is addressed in the algorithm as well, but first we describethe process for handling all other 2-chains.By paying attention to where we are within a 2-chain in an oriented path,we can proceed in order through the vertex set of an oriented path and providea minimum dominator coloring. The method used in the algorithm is to havea variable α ∈ Z indicate whether or not we should use the color C ⋆ or anew color when coloring vertices of out-degree zero. The variable β indicateswhether we have established the color C ⋆ yet. Since it turns out that 2-chainsof length three may use different colors for the two vertices of out-degree zeroif one vertex is colored with C ⋆ and C ⋆ is present elsewhere in the path (thiswill be proven in the theorem below), the algorithm handles 2-chains of lengththree by coloring both vertices the same if and only if the color C ⋆ has not yetbeen established (i.e., if β still has a value of 0).Lastly we address the exception of the path P which has either the out-degree sequence { , , , , , } or its reversal. As is stands, the algorithm wouldminimally color the reversal of this particular orientation of P but not this par-ticular orientation of P . Because this was the only exception listed in Theorem1 from [4], and because checking an input ( n ) will not alter the time complexityof the algorithm, we simply check for this occurrence in the same if statement3s when we check to see if a 2-chain of length three exists.Finally we are ready to present the algorithm. After stating the algorithm,we provide its time complexity and prove that it always provides a minimumdominator coloring of an oriented path. Algorithm 1
Minimum Dominator Coloring Algorithm for Oriented Paths input An orientated path P n of length n initialize C ← { C } initialize F ← ∅ initialize α ← initialize β ← for v i ∈ V ( P n ) do if d − ( v i ) = 0 then
8: Color v i with C F ← {F ∪ C } else if ∃ v j ∈ N − ( v i ) s . t . d + ( v j ) = 1 then
11: Color v i uniquely with a new color C |C| C ← {C ∪ C |C| } F ← {F ∪ C |C| } α ← ⊲ This indicates the end of a 2-chain15: else if α = 0 then if β = 0 then
17: Define new color C ⋆ = C |C|
18: Color v i with color C ⋆ C ← {C ∪ C ⋆ } F ← {F ∪ C ⋆ } if d + ( v i +1 ) = 2 = d + ( v i +3 ) or n = 6 then α ← ⊲ This indicates a 2-chain of length 3 or a P else α ← end if β ← else
28: Color v i with existing color C ⋆ F ← {F ∪ C ⋆ } α ← end if else
33: Color v i uniquely with color C |C| C ← {C ∪ C |C| } F ← {F ∪ C |C| } α ← end if end for return |C| ⊲ The Dominator Chromatic Number is: χ d ( P n ) = |C| return F ⊲ The coloring of V ( P n ), i.e., F i = c ( v i ) ∀ v i ∈ V ( P n ) Now we show that the time complexity of the algorithm is O ( n ). This resultfollows since we may count a constant number of things the algorithm needs tocheck for each vertex, hence the algorithm takes at most cn steps to completefor some c ∈ N .Next we show that the algorithm provides a minimum dominator coloringof any oriented path. 4 heorem 2. The Minimum Dominator Coloring Algorithm results in a mini-mum dominator coloring of every oriented path.Proof.
Since any vertex with in-degree equal to zero is assigned to the samecolor class by this algorithm, no counterexample can come from these vertices.Since every vertex with an in-neighbor of out-degree one is colored uniquely bythis algorithm, no counterexample can come from these vertices either. Thusany possible counterexample must come from the set of vertices whose entirein-neighborhood consists of vertices of out-degree two.Since the algorithm colors each 2-chain optimally, it suffices to show thatif each 2-chain is colored optimally, with the possible exception of 2-chains oflength three whenever C ⋆ already has been used, and the color C ⋆ is commonto all 2-chains which have non-uniquely colored vertices, all vertices of in-degreezero are colored similarly, and all vertices with an in-neighbor of out-degree oneare colored uniquely (i.e., the conditions of the first paragraph of this proof aremet), that the dominator coloring is minimum.Clearly the color C ⋆ must be common to all 2-chains (with non-uniquelycolored vertices), else there are at least two color classes that can be combined.The MDC algorithm for orientations of paths does ensure that the color class C ⋆ is the unique color class shared by 2-chains. With this established, it followsthat each 2-chain must be (and in fact is) minimally dominator colored, exceptfor possibly some 2-chains of length three which use the color C ⋆ which wasestablished prior to the instance of that 2-chain, as the only remaining verticesin our path are those vertices of 2-chains which must be colored uniquely. Thatthe resulting dominator coloring is minimum immediately follows. In this paper we established the first algorithm which provides a minimumdominator coloring of directed graphs. Specifically, this algorithm provides aminimum dominator coloring for orientations of paths. We proved that thisalgorithm always results in a minimum dominator coloring of an oriented path,as well as that the algorithm runs in O ( n ) time.The most likely extensions of this algorithm are to orientations of trees andcycles. While results on the dominator chromatic number of orientations oftrees exist, specific results for this class of digraphs are not as established asthey are for orientations of cycles, a class of graphs for which the dominatorchromatic number is entirely determined. However, the acyclic structure oftrees (and theoretically of directed acyclic graphs as well) lend them to beingpossible candidates for easy extensions of this algorithm.To conclude this paper we mention an application of this result. For thoseinterested, a python script, which uses this algorithm and provides a visualof a user selected orientation of a path, can be found online at the repository https://github.com/cat-astrophic/MDC-orientations_of_paths/ .Please feel free to use and modify this script to fit your needs!5 eferences [1] S Arumugam, K Raja Chandrasekar, Neeldhara Misra, Geevarghese Philip,and Saket Saurabh. Algorithmic aspects of dominator colorings in graphs.In International Workshop on Combinatorial Algorithms , pages 19–30.Springer, 2011.[2] Jean Blair, Ralucca Gera, and Steve Horton. Movable dominating sen-sor sets in networks.
JCMCC-Journal of Combinatorial MathematicsandCombinatorial Computing , 77:103, 2011.[3] Michael Cary. Dominator chromatic numbers of orientations of trees. arXivpreprint arXiv:1904.06293 , 2019.[4] Michael Cary. Dominator colorings of digraphs. arXiv preprintarXiv:1902.07241 , 2019.[5] E Cockayne, Sue Goodman, and Stephen Hedetniemi. A linear algorithmfor the domination number of a tree.
Information Processing Letters ,4(2):41–44, 1975.[6] Ralucca Gera. On dominator colorings in graphs.
Graph Theory Notes ofNew York , 52:25–30, 2007.[7] Ralucca Gera. On the dominator colorings in bipartite graphs. In
Fourth In-ternational Conference on Information Technology (ITNG’07) , pages 947–952. IEEE, 2007.[8] Ralucca Gera, Craig W Rasmussen, and Steve Horton. Dominator coloringsand safe clique partitions. 2006.[9] Teresa W Haynes, Sandra M Hedetniemi, Stephen T Hedetniemi, andMichael A Henning. Domination in graphs applied to electric power net-works.
SIAM Journal on Discrete Mathematics , 15(4):519–529, 2002.[10] Teresa W Haynes, Stephen Hedetniemi, and Peter Slater.
Fundamentals ofdomination in graphs . CRC press, 2013.[11] Houcine Boumediene Merouane and Mustapha Chellali. An algorithm forthe dominator chromatic number of a tree.