Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In case you were wondering: "As in ordinary ternary numbers, the digits of a balanced ternary numeral are coefficients of powers of 3, but instead of coming from the set {0, 1, 2}, the digits are –1, 0 and 1."

e.g.

1 x 3^3 - 1 x 3^2 + 0 x 3^1 + 1 x 3^0,

Imagine, trits instead of bits. I like the idea of base e, if unrealistic.

(BTW: I have an old answer on Math.stackexchange that cheats by using base 3: http://math.stackexchange.com/a/734723/108109 )



If you like the idea of e as a base I wrote a post about how you can do that, at least asymptotically, which might be of interest.

http://hummusandmagnets.tumblr.com/post/48829755849/how-to-u...


We'd all be more attuned to power laws if we thought in base 3. :-)

I like the -1, 0 and 1 concept, but is there any way to pull it off from an electrical engineering concept? Or would it all have to be overlayed as software?



If you assume a current I=0 represents 0 and I=i represents 1, you could instead choose I={-i,0,i} to represent {-1,0,1} using just 1/6 more power.


Galois field theory says there is no difference in using {0, 1, 2} or {-1, 0, 1}


Is that "no difference" in the sense that all turing complete languages are "the same", or in some more practical sense?


For representing a number, it makes no difference at all. For binary you can use on/off, up/down, positive/negative etc. For trinary you can have on-mid-off, up-mid-down, positive-neutral-negative, and so on. Any symbols will do as long as you define the math in terms of the symbols you pick.


Erm not under multiplication, it seems:

{a,b,c} => {0,1,2}-> A | {-1,0,1}-> B

b * c * c = 1 * 2 * 2 (A) != 0 * 1 * 1 (B)


Well, the problem is notation which is quite misleading here. Firstly, sets don't have order so {-1,0,1} == {0,1,-1} == {-1,1,0}. And the symbols "1", "-1" and "0" are quite misleading as well, especially if you are not familiar with finite fields. In reality the symbols "1", "-1" and "0" represent (infinite) sets and mathematics can be done using any "representative" of that set. For this particular example "-1" and "2" are part of the same set, however mathematics has this notion of "well-defined" so if you choose to do your calculations in say {0, 1, 2} and I do it in {3, 4, 5}, we will have the same answer.


You get the same answer if you only use '+', but you may get a different answer if you use 'x', that was my point. In other words, once you have a "canonical" addition table for the elements of a set, there are many multiplications tables to choose from which "extend" the addition in a straightforward way.

Sorry not very knowledgeable on this stuff so it took a long detour.


Ok, no problem. However once again that is not true and it has to do with the underlying mathematical structure (for which + and * are defined). Here is an easy way to think about: Imagine a filing cabinet with 3 drawers. Drawer 1 has papers "0", "3", "-3", "6", "-6" and so on. Drawer 2 has papers "1", "4", "-2", "-5" and so on. Drawer 3 has papers "2", "-1", "5", "-4", "8" and so on. So how do we add the two papers? Well you simply look at the numbers so "1" and "2", for example, and you add them -- we get "3". Now where do we put it under? Drawer 1, as it has the "3" in it. Or say we want to multiply "4" and "2", we just "multiply" and get "8", so it goes into Drawer 3. Now I say Drawer 1 should be labeled "0", Drawer 2 "1", and Drawer 3 "-1". But you might call me a sinner and a liar and say that Drawer 3 is "2". But it doesn't matter! "-1" and "2" are both equally valid and can be used as labels. Heck, you could even call it "8".


Oh so multiplication actually works nicely! Neat, thanks for the explanation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: