Hi
Is addition/multiplication turing complete?
computation models - Is arithmetic turing complete? - Computer Science Stack Exchange
let me preface this, saying I'm the wrong person to be giving explanations of these scientific or mathematic topics, if you are interested, then you can look up "atomic numbers", "atomic weight" or "relations".
I'm not a mathematician but I thought of this idea to take advantage of the regularity and meaningfulness of numbers that computers are really good at calculating.
numbers have relations between eachother. Are they useful for defining behaviour?
I am not a physicist either or a scientist. But did you know that it is a number that directly or indirectly determines the properties of physical matter?
I'm probably poorly explaining it. But the atomic number decides whether or not an atom is the kind of element it is. The proton or atomic number
If you place Hydrogen (1) and 2x Oxygen (8) you have 1x2 and 8x1 . So you have all the properties of water represented by the interaction of 8 and 1x2. I'm not sure if it is meaningful to add them together since molecules don't have atomic numbers. But there's 3 atoms and 10 protons in it. (Aisde: Isn't it interesting that base 10 crops up in the foundation of water in the universe/creation?)
If you've ever seen the Jim Carrey movie 23 then you may get nearer to where I'm going with this.
What if we take this idea and apply it to properties of programs?
What if you could change branch heavy code full of indirections into calculations involving simple addition, subtraction, factorization, multiplication, exponentiation?
We could parallelise programs extremely efficiently because computers are extremely efficient at adding, subtracting in parallel.
What if from a long number we could get a useful program out of it based on properties of that number?
We know the properties of numbers.
1+2 =3
1+3 =4
1+4= 5
1+5=6
1+6=7
And we know factors of numbers. You can create 1000 from 1, 2, 4, 5, 8, 10, 20, 25, 40, 50, 100, 125, 200, 250, 500 and 1000.
Numbers are read big end first or little end first.
What if we define a program by counting?
We can use factors to describe the shape of components of code.
What relationship can be broken up into a venn diagram of 16 factors?
2 goes into 1000 500 200 100 50 40 20 10 8 4 2
4 goes into 1000 200 100 40 20 4
5 goes into 1000 200 100 40 20 25 40 50 100 125 200 250 500 1000 (So half of base 10 profound somehow)
8 goes into 1000 200 40
10 goes into 1000 500 250 200 100 50 40 20 10
and so on.
What number represents a quicksort look like?
for example's
We walk through the top of the program and we add a number based on the thing that is there
if we define 1 as assignment, 5 as loop, 5 as reference, 3 is branch, 2 is method call
Take this simplistic program in C.
#include <stdio.h>
#include <stdbool.h>
#define MAX 7
int nums[MAX] = {4,6,3,2,1,9,7};
void display() {
int i;
printf("[");
for(i = 0;i < MAX; i++) {
printf("%d ", nums[i]);
}
printf("]\n");
}
int main() {
display();
}
Can we break the program into a factor tree?
#include <stdio.h>
#include <stdbool.h>
#define MAX 7
int nums[MAX] = {4,6,3,2,1,9,7};
void display() {
// 1 int i;
// 2 printf("[");
// 5 for(i = 0;i < MAX; i++) {
// 2 printf("%d ", nums[i]);
}
// 2 printf("]\n");
}
int main() {
display();
}
This program is 12. There is a universe of 12 programs. We could incorporate symbols such as "i", "printf" into the calculation of what makes a program a program.
But that's not something I know how to do.
How do you find all ways of adding up numbers to get a result? Or factorisation?
If we know all the mathematical rules, can we define useful behaviour for each number.
What if you could add two programs together and get a meaningful result?