Riddle (not easy)

Things that are not directly connected with Factorio.
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Riddle (not easy)

Post by kovarex »

There are 100 of bandits taken as prisoners one evening.
The prison manager gave them chance to change their destiny to be executed.
Every prisoner gets a unique number (1- 100), and in the manager office there are 100 numbered drawers. There are 100 number on papers (1-100) randomly inserted in each of the drawers.
The next morning, the manager will take prisoners one by one, and let them open 50 drawers, the prisoner has to find the drawer with his humber or all the bandits get executed.
Once he finds the number, he goes into another rooms and all drawers are closed, he can't say any information to others.

"Oh no, our chance to survive this are 1:2^100, this is practically zero" says the bandit statistic.
The combinatoric bandit tries to calm him down, actually there is chance for us to survive of more than 30%.
How can they do it?
Holy-Fire
Fast Inserter
Fast Inserter
Posts: 173
Joined: Sun Apr 14, 2013 9:15 am
Contact:

Re: Riddle (not easy)

Post by Holy-Fire »

Are prisoners allowed to shuffle the papers between the drawers they open?
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Riddle (not easy)

Post by kovarex »

Holy-Fire wrote:Are prisoners allowed to shuffle the papers between the drawers they open?
no
Gammro
Filter Inserter
Filter Inserter
Posts: 361
Joined: Wed Oct 09, 2013 1:45 pm
Contact:

Re: Riddle (not easy)

Post by Gammro »

I don't know if this may be a spoiler, so I'll just spoiler it:
Does this have something to do with factorials? :P
I'll try to work it out when I get home tonight.
Ignore this
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Riddle (not easy)

Post by kovarex »

Gammro wrote:I don't know if this may be a spoiler, so I'll just spoiler it:
Does this have something to do with factorials? :P
I'll try to work it out when I get home tonight.
It won't help much but:
Almost all combinatorics have something to do with factorioals :)
Gammro
Filter Inserter
Filter Inserter
Posts: 361
Joined: Wed Oct 09, 2013 1:45 pm
Contact:

Re: Riddle (not easy)

Post by Gammro »

Haha, well I had to look up the term combinatorics to see what it actually means :P
I have no clue where to begin, and exams coming up. So I better focus on that first :)
Ignore this
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Riddle (not easy)

Post by Nirahiel »

Answer
:)
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Riddle (not easy)

Post by kovarex »

Gammro wrote:I have no clue where to begin, and exams coming up. So I better focus on that first :)
I think so :)
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Riddle (not easy)

Post by ssilk »

Not understood.
Prisoner 1 takes slot 1 and in the slot, there is (what a luck) the number 2. So he opens slot 2 and there lays 3 ... and so on.
The chances that he finds his number is for the first slot 1:100, for the second 2:100, 3:100 and so on until 50:100.

And now I got lost, because when added the whole, I come to a chance of 12.75. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
wrtlprnft
Fast Inserter
Fast Inserter
Posts: 155
Joined: Thu Feb 21, 2013 8:49 pm
Contact:

Re: Riddle (not easy)

Post by wrtlprnft »

Nirahiel wrote:[…]
I figured something along these lines might work. Do you have any source as to how high the actual chance will be (
or, equivalently, the chance of a random permutation not containing a 51+-cycle ;-)
)? I did some testing and only got to 29.9%. That might of course have to do with insufficient randomness…
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Riddle (not easy)

Post by kovarex »

wrtlprnft wrote:
Nirahiel wrote:[…]
I figured something along these lines might work. Do you have any source as to how high the actual chance will be (
or, equivalently, the chance of a random permutation not containing a 51+-cycle ;-)
)? I did some testing and only got to 29.9%. That might of course have to do with insufficient randomness…
That is very correct way :)
Math behind
User avatar
FreeER
Smart Inserter
Smart Inserter
Posts: 1266
Joined: Mon Feb 18, 2013 4:26 am
Contact:

Re: Riddle (not easy)

Post by FreeER »

kovarex wrote:Math behind
I'm not sure i understand this (and I'll try again later since I'm tired anyways), but I think the best answer to this
is not a real answer, or is it
<I'm really not active any more so these may not be up to date>
~FreeER=Factorio Modding
- Factorio Wiki
- My Factorio Modding Guide
- Wiki Modding Guide
Feel free to pm me :)
Or drop into #factorio on irc.esper.net
User avatar
Math3vv
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Sun Oct 06, 2013 10:47 am
Contact:

Re: Riddle (not easy)

Post by Math3vv »

i think its this : SPOILER !!
isn't it just a 50/50 chance since they only have to find 1 paper and they can open 50 out of 100 drawers
edit :
i ment 1:2 chance
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Riddle (not easy)

Post by kovarex »

Math3vv wrote:i think its this : SPOILER !!
isn't it just a 50/50 chance since they only have to find 1 paper and they can open 50 out of 100 drawers
edit :
i ment 1:2 chance
That is even mentioned in the OP. The statistics view of this is the first one has 1:2 chance, so if they all have to be correct, they have 1:2^100 (chance 1 / 2^100), the trick is, that actually there is better way.
User avatar
Math3vv
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Sun Oct 06, 2013 10:47 am
Contact:

Re: Riddle (not easy)

Post by Math3vv »

kovarex wrote:
Math3vv wrote:i think its this : SPOILER !!
isn't it just a 50/50 chance since they only have to find 1 paper and they can open 50 out of 100 drawers
edit :
i ment 1:2 chance
That is even mentioned in the OP. The statistics view of this is the first one has 1:2 chance, so if they all have to be correct, they have 1:2^100 (chance 1 / 2^100), the trick is, that actually there is better way.
they all need to find ther own number in order to not get executed ?

edit :
:/ oke i found the solution : the first one opens 50 drawers and takes all the papers and hands them out this way once everyone went inside ther is an almoste 100% chance everyone has ther number
Nirahiel
Filter Inserter
Filter Inserter
Posts: 351
Joined: Mon Sep 23, 2013 2:18 pm
Contact:

Re: Riddle (not easy)

Post by Nirahiel »

Dudes, I gave the right answer..
Also Math3vv, no, each prisoner must put the papers back once he's done.
User avatar
Math3vv
Long Handed Inserter
Long Handed Inserter
Posts: 99
Joined: Sun Oct 06, 2013 10:47 am
Contact:

Re: Riddle (not easy)

Post by Math3vv »

Nirahiel wrote:Dudes, I gave the right answer..
Also Math3vv, no, each prisoner must put the papers back once he's done.
im trying to find my own solution O_O
Post Reply

Return to “Off topic”