Results 1 to 20 of 20

Thread: logic?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    VIETNAM
    Posts
    209

    logic?

    there are 13 stones ,12 stones have the same weight,and the rest one has different weight.
    How can we find out the stone that has different weight by using 3 times of balancing?

  2. #2
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    you need to know if the "odd" stone is lighter or heavier. let's assume it is lighter.

    1.weight 4 stones and 4 stones. if one group is lighter, chuck the rest of the stones away. if not, goto 5

    3. weigh two and two of those four stones. throw away the two heavier ones.

    4. weigh the two remaining stones, the lighter one is it.

    5. take the 5 which haven't been weighed, add one (any one) from those that have. wiegh 3 and 3 of them. throw away the heavier group

    6. from the 3 left, weigh 1 against another. if one weighs less, thats the one else the one which you didn't weigh is it.
    Have I helped you? Please Rate my posts.

  3. #3
    Fanatic Member twanvl's Avatar
    Join Date
    Dec 2001
    Posts
    771
    I'll take a bottom up approach.

    a. Given enough normal stones, you can find the odd one in 2 stones by weighing one of them against a normal one.

    b. If you know the 'direction' (wether the odd stone is lighter or heavier) you can find it in 3 stones by weighing two of them against each other

    c. Given 5 stones and unknown direction you can end up with one of {a,b} by weighing 3 of them against 3 normal stones.

    d. Given two groups (gl,gh) of 1 and 2 stones respectivly, and the information that if the odd stone is in gl it is lighter then a normal one, and if it is in gh is is heavier then a normal one:
    weigh the two gl stones against each other, the odd stones is the lighter one, if they weigh the same the odd stone is the one from gh.

    e. Given two groups (gl,gh) of 4 stones:
    weigh 3 stones from gl and 2 from gh against 5 normal ones (6 would be easier).
    - if the unknown stones are lighter we are left with the 3 from gl (case b)
    - if they are heavier the 2 from gh (case b or a),
    - otherwise the 2 remaining stones (case d)

    f. Given 13 stones weigh 4 of them against 4 other. You either end up in case e or in case c with the 5 remaining stones.

  4. #4
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    we basically have the same answer.
    Have I helped you? Please Rate my posts.

  5. #5
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    Here's a picture.
    Attached Images Attached Images  
    Don't pay attention to this signature, it's contradictory.

  6. #6
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    You can find this solution on-line. It's typically used with coins though. "There are 12 coins, all identical, except weight. Find the odd coin and determine whether it weighs more or less in 3 balances."

    It's very possibly.

    Basically:

    It's breaking up the 'stones' into small groups, identifying each, then using 'stones' you know are good mixed with ones you don't to find the 'odd' one.

    [edit]13?! WHAT WAS I THINKING?! [/edit]
    Last edited by DiGiTaIErRoR; May 7th, 2004 at 11:17 PM.

  7. #7
    Fanatic Member bugzpodder's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada
    Posts
    787
    actually either i am completely out of it, or both of you are wrong. you do not know if the fake stone is heavier or lighter
    Massey RuleZ! ^-^__Cheers!__^-^ Massey RuleZ!


    Did you know that...
    The probability that a random rational number has an even denominator is 1/3 (Salamin and Gosper 1972)? This result is independently verified by me (2002)!

  8. #8
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    If there are 12 objects, you can determine heavier/lighter. When there are 13 there's a 1/13 chance you won't get the weight.
    Don't pay attention to this signature, it's contradictory.

  9. #9
    So Unbanned DiGiTaIErRoR's Avatar
    Join Date
    Apr 1999
    Location
    /dev/null
    Posts
    4,111
    Originally posted by alkatran
    If there are 12 objects, you can determine heavier/lighter. When there are 13 there's a 1/13 chance you won't get the weight.
    And by the time you figure out which one it is with your balance, I'll use a scale and be done quick!

    That's logic and reasoning for you!

  10. #10

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    VIETNAM
    Posts
    209

    but...

    but the problem is that we dont know if the rest stone is lighter or heavier

  11. #11
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    do you know the answer?
    Have I helped you? Please Rate my posts.

  12. #12
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    here's my solution
    L = light/normal
    H = heavy/normal
    U = unknown
    N = normal

    1 UUUU UUUU UUUUU
    1A LLLL HHHH NNNNN
    1A2 LLHHH NNNNN LLH
    1A2A NNHHH NNNNN NNN (Heavy)
    1A2A3 HH HNNNNNNNNNN
    1A2A3A HN NNNNNNNNNNN
    1A2A3B NN HNNNNNNNNNN
    1A2B LLNNN NNNNN NNN (Light)
    1A2B3 L N LNNNNNNNNNN
    1A2B3A L N NNNNNNNNNNN
    1A2B3B N N LNNNNNNNNNN
    1A2C NNNNN NNNNN LLH
    1A2C3 L L HNNNNNNNNNN
    1A2C3A L N NNNNNNNNNNN
    1A2C3B N N HNNNNNNNNNN
    1B NNNN NNNN UUUUU
    1B2 UUU NNN NNNNNUU
    1B2A HHH NNN NNNNNNN
    1B2A3 H H HNNNNNNNNNN
    1B2A3A H N NNNNNNNNNNN
    1B2A3B N N HNNNNNNNNNN
    1B2B LLL NNN NNNNNNN
    1B2B3 L L LNNNNNNNNNN
    1B2B3A L N NNNNNNNNNNN
    1B2B3B N N LNNNNNNNNNN
    1B2C NNN NNN NNNNNUU
    1B2C3 U N NNNNNNNNNNU
    1B2C3A H N NNNNNNNNNNN
    1B2C3B L N NNNNNNNNNNN
    1B2C3C N N NNNNNNNNNNU
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Jun 2002
    Location
    VIETNAM
    Posts
    209
    i do not know the answer,is it possible to solve ?

  14. #14
    Member
    Join Date
    Dec 2003
    Location
    USA
    Posts
    42
    phanbachloc, IT CANNOT BE DONE.

    If we don't have the extra information that the odd ball is heavier or lighter, in three weighings, we can only get the odd ball out, if the number of balls is less than or equal to 8.

    Doing so, means not only we will find the odd ball, but will also find what is the defect.


    In case, if we assume that we have this information, in three weighings we can find the odd ball if the number of balls is less than or equal to 24.


    If anyone, wants I can explain.


    phanbachloc, I hope this helps you.

  15. #15
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    Excuse me, but you can determine wether or not it is heavier/lighter with 12 stones assuming you have 3 weighings (see my picture, do the last logical step for yourself, the 13th stone is only a problem when the first weighing is equal).

    and if you know the stone is heavier, you can:

    Last weighing, 3 unknown stones, compare 2. If different take heavier, else is remaining. before last gives 3, so 9.

    3^x stones can be sorted where x is the number of weighings. So with 3 weighs we can actually find the odd stone out of 3^3 = 3*3*3 = 3*9 = 27 stones.
    Don't pay attention to this signature, it's contradictory.

  16. #16
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    I noticed something.. nobody reads anyone's posts here I just read trough everyones solutions and twanvl seems to have got it long ago already
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  17. #17
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    Sometimes finding the solution for yourself is fun, too.
    Don't pay attention to this signature, it's contradictory.

  18. #18
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682
    Originally posted by twanvl
    I'll take a bottom up approach.
    I did hear rumours. j/k
    I don't live here any more.

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

    Re: logic?

    Originally posted by phanbachloc
    there are 13 stones ,12 stones have the same weight,and the rest one has different weight.
    How can we find out the stone that has different weight by using 3 times of balancing?
    I take this to mean:
    1 stone of a different weight
    12 stones of same weight
    You have 3 balances MAX to get the stone.

    If that is correct, then the lovely graphc is nice, but uses too many balances.

    If you know if its heavier or lighter then you can possibly get it in the 3 balances :

    1) 1st 6st-6st
    If balanced the odd stone is the difference
    Otherwise take the 6st from the unbalanced side

    2) 3st-3st
    Take the 3st from the unbalanced side

    3) 1 1st-1st
    If balanced its the removed stone
    If unbalanced its that stone

    However, if you don't know if the stone thats different, its going to be more tricky. And if the original poster now has the answer from a school book - please post


    Vince

    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...

  20. #20
    Fanatic Member alkatran's Avatar
    Join Date
    Apr 2002
    Location
    Canada
    Posts
    860
    You don't know if the stone is heavier or lighter, so there is no way to eliminate a group of stones in one weighing unless it returns equal. (You don't know if it's on the heavy or light side)

    If you knew the stone was heavier, it would make more sense to take 2/3 of your stones, and compare them (1/3 on each side) instead of putting them all on.
    Don't pay attention to this signature, it's contradictory.

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