A tree diagram can contain five vertices while using only three names. Suppose a folder tree repeats the name “draft” in different places. Counting visible positions answers a different question from counting distinct names. We will make that distinction precise before attempting an induction proof.
Our objects are finite ordered full binary trees. A tree is either Leaf(a), one vertex labeled a, or Node(a,L,R), a new vertex labeled a with left child tree L and right child tree R. Every internal vertex has exactly two children. Labels may repeat unless a rule explicitly forbids that. These are constructor trees, not graphs with shared vertices: inserting the same child expression twice creates two occurrences.
Write v(T) for the number of vertex occurrences and S(T) for the set of labels appearing. A set records each name once. Build Node(a,Node(b,Leaf(a),Leaf(c)),Leaf(b)) on paper. Count positions first; then cross out repeated names in your list.
Predict
Predict whether the equation “parent label count = one plus both child label counts” is always correct. Name two different reasons it might overcount. Is checking only that the root has a new name enough? Is checking only that the two children use different names enough?
Keep your predictions: the diagram deliberately violates both proposed shortcuts at its outer root. Neither violation changes the number of positions in the tree.
Experiment
Each circle is a separate occurrence. The two a circles carry equal labels; they are not the same vertex.
Subtree
Vertex occurrences v
Label set S
Distinct labels
Left child
3
a, b, c
3
Right child
1
b
1
Whole tree
5
a, b, c
3
The naïve addition gives 1+3+1=5. First, b appears in both child sets, so their union has 3+1−1=3 labels. Second, the root a already belongs to that union, so adding the root contributes zero new labels. The correct total remains three.
Now relabel the right leaf d and the root e, leaving the left subtree unchanged. Recompute every row. The whole tree now has five distinct labels: the children have disjoint sets and the root is fresh. This is a change to labels, not to shape or occurrence count.
Understand
Define admissible recursively. Every Leaf(a) is admissible. Node(a,L,R) is admissible if both children are admissible, their label sets are disjoint, and a belongs to neither child set. “Disjoint” means their intersection is empty; “fresh” means absent from the union. The recursive child condition prevents repetitions hidden deeper in a subtree.
Prove that every admissible tree satisfies |S(T)|=v(T). The leaf case is one label and one vertex. At a node, assume the result for both children. Child disjointness lets us add their set sizes; root freshness contributes exactly one. Therefore |S(T)|=1+|S(L)|+|S(R)|=1+v(L)+v(R)=v(T). Each equality has a reason. Structural induction supplies the child equalities; it does not supply disjointness or freshness unless the constructor includes them.
There is also an exact formula without these restrictions. Let j be the number of labels shared by the children, and let e be 1 when the root label already occurs in a child, otherwise 0. Then
|S(T)| = |S(L)| + |S(R)| − j + 1 − e.
This is inclusion-exclusion followed by the root contribution. Define the deficit d(T)=v(T)−|S(T)|. Subtraction yields d(T)=d(L)+d(R)+j+e. All terms are nonnegative integers. Consequently a parent has deficit zero exactly when both children have zero deficit, j=0 and e=0. This proves a converse too: our recursive rules describe precisely the trees whose vertex labels are all distinct.
The familiar full-tree identity v=2i+1, where i counts internal vertices, needs no uniqueness of labels. Its induction uses occurrences only. Do not transfer that identity to label-set cardinality without proving the additional conditions.
Apply
Use the changed tree Node(r,Node(s,Leaf(t),Leaf(t)),Leaf(u)), with r,s,t,u different. The outer root is fresh and the outer child sets are disjoint. Predict whether those two facts certify five distinct labels. Locate the missing constructor obligation and compute the deficit from the recurrence before opening the feedback.
Check the changed case
The left child has three occurrences but only two labels, so its deficit is one. The right child has deficit zero, and the outer j and e are zero. The whole deficit is therefore one: five vertices use four labels. The left child violates disjointness between its two leaves. Conditions at the outer root alone cannot justify an induction hypothesis about an invalid child.
For a further repair, replace only one repeated t by v, a label absent from the tree. Explain why all constructor conditions now hold. Then replace r by s instead: explain why the newly valid children do not rescue the root-freshness failure.
Continue
Return to recursive tree proofs if you need practice stating both child hypotheses. In the written tasks, identify the counted object before manipulating a recurrence: positions, distinct labels and leaves are different sets. Supply counterexamples as well as repaired general proofs. A successful calculation on this five-vertex diagram supports understanding of the definitions; the induction argument is what establishes the claim for every finite admissible tree.
Apply · explain · revise
Practice and reasoning
Drafts save locally as you type. Reveal worked solutions when useful; the site remembers that exposure. Automatic matches check the requested answer, while written arguments require review against the rubric.
For T=Node(p, Node(q, Leaf(p), Leaf(r)), Leaf(q)), list every vertex label in root-left-right order. Compute vertex occurrences, leaves, internal vertices and the distinct-label set. Identify both a root-freshness failure and a child-disjointness failure at the outer root.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Define admissible trees recursively: every Leaf(a) is admissible; Node(a,L,R) is admissible when both children are admissible, their label sets are disjoint, and a is absent from both. Prove for every admissible T that |S(T)|=v(T)=2i(T)+1, where v counts vertices and i counts internal vertices.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Give a three-vertex tree showing that fresh root alone does not suffice, and another showing that disjoint children alone do not suffice. Then give a five-vertex tree whose outer constructor satisfies both conditions but whose distinct-label count is still less than five. Explain the missing assumption.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
For any Node(a,L,R), derive a formula for |S(T)| using |S(L)|, |S(R)|, their intersection size j, and e equal to 1 if a lies in their union and 0 otherwise. Deduce a recurrence for d(T)=v(T)−|S(T)| and characterize exactly when d(T)=0.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
An admissible tree has seven vertices labeled 1 through 7. Relabel each vertex by its remainder modulo 3. Find its new distinct-label count and deficit. Prove that any injective relabeling on S(T) preserves admissibility, and explain why noninjectivity somewhere outside S(T) is irrelevant.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
A proof claims |S(T)| equals the number of leaves because it adds the label sets of the two children and ignores the root. Refute it using distinct labels. Prove instead that every finite full binary tree with ℓ leaves satisfies 1≤|S(T)|≤2ℓ−1. Characterize equality at the upper bound and show the lower bound is attainable for every permitted shape.
Structure your argument and preserve revisions
These optional planning fields save locally. Recording your response saves an immutable copy of the argument and these fields. Older records may contain only first/latest responses; missing intermediate revisions are not reconstructed.
Each field allows 2,000 characters. Keep a specific claim, state where it applies, cite the facts you use, and explain what still needs checking. Blank fields are allowed and are not evidence of mastery.
Reflect and continue
Before marking this lesson complete, explain one key idea without the worked solution and identify a condition that matters. Marking complete records participation, not independent mastery.