Научная статья на тему 'EDGE COLORING OF CACTUS GRAPHS WITH GIVEN SPECTRUMS'

EDGE COLORING OF CACTUS GRAPHS WITH GIVEN SPECTRUMS Текст научной статьи по специальности «Математика»

CC BY
11
4
i Надоели баннеры? Вы всегда можете отключить рекламу.
Область наук
Ключевые слова
cactus graphs / block-cut tree / edge coloring / restrictions on spectrums / dynamic programming

Аннотация научной статьи по математике, автор научной работы — Albert Khachik Sahakyan

An edge-coloring of a graph G is a coloring of the graph edges with integers such that the colors of the edges incident to any vertex of G are distinct. For an edge coloring α and a vertex v the set of all the colors of the incident edges of v is called the spectrum of that vertex in α and is denoted by 𝑆𝛼 (𝑣). We consider the case where the spectrum for each vertex v is provided 𝑆(𝑣), and the problem is to find an edge-coloring α such that for every vertex 𝑣 , 𝑆𝛼 (𝑣) = 𝑆(𝑉) . We provide an 𝑂(𝑁2) algorithm that finds such an edge-coloring for cactus graphs that satisfies all the restrictions. If it is impossible to have an edge-coloring that satisfies the restrictions of the spectrums the algorithm will tell that too.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «EDGE COLORING OF CACTUS GRAPHS WITH GIVEN SPECTRUMS»

EDGE COLORING OF CACTUS GRAPHS WITH GIVEN SPECTRUMS

Albert Khachik Sahakyan,

Chair of Discrete Mathematics and Theoretical Informatics, Faculty of Informatics and Applied Mathematics, Yerevan State University, Armenia

DOI: https://doi.org/10.31435/rsglobal_wos/30062021/7617

ARTICLE INFO ABSTRACT

An edge-coloring of a graph G is a coloring of the graph edges with integers such that the colors of the edges incident to any vertex of G are distinct. For an edge coloring a and a vertex v the set of all the colors of the incident edges of v is called the spectrum of that vertex in a and is denoted by Sa(v). We consider the case where the spectrum for each vertex v is provided S(v), and the problem is to find an edge-coloring a such that for every vertex v, Sa'(v) = 5(7) . We provide an 0(N2) algorithm that finds such an edge-coloring for cactus graphs that satisfies all the restrictions. If it is impossible to have an edge-coloring that satisfies the restrictions of the spectrums the algorithm will tell that too.

Citation: Albert Khachik Sahakyan. (2021) Edge Coloring of Cactus Graphs with Given Spectrums.

International Academy Journal Web of Scholar. 2(52). doi: 10.31435/rsglobal_wos/30062021/7617

Copyright: © 2021 Albert Khachik Sahakyan. This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) or licensor are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.

Received: 19 April 2021 Accepted: 05 June 2021 Published: 30 June 2021

KEYWORDS

cactus graphs, block-cut tree, edge coloring, restrictions on spectrums, dynamic programming.

Introduction. All graphs considered in this paper are undirected (unless explicitly said), finite, and have no loops or multiple edges. For an undirected graph G, let V(G) and E(G) denote the sets of vertices and edges of G, respectively. The degree of a vertex v E V(G) is denoted by dG (v).

A cactus is a connected graph in which any two simple cycles have at most one vertex in common. Equivalently, it is a connected graph in which every edge belongs to at most one simple cycle. Fig. 1 illustrates different examples of cactus and non-cactus graphs.

Fig. 1. Example of cactus and non-cactus graphs.

An edge-coloring of a graph G is a coloring of the graph edges with integers such that the colors of the edges incident to any vertex of G are distinct. For an edge coloring a and a vertex v the set of all the colors of the incident edges of v is called the spectrum of that vertex in a and is denoted by Sa(v).

A cut vertex is any vertex whose removal increases the number of connected components [1]. Any connected graph decomposes into a tree of biconnected components called the block-cut tree of the graph [9] (pg. 36). Cactus is a connected graph in which every block is an edge or a cycle [1] (pg. 160).

Fig. 2. Each color corresponds to a biconnected component. Multi-colored vertices are cut vertices, and thus belong to multiple biconnected components.

Finding a coloring for given spectrums were researched in different studies. In [2] a solution for the simplified version of this problem was provided for trees when the restrictions are on the spectrums, the restrictions are strict, and all the spectrums contain the color 1. In [3] another limited version was considered for trees where each vertex had at most one interval of forbidden colors. In [4] and [5] it was shown that for bipartite graphs with maximum degree equal to 3 and with strict restrictions on spectrums the problem of finding a coloring that meets the restrictions is an NP-complete problem. In [6] another problem with restrictions is considered for bipartite graphs where the restrictions are provided for one "part" of the bipartite graph. Finding a coloring for given spectrums is important for finding interval t-colorings which was first introduced by Kamalian and Asratian in [7]. When the restrictions on spectrums are intervals of integers then finding an edge-coloring is the same as finding an interval edge coloring. Finding an interval edge coloring for cactus graphs was researched in [8] but for bipartite cactuses.

An 0(N2) algorithm for edge coloring with given spectrums

Here we will provide an algorithm that finds an edge coloring for a cactus where the spectrums are given for all the vertices. The algorithm will also detect if it is impossible to find a coloring that satisfies all the restrictions. When saying that given the spectrum S(v) for a vertex v in the graph G we will understand that a strict restriction is provided for the vertex v such that |S(v) | = dG(v) and we are interested in finding an edge-coloring a such that Sa(v) = S(v)

Problem: Given a cactus graph C and for each vertex v the spectrum S(v) is given with |S(v)| = dc(v). Find an edge-coloring a such that Sa(v) = S(v) for all v or find out that it's impossible to find such coloring.

Lemma 1: If there is a proper edge coloring for given spectrums and there is an edge (u, v) E E(G) such that lS(u) n S(v)| = 1 then the color of the edge (u, v) should be the single element from S(u) nS(v).

Imagine in the final coloring a the edge (u, v) has the color c (c = a(u, v)), it means that c E S(u) and c E S(v) hence c E S(u) n S(v) but since |S(u) n S(v)| = 1 it means S(u) n S(v) = (c) hence if an edge-coloring exists it should color the edge (u, v) with the color c.

Lemma 2: If for some edge (u, v) E E(G) , |S(u) n S(v)| = 0 then there is no edge-coloring that satisfies the spectrum restrictions.

We will prove by contradiction. Assume there was an edge-coloring a that satisfies all the restrictions. Let c = a(u, v), it means that c E S(u) and c E S(v) hence c E S(u) n S(v) which means ^(u) n S(v)| > 1 which is a contradiction.

Lemma 1 and Lemma 2 give us a constructive approach for finding an edge-coloring. If there is an edge (u,v) for which ^(u) n S(v)| = 0 then it's impossible to find an edge-coloring, otherwise if there is an edge (u,v) such that ^(u) nS(v)| = 1 we will color the edge (u,v) with the color c from S(u) n S(v), remove the edge (u, v) and remove the color c from S(u) and S(v). Removing the edge (u, v) would either make the graph disconnected in which case we would solve

for each graph component separately or we would end up with a smaller graph because the number of edges decreases.

This means that we can assume there is no edge (u, v) with lS(u) n S(v)| = 1 hence for each edge (u,v), |S(u) n S(v)| > 2.

Lemma 3: If for each edge (u,v), |S(u) nS(v)| > 2 then there is no leaf vertex (a vertex with degree equal to 1).

If there existed a vertex v with dG (v) = 1 that was connected to a vertex u, then |S(v) | = 1 and 2 < |S(u) n S(v)| < |S(v)| = 1 which is a contradiction.

Lemma 4: In a cactus C with no leaf vertices and |V(C)| > 3 there is always a cycle for which all the vertices on that cycle except maybe one vertex have degree 2.

Since there are no leaf vertices and |V(C)| > 3 then there is at least one cycle. Let's consider the block-cut tree of the cactus C. Fig 3 illustrates an example of such cactus on the left and its respective block cut tree on the right. In the image the vertex 2 is the cut vertex c1 , the vertex 8 is the cut vertex c2 etc.

Fig 3. A cactus with no leaf vertices and its block-cut tree.

Since the block-cut tree is a tree, it has a leaf vertex which is a block because a cut vertex should be connected to at least two blocks. Let's suppose the block B is a leaf in the block-cut tree. The block B consists of vertices U-±, U2, ..., Wfc. Each block of a cactus is either an edge or a cycle but since in our case the cactus has no leaf vertices it means the block B is a cycle (otherwise it would be an edge that connects a leaf vertex in the cactus). Since B is a leaf vertex in the cut-vertex tree it means it contains at most one cut vertex which means there can be at least one vertex in the cycle B that has degree more than 2. All the other vertices will have degree 2 which was required to prove in this lemma.

We already managed to transform our original cactus to a set of cactuses where for each edge (u, v), |S(u) n S(v) | > 2 and hence by Lemma 3 there are no leaf vertices.

Now imagine we have a cactus C that has no leaf vertices and for each edge (u,v), |S(u) n£(v)| > 2. From Lemma 4 we can find a cycle C1 = (u1,u2, ...,uk) such that at most one vertex has degree greater than 2. Let that vertex be the vertex u1, then dc(u2) = 2, —, dc(uk) = 2 and (u1,u2) E E(C), (u2,u3) E E(C), —, (uk-1,uk) E E(C) and (uk,u1) E E(C). Since this is a cycle, it means k > 3. Now, we know that for each (ui,ui+1) edge (2 < i < k — 1) |S(uj) n S(uj+1)| > 2 and on the other hand |S(u£)| < dc(u{) = 2 , |5(u£+1 )| < dc(ui+1) = 2 hence |5(Uj)| = 2 and |^(ui+1 )| = 2 and S(ui) = S(ui+1). Which means for all the vertices ut (2 < i < k) the spectrums are the same and consist of two colors. Let's suppose these colors are a and b it means for all the edges on this cycle we should color only with colors a or b and the colors should be interchangeable. It means that if k is odd it will be impossible to satisfy the requirements, and if k is even we can freely color interchangeably and it does not matter which edges we will color with a and which edges we will color with b since we are going to remove both the color a and the color b from the spectrum S(u1). Fig 4. illustrates the two cases for odd (k = 2 *m + 1) and even (k = 2 *m) cycles. After the coloring we can remove all the edges of the cycle and also remove the colors a and b from all the spectrums of the vertices in this cycle. This way we managed to reduce the problem to smaller problems for each new component.

Fig. 4. The coloring of the cycle for the odd and even number of vertices.

For a cactus C and spectrums S the algorithm of constructing edge coloring a is the following:

• Step1: If there is no edge in C then we found the edge coloring that meets all the restrictions and we can terminate the algorithm with the answer a.

• Step2: If there is an edge (u,v) E E(C) with lS(u) n S(v)| = 0 then it is impossible to find a coloring and we can terminate the algorithm.

• Step3: If there is an edge e = (u,v) E E(C) with |S(u) nS(v)| = 1 with the color c E S(u) n S(v) then we assign a(e) = c, remove the edge e from C, remove the color c from S(u) and S(v) and go to Stepl.

• Step4: Let e = (u, v) be an arbitrary edge that we did not remove yet.

o In the connected component that contains this edge we find a cycle for which all the vertices except maybe one, have degree equal to 2.

o We can do it by checking all the cycles in the component since finding all the cycles of a cactus can be done in 0 (N).

o Let u1, ...,uk be that cycle where the vertex u1 does not need to have degree equal to 2. If k is odd then it's impossible to find a coloring and we can terminate the algorithm. If k is even (k = 2 *m) let S(u2) = {a, b} then for the edges (u^, u2^i+1) with 1 < i < m — 1 and for the edge (u2*m,ui) we assign a(u2^i,u2^i+1) = a, a(u2^m,u1) = a and for the edges (u2^i-1,u2^i) with 1 < i < m we assign a(u2^i-1,u2^i) = b.

o We remove the edges of the cycle from C, remove the colors a and b from S(ut) for 1 < i < k and go to Stepl.

If N = |F(G)| this can give us a simple 0(N2) algorithm, since for cactuses IE(C)| = 0(N) and we removed an edge or a cycle after every iteration and finding such an edge or a cycle can be done in 0(N).

Conclusions. We provided an 0(N2) algorithm for finding an edge-coloring of a cactus for the given spectrums on the vertices. The algorithm can be used for trees too since trees are special case of cactus graphs. When each spectrum is an interval then the coloring will be an interval edge coloring.

REFERENCES

1. West D.B. Introduction to Graph Theory. Prentice-Hall, New Jersey, 1996.

2. Caro Y., Schonheim J. Generalized 1-factorization of trees. Discrete Mathematics, 33, (1981) 319-321. https://doi.org/10.1016/0012-365X(81)90275-2

3. Kubale M. Interval vertex-coloring of a graph with forbidden colors. Discret. Math., 74, (1989) 125-136.

4. Kamalian R.R. Interval edge-colorings of graphs. Doctoral Thesis. Novosibirsk, 1990.

5. Even S., Itai A., Shamir A. On the Complexity of Timetable and Multicommodity Flow Problems. SIAM J. Comput., 5, (1976) 691-703.

6. Asratian A.S. Investigation of Some Mathematical Model of Scheduling Theory. Doctoral dissertation. Moscow University, 1980

7. Asratian A.S., Kamalian R.R. Interval colorings of edges of a multigraph.Appl. Math.5(1987) 25 -34. (in Russian).

8. Giaro, K., Rubale, M., & Malafiejski, M. Compact Scheduling in Open Shop with Zero-One Time Operations. INFOR: Information Systems and Operational Research, 37(1), (1999) 37-47. https://doi.org/10.1080/03155986.1999.11732367

9. Harary F. Graph Theory. Addison-Wesley Publishing Company, Boston, 1969.

i Надоели баннеры? Вы всегда можете отключить рекламу.