The Wayback Machine - https://web.archive.org/web/20201020044004/https://mathworld.wolfram.com/GracefulGraph.html

Graceful Graph

DOWNLOAD Mathematica Notebook

A graceful graph is a graph that can be gracefully labeled. Special cases of graceful graphs include the utility graph K_(2,3) (Gardner 1983) and Petersen graph. A grace that cannot be gracefully labeled is called an ungraceful (or sometimes disgraceful) graph.

Graceful graphs may be connected or disconnected; for example, the graph disjoint union K_1 union K_n of the singleton graph K_1 and a complete graph K_n is graceful iff n=3 or n=4 (Gallian 2018).

Although an unpublished result of Erdős says that most graphs are not graceful (Graham and Sloane 1980), most graphs that have some sort of regularity of structure are graceful (Gallian 2018).

It is an unsolved and apparently very difficult problem to determine which graphs are graceful. One reason for its difficulty is that a subgraph of a graceful graph need not be graceful (Seoud and Wilson 1993).

In order for a graph to be graceful, it must be without loops or multiple edges. A graph on n vertices and m edges must also satisfy

 n<=m+1

in order to be graceful, since otherwise there are not enough integers less than or equal to m to cover all the vertices. Another criterion than can be used to determine a graph is ungraceful is due to Rosa (1967), who proved that an Eulerian graph with edge count congruent to 1 or 2 (mod 4) is ungraceful.

UngracefulGraphs

The numbers of graceful graphs on n=1, 2, ... nodes are 1, 1, 2, 7, 22, 126, ... (OEIS A308548), while the corresponding numbers of connected graceful graphs are 1, 1, 2, 6, 18, 106, ... (OEIS A308549). The numbers of ungraceful graphs on n=1, 2, ... nodes are 0, 1, 2, 4, 12, 30, 85, ... (OEIS A308556), with the corresponding numbers of connected ungraceful graphs 0, 0, 0, 0, 3, 6, 34, ... (OEIS A308557), the first few of which are illustrated above.

Parametrized families of graceful graphs include the following:

1. banana trees,

2. book graphs B_(2m),

3. caterpillar graphs,

4. complete graphs K_n iff n=2,3,4 (Golomb 1974),

5. complete bipartite graphs K_(m,n) (Golomb 1974),

6. cycle graphs C_n iff n=0 or 3 (mod 4),

7. firecracker graphs,

8. gear graphs,

9. grid graphs P_n square P_m,

10. helm graphs,

11. hypercube graphs Q_n,

12. ladder graphs P_2 square P_n,

13. Möbius ladders M_n,

14. Mongolian tent graphs,

15. pan graphs,

16. path graphs P_n,

17. Platonic graphs (Gardner 1983, pp. 158 and 163-164),

18. prism graphs K_2 square C_n,

19. star graphs S_n,

20. sunlet graphs C_n circledot K_1,

21. tadpole graphs,

22. web graphs, and

23. wheel graphs W_n (Frucht 1988).

The n-barbell graph is ungraceful for n=4 and 5 (E. Weisstein, Aug. 15, 2020) and likely all larger n.

Since a tree on n vertiecs has m=n-1 edges, all values 0 to m-1 appear in any graceful labeling of its vertices. As a result, the edge label m-1 can occur only when the edge in question is incident on vertices with labels 0 and m-1, meaning vertex labels 0 and m-1 must occur at adjacent vertices in a graceful labeling (Hotron 2003, p. 7). Nikoloski et al. (2002) found an algorithm that uses a triangular tableau to identify and ignore cases of this type (Horton 2003, p. 7). It is conjectured that all trees are graceful (Bondy and Murty 1976), but this has only been verified for trees with <=27 graph vertices (Aldred and McKay 1998), a result later extended to 28 (Horton 2003) and 35 vertices. However, the disjoint union of two trees is always ungraceful (Seoud and Wilson 1993).

It has also been conjectured that all unicyclic graphs except the cycle graph C_n with n=1 or 2 (mod 4) are graceful (Truszczyński 1984, Gallian 2018).

Wolfram Web Resources

Mathematica »

The #1 tool for creating Demonstrations and anything technical.

Wolfram|Alpha »

Explore anything with the first computational knowledge engine.

Wolfram Demonstrations Project »

Explore thousands of free applications across science, mathematics, engineering, technology, business, art, finance, social sciences, and more.

Computerbasedmath.org »

Join the initiative for modernizing math education.

Online Integral Calculator »

Solve integrals with Wolfram|Alpha.

Step-by-step Solutions »

Walk through homework problems step-by-step from beginning to end. Hints help you try the next step on your own.

Wolfram Problem Generator »

Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.

Wolfram Education Portal »

Collection of teaching and learning tools built by Wolfram education experts: dynamic textbook, lesson plans, widgets, interactive Demonstrations, and more.

Wolfram Language »

Knowledge-based programming for everyone.