All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers > Sequences
Colored triangle (Posted on 2018-12-14) Difficulty: 4 of 5
Begin with a finite sequence of blocks in a row, each in one of 3 colors: red, blue, yellow.

Below each pair of neighboring blocks place a new block with the color rule: If the blocks are the same color use that color but if they are different use the third color.

Example:

r b y y b
 y r y r
  b b b
   b b
    b
How can the color of the last block be easily predicted from the top row?

Note: I don't know the full answer but can solve special cases.

No Solution Yet Submitted by Jer    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Some Thoughts Implementation in Excel | Comment 8 of 10 |

Start with the top line coded as r=0, y=1, b=2, in boxes A1,B1, etc.

Fill the boxes underneath with =MOD(3-(A1+B1),3) etc. Then, e.g.

0 1 2 0 2 1 2 1 0 2 0 1 1 2 0 1 0 2
2 0 1 1 0 0 0 2 1 1 2 1 0 1 2 2 1 
1 2 1 2 0 0 1 0 1 0 0 2 2 0 2 0  
0 0 0 1 0 2 2 2 2 0 1 2 1 1 1   
0 0 2 2 1 2 2 2 1 2 0 0 1 1    
0 1 2 0 0 2 2 0 0 1 0 2 1     
2 0 1 0 1 2 1 0 2 2 1 0      
1 2 2 2 0 0 2 1 2 0 2       
0 2 2 1 0 1 0 0 1 1        
1 2 0 2 2 2 0 2 1         
0 1 1 2 2 1 1 0          
2 1 0 2 0 1 2           
0 2 1 1 2 0            
1 0 1 0 1             
2 2 2 2              
2 2 2               
2 2                
2

just as fast as you can drag the lines. The trick is to deduct the sum of adjacent entries from 3 then take the result, mod 3.

0+0=(3-0)=0, 0+1=(3-1)=2, 0+2=(3-2)=1
1+0=(3-1)=2, 1+1=(3-2)=1, 1+2=(3-3)=0
2+0=(3-2)=1, 2+1=(3-3)=0, 2+2=(3-4)=2

An interesting experiment is to change just one digit near the middle of the top line. The effects of the change can then be seen to ripple through the 3 cells below, the 5 cells below that, and so on, tying in with xdog's insight.


Edited on December 19, 2018, 1:36 am
  Posted by broll on 2018-12-19 01:12:23

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (6)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information