Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Sum of unique powers of 3

  1. Jul 22, 2009 #1
    I have this problem where I'm having trouble solving so any help would be appreciated.

    Here's the problem:
    You have a balancing scale and a set of unique weights. Each weight that you have is a power of 3 ie you have weights 1,3,9,27 etc. You are given a weight w.
    The problem is to tell which weight goes on which pan so that the scale is balanced.

    For example:
    Suppose you are given weight with value 35.

    Solution:
    The left pan will have 35 + 1 = 36
    The right pan will have 27 + 9 = 36

    Another example with weight 52.
    The left pan will have 52 + 27 + 3 = 82
    The right pan will have 81 + 1 = 82

    I hope the problem is clear.

    I haven't gotten further than understanding that value on the pans must be 3x or 3x + 1.
     
  2. jcsd
  3. Jul 22, 2009 #2

    tiny-tim

    User Avatar
    Science Advisor
    Homework Helper

    Welcome to PF!

    Hi ged25! Welcome to PF! :wink:
    yup, that's a bit obvious, and I'm afraid won't help you. :redface:

    Hint: try it for the easiest cases, of weights of 1 up to 8, find a symbolic way of writing the answers, and see if you can find a pattern. :smile:
     
  4. Jul 22, 2009 #3

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    You know how to write numbers in base-3 (ternary), right?

    There's a direct correspondence between writing numbers in *balanced* ternary and the solution to this problem. Ordinary ternary uses the digits {0, 1, 2}; balanced ternary uses {-1, 0, 1}.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Sum of unique powers of 3
  1. Sum is unique? (Replies: 8)

Loading...