How Can I Solve This Unique Weight Balancing Problem Using Balanced Ternary?

  • Context: Undergrad 
  • Thread starter Thread starter ged25
  • Start date Start date
  • Tags Tags
    Sum
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
ged25
Messages
6
Reaction score
0
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.
 
Physics news on Phys.org
Welcome to PF!

Hi ged25! Welcome to PF! :wink:
ged25 said:
I haven't gotten further than understanding that value on the pans must be 3x or 3x + 1.

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