All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Logic > Weights and Scales
No Equal Weighings (Posted on 2016-04-18) Difficulty: 3 of 5
I have a batch of 16 coins, each coin weights either 9g, 10g, or 11g. I split the pile into halves and compare each half on a balance scale and the result is unequal.

Then I take each pile of 8 and perform the same process: split each pile in half and compare the halves from that pile. Both times I get unequal results.

I then repeat the process with the four piles of 4. Again all four weighings are unequal.

I keep going to make eight more weighings comparing the individual coins in each pair formed previously. Again all weighings are unequal.

What are the possible compositions of the original pile of 16 coins?

See The Solution Submitted by Brian Smith    
Rating: 3.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 5
DefDbl A-Z
Dim crlf$, weight(16), solct, types$


Private Sub Form_Load()
 Form1.Visible = True
 
 Text1.Text = ""
 crlf = Chr$(13) + Chr$(10)
 
 addOn 1
 
 Do
   ix = InStr(types, ",")
   If ix Then
     Text1.Text = Text1.Text & base$(Val(Left(types, ix - 1)), 17) & "  "
   End If
   Text1.Text = Text1.Text & crlf
   types = Mid(types, ix + 1)
 Loop Until ix = 0
 
 Text1.Text = Text1.Text & crlf & solct & " done"
  
End Sub

Sub addOn(wh)
  For new1 = 9 To 11
    weight(wh) = new1
    good = 1
    tst = wh: cpar = 1
    Do While tst Mod 2 = 0
      cp1 = 0: cp2 = 0
      For i = 0 To cpar - 1
        cp1 = cp1 + weight(wh - i)
        cp2 = cp2 + weight(wh - i - cpar)
      Next
      If cp1 = cp2 Then good = 0: Exit Do
      cpar = 2 * cpar
      tst = tst / 2
    Loop
    If good Then
      If wh = 16 Then
        ct9 = 0: ct10 = 0: ct11 = 0
        For i = 1 To 16
         Select Case weight(i)
           Case 9: ct9 = ct9 + 1
           Case 10: ct10 = ct10 + 1
           Case 11: ct11 = ct11 + 1
         End Select
        Next
        encode$ = LTrim(Str(17 * 17 * ct9 + 17 * ct10 + ct11))
        If InStr(types, encode) = 0 Then
         types = types + encode + ","
        End If
        solct = solct + 1
      Else
        addOn wh + 1
      End If
    End If
  Next new1
End Sub

Function base$(n, b)
  v$ = ""
  n2 = n
  Do
    d = n2 Mod b
    n2 = n2 \ b
    v$ = Mid("0123456789abcdefghijklmnopqrstuvwxyz", d + 1, 1) + v$
  Loop Until n2 = 0
  base$ = v$
End Function

Finds

655  
565  
556  


98304 done

Meaning that there were 98,304 orderings of the coins in which this occurs (out of 3^16 =  43,046,721 possibilities). But, more importantly in answer to the question, all have six of one weight and five of each of the other two weights. Obviously not all cases of these compositions produce the given results, as sequence (ordering) matters, but these are the observed distributions of the three weights.

  Posted by Charlie on 2016-04-18 14:55:28
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (21)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information