Math 2.0

definition

Binary tree

Definition

The binary trees are defined recursively by these two rules. The empty tree is a binary tree. It has no nodes. If LL and RR are binary trees, then node⁡(L,R)\operatorname{node}(L, R) is a binary tree. It has one more node than LL and RR together, the root, with left subtree LL and right subtree RR. Every binary tree comes from these two rules in a unique way, in finitely many steps.

Remarks

The left and right subtrees are ordered. Thus node⁡(node⁡(∅,∅),∅)\operatorname{node}(\operatorname{node}(\varnothing, \varnothing), \varnothing) and node⁡(∅,node⁡(∅,∅))\operatorname{node}(\varnothing, \operatorname{node}(\varnothing, \varnothing)) are different binary trees with 22 nodes. The number of binary trees with nn nodes is the Catalan number CnC_n. The node binary trees are counted by Catalan numbers states this. A nonempty binary tree is a rooted tree in which each vertex has at most two children, each marked left or right.

Explanations

L1 human

A binary tree is either empty, or a root with a left part and a right part that are binary trees again. Binary trees are used in computer science to store data for fast search.

What this node needs for W2
  • edge instance_of in: one example (0 of 1)
  • edge not_instance_of in: one non-example that fails one clause (0 of 1)

The writing levels say how complete the text of a node is. They do not measure its truth.

What depends on this

1 node uses this node, directly or through other nodes.

Sources

  1. Web https://en.wikipedia.org/wiki/Binary_tree, Recursive definition