thinker Posted April 5, 2009 Report Posted April 5, 2009 May this thread fits on this section. A friend of mine gave me this enigma. It is written in Excel format. Since here I can’t attach .xls file, I don't know how to put the file, name Enigma.xls. There are infinite amount of tables (Table 1, Table 2, Table 3,…, Table 100, Table 101, etc), 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 lying 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. Just like SUDOKU, in each tables there will be no same numbers vertically, horizontally and diagonally. If these tables are using permutations from an ideal table that you can see beneath Table 43 (supposed the ideal table was right), then how to find the formulas of its permutations?Can somebody help me about this?Thx.Hope my English is good enough for explaining this. Quote
sanctus Posted April 6, 2009 Report Posted April 6, 2009 Isn't it just that the first table goes from 1 to 92, second table from 1*92+1 to 2*92, third from2*92+1 to 3*92+1, etc? Hence table 40 would go from 39*92+1 till 40*92? And so on? That is at least how I understand your post. Quote
CraigD Posted April 6, 2009 Report Posted April 6, 2009 Welcome to hypography, thinker! Since here I can’t attach .xls file, I don't know how to put the file, name Enigma.xls. For small spreadsheets without formulae you can just select all, copy, and paste it into a post. The allignment may be less pretty than in Excel, but this should allow you to post a couple examples of what you’re describing, thinker. I’m not getting a clear enough picture of what you’re describing from your post to try guessing, so can’t consider your question. Quote
thinker Posted April 7, 2009 Author Report Posted April 7, 2009 Hi sanctus & CraigD,Perhaps you guys better see the file first. I put it at Mediafire.com (a file hosting service) name Enigma.xls, but I can't put the link until I make 10 posts here. I PM you the link guys.Thx. Quote
sanctus Posted April 7, 2009 Report Posted April 7, 2009 Here is the link you are not allowed yet to post:enigma.xls Quote
thinker Posted April 8, 2009 Author Report Posted April 8, 2009 Thx sanctus, but looks like it doesn't work. That's why I gave you another complete sharekey number that didn't cut yet. (You better open the link first, then copy-paste the address from its website).Thx. Quote
sanctus Posted April 8, 2009 Report Posted April 8, 2009 Ok, let's see if this link works.enigmaticlink Quote
CraigD Posted April 8, 2009 Report Posted April 8, 2009 Here's thinker's file as an attachment. I don’t know the rules of the puzzle, however. Thinker, is there a webpage somewhere that tells how to play? Or can you give instructions? Quote
thinker Posted April 8, 2009 Author Report Posted April 8, 2009 Hi guys,It works already.May this explanation make the problems become more clearly. Since numbers 93-184 and 185-276 look similar to numbers 1-92, then I subtracted 92 from numbers 93-184 (as tables on hidden columns AE-AX) and subtracted 184 from numbers 185-276 (as tables on hidden columns BZ-CT).Although this thread has been posted everywhere, but nobody can answer it yet. It’s very tough indeed. Numbers at the right side of each tables are total amount of numbers of each rows, it isn’t total SUM of numbers of each rows. Tables 1 and 4 both have the number 5 in cell {2,2}. Many others same thing happen as if there’s no connection from Table 1 to Table 2 (or other tables). So far I can recognize only patterns of the red & blue numbers as I described on Note: beneath Table 43: The red numbers (1,5,9,13,17,41,45,49,53,57) never touch row 9, as the blue numbers (21,25,29,33,37,61,65,69,73,77) never touch row 0 (but it occurs on Table 9).Number 1 will never be in the below row of number 5, number 5 will never be in the below row of number 9, number 9 will never be in the below row of number 13, number 13 will never be in the below row of number 17.Number 41 will never be in the below row of number 45, number 45 will never be in the below row of number 49, number 49 will never be in the below row of number 53, number 53 will never be in the below row of number 57.Number 21 will never be in the below row of number 25, number 25 will never be in the below row of number 29, number 29 will never be in the below row of number 33, number 33 will never be in the below row of number 37.Number 61 will never be in the below row of number 65, number 65 will never be in the below row of number 69, number 69 will never be in the below row of number 73, number 73 will never be in the below row of number 77. But these do not happen to black & green numbers.And there’s like an ANOMALY on Table 9. Number 17 touches row 9, which on other tables number 17 is maximum touch row 8. Numbers 113,117,153 touch row 0, where they usually supposed not to be there. Then I temporary concluded, perhaps an ideal table could be like this? 0 1 41 81 2 42 82 3 43 83 4 44 841 5 45 85 6 46 86 7 47 87 8 48 882 9 49 89 10 50 90 11 51 91 12 52 923 13 53 14 54 15 55 16 564 17 57 18 58 19 59 20 605 21 61 22 62 23 63 24 646 25 65 26 66 27 67 28 687 29 69 30 70 31 71 32 728 33 73 34 74 35 75 36 769 37 77 38 78 39 79 40 80 So many numbers in one row have difference = 4 (as numbers in circles/ovals). Besides, 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. Now how to scramble numbers to result like that..??Thx. Quote
phillip1882 Posted April 8, 2009 Report Posted April 8, 2009 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 1317 21 25 29 33 37then going down the list, randomly place a number on any row above it up to the previous number. 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. 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. Quote
thinker Posted April 9, 2009 Author Report Posted April 9, 2009 Thx phillip1882,I'll try it later. Quote
thinker Posted April 11, 2009 Author Report Posted April 11, 2009 Dear phillip1882,I didn't try yet your codes, but someone gave comments like this: i dont think he has those numbers right. they should be: 15913174145495357212529333761656973772346781011... i also dont think they are filled in randomly into the rows using a random number generator. for example, theres an obvious restriction on the number 1 to be in either row 0 or 1. for 70% of the 1's to land in the same row (out of 10 rows and 40 trys) if they are distributed randomly is astronomical. also, 11/12 times the 1 has been on row 1, the number 41 was placed above it. once again this seems to violate odds of a random distribution. im more inclined for this reason to say theres some sort of pattern behind the distribution of the numbers into rows. What do you think?Thx. Quote
thinker Posted April 18, 2009 Author Report Posted April 18, 2009 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 = "010509131741454953572125293337616569737702030406070810111214" + "151618192022232426272830313234353638394042434446474850515254" + "5556585960626364666768707172747576787980818283848586878889909192"; String number; int counter = 0; int randomNumber = 0; int rowPlacement = 0; 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 (counter=0; counter<184; counter = counter + 2) { number = list.substring(counter, counter + 2); //------------------------------------------------------------------- if (counter == 10 || counter == 20 || counter == 30 || counter >= 40) { rowPlacement = 0; } //------------------------------------------------------------------- do { randomNumber = (int) ( 10 * Math.random() ); } while (rowPlacement > randomNumber); //------------------------------------------------------------------- if (randomNumber == 0) { row_0.addElement(number); rowPlacement = 0; } else if (randomNumber == 1) { row_1.addElement(number); rowPlacement = 1; } else if (randomNumber == 2) { row_2.addElement(number); rowPlacement = 2; } else if (randomNumber == 3) { row_3.addElement(number); rowPlacement = 3; } else if (randomNumber == 4) { row_4.addElement(number); rowPlacement = 4; } else if (randomNumber == 5) { row_5.addElement(number); rowPlacement = 5; } else if (randomNumber == 6) { row_6.addElement(number); rowPlacement = 6; } else if (randomNumber == 7) { row_7.addElement(number); rowPlacement = 7; } else if (randomNumber == 8) { row_8.addElement(number); rowPlacement = 8; } else if (randomNumber == 9) { row_9.addElement(number); rowPlacement = 9; } } 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); } } But it didn't work correctly yet :) Quote
phillip1882 Posted April 18, 2009 Report Posted April 18, 2009 "theres an obvious restriction on the number 1 to be in either row 0 or 1. for 70% of the 1's to land in the same row (out of 10 rows and 40 trys) if they are distributed randomly is astronomical. also, 11/12 times the 1 has been on row 1, the number 41 was placed above it. once again this seems to violate odds of a random distribution." well even with my random distribution those restrictions would relatively apply. there is only a 50% chance of 5 being on the same row as 1, and less than 18% chance of 9 being on the same row as 1 and 5, therefore the chances of 1 being below row 1 is less than 5%. also 41 is the beginning of a new group, so it too is highly unlikely to be below row 1. here specifically is my code. 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] and here is an example output.[1, 5, 41, 45, 49, 2, 42, 3, 7, 43, 47, 4, 8][6, 46, 50, 11, 12, 44, 48][9, 10, 54, 16][13, 53, 14, 18, 15, 51, 55, 52, 56, 60, 64][17, 57, 61, 65, 58, 19, 23, 59, 20, 68][21, 22, 26, 30, 63, 24, 28][25, 62, 66, 27, 32, 36, 40][29, 69, 73, 77, 31, 67, 71, 75, 72][33, 34, 70, 74, 35, 76][37, 38, 78, 39, 79, 80]note i didn't include 81-92 as i'm not entirely sure how these numbers work. Quote
thinker Posted April 19, 2009 Author Report Posted April 19, 2009 You must have seen the other forum :) As I said, honestly, I’m so poor in computer & programming. I’ve just started learning Java. I’ve applied your source code there, but I don’t know why it didn’t work..?? :QuestionMSo I can’t try other results from the code. By inspecting your result, I have to say that the black & green numbers below (as on 'ideal table') spread almost into all rows (looks?) randomly, not almost consecutively going down from row 0 like your result. 1 41 81 2 42 82 3 43 83 4 44 845 45 85 6 46 86 7 47 87 8 48 889 49 89 10 50 90 11 51 91 12 52 9213 53 14 54 15 55 16 56 17 57 18 58 19 59 20 60 21 61 22 62 23 63 24 64 25 65 26 66 27 67 28 68 29 69 30 70 31 71 32 72 33 73 34 74 35 75 36 76 37 77 38 78 39 79 40 80 But I think I agree with you that 41 is the beginning of a new group, and I also feel 81-92 have another pattern... Thx phillip1882. Quote
phillip1882 Posted April 19, 2009 Report Posted April 19, 2009 my code is python, i find it much easier to manipulate arrays in that language. visit python.org for instructions on how to run python code. Quote
thinker Posted April 19, 2009 Author Report Posted April 19, 2009 Ok, I'll take a look it later. Can python read Excel file? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.