Did you miss your activation email?

• December 18, 2018, 03:09 PM
• Proudly celebrating 13 years online.
• Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.

Author Topic: Enigma  (Read 3293 times)

thinker

• Participant
• Joined in 2009
• Posts: 4
Enigma
« on: April 29, 2009, 12:57 AM »
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 is almost an infinite amount (with 10^92 possibilities) of tables (Table1, Table 2, Table 3, Table 100, Table 101...), with ten rows (row 0,1,2,......9) in each.
Inside each table is numbers 1 to 92, 93 and 184, 185 to 276, and 277 to 284 with its position lie on their certain rows.
Here I gave the example tables that have been filled in for 40 tables. By finding the patterns/ formulas, my friend asked me to extend the tables to fill in the blank tables 41,42,43,etc as given beneath of Table 40.

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

Thanks.
« Last Edit: May 07, 2009, 12:57 AM by thinker »

mouser

• First Author
• Joined in 2005
• Posts: 39,030
Re: Enigma
« Reply #1 on: May 05, 2009, 09:34 PM »
Welcome to the site thinker.. wish i had a solution for you but excel is not one of my skills.

thinker

• Participant
• Joined in 2009
• Posts: 4
Re: Enigma
« Reply #2 on: May 06, 2009, 12:43 AM »
Hi mouser, thx for welcoming me here...
Perhaps you can see the file at Mediafire.com (a file hosting service) name Enigma.xls:
http://www.mediafire...b7ace04e75f6e8ebb871

Someone has made a program in java like this:
import java.util.*;
public class Table {
static Scanner console = new Scanner(System.in);
public static void main (String[] args)
{

String list = "010509131721252933374145495357616569737702030406070810111214" +
"151618192022232426272830313234353638394042434446474850515254" +
"5556585960626364666768707172747576787980818283848586878889909192";
String number;

int counter = 0;
int counter2 = 0;
int randomNumber = 0;
Vector row_selection = new Vector();

Vector row_0 = new Vector();
Vector row_1 = new Vector();
Vector row_2 = new Vector();
Vector row_3 = new Vector();
Vector row_4 = new Vector();
Vector row_5 = new Vector();
Vector row_6 = new Vector();
Vector row_7 = new Vector();
Vector row_8 = new Vector();
Vector row_9 = new Vector();

for (counter2=0; counter2<40;)
{
//-----------------------------------------------------------------------
for (counter=0; counter<10; counter++)
{
do{randomNumber = (int) (10 * Math.random());}
while(randomNumber == 10);

}
//-----------------------------------------------------------------------
for (counter=0; counter<10;)
{
number = list.substring(counter2, counter2 + 2);

if (row_selection.indexOf(counter) != -1)
{
if (counter2 >= 20 && counter2 <30)
{
switch (counter)
{

case 0:
if(row_0.indexOf("21",0) != -1)
{
row_0.insertElementAt(number, (row_0.indexOf("21",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 1:
if(row_1.indexOf("21",0) != -1)
{
row_1.insertElementAt(number, (row_1.indexOf("21",0)));
}
else if (row_1.indexOf("25",0) != -1)
{
row_1.insertElementAt(number, (row_1.indexOf("25",0)));
}
else if (row_1.indexOf("29",0) != -1)
{
row_1.insertElementAt(number, (row_1.indexOf("29",0)));
}
else if (row_1.indexOf("33",0) != -1)
{
row_1.insertElementAt(number, (row_1.indexOf("33",0)));
}
else if (row_1.indexOf("37",0) != -1)
{
row_1.insertElementAt(number, (row_1.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 2:
if(row_2.indexOf("21",0) != -1)
{
row_2.insertElementAt(number, (row_2.indexOf("21",0)));
}
else if (row_2.indexOf("25",0) != -1)
{
row_2.insertElementAt(number, (row_2.indexOf("25",0)));
}
else if (row_2.indexOf("29",0) != -1)
{
row_2.insertElementAt(number, (row_2.indexOf("29",0)));
}
else if (row_2.indexOf("33",0) != -1)
{
row_2.insertElementAt(number, (row_2.indexOf("33",0)));
}
else if (row_2.indexOf("37",0) != -1)
{
row_2.insertElementAt(number, (row_2.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 3:
if(row_3.indexOf("21",0) != -1)
{
row_3.insertElementAt(number, (row_3.indexOf("21",0)));
}
else if (row_3.indexOf("25",0) != -1)
{
row_3.insertElementAt(number, (row_3.indexOf("25",0)));
}
else if (row_3.indexOf("29",0) != -1)
{
row_3.insertElementAt(number, (row_3.indexOf("29",0)));
}
else if (row_3.indexOf("33",0) != -1)
{
row_3.insertElementAt(number, (row_3.indexOf("33",0)));
}
else if (row_3.indexOf("37",0) != -1)
{
row_3.insertElementAt(number, (row_3.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 4:
if(row_4.indexOf("21",0) != -1)
{
row_4.insertElementAt(number, (row_4.indexOf("21",0)));
}
else if (row_4.indexOf("25",0) != -1)
{
row_4.insertElementAt(number, (row_4.indexOf("25",0)));
}
else if (row_4.indexOf("29",0) != -1)
{
row_4.insertElementAt(number, (row_4.indexOf("29",0)));
}
else if (row_4.indexOf("33",0) != -1)
{
row_4.insertElementAt(number, (row_4.indexOf("33",0)));
}
else if (row_4.indexOf("37",0) != -1)
{
row_4.insertElementAt(number, (row_4.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;
case 5:

if(row_5.indexOf("21",0) != -1)
{
row_5.insertElementAt(number, (row_5.indexOf("21",0)));
}
else if (row_5.indexOf("25",0) != -1)
{
row_5.insertElementAt(number, (row_5.indexOf("25",0)));
}
else if (row_5.indexOf("29",0) != -1)
{
row_5.insertElementAt(number, (row_5.indexOf("29",0)));
}
else if (row_5.indexOf("33",0) != -1)
{
row_5.insertElementAt(number, (row_5.indexOf("33",0)));
}
else if (row_5.indexOf("37",0) != -1)
{
row_5.insertElementAt(number, (row_5.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 6:
if(row_6.indexOf("21",0) != -1)
{
row_6.insertElementAt(number, (row_1.indexOf("21",0)));
}
else if (row_6.indexOf("25",0) != -1)
{
row_6.insertElementAt(number, (row_6.indexOf("25",0)));
}
else if (row_6.indexOf("29",0) != -1)
{
row_6.insertElementAt(number, (row_6.indexOf("29",0)));
}
else if (row_6.indexOf("33",0) != -1)
{
row_6.insertElementAt(number, (row_6.indexOf("33",0)));
}
else if (row_6.indexOf("37",0) != -1)
{
row_6.insertElementAt(number, (row_6.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 7:
if(row_7.indexOf("21",0) != -1)
{
row_7.insertElementAt(number, (row_7.indexOf("21",0)));
}
else if (row_7.indexOf("25",0) != -1)
{
row_7.insertElementAt(number, (row_7.indexOf("25",0)));
}
else if (row_7.indexOf("29",0) != -1)
{
row_7.insertElementAt(number, (row_7.indexOf("29",0)));
}
else if (row_7.indexOf("33",0) != -1)
{
row_7.insertElementAt(number, (row_7.indexOf("33",0)));
}
else if (row_7.indexOf("37",0) != -1)
{
row_7.insertElementAt(number, (row_7.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 8:

if(row_8.indexOf("21",0) != -1)
{
row_8.insertElementAt(number, (row_8.indexOf("21",0)));
}
else if (row_8.indexOf("25",0) != -1)
{
row_8.insertElementAt(number, (row_8.indexOf("25",0)));
}
else if (row_8.indexOf("29",0) != -1)
{
row_8.insertElementAt(number, (row_8.indexOf("29",0)));
}
else if (row_8.indexOf("33",0) != -1)
{
row_8.insertElementAt(number, (row_8.indexOf("33",0)));
}
else if (row_8.indexOf("37",0) != -1)
{
row_8.insertElementAt(number, (row_8.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 9:
if(row_9.indexOf("21",0) != -1)
{
row_9.insertElementAt(number, (row_9.indexOf("21",0)));
}
else if (row_9.indexOf("25",0) != -1)
{
row_9.insertElementAt(number, (row_9.indexOf("25",0)));
}
else if (row_9.indexOf("29",0) != -1)
{
row_9.insertElementAt(number, (row_9.indexOf("29",0)));
}
else if (row_9.indexOf("33",0) != -1)
{
row_9.insertElementAt(number, (row_9.indexOf("33",0)));
}
else if (row_9.indexOf("37",0) != -1)
{
row_9.insertElementAt(number, (row_9.indexOf("37",0)));
}
else
{
}
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

}
}
else{

switch (counter)
{

case 0:
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 1:
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 2:
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 3:
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 4:

row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 5:

row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 6:
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 7:
row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 8:

row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;

case 9:

row_selection.removeElementAt(row_selection.indexOf(counter));
counter2 = counter2 + 2;
break;
}
}
}
else {counter++;}

}
}

//-----------------------------------------------------------------------

System.out.println(" 1   2   3   4   5   6   7   8   9   10  11  12  13  14  15  16  17  18  19  20");
System.out.println("-------------------------------------------------------------------------------");
System.out.println(row_0);
System.out.println(row_1);
System.out.println(row_2);
System.out.println(row_3);
System.out.println(row_4);
System.out.println("-------------------------------------------------------------------------------");
System.out.println(row_5);
System.out.println(row_6);
System.out.println(row_7);
System.out.println(row_8);
System.out.println(row_9);

}
}

lanux128

• Global Moderator
• Joined in 2005
• Posts: 6,260
Re: Enigma
« Reply #3 on: May 06, 2009, 07:28 AM »
i'm not an expert in Excel so i normally rely on ASAP Utilities to do the legwork for me.. maybe it can be of help to you as well..

thinker

• Participant
• Joined in 2009
• Posts: 4
Re: Enigma
« Reply #4 on: May 07, 2009, 01:01 AM »
Thx lanux128,
I'll see it later.

AndyM

• Charter Member
• Joined in 2006
• Posts: 616
Re: Enigma
« Reply #5 on: May 07, 2009, 01:11 AM »
Not sure if I understand the problem/task.

Are you trying to create more tables based on the pattern established in the first n tables?

thinker

• Participant
• Joined in 2009
• Posts: 4
Re: Enigma
« Reply #6 on: May 07, 2009, 06:27 AM »
Are you trying to create more tables based on the pattern established in the first n tables?
-AndyM
Yes AndyM.
For further clues perhaps you can see the same thread HERE.
Thx.
« Last Edit: May 07, 2009, 06:29 AM by thinker »