Unfortunately, I have just proven it cannot be done this way. I'll have to stick with my original plan of attack.Quote:
Originally posted by solarflare
what I'm now wondering is whether or not it can be done in 4 predefined weighings ;)
Printable View
Unfortunately, I have just proven it cannot be done this way. I'll have to stick with my original plan of attack.Quote:
Originally posted by solarflare
what I'm now wondering is whether or not it can be done in 4 predefined weighings ;)
Well nobody except solarflare seems to have tried the 9 coins 2 false problem, so I'll post the solution. Dimm_coder, you can still go on and try it, you just don't have to look at the solution ;)
here is the solution in HTML form
And for those wondering whether I did that HTML page all by hand, here is a small C++ program I wrote for generating the solution ;)
program source
Yves, if really, I spent some time near 1 hour trying to solve it, but I can't. :( Now I haven't enough time.
Don't worry it's really hard. I don't even know if solarflare tried to solve it by hand, I sure didn't ;)
If you are interested, have a look at my program which solves the problem automatically. That's what I used to generate the solution ;) I did check it by hand though, but that's a bit easier than trying to find a solution by hand.
Ok, Yves, I 'll look at your program. Thank U. :)
I tried to find solution only logical way, not programming.
Of course, it's more mathematical problem than pure logical.
New riddle
The russian mafia is looking for a hacker who will hack the World Bank for them to get tha phat loot. They are very civilised people they take their task very seriously and prepare a test for the candidates. So they kidnap their first programmer, a guy who calls himself code_by_dimm_light. Since they have a very peculiar sense of humour they present him with the following task.
He is put into a romm lit only with small candle. code_by_dimm_light suspects that the candle will go out in about five minutes so he's eager to get done with the task. Probably especially so since if he fails he'll get to see the potatoes grow from below or something to this effect.
The mafia ganglord (who shall remain unnamed for security purposes) explains the problem to him.
"Here are eight light switches in this room. This wall is in fact a window and there are eight light bulbs in the room behind it. Each switch is connected to one light bulb and vice-versa. You will have to figure out which switch is connected to which bulb. You can test a configuration by turning on the master switch here. But to make things interesting, you can only turn the master switch on three times."
The mafia sub-boss besides him mumbles somthing to the effect of "If we had a better battery you could have four tries", but is silenced directly by the ganglord.
How does code_by_dimm_light solve this task ? Will he hack the world bank or become an ex-code_by_dimm_light ?
Here is the configuration :
How should the switches be set for the three times that he can press the Master switch ?Code:O O O O O O O O <- Light bulbs
------------------------- <- Window
\ \ \ \ \ \ \ \ <- switches
X <- frightened code_by_dimm_light
M <- Master switch
C <- candle burning out
Yes, I solved it by hand, and what a waste of time it was ;). You wasted an hour and a half of my life, and I want it back! Oh who am I kidding, I'd only lose it again anyway...Quote:
Originally posted by Yves M
I don't even know if solarflare tried to solve it by hand
Wow, Yves! Ok, hehehe, I'll try it :)
I think that I mast solve it by logical way, not programming, because ganglord didn't gave computer and I haven't notebook :rolleyes:
At free time I'll try it.
Well that's still pretty good compared to me wasting something like 7 hours to write that program :pQuote:
Originally posted by solarflare
Yes, I solved it by hand, and what a waste of time it was ;). You wasted an hour and a half of my life, and I want it back! Oh who am I kidding, I'd only lose it again anyway...
True, the solution is purely logical and can be found without the usual (if this happens then do that etc...)Quote:
I think that I mast solve it by logical way, not programming, because ganglord didn't gave computer and I haven't notebook
There is really no stopping solarflare ;) He solved the light-bulb riddle already :)
The real answer should be the guy turns on all the switches, flips the master switch up, and while the mob boss is stunned by 8 bright light bulbs code_by_dimm_light can make a break for it. He grabs the candle on his way out, so if anyone comes near him he can burn them.
My first solution didn't use all the tools, but this one does ;) (including the candle), plus its a bit more exciting than flipping switches :).
Yves, I have post U pm with answer.
____________________________________
Hehehe... but if really, we have another possible way. Code_by_dimm_light hear from sub-mafiaboss that they have energy only for 3 tests. That means they cannot check his solution by own tests. Of course, if they have list with answers, but with candle dimm can reduce to ashes it :) After that they ' ll not be able to prove him anything.
Ah, I gorgot to tell you that the boss is waering anti-glare sunglasses ;)Quote:
Originally posted by solarflare
The real answer should be the guy turns on all the switches, flips the master switch up, and while the mob boss is stunned by 8 bright light bulbs code_by_dimm_light can make a break for it. He grabs the candle on his way out, so if anyone comes near him he can burn them.
My first solution didn't use all the tools, but this one does ;) (including the candle), plus its a bit more exciting than flipping switches :).
No, but ! I won't let your devious schemes defeat the mafia boss :p
There is an old-fashioned refrigerator with a very small
freezer compartment which can hold up to seven ice cube trays
stacked, but there are no shelves to separate the trays. You
have fifteen trays, each of which can make a dozen cubes, but
if you stand one tray on top of another before it's frozen,
it will sink into the lower tray and you won't get full cubes
from the lower tray. You also can't turn the ice cube trays upside-down.
Without using anything but water and the ice cube trays, what
is the fastest way to make full ice cubes in seven trays?