## Abstract

A labeling of the edges of a graph is called vertex-coloring if the labeled degrees of the vertices yield a proper coloring of the graph. In this paper, we show that such a labeling is possible from the label set 1,2,3 for the complete graph *K*_{
n
}, *n* ≥ 3.

## Background

All graphs in this note are simple and finite. For notation is not defined here, we refer the reader to[1].

For some$k\in \mathbb{N}$, let *f*:*E*(*G*)→{1,2,…,*k*} be an integer labeling of the edges of a graph *G* = (*V*(*G*),*E*(*G*)) where *V*(*G*) = {*v*_{1},…,*v*_{
n
},}. This labeling is called vertex-coloring if the labeled degrees${S}_{i}:=\sum _{{v}_{j}\in N\left({v}_{i}\right)}f\left({v}_{i}{v}_{j}\right)$ for all integer 1 ≤ *i* ≤ *n* of the vertices yield a proper vertex-coloring of the graph; ( i.e. the color of vertex *v*_{
i
} is *S*_{
i
}). It is easy to see that for every graph which does not have a component isomorphic to *K*_{2}, there exists such a labeling for some positive integer *k*.

In 2002, Karonski et. al.[2] conjectured that such a labeling with. *k* = 3 is possible for all such graphs (*k* = 2 is not sufficient as seen for instance in complete graphs and cycles of length not divisible by 4). At first constant bound of *k* = 30 was proved by Addario-Berry et. al.[3], which was later improved to *k* = 16 in 2008 by Addario-Berry et. al.[4], to *k* = 13 by Wang and Yu[5], and to *k* = 6 by Kalkowski, et. al.[6], Also, Kalkowski et. al. introduced the best bound for *k* = 5 in[7].

In this paper, we will show an algorithm for the complete graph *K*_{
n
} labeling that improves the bound to *k*=3 that it is final value for *k* in the all graphs which are simple and finite.

The following theorem is the main result of this paper.

### Theorem 1

Let *n* be a positive integer. Then for the complete graph *K*_{
n
}, there is a labeling *f*:*E*(*G*)→{1,2,3}, such that the induced vertex weights${S}_{i}:=\sum _{{v}_{j}\in N\left({v}_{i}\right)}f\left({v}_{i}{v}_{j}\right)$ properly color *V*(*G*), where 1 ≤ *i* ≤ *n*.

## The algorithm

It is trivial that the run of the algorithms in a regular graph specially in the complete graphs is harder than any other graphs, because these graphs have one case. In the following lemma, we will give an algorithm for the complete graph *K*_{
n
}.

### Lemma 1

There exists an *edge-labeling* with numbers 1, 2 and 3 for the complete graph *K*_{
n
}such that the sum of the labels in all vertices is different.

### Proof

These following algorithms calculates the minimum sum that there exist for all vertices of the complete graph *K*_{
n
}. Indeed, this lower bound is for the regular graphs, which is the harder case and here we have only one case. We will prove that the lower bound of *S*_{
n
}in the complete graph *K*_{
n
}is *S*_{
n
}≥ *n*−1. □

**Algorithm for** *K*_{
n
} : For *n* = 1,2, there is no such edge-labeling. For *K*_{3}, we label the edge *v*_{1}*v*_{2}, *v*_{2}*v*_{3} and *v*_{1}*v*_{3} with 3,2 and 1, respectively, see Figure1. So, Suppose that *n* ≥ 4. Let *V*(*K*_{
n
}) = {1,…,*n*}. Note that every vertex of *K*_{
n
} is adjacent with other *n*−1 vertices. Now label every edge with 1. Then, for 1 ≤ *i* ≤ *n*, *S*_{
i
}= *n* − 1.

Now for each *v*_{
i
}, 2 ≤ *i* ≤ *n* − 1, set *k* = *i* − 1. We add *k* times 1unit to some edges as following. Start with *v*_{
i
}*v*_{
n
}. If the label of edge *v*_{
i
}*v*_{
n
}< 3 then add one unit, otherwise, add one unit to next desired edge, i.e. that if the label of edge *v*_{
i
}*v*_{n−1} < 3 then add one unit, otherwise, add one unit to next edge. After *k* stages, if the label of edge *v*_{
i
}*v*_{i + 1} < 3, add one unit, otherwise, if *S*_{
i
}≠ *S*_{i−1} then there is no problem in the process and continue. But if *S*_{
i
}= *S*_{i−1},set the label of edge *v*_{
i
}*v*_{i−2} with 3 and continue.

With this algorithm for computing of *S*_{2}, we have *k* = 1. The process start from *v*_{2}*v*_{
n
}. One can see that *v*_{2}*v*_{
n
}= 2 and *v*_{2}*v*_{1} = *v*_{2}*v*_{3} =⋯= *v*_{2}*v*_{n−1} = 1. Then, *S*_{2} = *n*−2 + 2 = *n*.

With this algorithm for computing of *S*_{3}, we have *k* = 2. The process start from *v*_{3}*v*_{
n
} and before process the label *v*_{3}*v*_{
n
}= 1 less than 3 and can add one unit. Now *v*_{3}*v*_{
n
}= 2. By doing again this process *v*_{3}*v*_{
n
}= 3. Finally *v*_{3}*v*_{
n
}= 3 and *v*_{3}*v*_{1} = *v*_{3}*v*_{2}=⋯=*v*_{3}*v*_{n−1} = 1, then *S*_{3}= *n*−2 + 3 = *n* + 1.

With this algorithm for computing of *S*_{4}, we have *k* = 3. The process start from *v*_{4}*v*_{
n
} and before process the label of *v*_{4}*v*_{
n
}= 1, with 2 time process *v*_{4}*v*_{
n
}= 3. Therefor, need to add one unit to it’s edges to finish process. We can continue adding with next edge that is *v*_{4}*v*_{n−1}. By doing this work *v*_{4}*v*_{
n
}= 3, *v*_{4}*v*_{n−1} = 2 and *v*_{4}*v*_{1}= *v*_{4}*v*_{2}=⋯=*v*_{4}*v*_{n−2} = 1, then *S*_{4} = *n*−3 + 3 + 2 = *n* + 2.

This algorithm must be do until, *i* = *n* −1 and the algorithm will be finished, and do not need to process for *i* = *n*, because this unit set in last units, with *v*_{1}*v*_{
n
}= 1, *v*_{2}*v*_{
n
}= 2 and *v*_{3}*v*_{
n
}=*v*_{4}*v*_{
n
}=⋯=*v*_{n−1}*v*_{
n
}= 3 and *S*_{
n
}= 3(*n*−3) + 1 + 2 = 3*n*−6.

Finally, we obtain *S*_{1},*S*_{2},…,*S*_{
n
}. Therefore, all edges of the complete graph *K*_{
n
}labeled with 1,2 and 3 and having the desired property. In fact for the graph *K*_{
n
}we find *n* series with finite sequences of numbers 1,2 and 3. In other words, for every *i*,1 ≤ *i* ≤ *n* set${S}_{i}:=\sum _{j=1}^{n}f\left({v}_{i}{v}_{j}\right)$ such that *f*(*v*_{
i
}*v*_{
i
}) = 0 and *f*(*v*_{
i
}*v*_{
j
})∈{1,2,3} for *i* ≠ *j*.

Then *S*_{1} = *n*−1 and *S*_{
n
}= 3*n*−6 are the minimum and maximum labeled degrees of *K*_{
n
}, respectively. Now the proof of Theorem 1 is complete.

Now one can ask that:

**Question 1.** Is there any such algorithm for arbitrary graph *G*?

In the rest of this paper we put the code of the algorithm of *K*_{
n
}, such that with run of its we get the result of each complete graph *K*_{
n
}.

The code is :*set* 1 *all* *labels* *of* *edge*

*calcudeAllSum*∖∖*computing* *all* *S*_{
i
}

*for*(*i* = 1;*i* < *Vertex.Size*()−1;*i* + + )

{⋯*Vertex* *vi* = *Vertex.elementAt*(*i*);

⋯*Vector*<*Edge*> *e* = *getAllEdgesOfThisVertex*(*vi*);

⋯*k* = 0;

⋯*for*(*j* = *e.Size*()−1;*j* ≥ *i* *and* *k* < *i*;*j*−−)

⋯∖∖*startfrom* *v*_{
i
}*v*_{
n
}

⋯{

⋯⋯*for*(;*k* < *i*;*k* + + )

⋯⋯{

⋯⋯⋯*if*(!*e.elementAt*(*j*)*.plasPlasLabelIfSmallerThanThree*())

⋯⋯⋯∖∖*if* *added* *one* *unit* *retuen* *true* *else* *return* *false*

⋯⋯⋯{

⋯⋯⋯⋯*break*;

⋯⋯⋯}

⋯⋯}

⋯}

⋯*if*(*k* < *i*)

⋯{

⋯⋯*calcudeAllSum*

⋯⋯*if*(*vi.sum*==*Vertex.elementAt*(*i*−1)*.sum*)

⋯⋯{

⋯⋯⋯*Edge* *e*=*GetEdgeOFVertex*(*vi*,*Vertex.elementAt*(*i*−1))

⋯⋯⋯∖∖*Find* *edge* *of* *v*_{
i
}*and* *v*_{i−1}.

⋯⋯⋯*e.label*=3;

⋯⋯}

⋯}

}

## References

- 1.
Kalkowski M, Kalkowski: A note on the 1,2-conjecture. submitted for publication.

- 2.
Karonskiy M, Luczak T, Thomason A: Edge weights and vertex colours.

*Comb. Theory (Ser. B) J*2004, 91: 151–157. 10.1016/j.jctb.2003.12.001 - 3.
Addario-Berry L, Dalal K, McDiarmid C, A Reed B, Thomason A: Vertex-colouring edge-wheitings.

*Combinatorical J*2007, 27: 1–12. 10.1007/s00493-007-0041-6 - 4.
Addario-Berry L, Dalal K, Reed BA: Degree constrained subgraphs.

*Discrete Appl. Mathematics J*2008, 156: 1168–1174. 10.1016/j.dam.2007.05.059 - 5.
Wang T, Yu Q: On vertex-coloring 13-edge-weighting.

*Front. Math. China*2008, 3: 1–7. - 6.
Kalkowski M, Karonski M, Pfender F: Vertax-Coloring Edge-Weithings With Integer Weights At Most 6.

*Publisher online*2003, 101–119. - 7.
Kalkowski M, Karonski M, Pfender F: Vertex-coloring edge-weightings: Towardsthe1–2-3-conjecture.

*Comb. Theory Ser. B J*2010, 100: 347–349. 10.1016/j.jctb.2009.06.002

## Author information

## Additional information

### Competing interests

The author did not provide this information.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

**Open Access** This article is distributed under the terms of the Creative Commons Attribution 2.0 International License (https://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

## About this article

### Cite this article

Alaeiyan, M.h. The edge-labeling and vertex-colors of *K*_{
n
}.
*Math Sci* **6, **45 (2012). https://doi.org/10.1186/2251-7456-6-45

Received:

Accepted:

Published:

### Keywords

- Edge-labeling
- Vertex-coloring
- Complete graph
- 05C15
- 05C78