שפות מונים ואוניברסלית Flashcards
שפת מונים, יצוגים
input: x1,x2,x3,…
output: Y
Labels: A,B,C,D,E each numbered to infinity
שפת מונים, פעולות
1: v <- v+1
2: v <- v-1
3: if v != go to L
Coding 2 numbers to single number
[x,y] = 2ˣ(2Y+1) - 1
Coding k number to single number
Based o the idea that you can identify the multipliers if they are prime numbers
[x1, x2, …, xk] = 2ˣ¹ × 3ˣ² + 5ˣ³ ⋯ pˣᵏ - 1
Coding a variable in the language
Y, X1, Z1, X2, Z2, X3, Z3…
#(v) = place in the series
Coding a label in the language
A1, B1, C1, D1, E1, A2…
#(L) = place in the series
Coding an instruction in the language
(I) = <a, <b, c» (coded twice using 2 numbers coding)
a - label, b - instruction type, c - variable
a = 0 if no label, else #(L)
b = {0: v <- v, 1: v <- v+1, 2: v <- v-1, #(L)+2 if. v!=0 goto L}
The universal program