NX01: Played with unit test to decode the Mandelbrot Gödel number
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 54s
All checks were successful
Run test asserts / Test-Asserts (push) Successful in 54s
This commit is contained in:
parent
a3d0ee45f6
commit
423b2b2fa9
2 changed files with 182 additions and 0 deletions
|
|
@ -42,6 +42,8 @@ The example above is an exact match and only works on small data.
|
|||
Larger data need to be approximately nullified by math, for
|
||||
example by layering sin functions until almost zero.
|
||||
|
||||
[Output](recursive-math-hardware.md)
|
||||
|
||||
#### Booting
|
||||
|
||||
To boot a computer when the graph network is the computer itself, there's a need
|
||||
|
|
|
|||
180
src/site/wigiti/msx/recursive-math-hardware.md
Normal file
180
src/site/wigiti/msx/recursive-math-hardware.md
Normal file
|
|
@ -0,0 +1,180 @@
|
|||
# Recursive Math Hardware
|
||||
|
||||
Based structure;
|
||||
|
||||
Convert the string "Zₙ₊₁=Zₙ²+C" into a Gödel number or alternative encoders.
|
||||
This can be found in PI so it can't be proven it already existed before "invented".
|
||||
|
||||
note: AI doesn't use unicode math symbols but renders unreadable images of noise.
|
||||
|
||||
## Gemini AI
|
||||
|
||||
To convert the string "Zn+1=Zn2+C" into a Gödel number, we use a two-step process:
|
||||
Assigning a unique integer to each symbol and then encoding those integers as exponents of prime numbers.
|
||||
Because Gödel numbering is a method rather than a single fixed code, the final number depends on the specific mapping chosen.
|
||||
Using a standard representative mapping, the process looks like this:
|
||||
|
||||
### 1. Assign Symbol Values
|
||||
|
||||
First, we assign each symbol in your expression a unique natural number:
|
||||
|
||||
* Z = 1
|
||||
* n = 2
|
||||
* + = 3
|
||||
* 1 = 4
|
||||
* = = 5
|
||||
* 2 = 6
|
||||
* c = 7
|
||||
|
||||
### 2. Encode the Sequence
|
||||
|
||||
We treat the expression as a sequence of symbols: (Z,n,+,1,=,Z,n,2,+,C)
|
||||
We then multiply the first ten prime numbers (P1,P2,...,P10), each raised to the power of the value of its corresponding symbol:
|
||||
|
||||
G = 2¹ x 3² x 5³ x 7⁴ x 11⁵ x 13¹ x 17² x 19⁶ x 23³ x 29⁷
|
||||
|
||||
Calculating the product of these powers results in an extraordinarily large integer:
|
||||
32,275,308,200,565,336,004,408,428,410,069,027,250
|
||||
|
||||
This single number uniquely encodes the Mandelbrot set iteration formula.
|
||||
To decode it, you would find the prime factorization of this number, and the exponents would reveal the original symbols in order.
|
||||
Would you like to see how this number changes if we use a different mapping system,
|
||||
such as the one Kurt Gödel originally used in his 1931 paper?
|
||||
|
||||
To encode the Mandelbrot formula "Zn+1=Zn2+C" using Kurt Gödel’s original 1931 mapping,
|
||||
we must translate its modern notation into the restricted language of Principia Mathematica (PM).
|
||||
Gödel's system used a specific set of symbols for constant signs and a prime-based system for variables.
|
||||
|
||||
### 3. Translating the Formula to Formal Logic
|
||||
|
||||
In Gödel's original work, there were no symbols for exponents (like ²) or subscripts (like n+1).
|
||||
These must be represented using the successor function (or s):
|
||||
|
||||
* Subscripts: "n+1" is the successor of "n", written as "f(x)" where "x" is the variable for "n".
|
||||
* Exponents: "Z2" is shorthand for "Z x Z".
|
||||
* Variables: Gödel used primes greater than 13 for variables (17,19,23,..=[A126769](https://oeis.org/A126769)) see We assign "Z->17","n->19", and "C->23".
|
||||
|
||||
The formula "Zn+1=Zn2+C" in a PM-compatible style might look like:
|
||||
|
||||
(17,(19,f))=(17,19)*(17,19)+23
|
||||
|
||||
### 4. Original Symbol Mapping (1931)
|
||||
|
||||
Gödel assigned the following values to his constant signs:
|
||||
|
||||
* zero = 1
|
||||
* fun = 3
|
||||
* not = 5
|
||||
* ven = 7
|
||||
* van = 9
|
||||
* lbr = 11
|
||||
* rbr = 13
|
||||
* is = 5*
|
||||
|
||||
*Note: In his original paper, Gödel primarily focused on a system with successor, but later extensions added =,+, and * as constant signs.
|
||||
|
||||
### 5. Step-by-Step Encoding
|
||||
|
||||
For the sequence of symbols "(17,(19,f))=(17,19)*(17,19)+23", we map each symbol to its Gödel number:
|
||||
|
||||
- 17 (Variable Z)
|
||||
- 11 (Left parenthesis)
|
||||
- 19 (Variable n)
|
||||
- 3 (Successor f)
|
||||
- 13 (Right parenthesis)
|
||||
- 5 (Equality =)
|
||||
- 11 (Left parenthesis)
|
||||
- 17 (Variable Z)
|
||||
- 19 (Variable n)
|
||||
- 13 (Right parenthesis)
|
||||
- 17 (Multiplication *)
|
||||
- 11 (Left parenthesis)
|
||||
- 17 (Variable Z)
|
||||
- 19 (Variable n)
|
||||
- 13 (Right parenthesis)
|
||||
- 15 (Addition +)
|
||||
- 23 (Variable C)
|
||||
|
||||
### 6. The Final Gödel Number
|
||||
|
||||
The resulting Gödel number (G) is the product of the first 17 primes raised to these powers:
|
||||
|
||||
G = 2¹⁷ x 3¹¹ x 5¹⁹ x 7³ x 11¹³ x 13⁵ x 17¹¹ x 19¹⁷ x 23¹⁹ x 29¹³ x 31¹⁷ x 37¹¹ x 41¹⁷ x 43¹⁹ x 47¹³ x 53¹⁵ x 59²³
|
||||
|
||||
This number is unfathomably larger than the previous one, as the exponents themselves are now much higher (reflecting the prime-based variable assignments of the 1931 system).
|
||||
|
||||
## Mandelbrot Sequence Search
|
||||
|
||||
Mandelbrot Gödel number;
|
||||
|
||||
683505876359950041159216395292418218643723548897506786765531772046527226636478552969268654443353250389915930385563708788491517027407860457492594921188896142308121054502817356554744425581825883892148702715030604280860100517232762642163389221976134018668275595000517989293393564980042093763809452107500000000000000000
|
||||
|
||||
|
||||
To search for resolved Mandelbrot Gödel number we need to cut off tailing zeros(17) and search PI.
|
||||
|
||||
PIE-OFFSET: <x>
|
||||
PIE-LENGTH: 298
|
||||
PIE-GROWTAIL: 17
|
||||
PIE-CODEC: Gödel-1931
|
||||
|
||||
Make sure to have a few peta-bytes of storage and download a few 200GB chucks here;
|
||||
[A Slice of Pi](https://www.backblaze.com/contact-sales/pi-day)
|
||||
|
||||
## Gödel number decoder
|
||||
|
||||
To go from a large Gödel number back to a formula, you essentially "reverse the arithmetic."
|
||||
Because of the Fundamental Theorem of Arithmetic, every integer has a unique prime factorization,
|
||||
meaning there is only one possible way to take that number apart.
|
||||
Here are the three steps to decode it:
|
||||
|
||||
* 1. Prime Factorization
|
||||
* 2. Extract the Exponents
|
||||
* 3. Map Back to Symbols
|
||||
|
||||
In java unit test this looks like;
|
||||
|
||||
```
|
||||
@Test
|
||||
public void testDecodeGodelNumber() {
|
||||
// Example: Encoding (Z, n, +) where Z=17, n=19, +=15
|
||||
// G = 2^17 * 3^19 * 5^15
|
||||
BigInteger godelNumber = new BigInteger("4649045868000000000000000");
|
||||
|
||||
List<Integer> decodedSymbols = decode(godelNumber);
|
||||
|
||||
// Assert the exponents match the original sequence
|
||||
Assertions.assertEquals(List.of(17, 19, 15), decodedSymbols);
|
||||
|
||||
// test resolved mandelbrot;
|
||||
BigInteger mandelBrotNumber = new BigInteger("683505876359950041159216395292418218643723548897506786765531772046527226636478552969268654443353250389915930385563708788491517027407860457492594921188896142308121054502817356554744425581825883892148702715030604280860100517232762642163389221976134018668275595000517989293393564980042093763809452107500000000000000000");
|
||||
List<Integer> mandelBrotSymbols = decode(mandelBrotNumber);
|
||||
Assertions.assertEquals(List.of(17, 11, 19, 3, 13, 5, 11, 17, 19, 13, 17, 11, 17, 19, 13, 15, 23), mandelBrotSymbols);
|
||||
}
|
||||
|
||||
/**
|
||||
* Decodes a Gödel number by finding the exponent of each prime factor.
|
||||
*/
|
||||
private List<Integer> decode(BigInteger g) {
|
||||
List<Integer> symbols = new ArrayList<>();
|
||||
BigInteger prime = BigInteger.valueOf(2);
|
||||
|
||||
// Loop through primes until the remaining number is 1
|
||||
while (g.compareTo(BigInteger.ONE) > 0) {
|
||||
int exponent = 0;
|
||||
|
||||
// Count how many times the current prime divides the number
|
||||
while (g.remainder(prime).equals(BigInteger.ZERO)) {
|
||||
g = g.divide(prime);
|
||||
exponent++;
|
||||
}
|
||||
|
||||
if (exponent > 0) {
|
||||
symbols.add(exponent);
|
||||
}
|
||||
|
||||
// Move to the next prime
|
||||
prime = prime.nextProbablePrime();
|
||||
}
|
||||
return symbols;
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue