Partials with Partial Children Below the Key Node
Amortized complexity argument.
Consider the quantities:
- q = number of Q nodes, cp = number of children of P nodes.
- We examine the quantity x = q + cp
- x is initially n and never negative.
- Each restrict of a key node increases x by at most 1.
- Each direct of a partial node with a partial child decreases x by at least 1.
- Since there are m restricts of a key node then there are most n + m directs of partials with partial children.