Results 1 to 39 of 39

Thread: Simple, but new, puzzle

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Simple, but new, puzzle

    It's new because I saw it for the first time today.

    There is a huge basket with a capacity of holding "X" balls in it. Initially, there is 1 ball in the basket. In the first second, 1 ball is dropped in, in 2nd second, 2 balls are dropped, in 3rd second, 4 balls are dropped, in 5th second, 8 balls are dropped and so on. At the end of 1 hour, the basket is totally filled.

    Questions:
    At what time was the basket half full?
    What is "X"?
    And you'll have explain your answer when you solve it (IF you can solve it). Not just copy-paste

  2. #2
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571

    Talking Re: Simple, but new, puzzle

    I won't answer it, to leave the fun for others, but a better version i like:
    You have an empty basket, and infinite balls, labelled 1, 2, 3, ....
    at 1 min to midnight, you put in balls #1 -> #10, and take out ball #1
    at 1/2 mins to midnight, you put in balls #11 -> #20, and take out ball #2
    ...
    at 1/n mins to midnight, you put in balls #10n-9 -> #10n, and take out ball #n
    ...
    The question is, how many balls are in the basket at midnight??
    sql_lall

  3. #3
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle

    It will be full when 2^(3600-1) balls have dropped in and half full when, of course, 2^(3600-2) have dropped in, that is, one second before. The problem is that neither my calculator or Excel can deal with such a huge number. I leave it to any one of you.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  4. #4

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Simple, but new, puzzle

    Quote Originally Posted by Rassis
    It will be full when 2^(3600-1) balls have dropped in and half full when, of course, 2^(3600-2) have dropped in, that is, one second before. The problem is that neither my calculator or Excel can deal with such a huge number. I leave it to any one of you.
    If you're answering my post, then your answer is incorrect (Read carefully ) And if you're answering sql_lall's post... no, you're not answering his post.

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Simple, but new, puzzle

    Half full as in exactly half or about half?


    Has someone helped you? Then you can Rate their helpful post.

  6. #6
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle

    Quote Originally Posted by mendhak
    Initially, there is 1 ball in the basket. In the first second, 1 ball is dropped in, in 2nd second, 2 balls are dropped, in 3rd second, 4 balls are dropped, in 5th second, 8 balls are dropped and so on. At the end of 1 hour, the basket is totally filled.
    You mean "...in 4th (and not 5th) second, 8 balls are dropped and so on." or what?

    Thanks
    ...este projecto dos Deuses que os homens teimam em arruinar...

  7. #7
    Lively Member
    Join Date
    Aug 2005
    Posts
    77

    Re: Simple, but new, puzzle

    the basket is full at 1 second before 1 hour, so at 3599 seconds.
    X=2^3600 (this is to big to show here, 1084 numbers! )

    initialy there is 1 ball in. every second there will come 2^(n-1) ball, where n is the time in seconds.
    So after 3 seconds X = 1 + 2^(1-1) + 2^(2-1) + 2^(3-1), which is equel to 2^3

    Pieter

  8. #8
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle

    The basket will be full when 2^(3600-1) balls have dropped in or when the basket contains 2^(3600) and it will be half full 1 second before.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  9. #9
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Simple, but new, puzzle

    Quote Originally Posted by mendhak
    It's new because I saw it for the first time today.

    There is a huge basket with a capacity of holding "X" balls in it. Initially, there is 1 ball in the basket. In the first second, 1 ball is dropped in, in 2nd second, 2 balls are dropped, in 3rd second, 4 balls are dropped, in 5th second, 8 balls are dropped and so on. At the end of 1 hour, the basket is totally filled.

    Questions:
    At what time was the basket half full?
    What is "X"?
    And you'll have explain your answer when you solve it (IF you can solve it). Not just copy-paste
    it was half full 1 second before the hour (59min 59 secs)
    X is twice the half full amount (lol)

    Sounds like a maths problem from a school. You should be able to work out a formula for it...

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

  10. #10
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Re: Simple, but new, puzzle

    The basket is never half full.
    Once you've dropped the first ball in the basket, you are always adding an even number of balls.

    So the basket always contains an odd number of balls {2X + 1 is always odd}.


    So, for it ever to be half full, you would have to add a half a ball at some point in time, {since half an Odd number 2X + 1 is X + .5, where X is an integral number}

    Unfortunately, you never add a half a ball.

    So its never half full.

  11. #11
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863

    Re: Simple, but new, puzzle

    Quote Originally Posted by NotLKH
    Once you've dropped the first ball in the basket, you are always adding an even number of balls.
    Not so sure about that, because:
    Quote Originally Posted by mendhawk
    Initially, there is 1 ball in the basket. In the first second, 1 ball is dropped in..
    So there is 1 ball in before start, and in the first second we drop in a odd number of balls (1), so we have an even number!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  12. #12

  13. #13
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Re: Simple, but new, puzzle

    Quote Originally Posted by mendhak
    There is a huge basket with a capacity of holding "X" balls in it.... At the end of 1 hour, the basket is totally filled.
    Obviously, at the end of 2 hours, its also {still} totally filled. {Unless someone empties the baskets balls}

    So, I've got to wonder.

    Does it achieve fullness AT 1 hour, or is it full previous to one hour?


  14. #14
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    It is full before the hour is up.

  15. #15
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    So, what are the two answers?

  16. #16
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle



    and so on.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  17. #17
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    The questions were:
    At what time was the basket half full?
    What is "X"?
    Where "X" is the total amount of balls needed to fill up the basket.

    EDIT: Also, that is not the right equation. (he said 1,2,3,5...)
    Last edited by dglienna; Sep 4th, 2005 at 02:59 AM.

  18. #18
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Simple, but new, puzzle

    Quote Originally Posted by Rassis
    It will be full when 2^(3600-1) balls have dropped in and half full when, of course, 2^(3600-2) have dropped in, that is, one second before. The problem is that neither my calculator or Excel can deal with such a huge number. I leave it to any one of you.
    2^(3600-1) = 2552433257170972795355421325784140960050835481970150808649442294891973512827494604713191933662806762 2716757084167988820637284734582230408909045052749932766788707495951115682206258172447933264711372686 9243217354413135743351144389318304154546207069175311471992648868850195027417444917592162965295852296 2426885816262185121963825871922744368708437402924184243246325369191792030596395114379845144177186866 0619577150091173099876270214544294693125296540362391561781815405091731382744595014587916240757662618 9505283853706649277815026281162349719949884832098778817193037571710828685146938306208309931545081221 9732396790803760993676875297786943911396561852909025373216343011052039908804945497095607273400609127 9360093516928041725970215462458104461051510233627913415147445683018873412838401413163428788558822026 5189769314661015745127323726981634906736987528338271354992415696612804093631675665724156441594074093 3592448274654530894070007615534170710981252060140941521353105173279637023684918140433107864260306762 723928686968885099947443629498724829053087360954921496828744984350458645612423282688

    this number was calculated with GHCi.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  19. #19
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    Wrong. Think RABBITS instead of FROGS!

  20. #20
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle

    Tr333,

    Great! Excuse my ignorance but GHCi is what? Some maths software...?
    ...este projecto dos Deuses que os homens teimam em arruinar...

  21. #21
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    It is still not the answer. Think about it.

  22. #22
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle

    I have been trying to respond Mendhak question so far and I have noticed that there are some of us that take the answers mistakenly as corresponding to Sql lall post. Let us put some order on this and accept the rule that each post should only address one single subject. I suggest that Sql lall starts a new thread with his problem and leave this only for those of us who have been dedicating their time and effort to find the right answer to the problem presented by Mendhak, who was the one to start this thread. Thank you all.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  23. #23
    Frenzied Member tr333's Avatar
    Join Date
    Nov 2004
    Location
    /dev/st0
    Posts
    1,605

    Re: Simple, but new, puzzle

    Quote Originally Posted by Rassis
    Tr333,

    Great! Excuse my ignorance but GHCi is what? Some maths software...?
    GHC is a compiler for the Haskell language. GHCi is an interpreter for GHC.
    CSS layout comes in to the 21st century with flexbox!
    Just another Perl hacker,

  24. #24
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: Simple, but new, puzzle

    I'll take a stab at this. I think that since the question said 1,2,3,5 seconds and NOT 4, then could it be that balls are only added to the basket if the number of seconds is a prime number?

    There are 504 prime numbers below 3600, (including 1), therefore since the number of balls added each time doubles the amount, the additon that is made before the last one must be when the basket is half full.

    This happens at 3583 seconds, or 59min 43sec

    and X = 5.2374E+151

    Is that anywhere close?!
    Attached Files Attached Files
    Last edited by Andy_P; Sep 4th, 2005 at 06:06 AM.
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


  25. #25
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Unhappy Re: Simple, but new, puzzle

    Quote Originally Posted by Andy_P
    I think that since the question said 1,2,3,5 seconds and NOT 4, then could it be that balls are only added to the basket if the number of seconds is a prime number? There are 504 prime numbers below 3600, (including 1), therefore since the number of balls added each time doubles the amount, the additon that is made before the last one must be when the basket is half full. This happens at 3583 seconds, or 59min 43sec and X = 5.2374E+151
    I think Andy P gave a correct answer if Mendhak meant prime numbers indeed. If so, it was not clear at all to me – reason why I posted on the 1st of the current month the question "You mean "...in 4th (and not 5th) second, 8 balls are dropped and so on." or what?", but unfortunately this was not answered and my efforts were diverted. It shouldn´t be so.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  26. #26
    Lively Member Something Else's Avatar
    Join Date
    Nov 2003
    Location
    Where Humboldt Intersects Carlson
    Posts
    99

    Re: Simple, but new, puzzle

    Quote Originally Posted by Andy_P
    I'll take a stab at this. I think that since the question said 1,2,3,5 seconds and NOT 4, then could it be that balls are only added to the basket if the number of seconds is a prime number?
    Since 1 is not truly a prime number, this could be some other pattern.

    For Example:

    1 2 3 5 8 13 21 34 ... Xi+1 = Xi + Xi-1

    Or:

    1 2 3 5 7 10 13 17 21 ...
    add1 add1,add2 add2,add3 add3,add4 add4,...
    no soap...radio -mendhak

    I understand...just a little...
    No comprende, it's a riddle
    - Wall of Voodoo-Mexican Radio

  27. #27
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: Simple, but new, puzzle

    Since 1 is not truly a prime number
    Yes, I wasn't too sure on that point, so you could be right.
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


  28. #28
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: Simple, but new, puzzle

    If the sequence 1 2 3 5 8 13 21 34 etc is correct, then it follows the Fibonacci sequence, and the total number balls will be 131072, and the basket will be half full after 1597 seconds, which is 26min 37sec

    X = 131072

    Half full at 1597s = 26min 37sec
    Attached Files Attached Files
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


  29. #29
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Simple, but new, puzzle

    Quote Originally Posted by Something Else
    1 2 3 5 8 13 21 34 ... Xi+1 = Xi + Xi-1
    That's the Fibonacci (SP?) sequence, right?


    Has someone helped you? Then you can Rate their helpful post.

  30. #30
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: Simple, but new, puzzle

    Yes, as mentioned in my previous post!
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


  31. #31
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171

    Re: Simple, but new, puzzle

    Quote Originally Posted by Andy_P
    Yes, as mentioned in my previous post!
    I really should read all the posts before posting

    I was just to proud of myself to recognise it


    Has someone helped you? Then you can Rate their helpful post.

  32. #32
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Re: Simple, but new, puzzle

    Another possible pattern:

    At N Seconds:

    [ 3*N5-40*N4+185*N3-320*N2+292*N ]/120

    Balls are dropped into the basket.

    So 6 Balls could have also been dropped in on the 4th Second.


  33. #33
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Simple, but new, puzzle

    It will be half full at 59minutes 59seconds ?
    I don't live here any more.

  34. #34
    Addicted Member Rassis's Avatar
    Join Date
    Jun 2004
    Location
    Lisbon
    Posts
    248

    Re: Simple, but new, puzzle

    The question was not clear in the first place and I think it should be reformulated.
    ...este projecto dos Deuses que os homens teimam em arruinar...

  35. #35
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    Found after 18 iterations of the Fibonacci Sequence.

    Answer: Basket is half full at 1597 seconds.

    And basket capacity, is the sum of all the previous values... 524289
    0seconds - 0.5 balls dropped
    1seconds - 1 balls dropped
    1seconds - 2 balls dropped
    2seconds - 4 balls dropped
    3seconds - 8 balls dropped
    5seconds - 16 balls dropped
    8seconds - 32 balls dropped
    13seconds - 64 balls dropped
    21seconds - 128 balls dropped
    34seconds - 256 balls dropped
    55seconds - 512 balls dropped
    89seconds - 1024 balls dropped
    144seconds - 2048 balls dropped
    233seconds - 4096 balls dropped
    377seconds - 8192 balls dropped
    610seconds - 16384 balls dropped
    987seconds - 32768 balls dropped
    1597seconds - 65536 balls dropped <--------- Half Full
    2584seconds - 131072 balls dropped <-------FULL (less than 3600 seconds)
    4181seconds - 262144 balls dropped

  36. #36
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397

    Re: Simple, but new, puzzle

    I don't understand the double entry at 1 second.

    Lets see.

    0 seconds, basket contains 1 ball
    1 second, 1 ball dropped, bsket contains 2 balls
    2 seconds, 2 balls dropped, basket contains 4
    ...

    so that would make:

    0:1
    1:2
    2:4

    IF we are counting the number of balls in the basket, and not the number of balls dropped.

    hmmm.

    Entries 0 to the first 1 seem to be off in your table.



  37. #37
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Simple, but new, puzzle

    Have to add the initial one (to the one at 1 second) to get the count right.

  38. #38

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Simple, but new, puzzle

    Yes, you should have read the post carefully. And I think that the question was formulated well. AndyP has the right answer, because we're working with the Fibonacci sequence here.

  39. #39
    Fanatic Member Andy_P's Avatar
    Join Date
    May 2005
    Location
    Dunstable, England
    Posts
    669

    Re: Simple, but new, puzzle

    Cool!

    I guess my old maths teacher was right after all: 'Always read the question!'
    Using Windows XP Home sp3
    Mucking around with C# 2008 Express
    while ( this.deadHorse ) { flog( ); }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width