On the Subject of the Binary Tree
Contrary to normal trees, binary trees grow downward and are endlessly confusing with their different traversal orderings...
See Appendix BT for a glossary of terms and orderings relating to binary trees.
- The module contains a screen and a depth-three complete binary tree, containing seven nodes that are buttons which could be pressed. Each node may be differently colored, and each has a single black or silver character printed on it. The letter 'O' does not appear on this module, but the number zero may appear.
- The module contains three stages. In each stage, determine which node to press using a reference node. For the first stage, use the root of the tree as the reference node. For each subsequent stage, use the correct node pressed in the previous stage as the reference node.
- To find which node to press, first turn the character printed on the reference node into a number. If it is a numeric character, use that number, otherwise use the position of that character in the alphabet + 2.
- If the resulting number is greater than 7, subtract 7 repeatedly until it is within the range 1−7. If the number is 0, use 7. Call this number N.
- Use the table on the next page to determine an ordering of the nodes from the current stage number and the color of the reference node.
- Press the node that is the Nth node from the start of the ordering, UNLESS the text on the reference node is silver, in that case press the Nth node counting in reverse from the end of the ordering instead.
- The screen displays previously pressed correct nodes, and is not required to solve the module.
- Pressing a wrong node will result in a strike, but the module will stay on its current stage. The module will also display the cross-shaped strike indicator for a while, during which all inputs are ignored.