Message Boards Message Boards

GROUPS:

Exponential Base Radix VS Mixed Radix (non exponential)

Posted 4 months ago
479 Views
|
3 Replies
|
1 Total Likes
|

Consider the following code:

estratti={04,23,20,11,84};
    meno=1;
    menouno=estratti-meno;
    base=2;
    radice=IntegerDigits[89,base]
    cifre=Length[radice]
    max=RandomInteger[{base-1,base-1},cifre]
    maxn=FromDigits[max,base]
    formula89=FromDigits[radice,MixedRadix[{u,v,w,x,y,z}]]
    formulamax=FromDigits[max,MixedRadix[{u,v,w,x,y,z}]]
    solu=Solve[{formulamax==maxn,formula89==89,{u,v,w,x,y,z}>0},{u,v,w,x,y,z},Integers];
    basi={u,v,w,x,y,z}/.solu
    binari=IntegerDigits[menouno,base,cifre]
    coppie=Tuples[{basi,binari}];
    cinquine=Partition[FromDigits[coppie[[#,2]],MixedRadix[coppie[[#,1]]]]&/@Range[1,Length[coppie]],5];
    StringRiffle[Mod[cinquine,90]+meno,"\n","."]

`I explain the steps I do:

I start with 5 numbers in the range between 1 and 90.

1st step: consists of enumerating the 90 elements of my collection from 0 to 89, as we do in cryptanalysis, subtracting -1.

2nd step: I choose the numerical base (exponential).

3rd step: I find the number of digits necessary to obtain 89 with the chosen exponential base.

4th step: calculation of the maximum number (NMAX) that can be combined with the highest number of the chosen base (base-1) and the length of digits necessary to obtain 89.

5th step: calculate the possible MIXED ROOTS (non exponential) that with that number of digits can generate the maximum number (NMAX).

6th step: I solve the system by identifying the MIXED ROOT that generates both 89 and NMAX

Step 7: starting from the 5 initial numbers converted to the chosen exponential numerical base, I apply the MIXED ROOT found and calculate 5 new numbers (from 0 to 89) MOD 90.

Step 8: add +1 to get the 5 numbers in the range from 1 to 90.

well, in base 2 I need 7 digits to get 89, and the unknowns of the mixed base are 6 {u, v, w, x, y, z}.

89 base10 = 1011001 base 2.

if I wanted to do the same calculation on base 3, the number of digits LENGTH would be 5,

89 base 10 = 10022 base 3.

MY QUESTION:

how can I automatically generate the unknowns {u, v, w, x, y, z} and replace them with {x0, x1 ... x_Length-1}?

TNK's

3 Replies

I wanted to point out that this playful calculation applied to the LOTTO was born from the study of a possible way of enumerating the 4 DNA BASES (A, T/U, C, G) that are usually converted into binary pairs {{1,1}, {1,0}, {0,1}, {0,0}}, and generate the 64 possible permutation 6-digit binary codons (groups of 3 bases) and that encode 23 between amino acids and START / STOP codons. if 000000 = 0 and 111111 = 63 (the 64th codon) calculating the possible MIXED ROOTS that generates 111111 = 22 (the 23rd amino acid), we can get possible NON EXPONENTIAL enumeration systems that can be used to study DNA sequences.

it can also be used to investigate ICHING, where, if Leibnitz used trigrams and hexagrams as a model to encoding binary arithmetic, no one has ever explained how each of the 64 hexagrams has been assigned a decimal number over the centuries.

I solved by myself in an inelegant way:

I added these lineā€¦

alpha={a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z};
incognite=alpha[[Range[26-cifre+2,26]]];

Mutatis,

The more elegant way is to do this:

var = Array[x, cifre-1]

and use var wherever you use {u, v, w, x, y, z}.

Regards

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract