mersenneforum.org  

Go Back   mersenneforum.org > Fun Stuff > Puzzles

Reply
 
Thread Tools
Old 2007-10-07, 05:47   #12
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2·3·13·83 Posts
Default

Quote:
Originally Posted by davieddy View Post
If we allow wrapping, then given the first marble, there are two distinct ways of choosing each of the next 18.

Wrapping is not invoked iff the last number is 1 or 20,
giving 2 possibilities for the first marble.
So number of ways is 2*2^18.
davieddy is offline   Reply With Quote
Old 2007-10-07, 06:43   #13
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

194A16 Posts
Default

Quote:
Originally Posted by Orgasmic Troll View Post
hrm. meh, somewhere I wasn't careful enough and I like wblipp's answer too much to go fix mine.
Yes I was convinced by William's solution as well.
For completeness I would like to "fix" your solution,
but if you can't be bothered, even with the added advantage of
(presumably) understanding what you meant in the first place,
then we may have some work to do
David
davieddy is offline   Reply With Quote
Old 2007-10-07, 07:41   #14
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

11001010010102 Posts
Default

Quote:
Originally Posted by wblipp View Post
Nice catch and nice resolution.
THX William. Does "catch" refer to my original error or the spotting
of it (or both)?
David

Last fiddled with by davieddy on 2007-10-07 at 07:48
davieddy is offline   Reply With Quote
Old 2007-10-07, 07:47   #15
wblipp
 
wblipp's Avatar
 
"William"
May 2003
New Haven

44768 Posts
Default

Quote:
Originally Posted by davieddy View Post

Wrapping is not invoked iff the last number is 1 or 20,
giving 2 possibilities for the first marble.
So number of ways is 2*2^18.
I don't see how you got from limitations on the last marble to limitations on the first marble. I liked your solution I called "nice resolution." In greater detail for those that may have missed it that argument runs:

There are 20 * 2^18 valid sequences with wrapping. All those sequences that end with 1 or 20 are also a valid sequence without wrapping. If we were sure that the last ball was equally likely, we would conclude the non-wrapped sequences are 2/20 of the wrapped sequences.

Consider the mapping of sequences that changes the number of every ball from n to (n+1) mod 20. The new sequence is a valid wrapping sequence, and distinct sequences map to distinct sequences, so the image of the wrapping sequences is the entire set of wrapping sequences. Consider doing this 20 times, and we have 20 copies of the wrapping sequences. In this collection the last ball is a 1 or 20 2/20 of the time because every wrapping sequence has 20 images, and all 20 choices for last ball show up once. But the images are all identical, so 2/20 must also apply to each image, and each image is the complete set.
wblipp is offline   Reply With Quote
Old 2007-10-07, 08:16   #16
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2·3·13·83 Posts
Default

Quote:
Originally Posted by wblipp View Post
I don't see how you got from limitations on the last marble to limitations on the first marble.
In my attempt at brevity I omitted that I was considering
each of the "top/bottom" marble sequences separately.
For any given sequence, adding one to the first marble adds one
to the last. Hence the connection between the limitations.
I am glad you understood my "nice resolution" although my
ability to present an argument rigorously isn't up to yours

David

PS I think the largest hole to be filled is my assertion that
no wrapping need be invoked iff the last marble is 1 or 20.

Last fiddled with by davieddy on 2007-10-07 at 08:26
davieddy is offline   Reply With Quote
Old 2007-10-07, 08:58   #17
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

11001010010102 Posts
Default

To misquote the late and lamented Mally:
Perhaps Davar55 could step in at this juncture, and
tell us how we are getting on

David
davieddy is offline   Reply With Quote
Old 2007-10-07, 10:04   #18
Mr. P-1
 
Mr. P-1's Avatar
 
Jun 2003

7×167 Posts
Default

Quote:
Originally Posted by davieddy View Post
PS I think the largest hole to be filled is my assertion that
no wrapping need be invoked iff the last marble is 1 or 20.
The last marble completes both the ascending and descending subsequences (with wrapping).

Therefore if the last marble is 1 the immediately prior descending subsequence is ..., 4, 3, 2. The immediately prior ascending subsequence is ..., 18, 19, 20.

Clearly wrapping hasn't occurred in either subsequence before the 1 was dropped. A similar argument applies when the last marble is 20.

We also need to show that a last marble other than 1 or 20 implies an previously wrapping subsequence. In this case, suppose the last marble is less than the starting marble. The number 1 cannot have been reached in the descending subsequence without the final marble having dropped earlier. Therefore it must have been reached when the ascending subsequence wrapped earlier. A similar argument applies with the number 20 when the last marble is greater than the starting marble.
Mr. P-1 is offline   Reply With Quote
Old 2007-10-07, 16:10   #19
Orgasmic Troll
Cranksta Rap Ayatollah
 
Orgasmic Troll's Avatar
 
Jul 2003

28116 Posts
Default

Quote:
Originally Posted by davieddy View Post
Yes I was convinced by William's solution as well.
For completeness I would like to "fix" your solution,
but if you can't be bothered, even with the added advantage of
(presumably) understanding what you meant in the first place,
then we may have some work to do
David
hah, I looked back at what the problem was, and it's a very minor error right at the end. If you have a function f(n), where f(n+1) = 2*f(n) and f(1) = 1, then f(n) = 2^(n-1), not 2^n.

So it's all good :)
Orgasmic Troll is offline   Reply With Quote
Old 2007-10-08, 18:57   #20
davar55
 
davar55's Avatar
 
May 2004
New York City

5×7×112 Posts
Default

As best I can tell, all three arguments given are valid,
and the correct answer is indeed 2^19.

There is another way of getting this.

Consider the REVERSE of any valid sequence. This must begin
with either 1 or 20, two possibilities. For either possibility, the
next number has again exactly two possibilities that avoid a gap. And so on, until the penultimate number has two possibilities.
But the final number will then be determined uniquely. So the
total number of valid reverse sequences is 2x2x2x...x2x1 = 2^19. Each corresponds to one valid forward sequence.

Last fiddled with by davar55 on 2007-10-08 at 18:59
davar55 is offline   Reply With Quote
Old 2007-10-09, 03:10   #21
wblipp
 
wblipp's Avatar
 
"William"
May 2003
New Haven

93E16 Posts
Default

Quote:
Originally Posted by davar55 View Post

Consider the REVERSE of any valid sequence. ... For either possibility, the next number has again exactly two possibilities that avoid a gap. And so on,
Neat!

When disassembling, the remaining balls always form a contiguous block, and next ball removed must come from one end of the block. Davieddy and I both struggled for clever ways to account for hitting one of the boundaries when growing. That whole question goes away on disassembly.
wblipp is offline   Reply With Quote
Old 2007-10-09, 09:55   #22
davieddy
 
davieddy's Avatar
 
"Lucan"
Dec 2006
England

2×3×13×83 Posts
Default

Thanks Davar.

I hope it is worth pointing out that an easy way of seeing
that 0C19 + 1C19 + 2C19 +.....+ 19C19 = 2^19 is that the
left hand side is a way of counting all 19 bit numbers.

David
davieddy is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Marbles in a pouch rodericj Puzzles 6 2004-01-07 14:32

All times are UTC. The time now is 05:19.


Fri Aug 6 05:19:59 UTC 2021 up 13 days, 23:48, 1 user, load averages: 2.16, 2.26, 2.33

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.