{{Short description|Assignment of labels to elements of a graph}} {{Use American English|date=January 2024}}

In the mathematical discipline of graph theory, a '''graph labeling''' is the assignment of labels, traditionally represented by integers, to edges and/or vertices of a graph.<ref name=mathw>{{mathworld|LabeledGraph|Labeled graph}}</ref>

Formally, given a graph {{math|1=''G'' = (''V'', ''E'')}}, a '''vertex labeling''' is a function of {{mvar|V}} to a set of labels; a graph with such a function defined is called a '''vertex-labeled graph'''. Likewise, an '''edge labeling''' is a function of {{mvar|E}} to a set of labels. In this case, the graph is called an '''edge-labeled graph'''.

When the edge labels are members of an ordered set (e.g., the real numbers), it may be called a '''weighted graph'''.

When used without qualification, the term '''labeled graph''' generally refers to a vertex-labeled graph with all labels distinct. Such a graph may equivalently be labeled by the consecutive integers {{math|{ 1, …, {{abs|''V''}} } }}, where {{math|{{abs|''V''}}}} is the number of vertices in the graph.<ref name=mathw/> For many applications, the edges or vertices are given labels that are meaningful in the associated domain. For example, the edges may be assigned weights representing the "cost" of traversing between the incident vertices.<ref>Robert Calderbank, ''Different Aspects of Coding Theory'', (1995) {{ISBN|0-8218-0379-4}}, [https://books.google.com/books?id=TcOzdq3nDp4C&pg=PA57&dq=%22labeled+graph%22&lr=#PPA53,M1 p. 53]"</ref>

In the above definition a graph is understood to be a finite undirected simple graph. However, the notion of labeling may be applied to all extensions and generalizations of graphs. For example, in automata theory and formal language theory it is convenient to consider labeled multigraphs, i.e., a pair of vertices may be connected by several labeled edges.<ref>"Developments in Language Theory", Proc. 9th. Internat.Conf., 2005, {{ISBN|3-540-26546-5}}, [https://books.google.com/books?id=QPgojKbuuUEC&pg=PA314&dq=%22labeled+graph%22#PPA313,M1 p. 313] </ref>

==History== Most graph labelings trace their origins to labelings presented by Alexander Rosa in his 1967 paper.<ref name="Gallian">{{cite journal|author=Gallian, J.|title=A Dynamic Survey of Graph Labellings, 1996-2023|journal=The Electronic Journal of Combinatorics|url=https://www.combinatorics.org/ds6|doi=10.37236/27 |doi-access=free}}</ref> Rosa identified three types of labelings, which he called {{math|''&alpha;''}}-, {{math|''&beta;''}}-, and {{math|''&rho;''}}-labelings.<ref name="Rosa">{{cite conference | zbl=0193.53204 | last=Rosa | first=Alexander | title=On certain valuations of the vertices of a graph | conference=Theory of Graphs, Int. Symp. Rome July 1966 | pages=349–355 | year=1967 | publisher=Gordon and Breach }}</ref> {{math|''&beta;''}}-labelings were later renamed as "graceful" by Solomon Golomb, and the name has been popular since.

==Special cases== ===Graceful labeling=== {{main|Graceful labeling}} 300px|thumb|A graceful labeling; vertex labels are in black and edge labels in red

A graph is known as graceful if its vertices are labeled from {{math|0}} to {{math|{{abs|''E''}}}}, the size of the graph, and if this vertex labeling induces an edge labeling from {{math|1}} to {{math|{{abs|''E''}}}}. For any edge {{mvar|e}}, the label of {{mvar|e}} is the positive difference between the labels of the two vertices incident with {{mvar|e}}. In other words, if {{mvar|e}} is incident with vertices labeled {{mvar|i}} and {{mvar|j}}, then {{mvar|e}} will be labeled {{math|{{abs|''i'' − ''j''}}}}. Thus, a graph {{math|1=''G'' = (''V'', ''E'')}} is graceful if and only if there exists an injection from {{mvar|V}} to {{math|{0, ..., {{abs|''E''}}<nowiki>}</nowiki>}} that induces a bijection from {{mvar|E}} to {{math|{1, ..., {{abs|''E''}}<nowiki>}</nowiki>}}.

In his original paper, Rosa proved that all Eulerian graphs with size equivalent to {{math|1}} or {{math|2}} ({{math|mod}} {{math|4}}) are not graceful. Whether or not certain families of graphs are graceful is an area of graph theory under extensive study. Arguably, the largest unproven conjecture in graph labeling is the Ringel–Kotzig conjecture, which hypothesizes that all trees are graceful. This has been proven for all paths, caterpillars, and many other infinite families of trees. Anton Kotzig himself has called the effort to prove the conjecture a "disease".<ref>{{cite journal |last1=Vietri |first1=Andrea |s2cid=16184248 |title=Sailing towards, and then against, the Graceful Tree Conjecture: some promiscuous results |journal=Bulletin of the Institute of Combinatorics and its Applications |date=2008 |volume=53 |pages=31–46 |publisher=Institute of Combinatorics and its Applications |issn=1183-1278}}</ref>

===Edge-graceful labeling=== {{main|Edge-graceful labeling}} An edge-graceful labeling on a simple graph without loops or multiple edges on {{mvar|p}} vertices and {{mvar|q}} edges is a labeling of the edges by distinct integers in {{math|{1, …, ''q''} }} such that the labeling on the vertices induced by labeling a vertex with the sum of the incident edges taken modulo {{mvar|p}} assigns all values from 0 to {{math|''p'' − 1}} to the vertices. A graph {{math|G}} is said to be "edge-graceful" if it admits an edge-graceful labeling.

Edge-graceful labelings were first introduced by Sheng-Ping Lo in 1985.<ref>{{cite conference | zbl=0597.05054 |last=Lo | first=Sheng-Ping | title=On edge-graceful labelings of graphs | conference=Sundance Conference, Utah | book-title=Congressus Numerantium | volume=50 | year=1985 | pages=231–241}}</ref>

A necessary condition for a graph to be edge-graceful is "Lo's condition": :<math>q(q + 1) = \frac{p(p - 1)}{2} \mod p.</math>

===Harmonious labeling=== A "harmonious labeling" on a graph {{mvar|G}} is an injection from the vertices of {{mvar|G}} to the group of integers modulo {{mvar|k}}, where {{mvar|k}} is the number of edges of {{mvar|G}}, that induces a bijection between the edges of {{mvar|G}} and the numbers modulo {{mvar|k}} by taking the edge label for an edge {{math|(''x'', ''y'')}} to be the sum of the labels of the two vertices {{math|''x'', ''y'' (mod ''k'')}}. A "harmonious graph" is one that has a harmonious labeling. Odd cycles are harmonious, as are Petersen graphs. It is conjectured that trees are all harmonious if one vertex label is allowed to be reused.<ref>{{cite book | last=Guy | first=Richard K. | authorlink=Richard K. Guy | title=Unsolved problems in number theory | publisher=Springer-Verlag |edition=3rd | year=2004 |isbn=0-387-20860-7 | zbl=1058.11001 | at = Problem C13, pp. 190–191}}</ref> The seven-page book graph {{math|''K''{{sub|1,7}} × ''K''{{sub|2}}}} provides an example of a graph that is not harmonious.<ref>{{cite journal | last = Gallian | first = Joseph A. | author-link = Joseph Gallian | journal = Electronic Journal of Combinatorics | mr = 1668059 | page = Dynamic Survey 6 | title = A dynamic survey of graph labelling | url = http://www.combinatorics.org/ojs/index.php/eljc/article/view/DS6 | volume = 5 | year = 1998}}.</ref>

===Graph coloring=== {{main|Graph coloring}}

A graph coloring is a subclass of graph labelings. Vertex colorings assign different labels to adjacent vertices, while edge colorings assign different labels to adjacent edges.<ref>{{cite book|title=How to Label a Graph|series=SpringerBriefs in Mathematics|first1=Gary|last1=Chartrand|author1-link=Gary Chartrand|first2=Cooroo|last2=Egan|first3=Ping|last3=Zhang|author3-link=Ping Zhang (graph theorist)|publisher=Springer|year=2019|isbn=9783030168636|pages=3–4|url=https://books.google.com/books?id=gZmdDwAAQBAJ&pg=PA3}}</ref>

===Lucky labeling=== A lucky labeling of a graph {{mvar|G}} is an assignment of positive integers to the vertices of {{mvar|G}} such that if {{math|''S''(''v'')}} denotes the sum of the labels on the neighbors of {{mvar|v}}, then {{mvar|S}} is a vertex coloring of {{mvar|G}}. The "lucky number" of {{mvar|G}} is the least {{mvar|k}} such that {{mvar|G}} has a lucky labeling with the integers {{math|{1, …, ''k''}.}}<ref>{{cite journal | zbl=1197.05125 | last1=Czerwiński | first1=Sebastian | last2=Grytczuk | first2=Jarosław | last3=Ẓelazny | first3=Wiktor | title=Lucky labellings of graphs | journal=Inf. Process. Lett. | volume=109 | number=18 | pages=1078–1081 | year=2009 | doi=10.1016/j.ipl.2009.05.011 }}</ref> === Antimagic labeling === An '''antimagic labeling''' of a graph {{mvar|G}} is a one-to-one assignment of the positive integers {{math|{1,..., {{abs|''E''}}}}} to the edges of {{mvar|G}} such that all induced vertex weights are distinct, where the '''weight''' of a vertex is the sum of the labels on all edges incident to it.<ref>Hartsfield, N. and Ringel, G. (2013). ''Pearls in Graph Theory: A Comprehensive Introduction''. Courier Corporation.</ref> === Magic labeling === A '''(distance) magic labeling''' of a graph {{mvar|G}} is a one-to-one assignment of the positive integers {{math|{1,..., {{abs|''V''}}}}} to the vertices of {{mvar|G}} such that all vertex weights are equal to some positive integer {{mvar|k}}. The '''weight''' of a vertex is the sum of the labels of all vertices adjacent to it. Such a constant {{mvar|k}}, if it exists, is called '''magic constant''' of a graph.

==References== {{reflist}} * *

Category:Extensions and generalizations of graphs