Riddle Minute

Popular word games for time well wasted.

Moderator:Æron

User avatar
nickspoon
Moderator (retired)
Posts:4057
Joined:Sun Oct 08, 2006 7:22 pm
Location:Essex, UK
Contact:

Postby nickspoon » Mon Jan 12, 2009 9:24 pm

I also think it's 1, but I may be way off. Huffman encoding against the alphabet "ABCDE" would result in A, B, C, D, and E being encoded as 10, 0111, 0101, 011, and 1, and since you told us what A through D are, E must be 1.
If that's the case, then that's interesting because it's not what I was thinking of. In my system, F would be 1101. The value of each character is independent of its context.

Also, I would be surprised if I got this right, but is the answer to your joker riddle ~0.161?
If you do not repent, I will come to you and remove your lampstand from its place. (Revelation 2:5, NIV)
Josh Woodward, Ohio Singer/Songwriter, offers his songs for free. Give him a listen.

User avatar
Doc Sigma
Posts:3726
Joined:Tue Oct 24, 2006 11:52 am
Location:Boston
Contact:

Postby Doc Sigma » Tue Jan 13, 2009 2:01 pm

I also think it's 1, but I may be way off. Huffman encoding against the alphabet "ABCDE" would result in A, B, C, D, and E being encoded as 10, 0111, 0101, 011, and 1, and since you told us what A through D are, E must be 1.
If that's the case, then that's interesting because it's not what I was thinking of. In my system, F would be 1101. The value of each character is independent of its context.

Also, I would be surprised if I got this right, but is the answer to your joker riddle ~0.161?
I'll need to rethink yours, then -- in my solution, F would not exist. Heh.

As for the joker riddle, nope -- considering the answer you got, you're thinking too hard. :) (Which is the beauty of this one... it kinda makes you think too hard at first.)

Archaemic
Posts:380
Joined:Fri Aug 27, 2004 1:25 am
Location:Massachusetts...or Providence, RI
Contact:

Postby Archaemic » Tue Jan 13, 2009 5:26 pm

Uhhh, fairly certain that Huffman coding doesn't work that way.
E would be 11 or 00 with Huffman coding if the sample set were just ABCDE and the other values were as mentioned.
[dA] | [LJ]

User avatar
Doc Sigma
Posts:3726
Joined:Tue Oct 24, 2006 11:52 am
Location:Boston
Contact:

Postby Doc Sigma » Tue Jan 13, 2009 7:30 pm

Uhhh, fairly certain that Huffman coding doesn't work that way.
E would be 11 or 00 with Huffman coding if the sample set were just ABCDE and the other values were as mentioned.
Why wouldn't there be any one-bit encodings? E would be 1. Or 0. Hmm. Hang on. *draws up the tree*

Wait, never mind, with a five-character alphabet, the most expensive string would be three bits long, not 4. So it's not Huffman encoding.

User avatar
Dr. Sticks
Posts:2319
Joined:Mon Nov 17, 2008 12:48 pm
Location:Alabama
Contact:

Postby Dr. Sticks » Tue Jan 13, 2009 9:09 pm

for the card riddle, do you stop as soon as you deal the joker BECAUSE it was the 53rd card dealt? in that case, the odds are 1:1
http://www.spingain.com/?ref=146518
Well put doog. You never posted anything offensive whatsoever
we know she'll be back, like a good bitch should.

User avatar
nickspoon
Moderator (retired)
Posts:4057
Joined:Sun Oct 08, 2006 7:22 pm
Location:Essex, UK
Contact:

Postby nickspoon » Tue Jan 13, 2009 10:12 pm

The position of the joker can be any one in 53, so each of the following has a 1/53 chance of occurring (situation;probability of four aces):
1st card is Joker;0
2nd card is Joker;0
3rd card is Joker;0
4th card is Joker;0

Those are simple. Now, the probability of all of the first four cards being aces is one in 270725 (52C4).
5th card is Joker;1/270725
The probability of four aces in the first five cards is 48 in 52C5 (because there are 48 possibilities for the fifth card).
6th card is Joker;48/2598960
First six cards, 48C2 in 52C6.
7th card is Joker;1128/20358520

And so on and so forth. The general formula for the probability getting four aces in X cards is therefore:
48C(X-4)/52CX, 53>X>4.

Thus, P(four aces before a joker) = (48C0/52C4 + 48C1/52C5 + 48C2/52C6 + ... + 48C48/52C52) / 53

...which leads to a probability of precisely a fifth.
If you do not repent, I will come to you and remove your lampstand from its place. (Revelation 2:5, NIV)
Josh Woodward, Ohio Singer/Songwriter, offers his songs for free. Give him a listen.

User avatar
Doc Sigma
Posts:3726
Joined:Tue Oct 24, 2006 11:52 am
Location:Boston
Contact:

Postby Doc Sigma » Wed Jan 14, 2009 12:38 am

The position of the joker can be any one in 53, so each of the following has a 1/53 chance of occurring (situation;probability of four aces):
1st card is Joker;0
2nd card is Joker;0
3rd card is Joker;0
4th card is Joker;0

Those are simple. Now, the probability of all of the first four cards being aces is one in 270725 (52C4).
5th card is Joker;1/270725
The probability of four aces in the first five cards is 48 in 52C5 (because there are 48 possibilities for the fifth card).
6th card is Joker;48/2598960
First six cards, 48C2 in 52C6.
7th card is Joker;1128/20358520

And so on and so forth. The general formula for the probability getting four aces in X cards is therefore:
48C(X-4)/52CX, 53>X>4.

Thus, P(four aces before a joker) = (48C0/52C4 + 48C1/52C5 + 48C2/52C6 + ... + 48C48/52C52) / 53

...which leads to a probability of precisely a fifth.
YES!!! Except you did it the really, really hard way. Hint: The cards other than the joker and the aces do not matter at all.

User avatar
LewisTheTank
Posts:765
Joined:Sun Aug 24, 2008 7:30 am
Location:Florida, USA
Contact:

Postby LewisTheTank » Wed Jan 14, 2009 12:53 am

My guess:

E=1

:?:
Reasoning?

EDIT: 2222nd post, awesome.
My calculator told me. The number 2 (or '0010') was very useful. It (my calculator) never lies, but HAS been wrong before. (Thanks to my input...)
8)
"Do you really think you have what it takes? Do you?"
Image

User avatar
LewisTheTank
Posts:765
Joined:Sun Aug 24, 2008 7:30 am
Location:Florida, USA
Contact:

Postby LewisTheTank » Wed Jan 14, 2009 1:01 am


A - 1
B - 11
C - 21
D - 1211
E - 111221
F - 312211
G - ?
G=13112221
(And just to show off a little):
H=1113213211
(This was another one my dad loved to keep me in practice with. I loved that jackass, but this IS a good brain-teaser!)

:twisted: 8) :twisted:
"Do you really think you have what it takes? Do you?"
Image

User avatar
Doc Sigma
Posts:3726
Joined:Tue Oct 24, 2006 11:52 am
Location:Boston
Contact:

Postby Doc Sigma » Wed Jan 14, 2009 2:32 am


A - 1
B - 11
C - 21
D - 1211
E - 111221
F - 312211
G - ?
G=13112221
(And just to show off a little):
H=1113213211
(This was another one my dad loved to keep me in practice with. I loved that jackass, but this IS a good brain-teaser!)

:twisted: 8) :twisted:
Excellent! I've always loved this one. :)

User avatar
nickspoon
Moderator (retired)
Posts:4057
Joined:Sun Oct 08, 2006 7:22 pm
Location:Essex, UK
Contact:

Postby nickspoon » Wed Jan 14, 2009 3:40 pm

My calculator told me. The number 2 (or '0010') was very useful. It (my calculator) never lies, but HAS been wrong before. (Thanks to my input...)
8)
I don't know what rule you're thinking of here, but the pattern that I'm looking for cannot be found on a calculator.

And Sigma, the formula reduces to (X(X-1)(X-2)(X-3))/6497400, which would expand to a quartic and is probably not the simpler solution you're looking for.
Last edited by nickspoon on Wed Jan 14, 2009 4:15 pm, edited 1 time in total.
If you do not repent, I will come to you and remove your lampstand from its place. (Revelation 2:5, NIV)
Josh Woodward, Ohio Singer/Songwriter, offers his songs for free. Give him a listen.

User avatar
Doc Sigma
Posts:3726
Joined:Tue Oct 24, 2006 11:52 am
Location:Boston
Contact:

Postby Doc Sigma » Wed Jan 14, 2009 4:07 pm

I GOT IT!!! I'll give some more answers, this should prove that I know it, WITHOUT giving away the answer. Because this is a cool one that other people should try, too!

A: 10
B: 0111
C: 0101
D: 011
E: 1
F: 1101
G: 001
H: 1111
...
T: 0
...
Z: 0011

Numbers, too!

1: 10000
2: 11000
3: 11100
...
0: 00000

User avatar
nickspoon
Moderator (retired)
Posts:4057
Joined:Sun Oct 08, 2006 7:22 pm
Location:Essex, UK
Contact:

Postby nickspoon » Wed Jan 14, 2009 4:17 pm

I GOT IT!!!
That you did! Very well done.

Also, I loved your riddle mainly because of how a ridiculous amount of maths amounts to such a simple answer, even if said maths wasn't the best method :smile:
If you do not repent, I will come to you and remove your lampstand from its place. (Revelation 2:5, NIV)
Josh Woodward, Ohio Singer/Songwriter, offers his songs for free. Give him a listen.

User avatar
Doc Sigma
Posts:3726
Joined:Tue Oct 24, 2006 11:52 am
Location:Boston
Contact:

Postby Doc Sigma » Wed Jan 14, 2009 6:26 pm

Basically, the other 48 cards do not matter. Dealing four aces followed by the joker... does it really matter which other cards got dealt in the process? Logically, no. It might as well just be five cards, the four aces and the joker. If you don't buy the logic, then do the math... which you already did. :)

My well has run dry at the moment... will post another riddle later.

User avatar
nickspoon
Moderator (retired)
Posts:4057
Joined:Sun Oct 08, 2006 7:22 pm
Location:Essex, UK
Contact:

Postby nickspoon » Wed Jan 14, 2009 6:48 pm

The other cards don't matter, yes, which is the reason for the 48C(X-4) - that's the number of combinations of the cards besides the aces.

Anyway, next riddle, nice easy one:

A town is run by an evil mayor. He has his eyes on the miller's daughter, and offers the miller a deal. He will give the miller's daughter a bag with two pebbles in it, one white and one black. The daughter will pull one stone from the bag with the townsfolk as an audience; if she draws the white stone, she goes free, and if she draws the black stone, she must marry the mayor. The miller has no choice but to agree; the mayor is a powerful man. However, he doesn't trust the mayor not to cheat. How can the miller's daughter act to ensure a fair game?
If you do not repent, I will come to you and remove your lampstand from its place. (Revelation 2:5, NIV)
Josh Woodward, Ohio Singer/Songwriter, offers his songs for free. Give him a listen.


Return to “Forum Games”

Who is online

Users browsing this forum: Majestic-12 [Bot] and 22 guests