Exercise · Volume 1 · 2.3-6
Exercise 2.3-6
not stated yet in Lean solution written
| Rating | 21 |
|---|---|
| Markers | recommended |
| Kind | K1, prove: show that a stated fact is true from the written solution |
| Section | Section 2.3 of Volume 1 |
The task
Define for two nodes and of a tree the statement that is an th cousin of , times removed, for and , in the way of family trees.
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
Write for the th parent of . A sibling is a 0th cousin. A first cousin has the same grandparent.
Hint 2
Two conditions are needed: a common ancestor at a fixed distance, and a rule that says the lines of descent separate just below it.
Solution
Show the solution
Let and . The value is undefined when has fewer than proper ancestors.
Definition. is an th cousin of , times removed, when both and exist and are equal, and .
The first condition says that and have a common ancestor that is steps above and steps above . The second condition says that the two lines of descent from down to and to use different children of . So is the nearest common ancestor.
Examples in a family tree. For , the nodes are siblings. For , they are first cousins. For , the node is a sibling of the parent of , so is an aunt or uncle of . For , the node is a first cousin of the parent of .
The relation is not symmetric when , because is deeper than by levels. In ordinary speech the relation is treated as symmetric.
Check
Python3 applied the definition to the tree of Fig. 19. It found: is a first cousin of (, ), and are siblings (, ), is a 0th cousin of twice removed (, , so is a great-aunt or great-uncle of ) and is an aunt or uncle of (, ). Each pair satisfied exactly one pair .
Remarks
Exercise 2.3-7 extends the definition so that every pair of nodes has exactly one .
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.