TOPICS
Search

Coprime Graph


A coprime graph is a graph defined by making two objects adjacent when a pair of associated positive integers is relatively prime. The term is not completely standardized, and the associated integers depend on context.

CoprimeGraph

A common number-theoretic version, the coprime graph of integers, has vertices 1, 2, ..., n, with two distinct vertices i and j adjacent iff (i,j)=1, i.e., iff i and j are relatively prime (Erdős and Sárközy 1997, Sárközy 1999, Sander and Sander 2009, Banerjee 2026). This graph is denoted TCG_n by Banerjee (2026), while the House of Graphs database uses labels such as CGI_7 for the corresponding graph on seven vertices.

Every coprime graph of integers is a traceable graph: for n=1 this is immediate, while for n>=2 the vertex sequence 1, 2, ..., n gives a Hamiltonian path, since consecutive integers are relatively prime. For n>=3, the additional edge joining n to 1 closes this path to a Hamiltonian cycle, since (n,1)=1. The case n=1 is the Hamiltonian graph K_1, while TCG_2=P_2 is nonhamiltonian; hence TCG_2 is the only nonhamiltonian coprime graph of integers.

The named instances among small coprime graphs of integers are summarized in the following table.

A shifted integer variant, the k-coprime graph of order n, has vertex set {k,k+1,...,k+n-1} and the same relative-primality adjacency rule (Bani Mostafa and Ghorbani 2021).

This adjacency convention is complementary to that used for an Erdős graph, whose Erdős sequence gives associated integers that make two vertices adjacent when the corresponding integers are not relatively prime.

In group theory, Ma, Wei, and Yang (2014) define the coprime graph of a finite group G to have vertex set G, with distinct elements x and y adjacent iff GCD(o(x),o(y))=1, where o(x) denotes the order of x. This usage is also followed, for example, for groups of integers modulo n and their subgroups by Juliana et al. (2020). A related but different subgroup version has as vertices the proper subgroups of a group, with two vertices adjacent iff the corresponding subgroup orders are coprime (Rajkumar and Devi 2015). Yet another variant, the prime coprime graph of a finite group, joins two group elements when GCD(o(x),o(y)) is either 1 or a prime (Banerjee and Adhikari 2022).

Thus, when the phrase "coprime graph" is used without qualification, the intended vertex set and the integers whose coprimality is being tested should be specified.


See also

Erdős Graph, Erdős Sequence, Relatively Prime

Explore with Wolfram|Alpha

References

Bani Mostafa, M. H. A. and Ghorbani, E. "Hamiltonicity of a Coprime Graph." Graphs Combin. 37, 2387-2395, 2021. https://doi.org/10.1007/s00373-021-02362-1.Banerjee, S. "Laplacian Spectra of Coprime Graph of Finite Cyclic and Dihedral Groups." Disc. Math. Algorithms Appl. 13, 2150020, 2021. https://doi.org/10.1142/S1793830921500208.Banerjee, S. "On Structural Properties and Adjacency Spectrum of Coprime Graph of Integers." Asian-European J. Math. 19, 2550069, 2026. https://doi.org/10.1142/S179355712550069X.Banerjee, S. and Adhikari, A. "Prime Coprime Graph of a Finite Group." Novi Sad J. Math. 52, 41-59, 2022. https://doi.org/10.30755/NSJOM.11151.Erdős, P. and Sárközy, G. N. "On Cycles in the Coprime Graph of Integers." Elec. J. Combin. 4, No. 2, R8, 1-11, 1997. https://doi.org/10.37236/1323.House of Graphs. Coprime Graphs of Integers. CGI_7, CGI_8, CGI_9, and CGI_10.Juliana, R.; Masriani, M.; Wardhana, I. G. A. W.; Switrayni, N. W.; and Irwansyah, I. "Coprime Graph of Integer Modulo n Group and Its Subgroups." J. Fundamental Math. Appl. 3, 15-18, 2020. https://doi.org/10.14710/jfma.v3i1.7412.Ma, X.; Wei, H.; and Yang, L. "The Coprime Graph of a Group." Int. J. Group Theory 3, 13-23, 2014.Rajkumar, R. and Devi, P. "Coprime Graph of Subgroups of a Group." 6 Dec 2015. https://arxiv.org/abs/1510.00129.Sander, J. W. and Sander, T. "On the Kernel of the Coprime Graph of Integers." Integers 9, A43, 569-579, 2009. https://doi.org/10.1515/INTEG.2009.045.Sárközy, G. N. "Complete Tripartite Subgraphs in the Coprime Graph of Integers." Disc. Math. 202, 227-238, 1999. https://doi.org/10.1016/S0012-365X(98)00359-8.

Cite this as:

Weisstein, Eric W. "Coprime Graph." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/CoprimeGraph.html

Subject classifications