### 2 releases

0.1.1 | Aug 19, 2020 |
---|---|

0.1.0 | Mar 18, 2020 |

#**1862** in Algorithms

**MIT**license

22KB

66 lines

# Trinoise

A mathematical noise pattern of 3 values based on Number Theory and Set Theory

### Example

The signature of

is a list of 108 numbers in base 3:`4`

`[1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2,
0, 1, 2, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0,
1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1,
0, 1, 0, 1, 2, 0, 1, 0, 1, 0, 1, 2, 0, 1, 0]
`

This signature is mathematically generated based on Number Theory and Set Theory.

A signature can be used to enumerate more efficiently through a collection which is similar to the powerset operator in Set Theory, but also includes isomorphisms. The property that is more efficient to search for, is how many modifications are required to change an identity map into a specific configuration.

### Properties

- Assigns a value to every natural number
- Fixed interpretation based on aligned positions to identity map
- Value counts the number of successors with decreasing value
- Never repeats the same number twice for bases greater than
`2` - Repeats noise pattern after

for base`N``^`N`N`

The value counts the number of successors with decrementing value. One can use it to skip successors and project into 3 values:

`0``base``-``2``base``-``1`

This is done using the

function.`tri`

The frequencies of

, `0`

and `1`

is predictable, e.g.
`2`

for base `[``470``,` `470``,` `155``]`

.`5`

The frequency of

and `0`

are equal for bases greater than `1`

(conjecture).`2`

The frequency of

or `0`

divided by frequency of `1`

converges rapidly
to `2`

when `base - 2`

`base`

goes to infinity (conjecture).### Inspiration

The powerset operator is important in Set Theory. To generate the powerset of a finite set, one can use a binary encoding, where each bit represents a membership of an object.

One problem with the powerset operator, is that it does not provide information about isomorphisms of sets to themselves.

An isomorphism can be modeled as a permutation of an identity map.

For example,

is isomorphic to `[``0``,` `1``,` `2``,` `3``]`

.`[``3``,` `2``,` `1``,` `0``]`

Since a set is unordered, there is only one set for all isomorphisms of the set.

This extra information is desirable when studying equivalences. Therefore, one would like a more "powerful" way of generating sets. Instead of generating the sets directly, one wishes to perform an intermediate step, such that the sets are generated by modifying the data in the intermediate step.

There is a different way of generating sets that respects isomorphisms:

- Starting with an identity map
`[``0``,``1``,``2``,``...``,`n`-``1``]` - Modify one position at a time, e.g.

where`[``0``,``1``,``2``]``=>``[``0``,``0``,``2``]``1``=>``0` - A modification can use any number from

to`0``n-1` - The generated discrete combinatorial space forms a groupoid
- Redundant members are removed through post-filtering to form subsets

For example,

becomes a set which contains only `[``0``,` `0``,` `0``]`

.`{``0``}`

Isomorphisms are also generated, e.g.

, not just `[``2``,` `0``,` `1``]`

.
This is because every isomorphism is covered by some sequence of modifications,
starting from the identity map. Sometimes, a modification leads to a smaller subset,
but a second modification can lead to an isomorphism of a larger subset than previous step.`[``0``,` `1``,` `2``]`

For a

, all lists `n =3`

`[``0``,` `0``,` `0``]`

up to `[``2``,` `2``,` `2``]`

are generated by modifications.
Therefore, ignoring how these are connected by modifications,
one can simply enumerate all numbers from `0`

to `n``^`n

and interpret them in base `n`

.This means that the same method construct both subsets and isomorphisms. The combination of subsets and isomorphisms is interesting to study for Sized Type Theory, a type theory where functions can be applied to equivalences. It is believed that an equivalence can ensure the existence of a partial normal path, hence not require the function to be an isomorphism.

For example,

is mapped differently than `[``0``,` `0``,` `1``]`

, but both has
the same set `[``1``,` `0``,` `0``]`

.
When a function maps to a smaller set, it can not be an isomorphism,
but in Sized Type Theory one can use `{``0``,` `1``}`

,
so this is still meaningful as
existence of some normal path `f``(`a `~``=` b`)` `==` `(``f``(`a`)` `~``=` `f``(`b`)``)`

where `f [g_i->n]`

`g_i``(`a`)` `==` `g_i``(`b`)`

and
`g_n``(``f``(`a`)``)` `==` `g_n``(``f``(`b`)``)`

.
Normal paths are commutative squares of functions.
In this case, the square commutes by definition.One benefit of this groupoid structure, is that it represents all possible transformations of sets closed under the category of functions. It is much easier to study this structure than reasoning about families of functions, because in families of functions the sets are repeated many times.

It turns out that the reachability tree with identity map as root,
assigns a node depth equal to

minus aligned positions with identity map.
This makes sense, because when a position is aligned, no modification is required at that position.
The smallest number of modifications needed to go from the identity map to the target,
is determined by the depth of the reachability tree.`n`

All nodes in same node depth in the reachability tree have same number of aligned positions.
This is because aligned positions are those positions that are unaffected by modifications.
Since the node depth is

, and `n - aligned`

`n`

is constant, one can use `aligned`

instead of node depth.When ordering the reachability tree, which is the same as counting from

to `0`

,
the nodes of same node depth are broken up into smaller neighborhoods.`n ^n`

A neighborhood are some numbers in incrementing sequence with same amount of aligned positions.

The size of the local neighborhood, when counting, is always

, `1`

or `n - 1`

`n`

(conjecture).This is because when counting upwards, the following is true:

- For every

cycle, there is at least one disruption (change of an aligned position)`n` - Any disruption can either collapse 2 positions, swap 1 vs 1, or collapse 1
- Swapping 1 vs 1 never happens twice during an

cycle`n`

The intuition is that if the least significant digit is aligned,
then incrementing makes it no longer aligned.
This leads to a change in amount of aligned positions, unless the reminder
incidentally aligns the second least significiant digit.
When this case occurs, where one aligned position is swapped for another,
one calls it "swap 1 vs 1".
This can never happen twice during an

cycle.`n`

Although this proves that local neighborhoods are not greater than

,
it does not prove why there are `n`

, `1`

or `n - 1`

`n`

as the only valid solutions.The order of the identity map is chosen to preserve this property.
If one uses

instead of `210`

in base `012`

, this property is destroyed.
This is because one gets a different reachability tree.`3`

The nodes in the groupoid can naturally be encoded with numbers in base

.
In base `n`

, the signature of ordered neighborhoods with same node depth
is encodable in base `n`

by subtracting `n`

, counting successors
from the first node in a local neighborhood.
Therefore, `1`

, `0`

or `base - 2`

`base ``-` `1`

are the only values.Since there are only 3 values,
one can use

(base `0``,` `1``,` `2`

) to represent the signature.
This is what becomes the trinoise.`3`

### Geometric Interpretation

If one thinks about the identity map

as a center,
then a sequence of single modification by replacing numbers with `[``0``,` `1``,` `2``,` `...``,` n`-``1``]`

to `0`

can be though of as having a radius to the center.`n-1`

A such measurement on a space is called a Hamming distance.

If the starting point was

,
then the shape of a grid normalized to a space with Hamming distance
forms a Hamming N-Sphere.`[`n`/``2``,` n`/``2``,` n`/``2``,` `...``,` n`/``2``]`

However, since one starts with the identity map, the Hamming distance is skewed by the order of dimensions.

A signature is a fragmentation of the skewed Hamming N-Sphere onto the sequence of natural numbers. It is not possible to enumerate all points of equal Hamming distance directly, but requires checking the aligned positions of the first number.

Therefore, trinoise signatures have no direct intuitive geometric interpretation. Although, it might happen that this application of geometry is useful for Number Theory.