By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,020 Members | 1,348 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,020 IT Pros & Developers. It's quick & easy.

How To Find The Formula of This Permutations?

P: 11
Hi to all of you guys hereÖ
A friend of mine gave me:
1). A paper with a table of 350 rows x 284 columns, which each cell contains of a single number from 0 to 9. This table didnít typed yet into .xls file. It will be like table on sheet 5 of file Enigma-2.xls if it has. Since here I canít attach .xls file, I put it at Mediafire.com (a file hosting service) name Enigma-2.xls:
http://www.mediafire.com/?sharekey=b...4e75f6e8ebb871

2). A file name Enigma.xls like on sheet 1,2,3,4 of file Enigma-2.xls. He has remapped the table of 350 rows x 284 columns on that paper with:

Column -> number of table (column 1->Table 1, column 2->Table 2, column 3->Table 3,...,column 284->Table 284).
Cell Entries Index, 0 thru 9 in Column -> 10 Rows per new table (Rows 0,1,2,...9).
Row -> Ascending list of cell entries where the row index exists in the original table whose column corresponds to this translated tables index.

But he remapped the original table for 40 rows only. We were so lazy to type the original table manually to .xls file, so I want to convert it as I did on sheet 5 file Enigma-2.xls, but it didnít work..?
Can somebody help me about this?

Now Iíve remapped it manually again per rows of that original table as on sheet 6 of file Enigma-2.xls with:

Rows -> number of table (row 1->Table 1, row 2->Table 2, row 3->Table 3,...,row 40->Table 40).
Cell Entries Index, 0 thru 9 in Row -> 10 Rows per new table (Rows 0,1,2,...9).
Row -> Ascending list of cell entries where the column index exists in the original table whose row corresponds to this translated tables index

Tables 1,5,9,13,17 / 41,45,49,53,57 / 21,25,29,33,37 / 61,65,69,73,77 on sheet 1 file Enigma-2. xls made us believe this infinite tables aren't random generated and have some patterns of permutations for extending it for the next larger numbers 41,42,43,and so on, as I gave the blank tables on sheet 6 to be filled inÖ
Can somebody help me about this too?
Hope my English is good enough for explaining this.
Thx.
Mar 23 '09 #1
Share this Question
Share on Google+
19 Replies


Expert 10K+
P: 11,448
I've read your question last night and I've read it this morning (after I took my espresso coffee) but I understand zilch from your question and your Excel sheets. Please try a different explanation and formulation of your question.

If I'm not mistaken this same question was asked in the Sun Java forums; nobody managed to figure out what you meant; right?

kind regards,

Jos
Mar 24 '09 #2

P: 11
Dear Jos,
Supposed now I give you a table with 350 rows x 284 columns, which each cell contains of a single number from 0 to 9. By finding its patterns, I need your help to extend that table to fill the cells for the rows 351,352,353,etc.
Then what would you do?
If you need to see that table, my friend also had put it on other forum, but it was only 350 rows x 20 columns. We were so lazy to type it for the rest of other columns. Itís supposed to be like on sheet 5 file Enigma-2.xls if it has.
By seeing that table, it was very difficult for us to see the patterns. Thatís why my friend remapped that table per-COLUMNS as he did on sheet 1,2,3,4 of file Enigma-2.xls with:
Column -> number of table (column 1->Table 1, column 2->Table 2, column 3->Table 3,...,column 284->Table 284).
Cell Entries Index, 0 thru 9 in Column -> 10 Rows per new table (Rows 0,1,2,...9).
Row -> Ascending list of cell entries where the row index exists in the original table whose column corresponds to this translated tables index.

By doing this, he found the patterns as he wrote on his opinion on sheet 0 of file Enigma-2.xls beneath NOMENCLATURE OF THE TABLES.

Then I remapped that table again per-ROWS as I did it on sheet 6 of file Enigma-2.xls with:
Row -> number of table (row 1->Table 1, row 2->Table 2, row 3->Table 3,...,row 40->Table 40).
Cell Entries Index, 0 thru 9 in Row -> 10 Rows per new table (Rows 0,1,2,...9).
Row -> Ascending list of cell entries where the column index exists in the original table whose row corresponds to this translated tables index

I can see its patterns as I wrote as the Note: on below of sheet 6.
But the big problem is we donít know how to scramble numbers to result like that.
I need help to extend the blank tables 41,42,43,etc as I gave on sheet 6 of file Enigma-2.xls. It will be the same as you extend the original table for the rows 351,352,353,etc.
Now can you understand the whole problems? If you do, perhaps you can also help me to re-write again this thread in English, so everybody else can understand it. Iíll be great thank to you, because our English isnít too excellent for it.
Thx Jos, for your attentions.
Mar 25 '09 #3

jkmyoung
Expert 100+
P: 2,057
Do you have any clue as to what type of pattern you are dealing with?
What formula is your original table using to calculate cells, or is this what you're trying to find?
Can you not use random numbers?

My feeling is that this question is not really suitable for this type of forum.
Mar 25 '09 #4

P: 11
Hi jkmyoung,
Yes, Iím trying to find what formula is the original table using to calculate cells.
If this is using random numbers, how to explain Table 1 (sheet 1 of file Enigma-2.xls) which contains only number 0 or 1 for more than 40 times?
I donít know for sure anymore what type of forum is really suitable for this question. :)
Thx for your attentions too.
Mar 27 '09 #5

Expert 10K+
P: 11,448
@fera
I don't see just 1s and 0s in that first table ... as a matter of fact I see only one 1 and no zeros at all ... and to tell you the truth: your explanations don't make any sense to me at all, sorry.

kind regards,

Jos
Mar 27 '09 #6

P: 11
If you see Table 1 (sheet 1 of file Enigma-2.xls), numbers 1 to 40 are only in row 0 or row 1. It means among the 284 columns of the original table 350 rows x 284 columns, column 1 contains only numbers 0 or 1 for 40 rows.
Yes, it is very very difficult for me to explain the whole problems by details...
Mar 29 '09 #7

Expert 10K+
P: 11,448
@fera
Why did you encode that large table in such an obscure way? So obscure that you can hardly explain what you have done and now you're asking us to understand this all? Why don't you give us the original table, partly completed, so that we can have a look, and understanding, of what you actually mean?

All these tables in all those tabs in that Excel sheet are gibberish to me ...

kind regards,

Jos
Mar 29 '09 #8

P: 11
Here you can find the original tables for 40 rows of columns 81,82,83,84,173,174,175,176,265,266,267,268,277,27 8,279,280,281,282,283,284.
http://www.mediafire.com/?sharekey=9...4e75f6e8ebb871
Since column 1 didn't typed yet into Excel, I can't show you that column 1 contains only number 0 or 1 for 40 rows.
Thx Jos.
Mar 29 '09 #9

Expert 10K+
P: 11,448
@fera
I'm afraid someone with more brain power should read this; You show us all sorts of tables and come up with lots of (arbitrary to us) numbers. What is it that you want? Don't throw more tables and numbers at us please, just tell us what the aim of the game is because I still don't understand it.

kind regards,

Jos
Mar 29 '09 #10

P: 11
Dear Jos,
Basically, just take a look only on sheet 6 of file Enigma-2.xls. There are infinite amount of tables, with ten rows (row 0,1,2,Ö.9) each. Inside of each tables, there are numbers from 1 to 92, 93 to 184, 185 to 276, and 277 to 284, which lie on their certain rows. They have been filled in for 40 tables. By finding the patterns/ formulas, can you help me to extend the tables to fill in the blank tables 41,42,43,etc as given beneath of Table 40. Just like SUDOKU, in each tables there will be no same numbers vertically, horizontally and diagonally. If these tables use permutations from an ideal table, that you can see beneath Table 40 (supposed the ideal table was right), then how to find the formulas of its permutations? That's all.
Thx.
Mar 31 '09 #11

jkmyoung
Expert 100+
P: 2,057
So you have a 1-1 relationship between rows and columns for that table? Is there ever a case where there is a row without a corresponding column or vice-versa?

Isn't there a beter way to store this information? I would seriously consider looking at redesigning whatever it is you're doing, and take it out of excel.
Apr 1 '09 #12

P: 11
@jkmyoung
Yes, it is.

@jkmyoung
I don't think so.

@jkmyoung
I made it in PDF file once, but Excel can be useful if you want to make any calculations.
Thx.
Apr 3 '09 #13

jkmyoung
Expert 100+
P: 2,057
I actually meant something more code based. You can still make changes within excel as well.

Instead of having hundreds or thousands of columns and rows, you could simply have 2 columns with the same # of rows you had before.
So if the first row has a 1 in column 200 (GR), and row 2 has a 1 in column 249 (IO)
Your spreadsheet could look like:
row index/ column index
1, 200
2, 249

If trying to perform calculations, you can use LOOKUP or other similar functions.
Apr 3 '09 #14

P: 11
Honestly, I don't know much about computer & programming. I've learned once about Visual Basic.Net, but it was too difficult for me. If I am able in it, I'd like to convert the file to be in VB format.
Thx for your suggestion.
Apr 5 '09 #15

Expert 10K+
P: 11,448
@fera
No matter all those numbers (which are almost random to me), can you describe your problem without mentioning all those numbers? If not I'm afraid your problem remains to be an open problem forever.

kind regards,

Jos
Apr 6 '09 #16

P: 11
If you say this is random, I think the red & blue numbers have patterns as I described on Note: beneath Table 43. Any numbers can be in the same one row with any other numbers, but If you take a look at the tables more carefully, (looks like) only numbers 37 (129/221) and 41 (133/225) will never be in the same one row. Besides, how come numbers that have difference = 4 (as numbers in circles/ovals) can be in the same one row. My big problem is how to scramble numbers to result like that..??
Thx Jos.
Apr 7 '09 #17

jkmyoung
Expert 100+
P: 2,057
This may be a useless reply, but that reminds me of counting the number of factors a particular number has. Numbers that are 4 apart often have the same number of factors.
Apr 8 '09 #18

P: 11
Someone in other forum gave me this answer :

so basically it looks like you want a random number generator with some restrictions.
firstly, for each table you only want to use each number 1- 92 once.
secondly, no row should have more than 20 numbers.
thirdly, you have four groups of numbers n mod 4. the four groups are further divided into three groups each, n <=40, 40<n<=80, rest. no number in a group that's less than another number in that same group should appear in a row below the larger number.
that is for example, group1 will be 1,5,9, etc up to 40. and 1 won't be below 5 or 9 nor will 5 be below 9.

here's my suggested algorithm.
first start with the optimal group.
1
5
9
13
17
21
25
29
33
37
then going down the list, randomly place a number on any row above it up to the previous number.
Code:
row = 0
for i in range(1,10):
row = random.randint(row,i)
then you can randomly shift rows down if there is any empty rows.
Code:
row = 10
for i in range(0,10):
row = row-1
if row is empty:
white = white +1
else:
newrow = random.randint(row,row+white)
execute this code for each of the 12 groups, and you should get what you are looking for.


What do you think? I didn't try it yet.
Thx.
Apr 9 '09 #19

P: 11
For resulting tables like on sheet #6 of file Enigma-2.xls, someone has made a program in Java like this:
Expand|Select|Wrap|Line Numbers
  1. import java.util.*;
  2. public class Table {
  3. static Scanner console = new Scanner(System.in);
  4.     public static void main (String[] args) 
  5.     {
  6.  
  7.        String list = "010509131741454953572125293337616569737702030406070810111214" +
  8.                      "151618192022232426272830313234353638394042434446474850515254" +
  9.                      "5556585960626364666768707172747576787980818283848586878889909192";
  10.        String number;
  11.        int counter = 0;
  12.        int randomNumber = 0;
  13.        int rowPlacement = 0;
  14.  
  15.  
  16.        Vector row_0 = new Vector();
  17.        Vector row_1 = new Vector();
  18.        Vector row_2 = new Vector();
  19.        Vector row_3 = new Vector();
  20.        Vector row_4 = new Vector();
  21.        Vector row_5 = new Vector();
  22.        Vector row_6 = new Vector();
  23.        Vector row_7 = new Vector();
  24.        Vector row_8 = new Vector();
  25.        Vector row_9 = new Vector(); 
  26.  
  27.        for (counter=0; counter<184; counter = counter + 2)
  28.        {
  29.            number = list.substring(counter, counter + 2);
  30.  
  31.            //-------------------------------------------------------------------          
  32.            if (counter == 10 || counter == 20 || counter == 30 || counter >= 40)
  33.            {
  34.                rowPlacement = 0;
  35.            }
  36.            //-------------------------------------------------------------------
  37.            do
  38.            {
  39.                 randomNumber = (int) ( 10 * Math.random() );   
  40.            }
  41.            while (rowPlacement > randomNumber);
  42.            //-------------------------------------------------------------------
  43.  
  44.            if (randomNumber == 0)
  45.            {
  46.                 row_0.addElement(number);
  47.                 rowPlacement = 0;
  48.            }
  49.  
  50.            else if (randomNumber == 1)
  51.            {
  52.                 row_1.addElement(number);
  53.                 rowPlacement = 1;
  54.            }
  55.  
  56.            else if (randomNumber == 2)
  57.            {
  58.                 row_2.addElement(number);
  59.                 rowPlacement = 2;
  60.            }    
  61.  
  62.            else if (randomNumber == 3)
  63.            {
  64.                 row_3.addElement(number);
  65.                 rowPlacement = 3;
  66.            }
  67.  
  68.            else if (randomNumber == 4)
  69.            {
  70.                 row_4.addElement(number);
  71.                 rowPlacement = 4;
  72.            }
  73.  
  74.            else if (randomNumber == 5)
  75.            {
  76.                 row_5.addElement(number);
  77.                 rowPlacement = 5;
  78.            }
  79.  
  80.            else if (randomNumber == 6)
  81.            {
  82.                 row_6.addElement(number);
  83.                 rowPlacement = 6;
  84.            }
  85.  
  86.            else if (randomNumber == 7)
  87.            {
  88.                 row_7.addElement(number);
  89.                 rowPlacement = 7;
  90.            }
  91.  
  92.            else if (randomNumber == 8)
  93.            {
  94.                 row_8.addElement(number);
  95.                 rowPlacement = 8;
  96.            }
  97.  
  98.            else if (randomNumber == 9)
  99.            {
  100.                 row_9.addElement(number);
  101.                 rowPlacement = 9;
  102.            }
  103.  
  104.         }
  105.         System.out.println(row_0);
  106.         System.out.println(row_1);
  107.         System.out.println(row_2);
  108.         System.out.println(row_3);
  109.         System.out.println(row_4);
  110.         System.out.println(row_5);
  111.         System.out.println(row_6);
  112.         System.out.println(row_7);
  113.         System.out.println(row_8);
  114.         System.out.println(row_9);
  115.      }
  116.   }
  117.  
But it didn't work correctly yet :)
Apr 18 '09 #20

Post your reply

Sign in to post your reply or Sign up for a free account.