taocp

This site has no text of the book. Keep your own copy of TAOCP next to it. See what is checked.

Exercise · Volume 1 · 2.3-8

Exercise 2.3-8

not stated yet in Lean solution written

Rating03
Markersrecommended
KindK3, find a value: compute a number, a set or a closed form from the written solution
SectionSection 2.3 of Volume 1

The task

Name the binary tree that is not a tree.

The exact wording is in your copy of the book.

Hints

Open one hint at a time. Try the exercise again after each.

Hint 1

Compare the two definitions. One of them allows a case that the other does not.

Solution

Show the solution

A tree has at least one node, its root. A binary tree may be empty. So the empty binary tree is a binary tree that is not a tree.

Answer: the empty binary tree.

Check

The empty binary tree has 0 nodes, and every tree has at least 1 node.

Remarks

The two concepts are separate even for nonempty trees: a binary tree distinguishes left and right subtrees. Exercise 2.3-20 gives a correspondence between binary trees and 0-2-trees.

This solution is drafted, and a person has not reviewed it yet. The source.

In Lean

not stated yet The exercise is not stated in Lean yet.

The status is computed from the Lean build. The node of the map.

Something is wrong? Report it.