Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 28 29 [30] 31 32 ... 36

Author Topic: The questions, riddles and puzzles thread  (Read 38366 times)

Kogut

  • Bay Watcher
  • Next account: Bulwersator
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #435 on: April 24, 2011, 07:34:09 am »


100000 tests
0: 0
1: 5.99858
2: 8.7113
3: 10.5729
4: 11.9307
5: 13.029
6: 13.9192
7: 14.7433
8: 15.3995
9: 16.0117
10: 16.5679
Spoiler: etc (click to show/hide)

Spoiler: test.cpp (click to show/hide)

EDIT: tests to 900
« Last Edit: April 24, 2011, 10:58:33 am by Kogut »
Logged
The worst bug - 34.11 poll
Tired of going decades without goblin sieges? Try The Fortress Defense Mod
Kogut, the Bugfixes apostle of Bay12forum. Every posts he makes he preaches about the evil of Bugs.

Strife26

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #436 on: April 24, 2011, 08:01:20 am »

That is totally cheating.  :D

Then again, I remember once using a program to prove that you should always switch doors when shown a goat.

I totally did the same thing when I first looked at the Monty Hall problem.
Logged
Even the avatars expire eventually.

ed boy

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #437 on: April 24, 2011, 08:03:20 am »

This is one question where inductive logic is a great help. This question is all about conditional expectation.

Think about the case with one dice. Consider the first roll. With the first roll, there is a 1/6 chance of it being eliminated, and a 5/6 chance of it not being eliminated. If it is eliminated on the first roll, then it will have taken one roll to eliminate all your dice. If it not eliminated on the first roll, then the expected number of rolls is one plus the expected number of rolls to eliminate it on the second throw. However, the expected number of throws to eliminate it stays the same on all the throws, so you have.

E(1)=1 * 1/6 + (E(1) + 1) * 5/6
E(1)=6

Now, when you roll two dice, you can either end up with two dice, one dice, or none, etc.
Logged

ed boy

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #438 on: May 08, 2011, 03:01:25 pm »

There are ten wizards, sitting in a circle. Each is wearing a coloured hat, and can see all nine hats but his own. There are 10 possible hat colours, and any combination of hats is possible, including repeats; so there are 10^10 possible permutations. Each wizard will be called upon to speak one word, which must be the name of one of the colours. They all speak simultaneously, so no information can be transferred between them. If a wizard speaks his own hat colour, he lives; else he dies.

Beforehand, they had a chance to confer, and agree upon a general strategy. Can you think of a strategy they could use that will guarantee that at least one wizard escapes?
Logged

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #439 on: May 08, 2011, 03:03:43 pm »

Always speak the color of the dude to your right. Or left, whatever.

Oh wait, that doesn't work.
Logged

Cthulhu

  • Bay Watcher
  • A squid
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #440 on: May 08, 2011, 03:14:35 pm »

There's no rule that prevents them from just telling each guy what color his friend's hat is beforehand, unless they're not wearing hats.

Aside from that, they all say the same color.  At least one of them will make it.
Logged
Shoes...

The Merchant Of Menace

  • Bay Watcher
  • Work work.
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #441 on: May 08, 2011, 04:00:44 pm »

Aside from that, they all say the same color.  At least one of them will make it.

Repeats are permitted, so this doesn't guarantee the survival of anyone
Logged
*Hugs*

ed boy

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #442 on: May 08, 2011, 04:06:57 pm »

There's no rule that prevents them from just telling each guy what color his friend's hat is beforehand, unless they're not wearing hats.

Aside from that, they all say the same color.  At least one of them will make it.
They don't get the hats until after they confer.

They don't know what the possible colours are beforehand. If they all say the same colour, they might pick a colour that is not being used for the hats.
Logged

Sowelu

  • Bay Watcher
  • I am offishially a penguin.
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #443 on: May 08, 2011, 04:25:46 pm »

You want to guarantee that at least one wizard escapes?

Everyone agree on a leader.  Everyone says the leader's hat's color, except for the leader, who says a color that he DOES NOT see.  (There's ten possible colors, so there will always be some color he doesn't see.)

If at least one non-leader wizard has a different colored hat from the leader, that wizard will say the leader's hat's color and survive.

If everyone has the same colored hat, the leader will say a different color and survive.

I'm assuming that they know what colors are -possible- at least.
« Last Edit: May 08, 2011, 04:27:28 pm by Sowelu »
Logged
Some things were made for one thing, for me / that one thing is the sea~
His servers are going to be powered by goat blood and moonlight.
Oh, a biomass/24 hour solar facility. How green!

ed boy

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #444 on: May 08, 2011, 04:31:44 pm »

That doesn't guarantee it. That only works when at least one person shares the hat color with the leader. If they all have different color hats, or if everybody apart from the leader has the same color, then that will not work.

I re-examined my source for the question, and it doesn't make it very clear whether or not the wizards know the possible hat colors beforehand. If you have a solution that requires knowing the possilbe colors, then I'll accept that (though a solution that does not rely on knowing the possilbe colors would be better).
Logged

ed boy

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #445 on: June 09, 2011, 11:50:10 am »

I've got two more.

1: How can you take half of twelve away and get seven?

2: Consider the following dots:
ooo
ooo
ooo
Can you draw four straight lines, with each line (except the first) starting from the end of the previous one, that go through all the dots?
Logged

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #446 on: June 09, 2011, 11:52:27 am »

Easy. Lemme upload a pic first.

Or I just type it.

__
l\/
l/\

Sorta like this.

« Last Edit: June 09, 2011, 11:57:05 am by Darvi »
Logged

Heliman

  • Bay Watcher
  • I knew you were coming. Nonetheless, welcome.
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #447 on: June 09, 2011, 11:59:28 am »

I've got two more.

1: How can you take half of twelve away and get seven?

If you take half of twelve away from thirteen you get seven.(13-6=7)
« Last Edit: June 09, 2011, 03:34:23 pm by Heliman »
Logged

Strife26

  • Bay Watcher
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #448 on: June 09, 2011, 12:03:56 pm »

XII becomes VII when you take half horizontally.
Logged
Even the avatars expire eventually.

Darvi

  • Bay Watcher
  • <Cript> Darvi is my wifi.
    • View Profile
Re: The questions, riddles and puzzles thread
« Reply #449 on: June 09, 2011, 12:07:02 pm »

^This.

Technically Heliman's answer is also correct but I guess it's not what was meant by the question.
Logged
Pages: 1 ... 28 29 [30] 31 32 ... 36