How To Analyze This (Cryptography Random?) Permutation...?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
lucky7
Forum Newbie
Posts: 4
Joined: Wed May 20, 2009 7:47 am

How To Analyze This (Cryptography Random?) Permutation...?

Post by lucky7 »

Hi to all of you guys, I’m new here…
May this thread fits on this section. A friend of mine gave me this enigma to do, written in excel but I can’t attach .xls file here.

Enigma:
There are 10^20 possibilities of tables (Table1, Table 2, Table 3, Table 4, Table 5,...), with ten rows (row 0,1,2,......9) in each.
Inside each table is numbers 1 to 20, with its position lie on their certain rows.
Here I gave the example tables that have been filled in for 25 tables. By finding the patterns/ formulas, my friend asked me to extend the tables to fill in the blank tables 26,27,28,etc as given after Table 25.

If these tables are using permutation method, then how do you find the formula for its permutation?

Thanks
Last edited by lucky7 on Tue May 26, 2009 7:52 am, edited 3 times in total.
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: How To Solve This Permutation?

Post by Benjamin »

Is your friend your teacher?
lucky7
Forum Newbie
Posts: 4
Joined: Wed May 20, 2009 7:47 am

Re: How To Solve This Permutation?

Post by lucky7 »

Hi astions,
No, we just try to solve this.
Thx.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How To Solve This Permutation?

Post by onion2k »

I don't understand the question. How do you put the numbers from 1 to 20 into a table with 10 rows?
lucky7
Forum Newbie
Posts: 4
Joined: Wed May 20, 2009 7:47 am

Re: How To Solve This Permutation?

Post by lucky7 »

Hi too onion2k,
Perhaps you better see the file first. I put it at Mediafire.com (a file hosting service) name New.xls:
http://www.mediafire.com/?sharekey=52d8 ... f6e8ebb871
Thx.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How To Solve This Permutation?

Post by onion2k »

:lol:

Yeah, downloading a random Excel spreadsheet. That'd be sensible.
lucky7
Forum Newbie
Posts: 4
Joined: Wed May 20, 2009 7:47 am

Re: How To Solve This Permutation?

Post by lucky7 »

Someone has made a program in python like below, but it was for numbers 1 to 80 inside each table. I'm so poor in computer & programming, I don't know how to modify the program if inside each table only numbers 1 to 20 to result like file New.xls above.

Code: Select all

 
import random
group = [[]*10 for i in range(0,8)]
#-----------------------------------------
group[0] = [1,5,9,13,17,21,25,29,33,37]
group[1] = [41,45,49,53,57,61,65,69,73,77]
#-----------------------------------------
group[2] = [2,6,10,14,18,22,26,30,34,38]
group[3] = [42,46,50,54,58,62,66,70,74,78]
group[4] = [3,7,11,15,19,23,27,31,35,39]
group[5] = [43,47,51,55,59,63,67,71,75,79]
group[6] = [4,8,12,16,20,24,28,32,36,40]
group[7] = [44,48,52,56,60,64,68,72,76,80]
#-----------------------------------------
row = [0]*10
temp =[0]*10
 
for i in range(0,10):
   row[i] = []
   temp[i] = []
 
for i in range(0,8):
   place = 0
   for j in range(0,10):
      place = random.randint(place,j)
      temp[place] = temp[place][:]+[group[i][j]]
   white = 0
   place = 9
   print temp
   for j in range(0,10):
      if len(temp[place]) == 0:
         white = white +1
      else:
         newrow =random.randint(place,place+white)
         temp[newrow] = temp[place]
         if newrow != place:
            temp[place] = []
         white = newrow -place
      place = place -1
   print temp
   for j in range(0,10):
      if len(temp[j]) != 0:
         row[j] = row[j][:] +temp[j][:]
         temp[j] = []
for i in range(0,10):
       print row[i]
   
Thx.
Post Reply