The tower's rotation table #
TowerFin gives the tower's rotation map as arithmetic on numbers; this module
runs that arithmetic. A level is held as a table — one record for each vertex
and dart, holding the vertex reached and the label to come back by, both in
unary — and one level is computed from the one below by writing a new table
whose every record needs two lookups in the old one.
The base graph's own rotation map is a table on a bounded key, so it is
polynomial time however it was chosen (FiniteKey).
Main definitions #
Complexity.FinBase.tableList,Complexity.FinBase.table— a level's tableComplexity.FinBase.baseRec— the base's rotation map, as a recordComplexity.FinBase.stepRec— one record of the next level
Main results #
Complexity.FinBase.baseRec_mem_FP,Complexity.FinBase.stepRec_mem_FPComplexity.FinBase.stepRec_eq— the rule computes the level aboveComplexity.FinBase.tableStep_eq,Complexity.FinBase.tableStep_mem_FP— and writing out every record climbs one levelComplexity.FinBase.table_mem_FP— so the table of any level is polynomial time, given room for it
The table #
The records of the level-k table: for each vertex and dart, the vertex
reached and the label pointing back, both in unary.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The level-k table.
Equations
- F.table k = Complexity.DataEncode.bitstringEncode (F.tableList k)
Instances For
The base graph's own table #
One record of the next level #
One record of the level above, from the table below. The argument is
pair table (unary index): the index splits into a vertex and a dart, the
vertex into a vertex of the level below and a base vertex, and the dart into two
base darts.
Equations
- One or more equations did not get rendered due to their size.
Instances For
One level of the table #
One level of the table: write out every record of the level above.
Equations
- F.tableStep T = Complexity.listEncFn F.stepRec (Complexity.pair (Complexity.marks (Complexity.mulC (F.deg ^ 4) (Complexity.posCount T))) T)
Instances For
Climbing to a level #
The table of a requested level is polynomial time, as soon as there is room to write it down.