File: MISC.md

package info (click to toggle)
bspwm 0.9.10-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 868 kB
  • sloc: ansic: 11,968; sh: 336; makefile: 85; python: 38
file content (15 lines) | stat: -rw-r--r-- 505 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Mathematical background

The main data structure is a full binary tree.

A binary tree is *full* if each of its node has either two or zero children.

If a node has two children it is an internal node, otherwise a leaf.

Fundamental theorem:
Let I be the number of internal nodes and L the number of leaves, then:
	L = I + 1

(It can be proved by induction on the number of internal nodes.)

This means that when we add a leaf to the tree (when a window is created), we must also add one internal node.