The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

attn william bashless (long) by gibuu2004-12-30 12:16:08
  Question about finding the solution. by Tars_Tarkas2004-12-30 12:38:24
    Interestingly enough... (extension) by williamashbless2004-12-30 12:55:01
      I did figure out the part with the sets... by Tars_Tarkas2004-12-30 13:12:30
        Thoughts. by williamashbless2004-12-30 13:28:36
          I think I would by gibuu2004-12-30 15:27:55
            I like trees :) by Tars_Tarkas2006-11-19 12:55:59
              thoughts on a tree by gibuu 2004-12-30 17:01:55
the method is recursive.... should be worth a try

how about on every level you divide the total number of coins by 3 rounded to the closest numberso with 12 the group is 4 with 31 the group is 10 10 and 11, 32 would be divided 11 11 10

right away we eliminate as much as two thirds and a minimum of a third

this continues until there is only one coin remaining - the one coin that has yet to be weighed and is the phony by default or the last of two coins to not be eliminated.

My solution differed in one respect in that I "reused" a coin early to come to a solution in two steps but it wasnt necessary. In order to code, you could put it that if we are down to 2 coins and neither has been weighed yet.. we can re-use a coin (could be designated at every weigh as one of the coins being eliminated)

To answer someones question now about what is the minimum number of weighs necessary for any given number of coins?

if x is the number of coins, (x/3)-1

worth testing with a simple script and a counter

[ Reply ]
                Trees, Trees everywhere by Tars_Tarkas2006-11-19 12:55:59

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)