Elegant vertex labelings with prime numbers
Thierry Gensane

TL;DR
This paper explores a novel graph labeling method assigning odd primes to vertices, aiming to produce edge differences that cover the first even numbers, with a conjecture about paths and an algorithm for constructing such labelings.
Contribution
It introduces the concept of elegant prime labelings for graphs, especially trees and paths, and provides an algorithm to generate elegant paths for up to 3500 vertices.
Findings
Successfully generated elegant paths for all n up to 3500
Conjecture that all paths are elegant with prime labelings
Proposes an algorithm for constructing elegant labelings
Abstract
We consider graph labelings with an assignment of odd prime numbers to the vertices. Similarly to graceful graphs, a labeling is said to be elegant if the absolute differences between the labels of adjacent vertices describe exactly the first even numbers. The labels of an elegant tree with vertices are the first odd prime numbers and we want that the resulting edge labels are exactly the first even numbers up to . We conjecture that each path is elegant and we give the algorithm with which we got elegant paths of primes for all up to .
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsGraph Labeling and Dimension Problems · graph theory and CDMA systems
Elegant vertex labelings with prime numbers
Thierry Gensane
LMPA J. Liouville
Université du Littoral
Calais, FRANCE
Abstract
We consider graph labelings with an assignment of odd prime numbers to the vertices. Similarly to graceful graphs, a labeling is said to be elegant if the absolute differences between the labels of adjacent vertices describe exactly the first even numbers. The labels of an elegant tree with vertices are the first odd prime numbers and we want that the resulting edge labels are exactly the first even numbers up to . We conjecture that each path is elegant and we give the algorithm with which we got elegant paths of primes for all up to .
1 Introduction
In this paper, we adapt the notion of graceful graphs by considering an assignment of odd prime numbers to the vertices. Let be a graph, we look for labelings of the vertices with distinct odd primes which induce edge labelings with all even integers from up to . For instance in the tree displayed in Fig. 1, the first twelve odd primes are assigned to the vertices and we get all the even positive integers up to . We call elegant any graph for which there exists such a labeling. We refer to Galian [2] for a very detailed survey about graph labelings.
Let us denote the increasing sequence of all odd prime numbers by and . We now precise the definition of an elegant graph.
Definition 1
Let be an undirected graph without loop or multiple edge, with vertices and edges. We say that is elegant if there exists an injective map such that the induced map
[TABLE]
is a one-to-one correspondence from to .
The complete graphs up to are graceful and elegant: Their elegant labelings are respectively determined by and . As in the case of graceful graphs, it seems that no other elegant complete graphs exists. We display an elegant labeling of the Petersen graph in Fig. 2.
Of course, if the number of vertices is too weak relatively to the maximal degree of the graph, then the graph is probably not (or cannot) be elegant. For instance, the star graphs with are not elegant as soon as the center has more than adjacent vertices (in fact, we verified that the only elegant star graphs are , , and ). Nevertheless, in the case of trees, we could hope that for each integer , the answer to the following question be positive.
Question : Let be an integer. Is there an integer such that each tree of maximal degree and with more than vertices is elegant?
The answer to is negative for large enough that is an easy consequence of the prime number theorem, see for instance [1, 3]: Let us consider a symmetric and elegant tree rooted at a vertex of degree , with exactly vertices of degree at each level and with leaves at level . We have and then . Moreover, the absolute difference between labels of two adjacent vertices is less than . We consider the path on the tree , from the vertex labeled by and ended by the vertex labeled by . Since , we get
[TABLE]
which is impossible when is large enough. Since when , there exists a minimal integer such that is false for all .
As soon as , it is difficult to know if is true or false (and we are far from the value which appears in the previous proof). Let us illustrate this point with an example: Let be the regular caterpillar with vertices of degree and leaves. On the one hand, up to a trivial stocchastic algorithm has given elegant labelings of only for but it is quite possible that be elegant for all large enough. Let us recall that Rosa [4] proved that all caterpillars are graceful. On the other hand, up to , as soon as we add a supplementary leaf on any leaf or if we supress anywhere one leaf of , then surprisingly our program finds in a few seconds that the modified tree is elegant.
Fortunately, the case seems not to be resistant and we are confident that :
Conjecture 1
For all , the path of length is elegant.
Let us recall that a path of vertices is elegant if there exists a permutation such that
[TABLE]
For instance, up to , the following labelings are elegant:
- •
- •
- •
3
- •
- •
- •
- •
- •
- •
2 Operations on admissible paths
In the sequel, a path of primes represents the labeling of the path of length with the primes in this order; we will identify the vertices of a path and their label .
Definition 2
Let be a given integer.
We say that a path is admissible if the primes are distinct and if the set of the gaps is a subset of cardinal of . 2. 2.
With regard to a path with , a prime in is said to be free if it is not a vertex of . A gap is said to be free if it does not belong to .
We also adopt the notations :
- •
If then .
- •
If and , then is the concatenation of and . When we want to add a prime to a path respectively on the left end, between and or on the right end, we note these paths or .
- •
If then , and .
- •
If is admissible, is the set of free primes for and is the set of free gaps for .
In the algorithm described in Section 3, we randomly apply transformations on admissible paths of length primes in order to find other admissible paths. Our aim is either to improve the length by adding a prime to the path, or to substitute a prime of the path for a free prime, or simply to shuffle the path. Proposition 1 gives two elementary tools - and - for shuffling an admissible path:
Proposition 1
Let and be an admissible path of primes. We denote by the gap between and .
- A1.
If , then the path is admissible and
[TABLE] 2. A2.
If , then the path is admissible and
[TABLE] 3. A3.
If , then the path is admissible and
[TABLE] 4. A4.
If , then the path is admissible and
[TABLE]
Remark 1** (Insertion of a free gap)**
In Algorithm 1 decribded in Section 3 and when we get an admissible transformation from to with a property , we try to insert a free prime in : If is a new free prime for , we can try to insert it directly with Proposition 2. If a gap has become free, we can try to insert in by Proposition 2, any prime if with or . Obviously, we also test in the algorithm if one of the paths or is admissible.
For instance, let us consider and the admissible path . The last free gap is and we can apply the transformation given by A1 with and , we get and the last free gap is now . The last free prime is and we can insert by the third point of Proposition 2 with and : We get an admissible and elegant path of seven primes with the admissible transformation .**
Proposition 2** (Insertion of a free prime)**
Let and be an admissible path of primes and let . We denote by C the condition
[TABLE]
If C is true for with
* and , then the path is admissible;* 2. 2.
* and , then the path is admissible;* 3. 3.
* and , then the path is admissible.*
In order to substitute a prime of a path for a free prime, we can consider transformations where and
The following proposition details only the transformations and , but it is trivial to find for which conditions the other transformations give admissible paths.
Proposition 3
Let and be an admissible path of primes. Let be a free prime.
The path is admissible if and
[TABLE] 2. 2.
The path is admissible if and
[TABLE]
3 An algorithm for finding elegant paths
We have found elegant labelings for all paths up to vertices with the algorithm we describe below. In Algorithm 1, we construct incrementally a sequence of paths: from a path of primes, we try either to add a prime or to modify the path without improving its length. The integer being fixed, our aim is to obtain .
The first part 1-4 of Algorithm 1 is a trivial greedy algorithm, we simply try to add free primes on the ends of . In the While statement of the step 5, we intensively and randomly use the transformations given in Section 2. When reaches without giving an elgant path of length , we quit and we start a new run of Algorithm 1. With , we get with Algorithm 1, all the elegant paths of primes from up to in less than 5 seconds with one core of a 3.6 GHz processor.
If , we accelerate the calculations with Algorithm 2 in which we have chosen et : when a run reaches , we do not give up the path if but we suppress the right end of the path . We take for instance for and from up to . This can be seen as a perturbation on a non-optimal and rigid configuration. When , the average run-time to find one elegant path with Algorithm 2 is 4 minutes; when , this average run-time becomes minutes. It is surprising to find a solution so easily among permutations.
Algorithm 1
Randomly choose a prime in and set , ;
While and do
•
;
•
If we find s.t. (or resp. ) is admissible then we set (or resp. ) and ;
If then return the elegant path and quit.
While and do
•
Randomly choose .
Case : Look for an admissible transformation or of with A1 or A2. If we succeed in changing , we set . Then, we try to insert a free prime in this new path with Remark 1 and Prop. 2; if we succeed in this, we set and , the path having been given by Prop. 6.
Case : If then randomly choose and set , and . Then, if we succeed in inserting a free prime in this new with Remark 1 and Prop. 2, we set and , the path having been given by Prop. 2.
Else there exists s.t. and we set with and .
Case : Look for a transformation among which gives an admissible path . If we succeed in modifying , we set . If we succeed in inserting a free prime in this new with Remark 1 and Prop. 2, we set and .
•
.
Return the path which is elegant if .
Algorithm 2
;
While do
Do Algorithm 1 which gives an admissible path of length ;
If then return the elegant path ;
If then
c:=0;
While and do
(a)
Suppress the last prime of and set ;
(b)
Do Step 5 of Algorithm 1 and set c:=c+1;
(c)
If then return the elegant path .
Let us detail an example of a possible run of Algorithm 1 in the case .
- •
Steps of Algorithm 1: We randomly choose , , and we get
[TABLE]
the last free prime is and the free gap is .
- •
Step of Algorithm 1: We randomly choose values for in :
- –
: The gap is free and we apply the transformation with and . We get
[TABLE]
the last free gap is now .
- –
: We apply the transformation with , , and . We find
[TABLE]
the free prime is now and the free gap is .
- –
: Since the gap between the two ends is , we apply with and . We get
[TABLE]
- –
: The gap is free and we apply the transformation with and . We get
[TABLE]
and the last free gap is . We can place the prime between and and we get an elegant path of eleven primes:
[TABLE]
Acknowledgements
Thanks to Shalom Eliahou for his encouragment and more.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] T. M. Apostol. Introduction to Analytic Number Theory , Springer-Verlag 1976, New York.
- 2[2] J. A. Gallian. A dynamic survey of graph labeling, The Electronic Journal of Combinatorics 5, #DS 6, 2005.
- 3[3] G. H. Hardy and E. M. Wright. An Introduction to the Theory of Numbers , 6th Edition, Oxford University Press, Oxford, 2008.
- 4[4] A. Rosa, On certain valuations of the vertices of a graph, Theory of Graphs , (Internat. Symposium, Rome, July 1966), Gordon and Breach, N. Y. and Dunod Paris (1967) 349-355.
