The Grey Labyrinth is a collection of puzzles, riddles, mind games, paradoxes and other intellectually challenging diversions. Related topics: puzzle games, logic puzzles, lateral thinking puzzles, philosophy, mind benders, brain teasers, word problems, conundrums, 3d puzzles, spatial reasoning, intelligence tests, mathematical diversions, paradoxes, physics problems, reasoning, math, science.

   
The Grey Labyrinth Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups    RegisterRegister  
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Coloured Tiles
Goto page Previous  1, 2
 
Reply to topic    The Grey Labyrinth Forum Index -> Grey Labyrinth Puzzles
View previous topic :: View next topic  
Author Message
jims
Icarian Member



PostPosted: Wed Jun 02, 2004 6:12 pm    Post subject: 41 Reply with quote

Okay, I concur, the correct answer is day 332239 if you make the following assumptions:
- You must use all the tiles in the patterns when it is possible
- The tiles must be in rectangles with yellow NxM and red (N+1)x(M+1)
- Only two levels are allowed
- The priest can arrange tiles very fast *nudge*
Back to top
View user's profile Send private message
hellmanap
Icarian Member



PostPosted: Thu Jun 03, 2004 1:50 pm    Post subject: 42 Reply with quote

If a = a side of the YELLOW rectangle, and N = the number of days then:

N = (999,999-a)*a/(8+3a) The question is then: For what values of a is N an integer? I get the same 13 solutions as in my post above. Since there less than a couple of thousand values of a to test, you COULD given time, test all of them using only pencil & paper. In fact, using stone tablets you colud hammer out a solution within a lifetime.

[This message has been edited by hellmanap (edited 06-03-2004 10:09 AM).]
Back to top
View user's profile Send private message Send e-mail AIM Address
ohtochooseaname
Icarian Member



PostPosted: Fri Jun 04, 2004 6:28 pm    Post subject: 43 Reply with quote

The world will never end. Red is not the only set of tiles that can represent a larger rectangle....yellow, when it gets big enough, can as well. Ever single day does not have a set of tiles that can represent the proper arrangement, but a future one does, and always will. The only way for there to be an end in which this pattern cannot be completed any more is when Y=2(R+1), which is not possible because as they go to infinity, Y=8/5, which is not the greater than 2 that is required for the arrangement to be at its maximum. Essentially, Yellow will never get large enough to outstrip red far enough that the arrangement will never be made again, and the world will last forever. However, if yellow must be the inner rectangle, then the world ends on day 3, because that is the very last day that red will ever be large enough for the arrangement to last: in all of the subsequent days, red is less than 2(Y+1), and thus can never be placed in that arrangement again.
Back to top
View user's profile Send private message
smich011
Icarian Member



PostPosted: Fri Jun 04, 2004 6:46 pm    Post subject: 44 Reply with quote

There are two rectangles, the yellow one being one tile shorter in both dimensions

This shows that no stacking is allowed.
It also shows that all tiles don't have to be used since only .0036% of the red tiles are used (36/1,000,015).

I checked my solution again and thought that god's statement, depending on emphasis and what the correct answer is, could lead to a trick question solution. In his last statement he says: You will be able to make similar patterns to this one as you receive more tiles. The world will end on the last day you have opportunity to do this.

The world ends on the day the priest dies.
Back to top
View user's profile Send private message Send e-mail
smich011
Icarian Member



PostPosted: Fri Jun 04, 2004 6:47 pm    Post subject: 45 Reply with quote

There are two rectangles, the yellow one being one tile shorter in both dimensions.

This also shows yellow has to be smaller.
Back to top
View user's profile Send private message Send e-mail
S A P
Guest



PostPosted: Sun Jun 06, 2004 1:12 am    Post subject: 46 Reply with quote

solve (1E6+5x)- 2sqrt(1E6+5x)-8x = 0 for X = days = 332246 (assume red square as solution, subtract length of sides, when yellow exceeds, then *whimper*)
Back to top
hellmanap
Icarian Member



PostPosted: Mon Jun 07, 2004 2:24 pm    Post subject: 47 Reply with quote

Ohtochooseaname’s is interesting. If we let the yellow rectangle be the larger rectangle then there is an easy solution. We know that a smaller red rectangle cannot be something * 1 because on day 1, the red rectangle would be 1,000,005 * 1 and the yellow rectangle would be 4 * 2. Each day, the red rectangle would get 5 tiles longer, and the yellow would get only 4 longer so it would never catch up. But, if the red rectangle were 2 * (1,000,000+5N)/2, then the yellow would be 3 * [(1,000,000+5N)/2 +1] = 3 * (1,000,002+5N)/2 = (3,000,006+15N)/2

Since this number represents the number of yellow tiles, it equals 8N so

(3,000,006+15N)/2 = 8N
3,000,006+15N = 16N
N= 3,000,006 or a little over 8,219 years.


I vote for letting yellow being the larger rectangle
Back to top
View user's profile Send private message Send e-mail AIM Address
Deathstream
Daedalian Member



PostPosted: Mon Jun 07, 2004 6:35 pm    Post subject: 48 Reply with quote

this isn't a democracy!
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Speeder
Icarian Member



PostPosted: Wed Jun 09, 2004 3:45 pm    Post subject: 49 Reply with quote

Just got back from holiday to find a new puzzle that has already been solved!

I agree with kevinatilusa that the answer is (332239 days)

I must admit I wrote some code to calculate this rather than use a more elegant solution.

I would just like to add that the priest might have felt pretty worried round about day (321715 (red=75*34781)) (if he hadn't already died of old age several centuries before.)

I wonder how many times it was possible to create the pattern from day one to the last day?

Speeder.



[This message has been edited by Speeder (edited 06-09-2004 11:46 AM).]
Back to top
View user's profile Send private message
mathgrant
A very tilted cell member



PostPosted: Wed Jun 09, 2004 3:48 pm    Post subject: 50 Reply with quote

I have a list of all §....thirteen....§ days.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Speeder
Icarian Member



PostPosted: Wed Jun 09, 2004 4:30 pm    Post subject: 51 Reply with quote

Excellent mathgrant, did you generate them with code or a snazzy piece of maths wizardry?
Back to top
View user's profile Send private message
mathgrant
A very tilted cell member



PostPosted: Wed Jun 09, 2004 8:08 pm    Post subject: 52 Reply with quote

Um. . . both?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
JToomey
Daedalian Member



PostPosted: Thu Jun 10, 2004 4:39 pm    Post subject: 53 Reply with quote

I'm just chiming in to say that, as usual, I am astounded by the simplicity of kevinatilusa's solution. That is all.



------------------
The Big, Stupid Puzzle:
http://www.yark.org/puzzle
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Speeder
Icarian Member



PostPosted: Thu Jun 10, 2004 4:43 pm    Post subject: 54 Reply with quote

What is the concensus on whether a pattern containing (x+1)*(y+1) yellow and x*y red is still a 'similar' enough pattern? (i.e when the yellows exceed the reds.)

I would imagine this pattern only occurs once. But when?

Edit: I've just calculated #336928 days# for this scenario.
Then I go and get #339183 days# so that's my 'occurs once' theory out the window.

Speeder.



[This message has been edited by Speeder (edited 06-10-2004 12:52 PM).]
Back to top
View user's profile Send private message
jims
Icarian Member



PostPosted: Thu Jun 10, 2004 4:52 pm    Post subject: 55 Reply with quote

The following table shows the dimensions, the day number, and the number of tiles (red and yellow):

code:


Yellow Rectangle
Dimensions
N M day N_yellow N_red
--------x-------- -------- -------- --------
1454 1828 332239 2657912 2661195
580 4574 331615 2652920 2658075
455 5824 331240 2649920 2656200
304 8693 330334 2642672 2651670
143 18304 327184 2617472 2635920
124 21050 326275 2610200 2631375
74 34780 321715 2573720 2608575
48 52629 315774 2526192 2578870
29 84208 305254 2442032 2526270
28 86954 304339 2434712 2521695
10 210524 263155 2105240 2315775
5 347824 217390 1739120 2086950
4 399998 199999 1599992 1999995



I have a quick little script that does it all in a second or two.

Jimbo
Back to top
View user's profile Send private message
Speeder
Icarian Member



PostPosted: Thu Jun 10, 2004 5:00 pm    Post subject: 56 Reply with quote

Hey Jims, I'd like to see your code.

What do you get for the 'yellow exceeding the red' version I mentioned in my previous post?

Speeder.
Back to top
View user's profile Send private message
dsghgf
Guest



PostPosted: Fri Jun 11, 2004 2:43 pm    Post subject: 57 Reply with quote

ummm... just to ask didnt god say in the riddle that the presit could not make that pattern until three days went by. therefore tomorrow he could not make the design therefore the world would end. may that be right? i dont know but its a thought i dont think you need to use that much math and stuff to figure that out. he cant make it on the first day.
Back to top
dsghgf
Guest



PostPosted: Fri Jun 11, 2004 2:46 pm    Post subject: 58 Reply with quote

Oh btw did anyone notice there are green tiles in the picture???
Back to top
jims
Icarian Member



PostPosted: Fri Jun 11, 2004 3:32 pm    Post subject: 59 Reply with quote

Speeder, this is a Linux script that does it about as quickly as I know how. The line numbers are just there for reference. This ought to work on any Unix/Linux box.

code:


1 #!/bin/tcsh
2 @ N_max = 1630
3 @ N = $N_max
4 printf "Yellow Rectangle\n"
5 printf " Dimensions\n"
6 printf " N M day N_yellow N_red \n"
7 printf "--------x-------- -------- -------- --------\n"
8 while ( $N > 0 )
9 @ M = ( -8 * ( $N - 999999 ) ) / ( 3 * $N + 8 )
10 if ( ( 5 * $N * $M ) == ( 8 * ( ( $N + 1) * ( $M + 1 ) - 1000000 ) ) ) then
11 @ d = ( $N * $M ) / 8
12 @ Ny = $N * $M
13 @ Nr = ( $N + 1 ) * ( $M + 1 )
14 printf "%8d %-8d %-8d %8d %8d\n" $N $M $d $Ny $Nr
15 endif
16 @ N--
17 end



Comments about the code:
I did a little math beforehand to find the limit (1630 on line 2) for N and the equations needed to satisfy the requirements of the puzzle. Also note that the divisions on lines 9 and 11 are integer divisions, no floating point numbers are used at all (TCSH scripts don't allow any floating point calculations).

[This message has been edited by jims (edited 06-11-2004 11:35 AM).]
Back to top
View user's profile Send private message
jims
Icarian Member



PostPosted: Fri Jun 11, 2004 7:05 pm    Post subject: 60 Reply with quote

If the yellow rectangle can be the larger (which does not appear to be allowed), there are 16 days when that occurs which are given in the table below. Note that the last case where N=1 gives negative values for everything else. It is simply an impossible case because of the ratio or yellow to red tiles. The other 16 are valid and the answer would be the largest value under "day" = 3000006 days.

code:


Red Rectangle
Dimensions
N M day Nyellow Nred
----------x---------- -------- -------- --------
1167 2290 334486 2675888 2672430
917 2915 334611 2676888 2673055
730 3663 334798 2678384 2673990
293 9155 336483 2691864 2682415
255 10528 336928 2695424 2684640
155 17393 339183 2713464 2695915
65 42107 347391 2779128 2736955
63 43480 347848 2782784 2739240
40 69567 356536 2852288 2782680
27 105265 368431 2947448 2842155
17 173915 391311 3130488 2956555
15 200002 400006 3200048 3000030
8 421055 473688 3789504 3368440
5 800003 600003 4800024 4000015
3 2000005 1000003 8000024 6000015
2 8000015 3000006 24000048 16000030
1 -4000005 -1000001 -8000008 -4000005



This is the script that generated the table (again line numbers are for reference only, they should be taken out if you try running the code).
code:


1 #!/bin/tcsh
2 @ N_max = 1634
3 @ N = $N_max
4 printf " Red Rectangle\n"
5 printf " Dimensions\n"
6 printf " N M day Nyellow Nred \n"
7 printf "----------x---------- -------- -------- --------\n"
8 while ( $N > 0 )
9 @ M = ( 5 * $N + 8000005 ) / ( 3 * $N - 5 )
10 if ( ( 8 * ( $N * $M - 1000000) ) == ( 5 * ( $N + 1) * ( $M + 1 ) ) ) then
11 @ d = ( ( $N + 1 ) * ( $M + 1 ) ) / 8
12 @ Nr = $N * $M
13 @ Ny = ( $N + 1 ) * ( $M + 1 )
14 printf "%10d %-10d %-8d %8d %8d\n" $N $M $d $Ny $Nr
15 endif
16 @ N--
17 end

Back to top
View user's profile Send private message
Speeder
Icarian Member



PostPosted: Mon Jun 14, 2004 10:51 am    Post subject: 61 Reply with quote

Interesting code Jim. Much better than my convoluted method.

Speeder.
Back to top
View user's profile Send private message
O.T.Kaverappa
Icarian Member



PostPosted: Thu Jun 17, 2004 1:08 pm    Post subject: 62 Reply with quote

Here is the solution to the 'Colored Tiles' Puzzle. The world will come to an end after 250007 days.

On day no. 250007,
number of yellow tiles = 2000056
number of red tiles = 2250035
The best way to arrange 2000056 yellow tiles in the form of a rectangle involves the dimensions 8 and 250007.
Thus, number of red tiles required to make the desired pattern is (8+1)*(250007+1)= 2250072, which is less than the number of red tiles the priest has.

How I found the solution:

After 'm' days,
number of yellow tiles = 8*m
number of red tiles = 5*m + 1000000

The best way to arrange the yellow tiles so that the number of red tiles is minimum, involves arranging the yellow tiles in the form of a square of side sqrt(8*m). (sqrt(8*m) is in general a real number. But let us allow real numbers at this stage.)
The number of red tiles required is, therefore (sqrt(8*m)+1)^2
When we do not have enough red tiles, the world comes to an end. i.e., we must find 'm' such that
5*m + 1000000 < (sqrt(8*m)+1)^2

Solving this we get m=332247

But we have allowed sqrt(8*m) to be a real number and hence from the above discussion, we can conclude that the actual solution is <= 332247.

Then I wrote a C program to check every number between 1 to 332246 to be a solution. This exercise provided the final correct answer 250007. Here is the code I wrote, which I hope is self-explanatory.

code:


for(i=1;i<=332247;i++)
{
yellow=8*i;
red=5*i+1000000;
j=floor(sqrt(yellow));
for(j;j>=2;j--)
{
if(yellow%j==0)
break;
}
required=(j+1)*((yellow/j)+1);
if(required>red)
{
printf("%lu",i); // i is the solution.
break;
}
}




[merc: code tags]

[This message has been edited by Mercuria (edited 06-19-2004 04:47 PM).]
Back to top
View user's profile Send private message Send e-mail
lostdummy
Daedalian Member



PostPosted: Thu Jun 17, 2004 3:32 pm    Post subject: 63 Reply with quote

well, even after reading solution to "Coloured Tiles" puzzle, I still think that we may prolong our days a bit and make "end of world" few days later.

Key point is in puzzle text where you need to "make similar patterns" to one shown in picture. Well, similar pattern is also one where yellow tiles surround red tiles, ie where yellow is on the outside.

That gives ground for more solutions, for example:

End of world after 334798 days, when we will have 3664x731 yellow tiles and 3663x730 red tiles

As you can see, that would give us over 7 years more to live
Back to top
View user's profile Send private message
ralphmerridew
Daedalian Member



PostPosted: Fri Jun 18, 2004 2:33 am    Post subject: 64 Reply with quote

Problem: Show, without using a calculator, that 2*2*2*3*5*19*23*1373 != 24000040
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
pokerfaced
Daedalian Member



PostPosted: Fri Jun 18, 2004 2:46 am    Post subject: 65 Reply with quote

lol

The right hand side should be divisible by 3.

2+4+4+5(0) = 10

10 is not divisible by 3, so neither is 24,000,040.

Yay, I got one

Note: Remove the factors of three, and the solution is correct.
(3x+5) = 2*2*1373
(3y+5) = 2*5*19*23
Back to top
View user's profile Send private message Visit poster's website
BlackiePas
Guest



PostPosted: Fri Jun 25, 2004 11:29 pm    Post subject: 66 Reply with quote

kevinatilusa wrote:
A solution requiring only a calculator (or pencil, paper, and accuracy I cannot match):
<FONT COLOR="<!!BGCOLOR!!>">
After t days we have 1000000+5t red tiles and 8t yellow tiles. If our rectangle for the red tiles is x by y, we must have

x*y=1000000+5t
(x-1)(y-1)=8t.

Multipling the first equation by 8, the second by 5, and subtracting them,
8xy-5(x-1)(y-1)=8000000, so 3xy+5x+5y=8000005.
Multiplying by 3, adding 25 to both sides, and factoring,
9xy+15x+15y+25=(3x+5)(3y+5)=24000040=2*2*2*5*19*23*1373.

We want to maximize t, which is the same thing as maximizing x*y. Since we know that 3xy+5x+5y is a constant, this is the same as minimizing x+y or minimizing (3x+5)+(3y+5). We know the product of (3x+5) and (3y+5) is a constant, so me make the sum smallest when there are closest together, i.e. as close to sqrt(24000040)=4898.98... as possible. The 1373 has to go somewhere, and the best we can do is pair it up with two of the twos.

3x+5=1373*4 => x=1829
3y+5=4370 => y=1455. t=(1829*1455-100000)/5=332,239 </FONT C>
Back to top
Display posts from previous: by   
Reply to topic    The Grey Labyrinth Forum Index -> Grey Labyrinth Puzzles All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Site Design by Wx3