Abstract
In this article, we consider the NP-hard problem of the two-step coloring of a graph. It is required to color the graph in the given number of colors in a way, when no pair of vertices has the same color, if these vertices are at a distance of one or two between each other. The optimum two-step coloring is one that uses the minimum possible number of colors. The two-step coloring problem is studied in application to grid graphs. We consider four types of grids: triangular, square, hexagonal, and octagonal. We show that the optimum two-step coloring of hexagonal and octagonal grid graphs requires four colors in the general case. We formulate the polynomial algorithms for such a coloring. A square grid graph with the maximum vertex degree equal to 3 requires four or five colors for a two-step coloring. In this paper, we propose the backtracking algorithm for this case. Also, we present the algorithm, which works in linear time relative to the number of vertices, for the two-step coloring in seven colors of a triangular grid graph and show that this coloring is always correct. If the maximum vertex degree equals six, the solution is optimum.
REFERENCES
Korsakov, S.V., Smirnov, A.V., and Sokolov, V.A., Principles of organizing the interoperability of equipollent nodes in a wireless mesh-network with time division multiple access, Autom. Control Comput. Sci., 2016, vol. 50, no. 6, pp. 415–422. https://doi.org/10.3103/s0146411616060031
Harary, F., Graph Theory, Addison-Wesley, 1969.
Medvedeva, N.S. and Smirnov, A.V., NP-completeness and one polynomial subclass of the two-step graph coloring problem, Autom. Control Comput. Sci., 2020, vol. 54, no. 7, pp. 685–696. https://doi.org/10.3103/s0146411620070159
Medvedeva, N. and Smirnov, A., Dvukhshagovaya raskraska pryamougol’nogo grafa reshetki, Zametki po informatike i matematike (Notes on Informatics and Mathematics), Yaroslavl: Yaroslavl. Gos. Univ., 2019, vol. 11, pp. 131–138.
Kolmogorov, A.N., Parquets made of regular polygons, Kvant, 1970, no. 3, pp. 24–27.
Umans, C. and Lenhart, W., Hamiltonian cycles in solid grid graphs, Proc. 38th Annu. Symp. on Foundations of Computer Science, Miami Beach, Fla., 1997, IEEE, 1997, pp. 496–505. https://doi.org/10.1109/sfcs.1997.646138
Itai, A., Papadimitriou, C.H., and Szwarcfiter, J.L., Hamilton paths in grid graphs, SIAM J. Comput., 1982, vol. 11, no. 4, pp. 676–686. https://doi.org/10.1137/0211056
Gordon, V.S., Orlovich, Yu.L., and Werner, F., Hamiltonian properties of triangular grid graphs, Discrete Math., 2007, vol. 308, no. 24, pp. 6166–6188. https://doi.org/10.1016/j.disc.2007.11.040
Islam, K., Meijer, H., Núñez, Y., Rappaport, D., and Xiao, H., Hamilton circuits in hexagonal grid graphs, Proc. 19th Canadian Conf. on Computational Geometry (CCCG2007), Ottawa: 2007, pp. 85–88.
Keshavarz-Kohjerdi, F. and Bagheri, A., An efficient parallel algorithm for the longest path problem in meshes, J. Supercomput., 2013, vol. 65, no. 2, pp. 723–741. https://doi.org/10.1007/s11227-012-0852-0
Funding
This study was supported by Demidov Yaroslavl State University, project no. VIP-016.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
The authors of this work declare that they have no conflicts of interest.
Additional information
Translated by K. Gumerov
Publisher’s Note.
Allerton Press remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
About this article
Cite this article
Smirnov, A.V. Two-Step Coloring of Grid Graphs of Different Types. Aut. Control Comp. Sci. 57, 760–771 (2023). https://doi.org/10.3103/S0146411623070131
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.3103/S0146411623070131