# What are the fewest weights you need to balance any weight from a triangular seesaw?

I saw this question:

What's the fewest weights you need to balance any weight from 1 to 40 pounds?

Suppose you want to create a set of weights so that any object with an integer weight from 1 to 40 pounds can be balanced on a two-sided scale by placing a certain combination of these weights onto that scale.

What is the fewest number of weights you need, and what are their weights?

Now, the answer was weights of mass in powers of 3 (1, 3, 9, 27, etc.) since they can be placed in either pan. Apparently, this is not really what I conceive of as base-3, but something to the effect of a "-1, 0, 1" and not 0, 1, 2. I am using this reasoning for my guess on this for the triangular cause, but first let me state the question.

What kind of efficient powers of weight suspended from vertices would be required to balance a regular triangle? (The triangle is supported on its centroid (1/3 distance from side to opposite vertex).

And then, what kind of multiples of weights would be required to balance a regular tetrahedron "magically" fastened in space by its centroid (1/4 distance from centroid of triangular face to opposite vertex)? The tetrahedral case has 4 pans (instead of the triangular 3 or the linear 2).

You can add weight to a pan with an unknown weight already in it. Unknown weights can be of any whole number mass, but known weights must be added of mass $x^n$ with $n=0, 1, 2, etc$. What is the optimal $x$ for minimizing the number of weights used? You have an unlimited number of $x^0$ weights, unlimited $x^1$, unlimited number of $x^2$ weights, etc. Find the most efficient $x$.

My guess would be that for a triangle the answer is $4^n$: 1, 4, 16, 64, etc. My guess for the tetrahedral case, if there is only an unknown weight on 1/4 or 3/4 of the vertices, then maybe it could be $5^n$ and possibly $7^n$ for the case of 2/4 vertices with an unknown mass, since the unknown mass is centered on one of the 6 edges rather than the 4 faces/vertices.

• the original question I copy/pasted was in puzzling... puzzling is my source :) – Jasand Pruski Jul 29 '16 at 6:05
• So, I assume from the problem statement that in the "triangle case" you have a mystery weight on one (or two) of three pans, and you want to be able to rearrange your weights to make all three pans have the same weight. The confusing part is that I personally don't understand what you mean by the "tetrahedral" and "octahedral" cases. How many pans are in each, and how does one "balance" them? (A little confused since triangles are 2D, whereas tetrahedra and octahedra are 3D) – Dennis Meng Jul 29 '16 at 6:47
• no rearrangement of weights! unknown weights can be of any mass, but known weights must be added of mass x^n with n=0,1,2,etc what is the optimal x for minimizing the number of weights used... you have an unlimited number of x^0, unlimited x^1, unlimited number of x^2 weights, etc... find the most efficient x... the tetrahedral case has 4 pans (instead of the triangular 3 or the linear 2)... the "octahedra" merely refers to a weight on 2/4 tetrahedral pans so that the mass is centered on one of the 6 edges rather than the 4 faces/vertices. – Jasand Pruski Jul 29 '16 at 6:56
• @Jasand Pruski: That picture does not show a tetrahedron as a tetrahedron has only 4 vertices instead of 5 and never has two vertices on directly opposite sides of its center – The Dark Truth Jul 29 '16 at 7:33
• @TheDarkTruth A regular tetrahedron is most easily drawn correctly by connecting 4 of the vertices of a cube, and that is what was done here. The tetrahedron is ACHF. The vertex D is a vertex of the surrounding cube but not of the tetrahedron, and DF is only drawn in order to get the centre O of the cube/tetrahedron. – Jaap Scherphuis Jul 29 '16 at 7:45

Triangle case: If the triangle has three weights, we can subtract the smallest value from each side. That reduces to the case of only two unknown weights and a zero in the third pan.

The original problem defines the maximum weight as 40. Rather than examine this exact case, I assume an arbitrarily large MAX weight and solved for that. This will give an optimal solution for arbitrarily large MAX, but for specific values (such as 40) it may merely give a very good solution rather than an optimal one.

There's a particularly good solution I want to mention, which doesn't quite fit the rules. You can balance the two unknown weights using a single set of 3^n weights as in the solution for the original problem, then fill the empty pan using a single set of 2^n weights. This efficiently uses fewer weights in total, but requires two differing sets of weights.

To solve this problem we are going to be working in some base x, and assume each weight is a number written in base x. When solving any particular case we will work on it one digit at a time, starting from the smallest digit. If we can balance the triangle for the smallest digit, then we simply repeat the same process to solve each larger digit. Note that because the process is the same for each digit, we only need to ensure that our process works for the smallest digit. If it works for one digit it will work for every digit.

This means that for x=2, we only need to examine the cases where the weights are 0,0 0,1 1,0 and 1,1. For X=3 we only need to examine the cases where the weights are 0,0 0,1 0,2 1,0 1,1 1,2 2,0 2,1 and 2,2. Similarly for x=4 we only need to examine the 16 cases with weights ranging up to 3,3. If that works we can solve the lowest digit and the process can repeat to solve every digit.

When x=2 the worst case is when the unknown weights are 0,1. We can add 1 to the second pan - this changes it into a 0 and a carry into the next digit. This results in 0,0,0 for the lowest digit in each pan. (We don't care about the carry, it gets absorbed into the next digit and solved when we handle that digit.) We only need 1 of each size weight.

When x=3 the worst case is when the unknown weights are 1,2. We will need 2,2,2 to balance the triangle, meaning we will need 3 of each size weight.

When x=4 the worst case is when the unknown weights are 1,3. The most efficient solution is to add 3 to the first pan and 1 to the second pan. This means we'll have 0,0,0 as the lowest digit in each pan, and the weights generate a carry into the next digit. This means we need 4 of each size weight.

When x=5 the worst case is when the unknown weights are 1,3. The most efficient solution is to add 2 to the first pan and 3 to the empty pan. This means we need 5 of each size weight. And things just get worse for larger x.

So which is the most efficient x?

For x=2 we will need 1 weight of each size, times LogBase2(MAX) sized-weights.

For x=3 we will need 3 weights of each size, times LogBase3(MAX) sized-weights.

For x=4 we will need 4 weights of each size, times LogBase4(MAX) sized-weights.

For x=5 we will need 5 weights of each size, times LogBase5(MAX) sized-weights.

For an arbitrarily large MAX value, lower is better:

x=2 has an efficiency of 1/Ln(2)=1.4427

x=3 has an efficiency of 3/Ln(3)=2.7307

x=4 has an efficiency of 4/Ln(4)=2.8854

x=5 has an efficiency of 5/Ln(4)=3.1067

For arbitrarily large MAX weight best solution is x=2, with one copy of each weight.

For the tetrahedron yet the reasoning is essentially the same. We'll have three unknown weights, and we only need to find how many weights are needed to solve a single digit in the worst case.

For x=2 the worst case is 0,1,1. We need 2 weights to balance that as 1,1,1,1.

For x=3 the worst case is 1,1,2. We need 4 weights to balance that as 2,2,2,2.

For x=4 the worst case is 1,1,3. We need 7 weights to balance that as 3,3,3,3.

For an arbitrarily large MAX value, lower is better:

x=2 has an efficiency of 2/Ln(2)=2.8854

x=3 has an efficiency of 4/Ln(3)=3.6410

x=4 has an efficiency of 7/Ln(4)=5.0494 and clearly worse for higher X.

For a tetrahedron the most efficient is x=2 with 2 copies of each weight.

You can uniquely weigh items using paired weights, two for every power of $4$:

$\begin{matrix} \color{red}{1} & = & 1 & = & 1 \\ \color{red}{2} + 1 + 1 & = & 4 & = & 4 \\ \color{red}{3} + 1 & = & 4 & = & 4 \\ \color{red}{4} & = & 4 & = & 4 \\ \color{red}{5} & = & 4 + 1 & = & 4 + 1 \\ \color{red}{6} + 1 + 1 + 4 + 4 & = & 16 & = & 16 \\ \color{red}{7} + 1 + 4 + 4 & = & 16 & = & 16 \\ \color{red}{8} + 4 + 4 & = & 16 & = & 16 \\ \color{red}{9} + 4 + 4 & = & 16 + 1 & = & 16 + 1 \\ \color{red}{10} + 1 + 1 + 4 & = & 16 & = & 16 \\ \color{red}{11} + 1 + 4 & = & 16 & = & 16 \\ \color{red}{12} + 4 & = & 16 & = & 16 \\ \color{red}{13} + 4 & = & 16 + 1 & = & 16 + 1\\ \color{red}{14} + 1 + 1 & = & 16 & = & 16 \\ \color{red}{15} + 1 & = & 16 & = & 16 \\ \color{red}{16} & = & 16 & = & 16 \\ \color{red}{17} & = & 16 + 1 & = & 16 + 1\\ \color{red}{18} + 1 + 1 & = & 16 + 4 & = & 16 + 4 \\ \color{red}{19} + 1 & = & 16 + 4 & = & 16 + 4\\ \color{red}{20} & = & 16 + 4 & = & 16 + 4 \\ \color{red}{21} & = & 16 + 4 + 1& = & 16 + 4 + 1\\ \color{red}{22} + 1 + 1 + 4 + 4 + 16 + 16 & = & 64 & = & 64 \end{matrix}$

This is because every integer has a unique representation in base $4$ using digits valued $-2, -1, 0, 1$.

• i kind of don't understand but I think this makes sense in the case of a triangle... i am waiting for more confirmations. – Jasand Pruski Jul 29 '16 at 23:13
• Works while only one pan has a random weight at the start. Stops working when more than one pan can have a weight at the start. For example you will not be able to balance a 1,2,3-starting-weight-distribution with only two sets of your weights. – The Dark Truth Aug 1 '16 at 14:39
• @TheDarkTruth Yes, that's true. But if you have two things you want to weigh, you can just weigh them one at a time. – Anon Aug 1 '16 at 15:12
• @McFry The question however is not about weighing a certain weight but about balancing a triangular(and tetrahedral and octahedral) scale – The Dark Truth Aug 2 '16 at 6:38
• i am very uninformed in math (more into artsy synergetics stuff), but wouldn't 2 unknowns in a triangle have its center of mass on an edge, so this still has a triangle type symmetry but just reversed? – Jasand Pruski Aug 5 '16 at 19:52

In order to balance a Triangle every vertice needs to have exactly the same weight.

To show this we can look from a single vertice in the direction of the center and realize that the other two vertices would need to have the same weight as otherwise the triangle would tilt somewhere in the half of the heavier one (depending on the weight of the vertice you look from).

If we name the vertices as A,B,C and look from vertice A that would mean that vertice B and C would need to be equal.

If we now look from one of the other two vertices we can make the same deduction and thereby can see that all three vertices must have the same weight for the triangle to stay in balance.

In order to balance a weight on one vertice that would mean that we can simply use the same strategy as in the original question.
However instead of looking at a single empty vertice we now have two empty vertices which means that we need to place the same weights on each of these two vertices.
therefore we need 2 sets of weights of order $3^n$.

For the tetrahedron we can use the same general idea.

If we place a single vertice at the bottom we can again see, that all 3 vertices on top need to have exactly the same weight (as long as I understand the question correctly and don't make a deduction based on misunderstood logic).

Next place one of the other vertices at the bottom and we see that all vertices must have the same weight again.

So for the tetrahedron we again use the same strategy only this time with 3 sets of weights of order $3^n$.

Lastly we look at the octahedron.

As an octahedron has 6 vertices consisting of 3 pairs of vertices on exact opposite sides of the center we only need to balance each vertice with its opposite one.

So we use the original strategy 3 times for a total of 3 sets of order $3^n$.

Edit:

I just thought about it again and realised that i made a mistake with the triangle (not in the logic but in the number of sets required).

We effectively need to use our weights to make every digit of our base 3 weight numbers equal.
So if we have our 3 weights and $\mod 3$ them we would need to distribute our 1-weights on the 3 vertices to get the same result on each of them.
After that we take $\mod 9$ and distribute our 3-weights and so on until we balanced all 3 vertices.

We reach a problem with the triangle when we have a $\mod 3^n$ result of 0,1 and 2 as it is impossible to make them equal with only 2 sets of weights.

Therefore we will need 3 sets of weights for the triangle as well.

• I think the number of sets required makes sense in terms of the mod-3 mod-9 mod-27 etc makes sense in a greedy algorithm, but I just don't know if 3^n is the answer in all circumstances since I am not qualified to make such a judgement. I am hoping other people will confirm or deny. – Jasand Pruski Jul 29 '16 at 22:11