473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How To Find The Formula of This Permutations?

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
19 4683
JosAH
11,448 Expert 8TB
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
fera
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
2,057 Expert 2GB
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
fera
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
JosAH
11,448 Expert 8TB
@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
fera
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
JosAH
11,448 Expert 8TB
@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
fera
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
JosAH
11,448 Expert 8TB
@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
fera
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
2,057 Expert 2GB
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
fera
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
2,057 Expert 2GB
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
fera
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
JosAH
11,448 Expert 8TB
@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
fera
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
2,057 Expert 2GB
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
fera
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
fera
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

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

Similar topics

10
by: Steve Goldman | last post by:
Hi, I am trying to come up with a way to develop all n-length permutations of a given list of values. The short function below seems to work, but I can't help thinking there's a better way. ...
2
by: Alex Vinokur | last post by:
Does STL contain algorithms which generate (enable to generate) exponents, permutations, arrangements, and combinations for any numbers and words? -- Alex Vinokur mailto:alexvn@connect.to...
2
by: Gunnar G | last post by:
Hello. Given vector<double> x; where I have no knowledge of the size of x at compile time, how can I write code that will give me all the possible permutations of the elements in the vector x? ...
13
by: mike | last post by:
I have ListArray with number in Eg: 1, 1.456, 2.43, 4, 6.78 next i have a decimal variable containing one number EG: 1.786 Could someone please tell me how i find the "closest match" number...
10
by: greatprovider | last post by:
i'm starting with a string such as "Na**3C**6H**5O**7*2H**20" im attempting to match all **\d+ ...once i can match all the double asterix \d i intend to wrap the \d in "<sub>" tags for display...
17
by: anurag | last post by:
hey can anyone help me in writing a code in c (function) that prints all permutations of a string.please help
7
by: Christian Meesters | last post by:
Hi, I'd like to hack a function which returns all possible permutations as lists (or tuples) of two from a given list. So far, I came up with this solution, but it turned out to be too slow for...
3
by: shihaoran | last post by:
I need help with a classabout arraylist. Please Help. 1. Write a program that produces random permutations of the numbers 1 to 10. (Note: “Permutation” is a mathematical name for an...
82
by: Bill Cunningham | last post by:
I don't know if I'll need pointers for this or not. I wants numbers 10^16. Like a credit card 16 digits of possible 10 numbers, so I guess that would be 10^16. So I have int num ; These are of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.