Piecewise Affine Function

From BusyBeaverWiki
Jump to navigation Jump to search

A Piecewise Affine Function (PAF) is a piecewise-defined function where each case is affine (and the case constraints are polyhedra). Many Cryptids are modeled by iterated PAFs, for example, BMO1. Like Generalized Collatz Problems, iterated PAFs are also proven to be Turing complete. On the bbchallenge Discord, these were originally called "Linear-Inequality Affine Transformation Automata (LIATA)" before we knew about the existing name in published literature.

Formal Definition

A n-dimension, p-region PAF is a piecewise defined partial function f:nn:f(x)={f0(x)for xH0f1(x)for xH1fp1(x)for xHp1Where each fi(x)=Aix+bi is an affine function and the Hin are non-overlapping "polyhedral regions" (defined below). If x is not in any region Hi, we say that it halts on that configuration.

We define a closed, rational half-space to be a region {xn:cx+d0} for some cn and d. In other words, it is the half of n-dimensional Euclidean space on one side of a hyperplane (a subspace defined by an affine function). And let an open, rational half-space be the same thing but using strict inequality ({xn:cx+d>0}).

Finally, define a polyhedral regions (or simply polyhedron) as the intersection of a finite number of rational half-spaces (any combination of closed and open ones). So, for example, the following are all polyhedral regions:

  • a<b represented formally as ba>0
  • 3ab<4a represented formally as (b3a0)(4ab>0)
  • a=2 represented formally as (a20)(a+20)

Given a PAF f, we say that it halts in k steps starting from configuration x iff fk(x) is undefined.

Example

An example of a PAF are the rules for BMO1:f(a,b)={(ab,4b+2)if a>b(2a+1,ba)if a<bwhere f(n,n) is undefined. BMO1 halts iff there exists k such that fk(1,2) is undefined (in other words fk1(1,2)=(n,n) for some n).

This is a 2-dimension, 2-region PAF. The 2 dimensions are the parameters a,b and the two regions are the half-spaces a<b and a>b. For each case the parameters are transformed via an affine transformation.

Turing Complete

PAF are Turing complete. This has been proven by implementing Generalized Collatz Problems and Minsky machines as iterated PAF problems: Amir M. Ben-Amram proved in 2015 that 2-dimensional PAF are Turing complete by implementing arbitrary GCP[1] and also that 2-region PAF are Turing complete by implementing arbitrary Minsky machines.[2]

Independently, similar results were proven on the bbchallenge Discord in 2025 (all by reduction to Minsky machines): @Bard proved that 3-dim PAF are Turing complete: Discord link, @star proved that 2-dim PAF are Turing complete: Discord link and Shawn Ligocki wrote up a proof sketch that 2-region PAF are Turing complete: Discord link.

In other words, we know that there exists a Universal PAF (which can simulate all TMs ... and thus all other PAFs) with 2-dimensions and some unspecified number of regions and another with 2-regions and an unspecified number of dimensions. Similar to Universal Turing Machines, we could explore the "pareto frontier" of minimal Universal PAFs by calculating exact values for the number of regions/dimensions in those specific constructions and searching for minimal values here and for more minimal sizes with 3+ dimensions and 3+ regions.

Note: the fact that PAF in general are Turing complete does not prove anything about specific PAF problems. For example, although 2-dim PAF (and 2-region PAF) are known to be Turing complete it is not known if 2-dim, 2-region PAF are. And even if it were known that 2-dim, 2-region PAF are Turing complete, it does not mean that the BMO1 PAF specifically is. And even if the BMO1 PAF specifically was known to be Turing complete, it does not mean that the specific trajectory followed by BMO1 is undecidable. In other words, there is really no hope of using the fact that PAF are Turing complete to prove anything rigorously about a specific example (like BMO1). Instead, the proofs that PAF in general are Turing complete simply provides some intuition for why PAFs in general are probably challenging problems to solve. This is similar to how the proof that Generalized Collatz Problems are Turing complete provides some intuition for why Generalized Collatz Problems in general are probably challenging problems to solve.

References

  1. Ben-Amram 2015. Section 2: Undecidability in Two Dimensions
  2. Ben-Amram, Genaim, Masud 2012. Section 5: Loops with Two Linear Pieces