My Math Forum Some binary and ternary facts

 Number Theory Number Theory Math Forum

 March 23rd, 2014, 11:57 AM #1 Math Team   Joined: Dec 2006 From: Lexington, MA Posts: 3,267 Thanks: 407 Some binary and ternary facts How many weights are needed to weight integral weights from 1 to 100? We can use seven binary weights $\{1,\,2,\,4,\,8,\,16,\,32,\,64\}$ [color=beige]. . [/color]to weigh up to 127 pounds. To weigh 100 pounds, convert 100 to binary:[color=beige] .[/color]$\;\;\;100 \:=\:1,100,100_2$ This means:[color=beige] .[/color]$100 \;=\;1(64)\,+\,1(32)\,+\,0(16)\,+\,0(8)\,+\,1(4)\, +\,0(2)\,+\,0(1)$ $\text{And we have: }\;\begin{array}{c}100 \;\;\;\;\; \fbox{64}\,\fbox{32}\,\fbox{4} \\ \\ ------------- \\ \wedge \;\;\;\;\;\;\;\;\;\;\;\;\end{array}$ If we can place weights in both pans of the scale, [color=beige]. . [/color]we can use five ternary weights:[color=beige] .[/color]$\{1,\,3,\,9,\,27,\,81\}$ [color=beige]. . [/color]to weigh up to 121 pounds. To weigh 93 pounds, convert to ternary:[color=beige] .[/color]$93 \:=\:10110_3$ This means:[color=beige] .[/color]$93 \;=\;1(81)\,+\,0(27)\,+\,1(9)\,+\,1(3)\,+\,0(1)$ $\text{And we have: }\;\begin{array}{c}93 \;\;\;\;\;\fbox{81}\,\fbox{9}\,\fbox{3} \\ ----------- \\ \wedge \;\;\;\;\;\;\;\; \end{array}$ It can get a bit tricky. To weigh 100 pounds, convert to ternary:[color=beige] .[/color]$100 \;=\;10201_3$ This means:[color=beige] .[/color]$100 \;=\;1(81)\,+\,0(27)\,+\,2(9)\,+\,0(3)\,+\,1(1)$ $\text{And we have: }\;\begin{array}{c}100 \;\;\;\;\;\fbox{81}\,\fbox{9}\fbox{9}\,\fbox{1} \\ -------------- \\ \wedge \;\;\;\;\;\;\;\;\;\;\; \end{array}$ But we don't have two 9-pound weights . . . What can we do? Add a 9-pound weight to each side. $\text{And we have: }\;\begin{array}{c}100\,\fbox{9} \;\;\;\;\;\fbox{81}\,\fbox{9}\fbox{9}\fbox{9}\,\fb ox{1} \\ ------------------ \\ \wedge \;\;\;\;\;\;\;\;\;\;\; \end{array}$ Of course, we don't have three 9-pound weights, either. [color=beige]. . [/color]But we can replace them with a 27-pound weight. $\text{And we have: }\;\begin{array}{c}100\,\fbox{9} \;\;\;\;\;\fbox{81}\,\fbox{27}\,\fbox{1} \\ -------------- \\ \wedge \;\;\;\;\;\; \end{array}$[color=beige] . . [/color]There! Must we go through this juggling every time? . . . No! Convert 100 to ternary:[color=beige] .[/color]$100 \;=\;10201_3$ If a "2' occurs, replace it with "-1" and add 1 to the digit to the left. $\text{So we have: }\;\begin{array}{ccccc}1&0&2&1&0 \\ \\1 & 1 & -1 & 0 & 1 \end{array}$ $\text{This means: }\;100 \;=\;1(81)\,+\,1(27)\,-\,1(9)\,+\,0(3)\,+\,1(1)$ The "minus" means that that weight goes on the "other side". $\text{Therefore: }\;\begin{array}{c}100\,\fbox{9} \;\;\;\;\;\fbox{81}\,\fbox{27}\,\fbox{1} \\ -------------- \\ \wedge \;\;\;\;\;\; \end{array} \;\;\;\;\text{ ta-}DAA!$
 March 23rd, 2014, 12:39 PM #2 Global Moderator     Joined: Nov 2006 From: UTC -5 Posts: 16,046 Thanks: 938 Math Focus: Number theory, computational mathematics, combinatorics, FOM, symbolic logic, TCS, algorithms Re: Some binary and ternary facts

 Tags binary, facts, ternary

,

### what is a binary and ternary fact?

Click on a term to search for related topics.
 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post gelatine1 New Users 0 September 9th, 2013 11:35 AM johnr Number Theory 6 August 25th, 2012 03:26 PM sepotok999 Abstract Algebra 0 January 10th, 2012 05:09 AM snakebaby Elementary Math 9 September 21st, 2009 07:44 PM snakebaby Number Theory 6 December 31st, 1969 04:00 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top