All books

Professional

Apps About Coach Log in Start reading

Computer Science · Glossary

What is Structural induction?

Definition 11.5 University Computer Science — Year 1 · Chapter 11 — Induction, Recursion and Termination

To prove a property PP of every element of an inductively defined set by structural induction, prove that PP holds for the elements given by the base rules, and that each construction rule, applied to elements satisfying PP, builds an element satisfying PP.

The induction step for full trees: each subtree has one more leaf than internal nodes, and the root adds one internal node and no leaf, so the whole tree keeps the difference of one. Leaves are pale, internal nodes shaded.
The induction step for full trees: each subtree has one more leaf than internal nodes, and the root adds one internal node and no leaf, so the whole tree keeps the difference of one. Leaves are pale, internal nodes shaded.
Read in context →