I Arithmetic representation of symbols according to certain rules

Click For Summary
The discussion revolves around generating sequences of symbols based on defined transformation rules, where each symbol can be replaced by one or more symbols. The transformation rules are deterministic and follow a specific order, which is crucial for generating the next sequence. While Excel is considered for implementation, participants suggest that using a programming language would be more efficient due to the complexity of handling longer sequences and potential cycles. The conversation also touches on the implications of these rules in cryptography, highlighting the difficulty of reversing the transformations and the potential for exponential growth in sequence length. Overall, the focus is on finding effective methods to apply these rules systematically for sequence generation.
  • #31
Adel Makram said:
View attachment 303541

This is amazing thank you very much.
These rules are the same local rules of Penrose tiling. No wondering the number 5 pops up.
You are correct that the cycle size of five seems to be consistent. I had not expected that.

C:\Users\John\Documents>cipher.pl
String length is 20
Generation limit is 17.388384878619 << Tuned the estimate further downward.
Generation Cipher Content
0 A
1 B
2 C
3 DE
4 FCHI
5 GADEJD
6 CBFCHIDFC
7 DECGADEJDFCGADE
8 FCHIDECBFCHIDFCGADEC
9 GADEJDFCHIDECGADEJDF
10 CBFCHIDFCGADEJDFCHID
11 DECGADEJDFCGADECBFCH
12 FCHIDECBFCHIDFCGADEC
13 GADEJDFCHIDECGADEJDF
14 CBFCHIDFCGADEJDFCHID
15 DECGADEJDFCGADECBFCH
16 FCHIDECBFCHIDFCGADEC
17 GADEJDFCHIDECGADEJDF
18 CBFCHIDFCGADEJDFCHID
 
  • Like
Likes Adel Makram
Mathematics news on Phys.org
  • #32
*BLUSH*. This is actually a cycle period of 4.

Danged fencepost errors.
 
  • Like
Likes Adel Makram
  • #33
Now you found the period of the cycle is 4. Is it possible to run your program to find the minimum length of symbols in the same generation that repeats itself? I know that Penrose tiling is not periodic so there may be no period. But I just want to study the statistical transition from one symbol to another in the same generation. So, having that “wavelength” will allow me to draw exact figures of the Markov matrix.
 
  • #34
Adel Makram said:
Now you found the period of the cycle is 4. Is it possible to run your program to find the minimum length of symbols in the same generation that repeats itself? I know that Penrose tiling is not periodic so there may be no period. But I just want to study the statistical transition from one symbol to another in the same generation. So, having that “wavelength” will allow me to draw exact figures of the Markov matrix.
Let me try to understand the request.

Instead of going vertically down the rows (generation after generation) looking for repeated rows, you want to sweep horizontally across a large string size looking for periodicity in the rows?

So basically, I need to iterate forward enough generations to reach the stable cycle, pick a row and then look for a cycle length in that row.

As is my usual habit, I will proceed a step at a time, working incrementally toward the goal. We can go for 1,000,000 length strings and iterate enough times to get to the eventual cycle. That much is a pretty easy tweak to the code.

If I can trust the resulting code, we get a one million character string at generation 31. I looked for periodicity in generation 32 and found none. That is, no leading sustring of length up to 500,000 was repeated after a period of between 1 and 500000.

The million character string in generation 32 was strongly patterned, but not periodic.
 
  • Like
Likes Adel Makram
  • #35
jbriggs444 said:
Instead of going vertically down the rows (generation after generation) looking for repeated rows, you want to sweep horizontally across a large string size looking for periodicity in the rows?
Yes, this is correct.
 
  • #36
Adel Makram said:
Is it possible to run your program to find the minimum length of symbols in the same generation that repeats itself?
I think if you are going to make any progress in this subject you should learn to do these things for yourself. If you don't like the look of @jbriggs444's Perl code, try it in Python: you can run it for yourself without installing anything at https://replit.com/@pbuk/StingyInfiniteNlp#main.py, and if you sign up for a repl.it account you can even try some edits.
Python:
# See https://www.physicsforums.com/threads/arithmetic-representation-of-symbols-according-to-certain-rules.1016467/

replacements = {
    'A': 'B',
    'B': 'C',
    'C': 'DE',
    'D': 'FC',
    'F': 'GA',
    'G': 'C',
    'E': 'HI',
    'H': 'J',
    'I': 'D',
    'J': 'D',
}

def transform(input):
    ''' Transform the input according to the rules '''
    output = ''
    for char in input:
        output += replacements[char]
    return output

truncateAt = 10

# Set the initial conditions.
current = 'A'
history = []

# This concise loop does all the work!
while not current in reversed(history):
    history.append(current)
    current = transform(current)[:truncateAt]

# Report the results.
cycle = len(history) - history.index(current)
count = len(history)
history.append(current)
print('Cycle length', cycle, 'after', count, 'iterations')

if truncateAt <= 100:
    for index, item in enumerate(history):
        if index == count - cycle or index == count:
            print(index, item, '<<<')
        else:
            print(index, item)
 
  • Like
Likes jbriggs444

Similar threads

  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
1K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 10 ·
Replies
10
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
Replies
7
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K