Lambdia

Triangular number

4 articles

A Twenty-Step Tree Has 231 Nodes, or 2,097,151

Whether an up move followed by a down move lands where a down move followed by an up move lands decides between a quadratic node count and an exponential one, and at twenty steps the gap is a factor of 9,078.6. Both sums carry N+1 terms rather than N, because a twenty-step tree has twenty-one dates on it, and the off-by-one costs the entire final row. The article also states the recombination hypothesis exactly, which is weaker than the usual ud = 1.

0

5050 Minus the Total, in One Pass

Sorting the list finds the gap and is merely wasteful, which is why the article says so rather than striking it out. The subtraction works because 5050 is a closed form available before the list is read, and the two conditions carrying it are distinctness and a known range. The article adds the duplicate-hunting mirror image, the sum-of-squares route when two values are absent, and the exclusive-or accumulator for when the total would overflow.

0