Graceful Graph Moves

  1. The extreme sprout
  2. Proof: All paths are graceful.
  3. Proof: All caterpillars are graceful.
  4. The leaf pair and midpoint transfers
  5. Proof: All double stars are graceful.
  6. Banana trees!
  7. The label-sum transfer
  8. References

In 2020, I was slowly reading Douglas West’s Introduction to Graph Theory and somehow became very interested in the Graceful Tree Conjecture (GTC), which triggered me to write this post. There’s nothing novel in that write-up; it was mostly a notes-to-self, and a place for me to play with nice diagrams. That’s what this post is too.

I set aside graph theory after a few months, picked it back up for Arcol (see here), and returned to it recently. My recent interest is due to frontier models becoming decent at math. Over the past few weeks I’ve had many fun, mathematically lively conversations with GPT-5.5 about the GTC and related matters. One thing I had forgotten is that, if true, the GTC implies Ringel’s tree-packing conjecture, which is itself a fascinating conjecture that is useful in combinatorial design theory.

Quanta Magazine has a nice write-up about the Ringel Conjecture here. However it’s a bit slippery to say that the problem has been solved: what has been proven is the large-tree case. That’s a big deal, but the original conjecture is still open (as I write this anyway).

GPT-5.5 taught me about different families of trees that have been proven to be graceful. Here are three examples: paths, caterpillars, and any tree with a diameter of 55 or less. Interestingly spiders and lobsters have not been settled at the time that I write this, but various subfamilies have been proven to be graceful.

The diameter of a tree is the largest distance, measured in edges, between any two vertices. A leaf is a vertex of degree 11. A path is a tree whose vertices can be arranged in a single chain, so it has no branching. A caterpillar is a tree for which one can choose a path, called the spine, so that every vertex not on the spine is a leaf adjacent to a spine vertex. Those off-spine leaves are called legs. This convention matters: a spine endpoint can itself be a leaf of the whole tree, but it is not a leg for the construction that we’ll be using later. Note that our definition allows spine vertices to have more than one incident leg.

Using a constructive proof is an easy way to show that one of the above families is graceful. These kinds of proofs rely on transformations that promise to preserve gracefulness. I call them “moves” because some of them remind me a bit of Reidemeister moves from knot theory. Also “moves” makes it feel like a game.

Stars are almost too easy for this list, but they are worth keeping in mind. The star K1,nK_{1,n} is graceful: label its center 00 and label its nn leaves 1,2,,n1,2,\ldots,n. The edge labels are then exactly 1,2,,n1,2,\ldots,n.

Two graceful labelings of K1,5K_{1,5}. The right labeling is the complement of the left one, so the vertex labels invert while the edge labels stay the same.

The extreme sprout

Here’s our first move. It’s especially useful for paths and caterpillars, as you’ll see.

The extreme sprout

Suppose GG is a gracefully labeled graph with qq edges.

  • If a vertex xx is labeled 00, attach a new leaf yy to xx and label it with q+1q + 1.
  • If a vertex xx is labeled qq, first add 11 to every old vertex label, then attach a new leaf yy to xx and label yy with 00.

Either way, xx is the attachment point of the move.

Note that in both cases described by the move, the old edge labels remain as-is.

Proof: All paths are graceful.

Let’s use the extreme sprout move to prove that all paths permit a graceful labeling. We’ll induct on qq, the number of edges in the path. In fact, the induction proves a slightly stronger statement: for every q0q \ge 0, there is a graceful labeling of PqP_q with an attachment point at one end of the path, labeled 00 when qq is even and labeled qq when qq is odd.

For the base case, P0P_0 is a single vertex labeled 00. For the inductive step, assume the stronger statement holds for PqP_q. Apply the extreme sprout move at the attachment point. If that point is labeled 00, the move gives the new leaf label q+1q + 1. If that point is labeled qq, the move gives the new leaf label 00. In either case, the new leaf becomes the attachment point of the longer path, so the parity condition flips exactly as it should. Thus the stronger statement holds for Pq+1P_{q+1}, and therefore every path is graceful.

Proof: All caterpillars are graceful.

To prove that all caterpillars are graceful, choose a left-to-right orientation of the spine and write its vertices as v0,v1,v2,v_0, v_1, v_2, \ldots. Let aia_i be the number of legs that need to be attached to viv_i. We will grow the caterpillar from left to right. At each spine vertex, we first attach its legs, then move on by attaching the next spine vertex.

Now begin with the one-vertex graph consisting only of v0v_0, labeled 00. At any moment, the rightmost spine vertex is an extreme label. More precisely, after reaching viv_i, that vertex has label 00 when ii is even and has the current maximum label when ii is odd.

At viv_i, create every new neighbor by applying the extreme sprout move: first the aia_i legs, and then, unless viv_i is the last spine vertex, vi+1v_{i+1}. If ii is even, then viv_i is labeled 00, so the move assigns the new neighbor the current maximum label. Thus the next spine vertex, if one is created, becomes the maximum-labeled endpoint. If ii is odd, then viv_i has the current maximum label, so the move assigns the new neighbor label 00. Thus the next spine vertex, if one is created, becomes the 00-labeled endpoint.

At the last spine vertex, this rule attaches only the remaining legs. At that point every spine edge and every leg of the target caterpillar has been added. Since each individual sprout preserves gracefulness, every intermediate graph is graceful, and the final caterpillar is graceful.

The leaf pair and midpoint transfers

The leaf pair transfer

Suppose TT is a gracefully labeled tree, and suppose uu has two attached leaves that we want to move to another vertex vv. A leaf pair transfer from uu to vv deletes the old edges from uu to those two leaves and replaces them with edges from vv to the same leaves. No vertex labels are changed. If the moved leaves have labels ss and tt, the transfer is allowed when s+t=f(u)+f(v). s+t=f(u)+f(v).

The leaf midpoint transfer

Suppose TT is a gracefully labeled tree, and suppose uu has one attached leaf that we want to move to another vertex vv. A leaf midpoint transfer from uu to vv moves exactly one leaf from uu to vv: it deletes the old edge from uu to that leaf and replaces it with an edge from vv to the same leaf. No vertex labels are changed. If the moved leaf has label ss, the transfer is allowed when 2s=f(u)+f(v). 2s=f(u)+f(v).

Three transfer diagrams: one leaf pair transfer, a leaf pair transfer followed by a midpoint transfer, and two leaf pair transfers. Blue leaves move from u to v, gray leaves stay attached where they started, and each row shows the sum-pairing rule.
Leaf pair and midpoint transfers. Blue leaves move; gray leaves stay put. Rows with more than one moved group are sequences of atomic moves.

Next we’ll use these transfer rules to prove that an interesting family of trees is graceful.

Proof: All double stars are graceful.

A double star is a tree with two adjacent vertices xx and yy, called the centers, such that every other vertex is a leaf attached to one of the centers. Write Da,bD_{a,b} for the double star with aa leaves attached to xx and bb leaves attached to yy, in addition to the center edge xyxy. Thus Da,bD_{a,b} has a+b+1a+b+1 edges and a+b+2a+b+2 vertices. Pay attention to the parity of bb, the number of leaves attached to yy; it’s an important factor in the proof.

By the definition above, every double star is already a caterpillar: take the center edge xyxy as the spine, and every other vertex is a leg. So this family is already covered by the caterpillar proof. I still want to give a separate proof because it shows off different move types that come in handy for more complicated families.

An example double star D4,3D_{4,3}. The two center vertices are joined by the center edge, with four leaves attached on the left and three leaves attached on the right.

Let’s set aside the corner case where one of the stars has no leaves, because then we just have a single star. So assume a,b1a,b \ge 1, and let q=a+b+1q=a+b+1. Start with the star K1,qK_{1,q}, centered at xx and gracefully labeled by f(x)=0,f(leaves)={1,2,,q}. f(x)=0,\qquad f(\text{leaves})=\{1,2,\ldots,q\}. This star has one more leaf than the final number of leaves because one of its leaves will become the second center yy.

Choose which leaf will become yy by finding the vertex with the following label: f(y)=c={b+1,b is odd,b+2,b is even. f(y)=c= \begin{cases} b+1, & b \text{ is odd},\\ b+2, & b \text{ is even}. \end{cases} In both cases, we can choose exactly bb leaf labels below cc and move them from xx to yy using only leaf pair transfers and leaf midpoint transfers. The allowed sum for every transfer is f(x)+f(y)=c, f(x)+f(y)=c, so we only need leaf labels that are paired around cc, with at most one midpoint label.

If bb is odd: then c=b+1c=b+1. Move the leaves labeled 1,2,,b1,2,\ldots,b: pair 11 with bb, pair 22 with b1b-1, and so on, and use one midpoint transfer for the leaf labeled (b+1)/2(b+1)/2.

If bb is even: then c=b+2c=b+2. Move all leaves labeled 1,2,,b+11,2,\ldots,b+1 except the midpoint leaf; these labels split completely into complementary pairs whose sums are b+2b+2.

Each move preserves label sums, so after all the moves the labeling in the double-star is still graceful.

Banana trees!

By carefully extending the double-star proof it’s possible to show that another delicious family of trees is graceful. Sethuraman and Jesintha proved this in 2009. If you eyeball the example figure below, you can see how it’s a bit like a generalized multi-star.

For r1r\ge 1 and nonnegative integers a1,,ara_1,\ldots,a_r, the banana tree B(a1,,ar)B(a_1,\ldots,a_r) has vertices v0,p1,,pr,w1,,wr,uj,k(1jr,1kaj), v_0,\quad p_1,\ldots,p_r,\quad w_1,\ldots,w_r,\quad u_{j,k}\ (1\le j\le r,\ 1\le k\le a_j), and edges v0pj,pjwj,wjuj,k. v_0p_j,\quad p_jw_j,\quad w_ju_{j,k}. So the root v0v_0 is attached to one leaf of each star, and the jjth star has center wjw_j and aja_j remaining leaves.

For the animated proof we’ll forgo the usual step-by-step description and just play it through in a loop for fun:

As you can imagine, the bookkeeping involved in the Sethuraman-Jesintha proof is a bit mind-bending! See their paper for details.

The label-sum transfer

The last move I want to describe generalizes the leaf transfer rules. It lets you transfer one or two entire subgraphs from one place to another.

The label-sum transfer

Suppose TT is a gracefully labeled tree. Consider one or two branches attached to uu, where a branch means the whole component hanging off uu through its root. Call the roots u1u_1 and, in the two-branch case, u2u_2. Let vv be outside those branches. A label-sum transfer from uu to vv moves the branch or branches by replacing the attachment edges from uu with attachment edges from vv. No vertex labels are changed.

For two branches, the required condition is

f(u1)+f(u2)=f(u)+f(v) f(u_1) + f(u_2) = f(u) + f(v)

For a single branch rooted at u1u_1, the required condition is the midpoint case

2f(u1)=f(u)+f(v) 2 f(u_1) = f(u) + f(v)

This move was used in the Hrnčiar-Haviar proof that every tree with diameter 55 is graceful. There’s quite a bit of machinery in that proof so it’s a bit out of scope for this post.

References


graceful-moves-20260530-a.md / graceful-moves-20260530-a.md.ots

graceful-moves-20260530-b.md / graceful-moves-20260530-b.md.ots