Coprime and Prime Labelings of Graphs

Adam H. Berliner

Department of Mathematics, Statistics, and Computer Science St. Olaf College

Northfield, MN 55057

USA

berliner@stolaf.edu

Jonelle Hook

Department of Mathematics and Computer

Science

Mount St. Mary’s University

Emmitsburg, MD 21727

USA

jhook@msmary.edu

Aba Mbirika Department of Mathematics

University of Wisconsin-Eau Claire

Eau Claire, WI 54702

USA

mbirika@uwec.edu

Nathaniel Dean Department of Mathematics Texas State University San Marcos, TX 78666 USA

                            nd17@txstate.edu

Alison Marr Department of Mathematics and Computer Science Southwestern University Georgetown, TX 78626 USA

                         marra@southwestern.edu

Cayla D. McBee Department of Mathematics and Computer Science Providence College Providence, RI 02918 USA

                          cmcbee@providence.edu

Abstract

A coprime labeling of a simple graph of order n is a labeling in which adjacent vertices are given relatively prime labels, and a graph is prime if the labels used can be taken to be the first n positive integers. In this paper, we consider when ladder graphs are prime and when the corresponding labeling may be done in a cyclic manner around the vertices of the ladder. Furthermore, we discuss coprime labelings for complete bipartite graphs.

1 Introduction

Let G = (V, E) be a simple graph with vertex set V and edge set E, where n = |V | is the number of vertices of G. A coprime labeling of G is a labeling of the vertices of G with distinct integers from the set {1, 2, …, k}, for some k ≥ n, in such a way that the labels of any two adjacent vertices are relatively prime. We then define 𝔭𝔯(G) to be the minimum value of k for which G has a coprime labeling. The corresponding labeling of G is called a minimal coprime labeling of G.

If 𝔭𝔯(G) = n, then a corresponding minimal coprime labeling of G is called a prime labeling of G and we call G prime. Though these definitions are more common, some of the literature uses the term coprime to mean what we refer to as prime in this paper (cf. [1]). In our setting it does not make sense to refer to a graph as coprime, since all graphs have a coprime labeling (for example, use the first n prime integers as the labels).

Much work has been done on various types of labeling problems, including coprime and prime graphs (see [4] for a detailed survey). For nearly 35 years, Entringer’s conjecture that all trees are prime has remained unsolved. Some progress towards the result has been made. In 1994, Fu and Huang proved trees with 15 or fewer vertices are prime [2]. Pikhurko improved the result for trees of up to 50 vertices [7] in 2007. In 2011, Haxell, Pikhurko, and Taraz [3] proved Entringer’s conjecture for trees of sufficiently large order. Specifically, it is known that paths, stars, caterpillars, complete binary trees, and spiders are prime.

Many other classes of graphs have been studied as well, several of which are constructed from trees. If we let P_{n} denote the path on n vertices, then the Cartesian product P_{n} × P_{m}, where m ≤ n, is called a grid graph. Some results about prime labelings of grid graphs can be found in [11, 5]. If m = 2, then the graph is called a ladder. Several results are known about ladders. For example, if n and k are prime, then P_{n} × P_{2}, P_{n+1} × P_{2}, P_{n+k} × P_{2}, P_{3n} × P_{2}, and P_{n+2} × P_{2} are prime [6, 11, 12]. Ladders P_{n} × P_{2}, P_{n+1} × P_{2}, and P_{n+2} × P_{2} have also been shown to be prime when 2n + 1 is prime [6, 12, 13]. In [13], it is conjectured that all ladders are prime. While we cite the papers [6, 13] here, we note that both of them contain some errors and incomplete proofs.

In Section 2, we further consider prime labelings for ladders. Moreover, we consider instances when a prime labeling exists where the labels occur in numerical order around the vertices of the ladder.

In Section 3, we consider complete bipartite graphs K_{m,n}. In the case m = n, it is clear that K_{n,n} is not prime when n > 2. Thus, we focus on minimal coprime labelings. In the more general case of m < n, for each m we give a sufficiently large lower bound value of n for which K_{m,n} is prime. Specifically, we give all values of n for which K_{m,n} is prime for m ≤ 13.

In Section 4, we conclude with some possible directions for future work.

2 Ladders

In this section, we give labelings of ladders that are mainly constructed in a cyclic manner. As mentioned above, several classes of ladders have been shown to be prime. We reproduce some of the results of [6] and [12], but our constructions are arguably more elegant and complete than those given.

Theorem 1. If n + 1 is prime, then P_{n} × P_{2} has a prime labeling. Moreover, this prime labeling can be realized with top row labels from left to right, 1, 2, …, n, and bottom row labels from left to right, n + 2, n + 3, …, 2n, n + 1.

Proof. Consider the graph P_{n} × P_{2} where n + 1 is prime. We claim that the following vertex labeling gives a prime labeling:

\begin{matrix}⋯ \\ ⋯ \\ 1 \\ 2 \\ n − 1 \\ n \\ n + 2 \\ n + 3 \\ 2n \\ n + 1 \end{matrix}

Since gcd(k, k + 1) = 1, it suffices to check only the vertex labels arising from the endpoints of the following n particular edges:

• the horizontal edge connecting vertex labels 2n and n + 1, and

• the first n − 1 vertical edges going from left to right.

Since n+1 is prime and 2n < 2(n+1), then n+1 cannot divide 2n. Hence, gcd(2n, n+1) = 1 as desired. Observe that each of the n − 1 vertical edges under consideration have vertex labels a and (n+1)+a for 1 ≤ a ≤ n−1. It follows that gcd((n+1)+a, a) = gcd(n+1, a) = 1. Thus, the graph P_{n} × P_{2} is prime whenever n + 1 is prime.

The remaining theorems involve consecutive cyclic prime labelings of ladders. Let P_{n}×P_{2} be the ladder with vertices v_{1}, v_{2}, …, v_{n} and u_{1}, u_{2}, …, u_{n}, where v_{i} is adjacent to u_{i} for 1 ≤ i ≤ n, v_{i} is adjacent to v_{i+1} for 1 ≤ i ≤ n−1, and u_{i} is adjacent to u_{i+1} for 1 ≤ i ≤ n−1. When drawing a ladder graph, we may assume without loss of generality that v_{1} denotes the top left vertex of the graph.

Definition 2. A consecutive cyclic prime labeling of a ladder P_{n} × P_{2} is a prime labeling in which the labels on the vertices wrap around the ladder in a consecutive way. In particular, if the label 1 is placed on vertex v_{i}, then 2 will be placed on v_{i+1}, n − i + 1 will be placed on v_{n}, n − i + 2 on u_{n}, 2n − i + 1 on u_{1}, 2n − i + 2 on v_{1}, and 2n will be placed on vertex v_{i−1}. A similar definition holds if 1 is placed on u_{i}.

The reverse direction of the following theorem is stated and proved in [6, 13], but we include our own proof here for completeness.

Theorem 3. P_{n} × P_{2} has a consecutive cyclic prime labeling with the value 1 assigned to vertex v_{1} if and only if 2n + 1 is prime.

Proof. We prove the forward implication by contradiction. Let p > 1 be a divisor of 2n + 1. The following consecutive cyclic labeling of P_{n} × P_{2} with the value of 1 assigned to the top left vertex of the graph is not a prime labeling. The pair of vertices labeled p and 2n − (p − 1) = 2n + 1 − p are not relatively prime since p | 2n + 1.

\begin{matrix}⋯ \\ ⋯ \\ ⋯ \\ ⋯ \\ 1 \\ 2 \\ 3 \\ p \\ 2n \\ 2n − 1 \\ 2n − 2 \\ 2n − (p − 1) \end{matrix}

Conversely, consider the graph P_{n}×P_{2} where 2n+1 is prime. We claim that the following vertex labeling gives a consecutive cyclic prime labeling:

\begin{matrix}⋯ \\ ⋯ \\ 1 \\ 2 \\ n − 1 \\ n \\ 2n \\ 2n − 1 \\ n + 2 \\ n + 1 \end{matrix}

Since gcd(k, k + 1) = 1, it suffices to check only the vertex labels arising from the endpoints of the first n − 1 vertical edges going from left to right. Observe that each of the n − 1 vertical edges under consideration have vertex labels a and (2n + 1) − a for 1 ≤ a ≤ n − 1. We conclude that

gcd(a, (2n + 1) − a) = gcd(a, 2n + 1) = 1.

Thus, the graph P_{n}×P_{2} has a consecutive cyclic prime labeling whenever 2n+1 is prime.

When drawing a ladder, n columns are formed consisting of a vertex from the first path, a vertex from the second path, and the edge between them. When we place labels on the vertices, we create n column sums which are just the sum of the label on vertex u_{i} and v_{i} for 1 ≤ i ≤ n. When constructing a consecutive cyclic labeling, without loss of generality we place a value of 1 somewhere in the top row of the ladder and increase each next vertex label by one in a clockwise direction. Thus, there will be a value k directly below the 1 depending on where the 1 is placed in the top row. This creates column sums of k + 1 for columns to the right of 1 (and including the column with a 1) and column sums of 2n + k + 1 for columns to the left of the 1.

Theorem 4. For every consecutive cyclic labeling of P_{n}×P_{2}, the column sums are congruent to k + 1 modulo 2n, where k is the label on the vertex directly below the vertex with label 1. If k + 1 is not prime, then the consecutive cyclic labeling is not a prime labeling.

Proof. Consider a ladder graph with the following consecutive cyclic labeling.

\begin{matrix}⋯ \\ ⋯ \\ ⋯ \\ ⋯ \\ 2n \\ 1 \\ 2 \\ k + 1 \\ k \\ k − 1 \end{matrix}

First, recall that each column sum in a consecutive cyclic labeling will be either k + 1 or 2n + k + 1. If k + 1 is prime, then all the column sums are congruent to a prime modulo 2n. So k +1 must be composite (which is an odd composite since k must be even). Then q | k +1

for some prime q. Note that k + 1 = q · s > 2q which implies that q < \frac{k + 1}{2}. In the above consecutive cyclic labeling, the labels q and k + 1 − q are (vertically) adjacent. However, gcd(q, k + 1 − q) = q and so the consecutive cyclic labeling is not a prime labeling.

The converse of Theorem 4 does not hold. If k + 1 is prime, then it does not guarantee there exists a consecutive cyclic prime labeling, as the following example illustrates.

Example 5. Below is a consecutive cyclic labeling of P_{5} × P_{2} where k + 1 equals 5, but the labeling is not prime.

8 9 10 1 2 7 6 5 4 3

Lemma 6. Consider a consecutive cyclic labeling of P_{n} × P_{2} and let k be the label on the vertex directly below the vertex with label 1. If the column sums k + 1 and 2n + k + 1 are prime, then the labeling is a consecutive cyclic prime labeling of P_{n} × P_{2}.

Proof. Consider the graph P_{n} ×P_{2} with a consecutive cyclic labeling and prime column sums k + 1 and 2n + k + 1. To show this labeling is prime we must verify that the vertex labels arising from the endpoints of the vertical edges are relatively prime. Letting k + 1 = p results in vertical pairs of labels (a, p − a) for 1 ≤ a ≤ \frac{1}{2}(p − 1) and (2n − b, p + b) for 0 ≤ b ≤ n − \frac{1}{2}(p − 1).

First we claim that gcd(a, p − a)=1. Suppose gcd(a, p − a)=d for d a positive integer. This implies d | (p − a + a) and so d | p. Therefore, d = 1 or p, but, d ≠ p since d ≤ a < p. Thus, gcd(a, p − a)=1.

Next we claim that gcd(2n − b, p + b)=1. Suppose gcd(2n − b, p + b)=d for d a positive integer. Then d | ((2n − b) + (p + b)) which is equivalent to d | (2n + p). Since we assumed 2n + p is prime, d = 1 or 2n + p. However, d ≠ 2n + p since d ≤ 2n − b < 2n + p. Therefore, gcd(2n − b, p + b)=1.

Given the cyclic labeling of the graph, all horizontal edges connect labels that are relatively prime. Thus we can conclude that if the column sums k + 1 and 2n + k + 1 are prime, then the labeling is a consecutive cyclic prime labeling.

The converse of Lemma 6 is not true, as is shown in the following example.

Example 7. The labeling below is a consecutive cyclic prime labeling of P_{4}×P_{2} with column sums 7 and 15.

8 1 2 3 7 6 5 4

Theorem 8. If 2n + p is prime where p is a prime less than 2n + 1, then P_{n} × P_{2} has a consecutive cyclic prime labeling. Moreover, this labeling can be realized by assigning 1 to the vertex in the location \frac{1}{2}(p − 1) − 1 places from the top right vertex.

Proof. Let 2n + p be a prime where p is prime less than 2n + 1. We claim that the following gives a consecutive cyclic labeling of P_{n} × P_{2}:

\begin{matrix}⋯ \\ ⋯ \\ ⋯ \\ ⋯ \\ e_{L} \\ e_{R} \\ L_{T} \\ L_{T} + 1 \\ 2n − 1 \\ 2n \\ 1 \\ 2 \\ R_{T} − 1 \\ R_{T} \\ L_{B} \\ L_{B} − 1 \\ p + 1 \\ p \\ p − 1 \\ p − 2 \\ R_{B} + 1 \\ R_{B} \end{matrix}

where the four corner values are

L_{T} = \frac{1}{2}(p + 1) + n  R_{T} = \frac{1}{2}(p − 1)
L_{B} = \frac{1}{2}(p − 1) + n  R_{B} = \frac{1}{2}(p − 1) + 1.

Since gcd(k, k + 1) = 1, it suffices to check only the vertex labels arising from the endpoints of the first n − 1 vertical edges going from left to right. For the vertical edges right of (and including) e_{R}, the column sum is p. For the vertical edges left of (and including) e_{L}, the column sum is 2n + p. Since both of these column sums are prime, Lemma 6 implies the ladder has a consecutive cyclic prime labeling.

It is of interest to know if there exists a prime number of the form 2n + p where n is an integer and p = 1 or p is a prime less than 2n + 1. If such a prime exists, then by Theorem 3 and Theorem 8 we may conclude that 𝔭𝔯(P_{n} × P_{2}) = 2n for all n and also that every ladder has a consecutive cyclic prime labeling that we may easily construct.

Unfortunately, determining whether such a prime exists is a difficult problem related to Polignac’s conjecture. Polignac’s conjecture, first stated by Alphonse de Polignac in 1849 [8], states that for any positive even integer n, there are infinitely many prime gaps of size n. If n = 2, the conjecture is equivalent to the twin prime conjecture. In looking for cyclic prime labelings of ladder graphs, we are interested in finding pairs of primes that differ by the even number 2n where the smaller prime is less than 2n + 1. Although Polignac’s conjecture guarantees the existence of pairs of primes whose difference is 2n, the result remains as yet to be proved. Also, Polignac’s conjecture does not address our additional constraint that the smaller prime be less than 2n + 1. In summary, we have the following observation:

Observation 9. If every even integer 2n can be written in the form 2n = q − p where q is a prime and p is either 1 or a prime less than 2n + 1, then all ladder graphs are prime.

The labelings in the following example illustrate our results thus far.

Example 10. Consider P_{10} × P_{2}. Theorem 3 does not apply because 2n + 1 = 21 is not prime. Consequently, assigning 1 to the top left vertex does not yield a consecutive cyclic prime labeling.

The only primes p for which 2n + p is prime and p < 2n + 1 are p = 3, 11, 17. Thus, Theorem 8 holds and we have the following consecutive cyclic prime labelings:

\begin{matrix}p = 3 \\ 12 \\ 11 \\ 13 \\ 10 \\ 14 \\ 9 \\ 15 \\ 8 \\ 16 \\ 7 \\ 17 \\ 6 \\ 18 \\ 5 \\ 19 \\ 4 \\ 20 \\ 3 \\ 1 \\ 2 \end{matrix}

\begin{matrix}p = 11 \\ 16 \\ 15 \\ 17 \\ 14 \\ 18 \\ 13 \\ 19 \\ 12 \\ 20 \\ 11 \\ 1 \\ 10 \\ 2 \\ 9 \\ 3 \\ 8 \\ 4 \\ 7 \\ 5 \\ 6 \end{matrix}

\begin{matrix}p = 17 \\ 19 \\ 18 \\ 20 \\ 17 \\ 1 \\ 16 \\ 2 \\ 15 \\ 3 \\ 14 \\ 4 \\ 13 \\ 5 \\ 12 \\ 6 \\ 11 \\ 7 \\ 10 \\ 8 \\ 9 \end{matrix} .

In each graph, we highlight the value of p where the location of the label 1 is determined by Theorem 8. For p = 19, we observe that 2n + p = 39 is not prime, yet the following labeling shows that assigning 1 to the prescribed vertex gives a successful labeling.

\begin{matrix}p = 19 \\ 20 \\ 19 \\ 1 \\ 18 \\ 2 \\ 17 \\ 3 \\ 16 \\ 4 \\ 15 \\ 5 \\ 14 \\ 6 \\ 13 \\ 7 \\ 12 \\ 8 \\ 11 \\ 9 \\ 10 \end{matrix}

An exhaustive check shows that assigning 1 to any other vertex in the top row fails to yield a consecutive cyclic prime labeling.

The previous example proves that the converse of Theorem 8 does not hold. That is, there are primes p for which 2n + p is not prime, yet the prescribed labeling is successful.

3 Complete bipartite graphs

In this section, we look at prime labelings and coprime labelings of complete bipartite graphs. We first examine minimal coprime labelings of K_{n,n} for n > 2. Then, we consider complete bipartite graphs K_{m,n} with m < n, which have prime labelings for sufficiently large n (depending on the value of m).

3.1 Minimal coprime labelings of K_{n,n}

It is straightforward to see that the complete bipartite graph K_{n,n} has no prime labeling for n > 2. Hence, the best that one can do is to find the minimal value 𝔭𝔯(K_{n,n}) > 2n such that 2n distinct labels chosen from the set {1, 2, …, 𝔭𝔯(K_{n,n})} allows a coprime labeling of K_{n,n}. We use the term minimal coprime labeling to denote the latter assignment of labels on a graph G.

Example 11. The minimal coprime labelings of K_{3,3} and K_{4,4} below show that 𝔭𝔯(K_{3,3}) = 7 and 𝔭𝔯(K_{4,4}) = 9.

1 3 5 2 4 7  1 3 5 9 2 4 7 8

Using an exhaustive computer check, we give the following values for 𝔭𝔯(K_{n,n}).

\begin{matrix}n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 & 12 & 13 \\ 𝔭𝔯(K_{n,n}) & 2 & 4 & 7 & 9 & 11 & 15 & 17 & 21 & 23 & 27 & 29 & 32 & 37 \end{matrix}

This sequence \underline{A213273} appears in the On-Line Encyclopedia of Integer Sequences (OEIS) [10]. By further computer check, Alois Heinz extended the sequence to n = 23, thus adding the following values for 𝔭𝔯(K_{n,n}):

\begin{matrix}n & 14 & 15 & 16 & 17 & 18 & 19 & 20 & 21 & 22 & 23 \\ 𝔭𝔯(K_{n,n}) & 40 & 43 & 46 & 49 & 53 & 57 & 61 & 63 & 67 & 71 \end{matrix}

Observation 12. By analyzing the minimal coprime labelings constructed for K_{n,n}, the following facts are readily verified for n ≤ 13:

• There exists a minimal coprime labeling with the labels 1 and 2 in separate partite sets.

• All primes up to 𝔭𝔯(K_{n,n}) are used in a minimal coprime labeling.

• There are never more than \frac{n}{2} primes in a minimal coprime labeling of K_{\frac{n}{2} , \frac{n}{2}} .

• A small set, 𝔓, of carefully chosen primes determine the minimal coprime labeling of K_{n,n} by labeling one of the two partite sets of vertices with numbers from a set of products of powers of these primes (see Definition 13).

Definition 13. Let 𝔓 = {p_{1}, …, p_{j}} be a set of primes. From 𝔓, we build the set of the first n integers (larger than 1) of the form p_{1}^{k_{1}}p_{2}^{k_{2}} ⋯ p_{j}^{k_{j}} such that k_{i} ≥ 0 for all i. Since this set is constructed by taking products of powers of primes, we denote this set of n elements as 𝔭𝔬𝔭𝔬𝔭(𝔓, n).

For example, for 𝔓 = {2, 3},

𝔭𝔬𝔭𝔬𝔭(𝔓, 9) = {2, 3, 4, 6, 8, 9, 12, 16, 18}.

Conjecture 14. For K_{n,n}, there exists a set of prime numbers {p_{1}, …, p_{j}} such that this set determines the values in the label sets of the two partite sets of vertices, giving K_{n,n} a minimal coprime labeling.

We believe the conjecture is true if we do the following. Consider a carefully^{1} chosen set of small primes, 𝔓 = {p_{1}, …, p_{j}}. Let A = 𝔭𝔬𝔭𝔬𝔭(𝔓, n) and B contain the n smallest positive integers which are relatively prime to all the elements of A. We claim that the sets A and B, when used to label the partite sets, yield a coprime labeling of K_{n,n}. Moreover, we claim 𝔭𝔯(K_{n,n}) = max{x | x ∈ A ∪ B}, and hence this is a minimal coprime labeling.

Example 15. Via exhaustive search in Mathematica, we verified that there is a unique minimal coprime labeling of K_{12,12} and 𝔭𝔯(K_{12,12}) = 32. If Conjecture 14 is correct, then this calculation could have been done by the following method. If we let 𝔓 = {2, 7, 11, 13}, then 𝔭𝔬𝔭𝔬𝔭(𝔓, 12) is the following:

A = {2, 4, 7, 8, 11, 13, 14, 16, 22, 26, 28, 32}.

Hence, the set of the n smallest positive integers all relatively prime to the elements of A is:

B = {1, 3, 5, 9, 15, 17, 19, 23, 25, 27, 29, 31}.

These two sets are exactly the sets in which the exhaustive computer check unveiled as the unique minimal coprime labeling of K_{12,12}. Observe that the largest element in A ∪ B is 32, and indeed 𝔭𝔯(K_{12,12}) = 32.

Again using Mathematica, we observe that there exists a unique minimal coprime labeling of K_{n,n} for n = 1, 2, 5, 9, 11, 12. On the other hand, for n = 3, 4, 6, 7, 8, 10, there are a variety of different minimal coprime labelings. For example, K_{8,8} has 5 different coprime labelings while K_{10,10} has 9 different coprime labelings. Thus it is natural to ask if there is a way to determine the values of n for which K_{n,n} has a unique coprime labeling. By further computation, Alois Heinz found the number of minimal coprime labelings of K_{n,n} for n ≤ 23, published as sequence \underline{A213806} in the OEIS [10].

1Currently, how to carefully choose a prime set is not clear. For example, 𝔭𝔬𝔭𝔬𝔭({2, 3}, n) allows a coprime labeling of K_{n,n} for n = 3, 8, 13, but fails for every other n ≤ 13. Whereas, 𝔭𝔬𝔭𝔬𝔭({2, 7, 11, 13}, n) allows a coprime labeling of K_{n,n} for n = 3, 4, 10, 11, 12, but fails for every other n ≤ 13.

3.2 Prime labelings of K_{m,n}

Although there exist no prime labelings for K_{n,n} when n > 2, there are prime labelings for K_{m,n} when m is fixed and n is sufficiently large, depending on the value of m. In 1990, Fu and Huang [2] proposed a necessary and sufficient condition for the graph K_{m,n} to be prime. Letting P (t, v) be the set of all primes x such that t < x ≤ v, they prove the following proposition.

Proposition 16. Let m, n be positive integers where m < n. Then K_{m,n} is prime if and only if m ≤ |P (\frac{m+n}{2}, m + n)| + 1.

We provide alternate proofs for specific cases of small values of m and then in full generality. First, we must introduce some helpful notation and definitions. Combining the notation of [2] with ours, we denote the set of labels for each partite set of vertices in a prime labeling of K_{m,n} as A_{m,n} and B_{m,n}. For K_{3,4}, for example,

1 5 7 2 3 4 6 corresponds to \begin{cases}A_{3,4} = \{1, 5, 7\}, and \\ B_{3,4} = \{2, 3, 4, 6\}. \end{cases}

If we let π(x) denote the number of primes less than or equal to x, then the n^{th} Ramanujan prime is the least integer R_{n} for which π(x) − π(\frac{x}{2}) ≥ n holds for all x ≥ R_{n}. The first few Ramanujan primes as given in sequence \underline{A104272} in the OEIS [10] are as follows:

\begin{matrix}n & 1 & 2 & 3 & 4 & 5 \\ R_{n} & 2 & 11 & 17 & 29 & 41 \end{matrix}

Remark 17. In his attempt to give a new proof of Bertrand’s postulate in 1919, Ramanujan published a proof in which he not only proves the famous postulate, but also generalizes it to infinitely many cases. This answered the question, “From which x onward will there be at least n primes lying between \frac{x}{2} and x?” [9].

Theorem 18. K_{m,n} is prime if n ≥ R_{m−1} − m.

Proof. There are at least m − 1 primes in the interval (\frac{m+n}{2}, m + n] for n ≥ R_{m−1} − m. If we denote the first m − 1 of these primes by p_{1}, p_{2}, …, p_{m−1}, then the sets

A_{m,n} = {1, p_{1}, p_{2}, …, p_{m−1}}
B_{m,n} = {1, …, m + n}\A_{m,n}

give a prime labeling of K_{m,n} for n ≥ R_{m−1} − m.

Remark 19. Note that Theorem 18 provides a sufficiently large value of n for which K_{m,n} is always prime. It is interesting to note, however, that for certain smaller values of n, the graph K_{m,n} still has a prime labeling. These cases are summarized below for 3 ≤ m ≤ 13.

K_{m,n} Prime (small n-cases)  Prime by Theorem 18
K_{3,n} n = 4, 5, 6  n ≥ 8
K_{4,n} n = 9  n ≥ 13
K_{5,n} n = 14, 15, 16, 18, 19, 20  n ≥ 24
K_{6,n} n = 25, 26, 27, 31  n ≥ 35
K_{7,n} n = 36, 37, 38  n ≥ 40
K_{8,n} n = 45, 46, 47, 48, 49  n ≥ 51
K_{9,n} n = 52  n ≥ 58
K_{10,n}  n ≥ 61
K_{11,n} n = 62, 68, 69, 70, 72, 73, 74, n ≥ 86

78, 79, 80, 81, 82

K_{12,n}  n ≥ 89
K_{13,n} n = 90, 91, 92  n ≥ 94

We conclude this subsection by applying Theorem 18 to find the exact prime labelings for all graphs K_{m,n} when m = 3, 4, 5, or 6. Moreover, we give prime labelings for K_{m,n} for the values of n smaller than R_{m−1} − m for which a prime labeling is possible.

Proposition 20. K_{3,n} is prime if n = 4, 5, 6 or n ≥ 8.

Proof. Since R_{2} = 11, there are at least two primes p_{1}, p_{2} in the interval (\frac{n+3}{2}, n+3] for n ≥ 8. Hence, the sets A_{3,n} = {1, p_{1}, p_{2}} and B_{3,n} = {1, …, n + 3}\A_{3,n} give a prime labeling of K_{3,n} for n ≥ 8.

If n = 4, 5, or 6, then A_{3,n} = {1, 5, 7} and the sets B_{3,n} = {2, 3, 4, 6}, {2, 3, 4, 6, 8}, and {2, 3, 4, 6, 8, 9}, respectively, give the following prime labelings of K_{3,4}, K_{3,5}, and K_{3,6}:

1 5 7 2 3 4 6  1 5 7 2 3 4 6 8  1 5 7 2 3 4 6 8 9

Proposition 21. K_{4,n} is prime if n = 9 or n ≥ 13.

Proof. Since R_{3} = 17, there are at least three primes p_{1}, p_{2}, p_{3} in the interval (\frac{n+4}{2}, n + 4] for n ≥ 13. Hence, the sets A_{4,n} = {1, p_{1}, p_{2}, p_{3}} and B_{4,n} = {1, …, n + 4}\A_{4,n} give a prime labeling of K_{4,n} for n ≥ 13.

If n = 9, then the sets A_{4,9} = {1, 7, 11, 13} and B_{4,9} = {2, 3, 4, 5, 6, 8, 9, 10, 12} give a prime labeling of K_{4,9}.

Proposition 22. K_{5,n} is prime if n = 14, 15, 16, 18, 19, 20 or n ≥ 24.

Proof. Since R_{4} = 29, there are at least four primes p_{1}, p_{2}, p_{3}, p_{4} in the interval (\frac{n+5}{2}, n + 5] for n ≥ 24. Hence, the sets A_{5,n} = {1, p_{1}, p_{2}, p_{3}, p_{4}} and B_{5,n} = {1, …, n + 5}\A_{5,n} give a prime labeling of K_{5,n} for n ≥ 24.

If n = 14, 15, or 16, then choose A_{5,n} = {1, 11, 13, 17, 19}. If n = 18, 19, or 20, then choose A_{5,n} = {1, 13, 17, 19, 23}. In each case, B_{5,n} = {1, …, n + 5}\A_{5,n} gives a prime labeling of K_{5,n}.

Proposition 23. K_{6,n} is prime if n = 25, 26, 27, 31 or n ≥ 35.

Proof. Since R_{5} = 41, there are at least five primes p_{1}, p_{2}, p_{3}, p_{4}, p_{5} in the interval (\frac{n+6}{2}, n+6] for n ≥ 35. Hence, the sets A_{6,n} = {1, p_{1}, p_{2}, p_{3}, p_{4}, p_{5}} and B_{6,n} = {1, …, n + 6}\A_{6,n} give a prime labeling of K_{6,n} for n ≥ 35.

If n = 25, 26, or 27, then choose A_{6,n} = {1, 17, 19, 23, 29, 31}. If n = 31, then choose A_{6,31} = {1, 19, 23, 29, 31, 37}. In each case, B_{6,n} = {1, …, n + 6}\A_{6,n} gives a prime labeling of K_{6,n}.

Question 24. Is there any predictability as to the values of n smaller than R_{m−1} − m for which K_{m,n} has a prime labeling? It is interesting to note that when m = 10 or m = 12, there are no such values of n.

4 Future work

Throughout the paper we have mentioned some questions and conjectures for further research. We conclude here with a few additional open questions.

Question 25. Is it possible to write every even integer 2n in the form 2n = q − p where q is prime and p is either 1 or a prime less than 2n + 1?

An affirmative answer to this interesting number theory question implies that all ladders are prime and, in fact, have a consecutive cyclic prime labeling.

Question 26. Does there exist an inductive method to get a minimal coprime labeling of the graph K_{n+1,n+1} from a minimal coprime labeling of the graph K_{n,n}?

We have observed that minimal coprime labelings of K_{n,n} are sometimes properly contained as subgraphs of a minimal coprime labeling of K_{n+1,n+1}. For example, we have the following labeling of K_{6,6}:

1 3 5 9 11 15 2 4 7 8 13 14

Observe that the above graph is properly contained in the following minimal coprime labeling of K_{7,7}:

1 3 5 9 11 15 17 2 4 7 8 13 14 16

Also we see that the sets 𝔭𝔬𝔭𝔬𝔭({2, 7, 13}, 6) and 𝔭𝔬𝔭𝔬𝔭({2, 7, 13}, 7) give the bottom row labelings for K_{6,6} and K_{7,7}, respectively. We observed that in all the examples which we looked at for which we go from a minimal coprime labeling of K_{n,n} to K_{n+1,n+1} in which the above phenomena above arose, the prime numbers in the 𝔭𝔬𝔭𝔬𝔭 sets coincided.

Secondly, another reason to believe that there may exist an inductive method to get from K_{n,n} to K_{n+1,n+1} is the observation that we can always switch a prime number in the top row with one from the bottom row and still have a coprime labeling if and only if there are no multiples of the particular two prime numbers within the set of the other labels in the graph. For example, we can get from K_{5,5} to K_{6,6} by simply switching the primes 5 and 7 in K_{5,5}. The cost of such a switch is that the label 10 in K_{5,5} cannot also be a label in K_{6,6} since both the values 2 and 5 exist in K_{6,6} as a consequence of the switch. So we replace 10 with the smallest available prime, namely 13. Below we illustrate this transition from K_{5,5} (on the left) to K_{6,6} (on the right):

1 3 7 9 11 2 4 5 8 10  1 3 5 9 11 15 2 4 7 8 13 14

5 Acknowledgments

The authors thank the AIM (American Institute of Mathematics) and NSF (National Science Foundation) for funding the REUF (Research Experiences for Undergraduate Faculty) program. Furthermore, we appreciate the hospitality of ICERM (Institute for Computational and Experimental Research in Mathematics), who hosted the REUF program in summer 2012 where the collaborators met and the work on this paper was initiated.

References

[1] P. Erdős and G. Sarkozy. On cycles in the coprime graph of integers. Electron. J. Combin. 4 (1997), no. 2, Research Paper 8.

[2] H.-L. Fu and K.-C. Huang. On prime labellings. Discrete Math. 127 (1994), 181–186.

[3] P. Haxell, O. Pikhurko, and A. Taraz. Primality of trees. J. Comb. 2 (2011), 481–500.

[4] J. A. Gallian. A dynamic survey of graph labeling. Electron. J. Combin. DS6 (2014).

[5] A. Kanetkar. Prime labeling of grids. AKCE J. Graphs. Combin. 6 (2009), 135–142.

[6] T. Nicholas, S. Somasundaram, and V. Vilfred. Classes of prime labelled graphs. Int. J. Management and Systems 18 (2002), no. 2.

[7] O. Pikhurko. Trees are almost prime. Discrete Math. 307 (2007), 1455–1462.

[8] A. de Polignac. Six propositions arithmologiques déduites de crible d’Ératosténe. Nouv. Ann. Math. 8 (1849), 423–429.

[9] S. Ramanujan. A proof of Bertrand’s postulate. J. Indian Math. Soc. 11 (1919), 181–182.

[10] N. J. A. Sloane et al. The On-Line Encyclopedia of Integer Sequences. Available elec-

  tronically at https://oeis.org.

[11] M. Sundaram, R. Ponraj, and S. Somasundaram. On a prime labeling conjecture. Ars Combin. 79 (2006), 205–209.

[12] M. Sundaram, R. Ponraj, and S. Somasundaram. A note on prime labeling of ladders. Acta Ciencia Indica. 33 (2007), 471–477.

[13] T. Varkey. About prime labelings of graphs. Preprint.

2010 Mathematics Subject Classification: Primary 05C78; Secondary 11A05. Keywords: Coprime labeling, prime labeling, prime graph, consecutive cyclic prime labeling, bipartite graph, ladder graph, Ramanujan prime.

(Concerned with sequences \underline{A104272}, \underline{A213273}, and \underline{A213806}.)

Received March 12 2016; revised versions received June 7 2016. Published in Journal of Integer Sequences, June 13 2016.

Return to Journal of Integer Sequences home page.