1 (edited by thinker 2009-05-07 05:52)

Topic: Enigma

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.

2

Re: Enigma

If it is a true enigma, there is no solution.

Re: Enigma

Hi  MattF,
I put it at Mediafire.com (a file hosting service) name Enigma.xls:
http://www.mediafire.com/?sharekey=12a9 … f6e8ebb871

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);              
                
                row_selection.addElement(randomNumber);
           }
           //-----------------------------------------------------------------------          
           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_0.addElement(number);
                                       }
                                       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_1.addElement(number);
                                       }
                                       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_2.addElement(number);
                                       }
                                       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_3.addElement(number);
                                       }
                                       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_4.addElement(number);
                                       }
                                       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_5.addElement(number);
                                       }
                                       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_6.addElement(number);
                                       }
                                       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_7.addElement(number);
                                       }
                                       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_8.addElement(number);
                                       }
                                       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_9.addElement(number);
                                       }
                                       row_selection.removeElementAt(row_selection.indexOf(counter));
                                       counter2 = counter2 + 2; 
                                       break;
              
                                    }
                                }
                       else{
                   
                   
                   
                   switch (counter)
                   {
                  
                       case 0:
                                       row_0.addElement(number);
                                       row_selection.removeElementAt(row_selection.indexOf(counter));
                                       counter2 = counter2 + 2; 
                                       break;
                   
                       case 1:
                                       row_1.addElement(number);
                                       row_selection.removeElementAt(row_selection.indexOf(counter));
                                       counter2 = counter2 + 2;
                                       break;
                     
                       case 2:
                                       row_2.addElement(number);
                                       row_selection.removeElementAt(row_selection.indexOf(counter));
                                       counter2 = counter2 + 2;
                                       break;
                   
                       case 3: 
                                       row_3.addElement(number);
                                       row_selection.removeElementAt(row_selection.indexOf(counter));
                                       counter2 = counter2 + 2;
                                       break;
                   
                       case 4:
                   
                                      row_4.addElement(number);
                                      row_selection.removeElementAt(row_selection.indexOf(counter));
                                      counter2 = counter2 + 2;
                                      break;
                                      
                       case 5:
                 
                                      row_5.addElement(number);
                                      row_selection.removeElementAt(row_selection.indexOf(counter));
                                      counter2 = counter2 + 2;
                                      break;
                   
                       case 6:
                                      row_6.addElement(number);
                                      row_selection.removeElementAt(row_selection.indexOf(counter));
                                      counter2 = counter2 + 2;
                                      break;
                   
                       case 7:    
                                      row_7.addElement(number);
                                      row_selection.removeElementAt(row_selection.indexOf(counter));
                                      counter2 = counter2 + 2; 
                                      break;
                   
                       case 8:
                   
                       
                                      row_8.addElement(number);
                                      row_selection.removeElementAt(row_selection.indexOf(counter));
                                      counter2 = counter2 + 2;
                                      break;
                   
                       case 9:
                   
                                      row_9.addElement(number);
                                      row_selection.removeElementAt(row_selection.indexOf(counter));
                                      counter2 = counter2 + 2;
                                      break;
                                    }
            }
        }
        else {counter++;}
    
        }
    }
               
           //-----------------------------------------------------------------------
           
         
  
               
     
               
           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(row_5);
           System.out.println(row_6);
           System.out.println(row_7);
           System.out.println(row_8);
           System.out.println(row_9);
           
     
    }
}

Thx.