
"Computer
Science is no more about computers than astronomy is about telescopes."
Edsger W. Dijkstra

A
puzzle Algorithm
Number system
Negative numbers
Formal Requirements
Fractional numbers
Zero
Resolution
Comparison
Tristate & Base3
Equiprobable?
Addition
Multiplication
Multiplication
of fractional numbers
Division
Discrete Systems, Computing
and Formal logic
3ary systems
Data Compression
Other Fields
Epilogue
History
Bibliography
Contact


A
puzzle to solve 
It
all started with my roommate in academy offering me an innocuous puzzle
to solve.
He said "if you were
to weigh all integer weights from 1 to 40 using a physical balance and
just 4 standard weights, (placed on either pans) how would you do it.
What would be your choice of the 4 standard weights?"
I will urge you to toy with
this puzzle at least a few minutes to enjoy the essence of this article. 
The
solution to that puzzle turned out to be 1, 3, 9, 27. By using the combinations
of only these weights in either pans as above it was possible to measure
any weight between 1 and 40.
like 5 = 9  3  1, so you put 9 on one side and 3 and 1 with the weight
you measure.
32 = 27 + 9  3  1
and so on.
That was very interesting
 because these numbers showed a property. 1, 3, 9 and 27 were three raised
to the powers of zero, one, two and three respectively. Why this pattern?

Immediately
one would like to investigate if this property was valid for larger
numbers or was just a coincidence.
I did and it turned
out that is does! You could go on representing any number however
large as combinations of radicals of three.
Something like 345 = + 243 + 81 + 27  9 + 3
or
242424 = + 177147
+ 59049 + 6561  243  81  9
Here are some more examples which you
must look if you are coming across this first time. 
The fact that all numbers
however great could be expressed as a unique combination of sums and subtracts
of radicals of three, each used only once,
and in such a structured and predictable*
manner, offered great possibilities to me and it was not easy to sleep
with it for all these years.
It could have many applications.
One of which  it could
be a number system!
*predictable because we
have a simple algorithm that generates these numbers for any arbitrary
given number. There is a program discussed below which generates these
numbers.

Before
you grow skeptical and leave at this stage. I would like to clarify the
following.

Please dont confuse
this with a base 3 number system  no relation to it.
There is a
comparison between the two systems later.

Here
is a Pascal program to prove that
any number however large can be indeed represented. And in a structured
and predictable manner.

And
here is an executable program (Windows) which generate those
crunches for any number you enter. So this is immediately testable.
We can have all kinds of positional number systems. We can have
base 1 and we can even have base 100,000 or any number in the
middle. Base 1 would mean drawing a tick on the wall as many
times as the number is.
Base 2 we call binary, base 10
we call decimal, base 16 we call hexadecimal, and there can
be any others, like the duodecimal system, base 12. They are
quite general of the form ax^{n} + bx^{n1}+cx^{n2}
+ ... where a,b,c are the digits and x is the base. Nothing
spectacular about any particular one. But they are not completely
the same.
Some of these offer more efficiency
than others in not producing recurring decimals (irreducable
fractions). The more the number of prime factors, the better
the system in that respect. A related issue is the periodicity
of the recurring decimals and the frequency with which they
occur. For example division by 3 offers more frequently than
division by 5. But there is also the issue of efficiency between
the number of digits required and size of the symbol table.
All of these number systems are not equally efficient in this
second aspect. This is explained further here.
It turns out that the most efficient
would be the base of the natural logarithms e, which is equal
to 2.71828 Since this is a fractional number, its not so easy
to work with. The nearest integer value is 3. Hence base 3 would
be most efficient of all the place value number systems, also
called positional notation.
Here, in this article we are
not talking of base three, we are talking of more than that,
a polar place value system which turns out to be even more efficient.
But three is anyway very good.


The Algorithm
The algorithm whose code is here can be described
as a "reach and step back" algorithm.
Reach for the highest radical of three which is greater than the target
number. Now measure the gap between the radical and the target number.
If the gap between the number and the radical is greater than half of
the radical value, then step back by inserting a negative value equal
to the next smaller radical. If the gap is smaller than the half value,
then insert the next nearest lower radical as a positive value to continue
in the forward direction. The resultant gap that remains is to be filled
by the using the same above algorithm recursively till the target number
is reached. 
How
a number system? Because
you could represent any number simply using three symbols: +  and 0
placed in the respective place values of 3^0, 3^1, 3^2 and so on.
Like
89= +81 +9 1
= +3^4 + 3^2  3^0
= +0+0_{(tristate)}
(the zeroes stand for place values of
3^3 and 3^1 which were not used in this number)
34343=
+59049 19683 6561 +2187 729 +81 1
= + 3^10  3^9  3^8 + 3^7
 3^6 + 3^4  3^0
= ++0+000
Any
number can be represented, this software
generates this for any number.
Negative
whole numbers
Then I started looking at what it does with negative numbers and a most
interesting property showed itself.
It
was possible to represent any negative number, without the need
of using a negative sign.
For
example
78=
81 +3
= 00+0
The
sign was contained in the number. This could be most useful, especially
for computers. We do not need to send an extra bit to represent the
sign + or  . Therefore it has cut down all the complications that we
face in trying to represent a negative number in binary system. ( The
1's complement and 2's complement methods). The existing system needs
a difficult algorithm to do mathematical operations on these signed
operands. The beauty was also that you could obtain a negative of a
number by just inverting the symbols in their own places and vice versa.
So that was an easy transform.
Inversion: + becomes ,  becomes + and 0 remains 0.
How
do we recognise a negative number by looking at it?
The first digit of a negative number will always be 
Similarly a positive number will have its first digit as +
This could be counted as one of the properties of this number system.
What
are the formal requirements of a perfect number system?
 That all numbers had a unique
representation. (meaning you could not have two ways to define
the same number.
 That no number went unrepresented.
There were no gaps in the entire number line till infinity.
 Two representation did not
represent the same number. It is the converse of (1)
 That all symbolic representations
must map to a number. (that there will be no number without
any meaning)
This number system met all of
the above requirements.
This was a place value number
system but with a difference  each place could either be positive
or negative or neutral. So lets call this a polar place value
system. Unique in itself. 
Why such a property should
come our way. And why this is unique to the number three does not seem
to have any easy apparent answers but its worth investigating. Perhaps
from group theory.
I used to call it the
tristate number system  indicating the three states that the digits
can resolve to. A friend suggested that the symbols themselves be called
trits  like bits, digits. So we shall call them trits hereafter.

It
was enticing to investigate this for fractional numbers now.
Representing fractional numbers is a big problem for computers. For
example, if we were given to express .4386 in binary, the binary system
would go on generating a stream of numbers inching its value towards
the desired value, but alas it could have denoted only 57% of the value
in the first two significant digits {.011_{binary}/.4386}
= {(.25+.125)/.4386}, and upto 85% by the third place of binary decimal
{(.25+.125+.0625)/.4386} and 99% by only the fourth place of decimal.
But the real difficulty of working with binary fractional numbers comes
in terms of including the sign inside the number and then working with
them. The practical schemes worked out include a sign bit typically
and create overflow errors at the most significant bit.
Lets
begin with what our tristate digits (trits) after the radix point (tristate
point) looks like. Like any other place value system they would
be 3^n : 3^1, 3^2, 3^3 and so on. They would be 1/3, 1/9, 1/27 and
so on.(tristate
point like decimal point, binary point)
Lets
see what happens if we add these tristate fractional numbers:
1/3 + 1/9 + 1/27 + 1/81 + ....An
interesting property shows up here too.
The
summation of 3^n where n tends to minus infinity is a convergent
series that equals exactly to .5
In
other words, if we added an infinite string of tristate numbers
after the tristate point, we could at best make up a number no greater
than .5
So
to define .5  we would run into an infinite string of digits, although
reaching 99% of the value in 5 digits of tristate (trits). And we could
use one of the other values in the middle to reach any other point in
the middle. But definitely, we can cover this whole zone between 0 and
.5 with great accuracy. BUT, this covers exactly only half the length
between 0 and 1 on the number line. Whereas the binary system covers
the whole zone between 0 to 1 because summation of 2^n and n tends
to infinity is equal to 1. This might appear unpromising at first sight,
for tristate, but as we shall see below this is exactly what should
be expected if we are to move the tristate miracle down to the real
domain representation. This will be resolved by a two pronged approach.
For numbers greater than .5 and less than 1 we shall use the same numbers
but expressed as subtracts from 1. This bidirectional zooming ( z and
1z) can get us to any point in the number line.
Positive
fractional numbers
for all z such that (0 < z <= .5) the numbers get expressed as
0.+tristate,
for example 0.+0
or 0.000+
The first significant digit (non zero digit) after the tristate point
being a +
As
it turns out all positive fractional numbers have the first significant
digit as a + and all negative fractional numbers (discussed next) have
 as the first significant digit.
for
all z such that (.5 < z < 1) the numbers get expressed as
+.tristate,
for example +.+0
or
+.00+0
(hence
the part after tristate point as subtracts from unity)
Negative
Fractional numbers
for all z such that (0 > z >= .5)
the numbers get expressed as 0.tristate,
for example 0.0+
or
0.00000+
for all z such that (.5 > z > 1) the numbers get expressed as
.+tristate,
for example .+0+
or .0++0+
But as a pay off from this two pronged approach to reaching a number
on the real plane quickly which would result in
far greater resolution. By resolution I mean that we can represent
fractional numbers far more accurately without running into huge strings
of numbers after the tristate point.
The beauty is that this convention we have just chosen turns out
to be the natural one because the resultant tristate numbers work through
the arithmetic operations with the same generality. This is illustrated
later. This is the inventive step.
The discrete has become truly continuous.
Lets
try to represent a few numbers as tristate fractional numbers.
Say,
we want to represent .4389_{(decimal)}
0.4389 =
3^{n} 

value 

Cumulative
Total 
Balance 
Percentage
Error 
1 
1/3 
.33333333 
+ 
.333333 
.105567 
24% 
2 
1/9 
.11111111 
+ 
.444444 
+.005544 
1.2% 
3 
1/27 
.03703703 
0 
.444444 


4 
1/81 
.01234567 
0 
.444444 


5 
1/243 
.00411522 
 
.440329 
+.001429 
0.32% 
6 
1/729 
.00137174 
 
.438957 
+.000057 
.012% 
7 
1/2187 
.00045724 
0 
.438957 


8 
1/6561 
.00015241 
0 
.438957 


9 
1/19683 
.00005080 
 
.4389062 
+.0000062 
.001% 
To
represent a number between .5 and 1
Lets say the number is 0.7182818
This number is larger than
.5, so we shall find the 1s complement of it. (subtract from 1) which
is equal to 1  0.7182818 = 0.2817182
.2817182 =
3^{n} 

value 
1/6
value* 

Cumulative
Total 
Balance 
Percentage
Error 
1 
1/3 
.33333333 
.0555555 
+ 
.33333333 
+.0516151 
18% 
2 
1/9 
.11111111 
.0185185 
0 



3 
1/27 
.03703703 
.0061728 
 
.29629629 
+.0145780 
5% 
4 
1/81 
.01234567 
.00205761 
 
.28395061 
+.00223238 
.79% 
5 
1/243 
.00411522 
.00068587 
 
.27983539 
.00188281 
.66% 
6 
1/729 
.00137174 
.00022862 
+ 
.28120713 
.00051107 
.18% 
7 
1/2187 
.00045724 
.000076207 
+ 
.28166438 
.00005382 
.019% 
8 
1/6561 
.00015241 
.000025402 
0 



9 
1/19683 
.00005080 
.000008467 
+ 
.28171518 
.00000302 
.001% 
10 
1/59049 
.00001693508 
.0000028225 
0 



11 
1/177147 
.000005645029 
.00000094083 
+ 
.28172083 
+.00000263 
.0009% 
12 
1/531441 
.000001881676 
.00000031361 
 
.281718949 
+.000000749 
.0002% 
13 
1/1594323 
.0000006272254 
.00000010453 
 
.2817183218 
+.000000121 
.00004% 
14 
1/4782969 
.0000002090751 
.000000034845 
 
.28171811274 
.0000000872 
.000030% 
15 
1/14348907 
.0000000696917 
.000000011615 
+ 
.28171818243 
.0000000175 
.0000062% 
16 
1/43046721 
.0000000232305 
.0000000038717 
+ 
.28171820566 
+.0000000056 
.0000019% 








*The 1/6th values and balance
are compared at every stage. Red>Green.
When the magnitude of the balance is less than 1/6 value, the next digit
is a zero. This is as per the algorithm discussed later.
There is an
interesting variation to this worth studying.
.2817182 = 0.+0++0+0+++
Click
for full view

The
above is a pictorial representation for an intuitive overview
of how tristate numbers dendritically come to occupy the whole
number space. 
Therefore .2817182 = 0.0+++00+++
[ Inverting the bits ]
Therefore .7182818 = +.0+++00+++
[ Expressed as 1  z ]
If we add 2 (+.0) we get
+.0000000000000000
+ +.0+++00+++
____________________
+0.0+++00+++
Therefore, the Euler number
e = 2.7182818 can be expressed as +0.0+++00+++
*Note: Why 1/6 value ?
Because the algorithm refers to the 1/6 value while taking a decision
on the next digit for fractional numbers.
Each trit and its subsubsequent branches cover exactly 1/6 of its own
value on either side of it. Making a total of 1/3 the space. If the balance
is less than 1/6 value in magnitude (in any direction), it follows along
the current stem. If greater than 1/6, it is expressed in terms of the
next digit which is a neighbouring stem.
Each trit term is exactly 3 times of the next term in value.
The reason is obvious though.
3^{(n+1)} = 3^{(n1)} = 3^{n} x 3^{1}
= 1/3 (3^{n})
[ A^{(m+n)} = A^{m} x A^{n} ] ; 3^{1}
= 1/3
Hence the next term is one third of the previous term.
Algorithm
for fractional numbers
The algorithm for generating fractional numbers is a little different
from the algorithm for generating whole numbers. It is very similar but
not the same.

Due to the two pronged
approach for numbers greater than .5 and less than .5

The algorithm is not quantised
to whole numbers, its over the continuous.
The algorithm is

Find the largest radical
of 3 just larger than the target value

Assign it and calculate
the difference

If the difference is
positive then the next term is to be expressed by a negative sign
and vice versa

If the magnitude of
the difference is less than or equal to 1/6 of the current radical
then insert a zero in the next place and the balance to be attempted
in subsequent radicals.
For
negative fractional numbers
Say you want to represent .6729,
it would just be the inverted bits of +.6729. This is much simpler and
straightforward than current binary representation.
More
examples

The
representation of the number zero
The
number zero is represented by 0
or 0.0
There is no problem of a negative zero representation as
has been the case with some binary representation like 1's complement
method.

Irrational
Real numbers
I would like to experiment with
reaching the values of some of the traditional irrational numbers like pi,
e , roots of prime numbers etc using the tristate numbers and see if it
results in any efficiencies or patterns. Some of these are are called transcendental
numbers because it is provable that they are not roots of any polynomial
expression. May we explore these for patterns. 
Resolution
Lets be quantitative about our claim of resolution
and compare it to other systems.
How does
the resolution of a tristate number compare to the binary system for an
arbitrary rational number?
The
following two figures are about a similar question being asked by
Brian Hayes for base 2 and base 3 systems, as compared to the base
e.



Figure
1. Most economical radix for a numbering system is e (about 2.718)
when economy is measured as the product of the radix and the width,
or number of digits, needed to express a given range of values.
Here both the radix and the width are treated as continuous variables.


Figure
2. Most economical integer radix is almost always 3, the integer
closest to e. If the capacity of a numbering system is rw, and the
cost of a representation is rw, then r=3 is the best integer radix
for all but a finite set of capacities. Specifically, ternary is
inferior to binary only for 8,487 values of rw; ternary is superior
for infinitely many values.

But tristate
is more than just ternary.
Where does the curve for tristate numbers fit in into the above ?
Let us compare between tristate and Base 3
for one arbitrary example.
0.4389 =


Place value 
Tristate 
cumulative
value 
balance 
error 
Base
3 

cumulative
value 
balance 
error 
1 
1/3 
.33333333 
+ 
.333333 
.105567 
24% 
1 
.33333333 
.33333333 
.105567 
24% 
2 
1/9 
.11111111 
+ 
.444444 
+.005544 
1.2% 
0 




3 
1/27 
.03703703 
0 
.444444 


2 
.07407407 
.40740740 
.0254926 
5.8% 
4 
1/81 
.01234567 
0 
.444444 


2 
.02469134 
.43209876 
.0068012 
1.5% 
5 
1/243 
.00411522 
 
.440329 
+.001429 
0.32% 
1 
.00411522 
.43621399 
.0026860 
.61% 
6 
1/729 
.00137174 
 
.438957 
+.000057 
.012% 
1 
.00137174 
.43758573 
.0013142 
.29% 
7 
1/2187 
.00045724 
0 
.438957 


2 
.00091449 
.43850022 
.0003997 
.09% 
8 
1/6561 
.00015241 
0 
.438957 


2 
.00030482 
.43880505 
.0000949 
.02% 
9 
1/19683 
.00005080 
 
.4389062 
+.0000062 
.001% 
1 
.00005080 
.43885585 
.0000441 
.01% 












In this arbitrary example, we find that
the tristate is more efficient than the base 3 at every point along the
resolution. It is apparent why this ought to be the case. The tristate
system has exactly the same pieces but it can be opportunistic about it.
This gives it an advantage. How can we quantify that advantage. We can
see that towards the end the tristate numbers are accurate by many folds
over their Base 3 counterparts.
Equiprobable?
Are the occurences of any of of the tristate trits: +  0 : equiprobable
?
Equiprobable over whole numbers or real numbers ?
They should be. Although all positive numbers start with + and negative
numbers with a  but for the balance significant digits they seem to have
an equal distribution. At least in this exercise
for whole numbers upto 40. In each of the epochs shown in different colors,
the digits occur in equal frequency. Since the tristate system  like
fractals is so selfsymmetrical, we could assume that this should be the
case even for real numbers.
In such a case, can we quantify how often the advantage of tristate will
show up visavis Base 3? Should it be around 33%. What efficiency results
if we could be opportunistic 33% of the time. In the example above, we
find that the tristate system has resolved the number better by 10 times
compared to Base 3, by the 9th place of radix point.
Also, we have seen that Base 3 is nearly equal to Base e, so where does
tristate lie vis�vis the Euler number, which has the theoretical highest
efficiency? Is it superior, is it inferior, by how much ?
Perhaps, we have now reached the theoretical
limit of packing numbers into digits.
Let us get further insight by considering
a worst case scenario for tristate.
Consider
the case of .5 which is pretty much one of the worst
case. Any other case is expected to be equal or better. .5 also
happens to be one of the worst cases of base 3 and performs similarly.
.5 = 1/3
+ 1/9 + 1/27 + 1/81 + ....
= .333333 + .111111 + .037037 + .012345 +
= 67% of the target value in first significant digit
calculation: 1/3 = .333333
.333333/.5 = .666666
89% of the value in the second digit
calculation: 1/9
= .111111
.333333+.111111 = .444444
.444444/.5 = .888888, therefore 89% within
the first two digits.
96%
of the value in the third digit
1/27 = .037037
.333333 +.111111 + .037037 = .481481
.481481/.5 = .962962
98.76% of the value of the target number in the
first four significant digits
1/81 = .012345
.493827/.5 = .987654
99.58% in the first five digits
1/243 = .004115
.497942/.5 = .995884
with the next digit it goes to 99.86% accuracy.
Therefore
.5 = .++++++_{(tristate)}
If 99.5%
in first five digits is the case with .5 which is the worst case, we can
expect to do better than this for any other arbitrary number on the number
line.
In binary
system, .5 would be expressed to 100% accuracy in just one significant
digit (0.1_{binary}) after the binary point, but thats the best
case scenario for the binary system. It would be nowhere nearly as good
if it were to express .51785 for example, a number only 3.5% away from
.5
In the end,
we have to analyse which systems produce best results overall for most
points on the number line. That is the point I am trying to make. Some
formal treatment may be in order. 

Simple and Efficient Operations
Another exciting feature that follows is the
much more efficient and simplified algorithm for mathematical operations.
The Tristate system appears to be nature's chosen one. Addition
Every Tristate number is inherently positive
or negative. The sign is contained inside the number itself.
Also, since xy = x + (y), if we need to subtract y from x, we only need
to invert the trits of y and add them. Therefore we only need just one
kind of operation for both addition and subtraction.
The ground
rule are pretty much like normal arithmetic with the following rules,
carried out right to left.
() + () = + and Carry = 
(+) +() = 0
(a neutralisation)
(+) +(0) = +
() +(0) = 
(+) + (+) =  and Carry = +
Commutative
and Distributive laws apply.
Examples
++++0
345
+ ++0
+ 98
____________________________
++++
443
Addition
of two fractional numbers
Align the
radix point (tristate point) and plain add.
0.++00
.4389
+
0.++00+
+ .25483
______________________________________
+.0+++
.694000389
Special note: There is a small difference with .4389
+ .25483 which is .69373 , this is because we were rounding off values
in every stage of the derivation of the tristate number from the respective
decimals.
This should lead to a substantial reduction to hardware required to implement
these operations in a machine. Also it will be much simpler and faster.
Multiplication
The rules
are
(+) * (+) = + (the are same rules as plain arithmetic)
(+) * () = 
() * () = +
(0) * (+) = 0
(0) * () = 0 (anything multiplies by 0 is 0, much the
same)
Commutative
and Distributive laws apply.
Example
+0+0
75
x +0
x 6
_________________________
00000
450
0+0
+0+0
_________________________
+000
450
Multiplication
of two fractional numbers
+0.0+++00+++
2.7182818
0.++0000
.4389
_________________________________________
1.19305388
Carry 




+ 
+ 


 


+ 
 



+ 
+
+
 

 
 
 
















 
0 
+ 
0 
 
 
 
+ 
+ 
0 
+ 
0 
+ 
 
 
 
+ 
+ 








0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 








0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 








 
0 
+ 
0 
 
 
 
+ 
+ 
0 
+ 
0 
+ 
 
 
 
+ 
+ 








 
0 
+ 
0 
 
 
 
+ 
+ 
0 
+ 
0 
+ 
 
 
 
+ 
+ 








0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 








0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 
0 








+ 
0 
 
0 
+ 
+ 
+ 
 
 
0 
 
0 
 
+ 
+ 
+ 
 
 








+ 
0 
 
0 
+ 
+ 
+ 
 
 
0 
 
0 
 
+ 
+ 
+ 
 
 








Result 
+ 
+ 
 
 
+ 
 
0 
 
+ 
 
+ 
 
0 
+ 
0 
+ 
+ 
0 
0 
+ 
+ 
+ 
0 
 
+ 
+ 
The result is +.++0++0+0++00+++0++
which is equal to 1.1930720112 calculated
upto the 16th place. The result varies from the 5th place of
tristate point because one of the operands .4389 was only calculated
to the 4th place of tristate.
It is however clear that the algorithm works for fractional numbers.
Amazing!
What is that field of mathematics that explores these structures
in the universe of numbers? Why these simple rules of arithmetic
that applied to positional number systems and explained through
polynomial algebra should work for this radically different
polar structure. And also to our serendipitous convenience. 
Division
A simple rule for division has been hard to come by so far. This is one
of the reasons for withholding the publication of this theory a long while
ago. It is less than complete in this one aspect. In any case the rules
for divisions for all systems so far has been very complex. In this case
too, we may have to resort to restoring or the
non restoring division algorithm. But I have a belief that a simple
scheme may simply be evading us. May be we can find a clue in the properties
of numbers discovered in other areas. A simple shift and carry algorithm
may be evading us. This may be found in tristate even though not in other
positional systems, because tristate has a distinction that all its positions
are occupied by just signs and not magnitudes. This is different. Hence
we might find a way for repeated subtraction which could be only an operation
of shifts and bitwise operations.
One of the strategies could
be working with reciprocals. For example if m/n is to be determined, we
could work with m x 1/n The terrain of the tristate has been so
fecund so far that we could perhaps find a relation between the expressions
of n and 1/n. If we could do that we shall have an easy operation for
division. It should be expected that an easy transform should exist because
division is a basic mathematical operation and only an inverse of the
multiplication operation.

The
advantages to Discrete systems, computing and formal logic
The many advantages to computing
systems have been outlined above. We only need to implement them to
demonstrate.
George
Boole  an English mathematician
in 1850s formulated some rules of formal logic using logical constructs
like the AND OR NOT etc called the Boolean Algebra. Many often confuse
Boolean Algebra as one and the same as binary computers or binary arithmetic.
Boolean Algebra uses two truth values  True and False, hence his system
in bivalued. Binary is also bivalued  zero and one, but the similarity
ends there. The constructs of AND NOT OR were later created in hardware
in the form of logic gates in binary hardware. But there is no reason
to think that these gates cannot be created in trivalue systems. Sometimes,
I have heard people say we cant have trinary computers because we would
have to reinvent Boolean Algebra. We dont have to. In fact a trivalued
system (and our tristate in particular) may have some unique advantages
in predicate
calculus, as described below.
Some hardware attempts
for trinary has been done in the past. We might gain from their past
work. It should be simple to extend from binary systems because the
additional symbol used is zero  which stands for neutrality and goes
unchanged in most/all transforms.
The opposite of true is
false. The opposite of one is not zero. However the opposite of positive
is negative. Tristate would allow you to define truth values in varying
magnitudes which can simply add or nullify each other. This should be
more useful for formal logic, especially if they have to deal with tautologies
which are not black or white but shades of gray. Fuzzy logic for example.
Suppose they had to sum them up or do other transforms on them, like
multiplication or matrices. There are also a class of statements which
are neither true nor false, perhaps, meaningless, unknown, indeterminate.
The neutrality symbol could come useful for that sort of argument. There
have been many who have suggested a third value for truth including
Aristotle, William
of Occam of Occams Razor fame and many others subsequently. Łukasiewicz
worked on his own
threevalued propositional calculus, which with just 3 axioms is
the most elegant axiomisation of propositional logic and is most used
today. And there exists a discipline called Multiple
valued logic.
A friend is working on designing
an Universal Turing Machine based on tristate.

3ary
systems
Communication systems use modulation
schemes that send out signals in m symbols, often in multiples of two.
These are called mary systems. Because
existing computers and automation systems are based on binary logic
most of the modulations have an order which is a power of two: 2, 4,
8, 16, etc. In principle, however, the
order of a modulation can be any integer greater than one.
Our 8PSK and 16PSK systems
are an evolution from the the above. What if we could have 3 PSK and
9PSK instead.
Perhaps 3 axis's could be
more efficient than our current quadrature based designs. It could perhaps
be easiest to resolve these points in a spectral constellation diagram.
The dendritical structure
of tristate numbers look so much like a trellis.

Data
Compression
One of the ways,
to achieve greater data compression lies in our ability to define a
point on the number line more and more efficiently (accurately using
less digits). As we have established that tristate is efficient in representing
numbers, a compression will definitely arise out of it.
Also the beauty of tristate lends naturally to progressively encoded
information, a situation whose applicability is in all data communication.
We shall need to design our algorithms which could take advantage of
this. 

Applications
of the Tristate concepts in other fields.

Practically in any
field that incorporates a differential arrangement. The
lengths of the various limbs in a robotic arm. The ratings of the
stepper motors required to achieve fine placement or for offering
finely variable torque. Or in fixing gear ratios to permit all possible
speeds. The optimum length of links in a crane scaffolding used
by constructors and firemen to reach all possible floor levels.
Just hypothetical examples to illustrate. Designers and technologists
can find the ones which are truly relevant.

Currency
notes/ Credit tokens.
The most economical ways to exchange money for the least number
of currency notes/ coins minted. Theoretically speaking. Perhaps
Internet Commerce which faces a challenge of micropayments can adopt
this model of microcoins to standardise transaction types and hence
bring down the cost of transaction that makes the concept unviable
today.

Cryptology:
More complex encryption can be achieved which will could resist
code breaking. Not just from the obvious obscurity from being non
standard, but also actual mathematical properties which are likely
to come our way.

Or the choice of
standard weights used by any shopkeeper from which the problem
initially evolve.

Or for Dewey Decimal
kind of system, where we always want space for extensibility of
the system.

In search algorithms
 an understanding of the assured uniform density and the bidirectional
zooming natural to the tristate system may help design superior
search algorithms of progressively denser searches.

In Quantum Physics,
where there are particles with like charges, opposite charges and
no charge. Similarly there are particles with spinstates which
are clockwise, anticlockwise and also no spin. Also, if in the future
we are to see quantum computing, may be tristate will turn out to
be the natural ally.

Did you hear of a
plate designed
by Carl Sagan which was sent as a message from earth to distant
space in a probe that was hurtling away from the Solar System at
an amazing speed towards outer space. The plate was engraved with
pictures and symbols that were to make some deducible meaning to
an intelligent alien if it were to meet one in its journey. The
information included numbers and there was a diagram to explain
how those numbers worked. Can you think of a most deducible
number system that would uniquely make sense to any kind of
intelligent life in the universe? We would have to do lesser "explaining"
of how the numbers worked.

Epilogue
I came across this idea in 1987 exactly in the manner described at
the beginning of this article. I tinkered with it, slept with it,
felt great joy. ( I was 17 in 1987).
With the access to Internet in India from homes possible since 1998,
I have often looked around on the net, but have found no references
of past work. So I have believed perhaps excusably that I invented
this independently. I sent this work to many others for review, publishing
where I could and on the web,
but not many seemed to take this seriously. Some individuals were
most appreciative though and one even supports me with a stipend until
today. Although I had the inkling, I was never completely sure about
the importance of this work. I often thought this was a specific quirk
perhaps known and explainable by group theory/graph theory, but its
remarkable suitability for computers which was completely ignored
was less explainable. Over the years, Internet and search has evolved
and more scientific work has come online, and most notable is the
development of the wikipedia in recent times.
I now know that this system is also called the balanced
ternary system. They are also called triadic numbers in some
places. It had been invented in the past (earliest recorded reference
in the 12th century) and some leading mathematicians and thinkers
of the computer world have worked on this and have expressed the foresight
of its possibilities to revolutionise computing. Many have known.
These leading figures include DeMorgan,
Cauchy (?), Dijkstra
and Donald Knuth.
The pioneers in this field were John
Colson (England, 1726), Thomas
Fowler (England, 1840s), S.
L. Sobolev (USSR,1950s), Brousentsov
N. P and others (USSR, 1970s), Gideon Friedar (US, 1973). Work
on the mathematical properties of balanced ternary has been done by
Axel Thue (Norway,1912) and subsequently others on the square free
properties of balanced ternary.
I
now know that the original puzzle of weights is of considerable historical
importance and has intrigued the minds of such greats at
Fibonacci and Mendeleev.
In fact it occupies its place just next to the rabbit problem in the
celebrated work Liber Abaci by Fibonacci. Why such an apparently pedestrian
puzzle should attract the interest of such perceptive mathematicians
is worth its due consideration.
The Moscow State University developed a few of these trinary computers
 "Setun". Fowler had designed a mechanical computer. The
Moscow machine however in the absence of ternary hardware, used binary
ferrite cores to encode ternary data hence the ternary advantage was
flittered away. Those were the days of vacuum tubes. I do not think
designing solid state devices suitable for ternary data would be an
insurmountable challenge. It would involve switching at two threshold
points or a compound transistor made from two standard transistors
using available technologies. Some suggestive work appears to have
been done in the past. What about memory storage in three states?
Three state hard drives are already around.
The detailed references of past work can be found here
in this bibliography.
This tristate system however beautiful has not been mainstream along
all its short journey, but it should be believed that this form of
computing could become mainstream very soon for its qualitative merits.
The computing industry took to binary computers based on flipflops
from the seminal Master's thesis
(also here) of Claude
Shannon (MIT, 1937) and has never stopped since to take a second
look. We must admit that computers are not bound to one kind of flipflops,
they are just a specific implementation, like horse driven carts are
one kind of transportation. Shannon was aware of Ternary towards later
when he writes about "A symmetrical notation for numbers",
American Mathematical Monthly 57:9093, in 1950.
Curiously, I wish to add
that all individuals who have shared an excitement with me over the
years have been deeply influenced by the writings of Douglas R Hofstadter,
the author of the book  "Godel, Escher, Bach: An Eternal
Golden Braid", amongst others. Bach's Art of Fugue, A
Musical Offering is about music in mathematics. Perhaps they saw
the connection in the self referential model of Hofstadter. Tristate
is akin to a self referential model.
Here is a perceptive Lshape
fractal designed by Declan Malone, Ireland, based on the tristate.
Declan also says "but the two fields that seem to be the basics
(Multivalued logics (Łukasiewicz)
and the elementary work of the Geometry of Numbers (Minkowski)
don't seem to have been put together before". Thanks also to
Declan for pointing out that the Dadekind
cut of the Tristate numbers is .5 (and other such numbers) which
I have simply described as the worst case scenarios.
The tiny unresolved small quantities that we work on are hence the
Cantors dust.
Some of the ideas expressed
in this article still continue to be the first expression on this
subject. For example the scheme for fractional numbers, I have not
spotted anywhere else, also a quantitative description of the superior
resolution of this system, its probable importance in communication
systems and the pointers left for further work in the other areas.
I would wish to work on this further. I wish to have this published
and I wish to offer presentations on this. Any kind of support / encouragement
on this is welcome. I truly believe this has a great future.

Abhijit
Bhattacharjee
5C, Nilanjana Apartments
43, Diamond Harbour Road
Behala
Kolkata 34
INDIA 700 034+91 33 2445 4900
+91 98303 98631
abhijit8086@yahoo.com
This page is available at
http://abhijit.info/tristate/tristate.html
Thanks to Rohit
Gupta who recommended that I need to update this content to a better
webpage than it was. 