1. Chromatic Numbers and Ternary Algebra
Kavosh Havaledarnejad Icarus.2012@yahoo.com
Iran Tehran
Abstract:
This paper reviews a new format for representing 2-dimentioanal complex numbers (
complex numbers with one imaginary number ) based on 3 different colors red, blue and
green and review doing calculation in these type of coding directly. Approach can uses
straightly for complex numbers with more dimensions. For example a complex numbers with
2 imaginary number and can show using 4 colors. Then using this numbers we introduce
Ternary Algebra. One application of this Ternary Algebra is in dealing with NP-Complete
problems. Because some ( simplest forms of ) NP-Complete problems deal with number 3
like 3-Coloring, 3-SAT and 3-RSS ( the problem that we will propose here ) thus Ternary
Algebra has some benefits for computer science that Boolean Algebra has not. We will prove
the soundness and completeness of resolution systems on Ternary Algebraic CNF formulas
that author wish that him or others develop algorithms based on Ternary Resolution Systems.
Keywords: Complex Numbers, Calculation, Boolean Algebra, NP-Complete problems,
Resolution Theorem
Introduction
Beauty of Chromatic Numbers is that: they don’t use positive and negative signs and colors
are sign of these numbers. In this paper we show how we can write complex numbers as
chromatic numbers and do calculation on them directly. It is clear that doing calculation on
chromatic numbers is at least as easy as doing calculation on simple complex number. In the
rest of paper we first defines chromatic numbers and their standard form and then show how
we can do summation, subtraction, multiplication, inverse and division on them directly.
Finally we close the discussion by power and root. However calculating a real power
operation on chromatic numbers is hard but however it is hard for simple complex number
when we write them based on summation of a number and an imaginary number. Calculating
power 2 for green and blue numbers and calculating root 3 for red numbers in this coding is
easy but doing more calculation didn’t review in this paper.
At the second part of this paper we will extend the Ternary Algebra based on Chromatic
Numbers. We will show their application in formulation of some NP-Complete problems. We
can easily show a 3-SAT problem using Boolean Algebra in CNF and also we can show a 3-
SAT problem in the space of hyper-graphs. We can also show 3-Coloring and 3-RSS
problems respectively using graphs and multi-partite graphs but one may ask that how we can
show 3-Coloring or 3-RSS as mathematical formulas this paper is a respond to this question.
At the end of paper we will show all types of resolutions on Ternary Variable Clauses and
prove the Resolution Theorem in Ternary Algebra space consists of Soundness and
Completeness of resolution on ternary algebraic CNF formulas ( TCNF ) that can use in
2. designing algorithms for 3-RSS and 3-Colorability problems or some other applications in
Artificial Intelligence.
1. Chromatic Numbers
A chromatic number is simply a positive weighted combination of 3 colors r, g and b. Note
that this combination has not sign because colors are sign of these numbers.
Definition 1. A chromatic number is a number in the form:
Where:
And:
It is obvious that:
And:
Also:
( )( )
And:
( )( ) ( )( )
From symmetry we have:
( )( ) ( )
Also with a simple calculation:
( )( ) ( ) ( )( ) ( )
( )( ) ( ) ( )( ) ( )
( )( ) ( ) ( )( ) ( )
1.2
1.1
3. ( )( ) ( )( )
( )( ) ( )( )
We can show in a diagram like (Fig. 1). From this diagram we can
show that:
( )
√ √
And from symmetry:
√ √
As a further check:
( )
√ √ √ √
(Fig. 1)
Also we can calculate from :
√ √
( )
Also:
Using this formulas we can convert every complex number to a chromatic number and wise
versa.
1.3
4. 2. Chromatic Number in standard form
A chromatic number in standard form can be only combination of only 2 colors like red and
green, red and blue or green and blue
Definition 2. Every chromatic number in standard form can be only combination of 2 colors
if not we can convert it to standard form.
Proof. Assume we have a chromatic number including 3 different colors arbitrary. It will be
in the form:
But always one of this numbers are minimum without loss of generality we can
assume that is minimum thus we have:
( )
( ) ( ) ( )
But based on formula 1.2. we have thus:
Only two of them. Proving the theorem.
3. Calculations:
In this session we show how we can do calculation in chromatic numbers.
3.1. Summation and Subtraction
Summation and subtraction of chromatic numbers can handle directly by summation and
subtraction of colors separately from each other.
( ) ( ) ( )
And:
( ) ( ) ( )
After summation or subtraction some values may be negative based on 1.2 we have
5. Thus we can transform it to positive case easily. Then we must convert the number to
standard form by the method which used for proof of definition 2.
3.2. Multiplication
Based on equation 1.1 we have and also
thus we can calculate multiplication on chromatic
numbers easily:
( ) ( )
( ) ( )
Also for multiplication of two chromatic number we have:
( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( ) ( )
( ) ( )
( )
After multiplication we have not negative number but maybe we have a combination of 3
different colors thus we can transform the number to standard form arbitrary.
3.3. Division
We can calculate division of 2 chromatic numbers using multiplication on first number and
inverse of second number. For calculating inverse of a chromatic number we must find
coupled of a chromatic number.
3.3.1. Coupled of a chromatic number
Based on Fig. 1 coupled of a chromatic number in form:
is:
̅
We can calculate multiplication of them easily that is:
̅ ( )
3.3.2. Inverse of a chromatic number
Consider inverse of a chromatic number in the form:
6. With multiplication by coupled we have:
( ) ( ) ( )
Thus we can find division of two chromatic numbers by multiplication of first with inverse of
second.
4. Power and Root of a chromatic number
Based on extension on equation 1.1. we have:
{
( )
( )
( )
{
( )
( )
( )
It is obvious that a number in the form:
( )
Also:
{
( )
( )
( )
It is obvious that a number in the form:
( ) ( )
Also based on equation 1.1. We have:
√
√
√
Also:
7. √ ( )
Because:
( )
And:
√ ( )
Because:
( )
And:
√ ( )
Also:
√
√
( )
√
( ) √
√
( )
√
( )
Because:
{
√
( )} ( )
Also based on 1.3:
√
( ) √ √
√
( ) and
√
( )
And:
√ √ ( )
And:
√√ √
√
( )
And there is an estimation that:
√
√
( )
Also:
8. ( )
(
√
)
√ √
√
And from symmetry we have:
√
Also we can calculate:
√ ( ) √
And from symmetry we have:
√ ( ) √ √
It is obvious that:
5. 3-RSS problem
In this session we will introduce a new NP-Complete problem namely 3-RSS by reduction
from 3-SAT and whereas this problem is in NP thus this problems is also NP-Complete ( both
NP and NP-Hard). It is a well-known fact that whole problems in NP can reduce to 3-SAT problem.
It is known as Cook-Levin theorem ( see [1] ). We here introduce a reduction from 3-SAT to a new
problem namely 3-RSS and it proves that whole problems in NP can reduces to 3-RSS.
Fig 1 Reducing from 3-SAT to RSS ( Lines show conflicts )
There exists a famous reduction from 3-SAT to Maximum Clique instance ( see [2] ) but a
special case of maximum clique as all nodes of graph stand in separate Independent Sets of size 3.
Tues if we consider these independent sets are rules with 3 states we have a RSS instance. Two nodes
are connected by an edge if (1) they correspond to literals in the same clause, or (2) they correspond
to a variable and its inverse for example this Formula is transformed into the graph of (Fig. 1).
9. ( ) ( ̅ ̅) (̅ ) ( ̅ ̅)
Theorem 2.3.1. Whole problems in NP can reduces to 3-RSS
Proof Based on Cook-Levin theorem every problem ρ in NP can reduces to 3-SAT and we explained
how 3-SAT can reduces to 3-RSS thus ρ can reformulates as a 3-RSS.
Please note that structure of this problems can show by a multipartite graph of size n. where n
is number of variables ( rules ) in this problem.
6. Ternary Algebra and 3-RSS problem
In Boolean algebra all variables have only two states zero and one. Here we use a new
algebra system that variables have three states Red, Blue and Green we will show that by r, g
and b and then we will formulate 3-RSS problem based on these types of variables.
6.1. [ ] [ ] [ ] ̅[ ] ̅[ ] ̅[ ]
Here we introduce six new operators [ ] [ ] [ ] ̅[ ] ̅[ ] ̅[ ] this operators
easily use to assess that a variable x has either a special color or not for example an operator
in form [ ] has Boolean output One iff variable has the color and an operator in form
̅[ ] has Boolean output One iff variable has not the color . We can also write these
functions using calculi using figure 1 and this fact that ⁄ ⁄ we have:
[ ] ( { } )
[ ] { }
Also we have:
[ ] [ ] [ ] [ ]
In these formulas are rotator operators for example converts to , to
and . Also we have:
̅[ ] [ ]̅̅̅̅̅̅ ̅[ ] [ ]̅̅̅̅̅̅ ̅[ ] [ ]̅̅̅̅̅̅
6.2. A formulation for 3-RSS problem
Now we are present to introduce a formulation system for 3-RSS problem. Aim is we will be
able to write a 3-RSS problem like a 2-SAT problem based on binary clauses but using
ternary variables.
Consider a 3-RSS problem instance that have variables we can easily show this problem
with a multi-partite graph consists of independent sets. We wish to show this problem also
by Ternary Algebra. For a disconnection that is in one independent set ( one variables ) it is
clear that it is not important to write because a Ternary Variable never stand in more than two
of its states ( colors ). Thus we only deal with disconnections that stand between two states (
10. colors ) of two different variables. Consider we have a disconnection between variable and
consider for a moment that without loss of generality this disconnection be between color
Red of and Green of then we can write a clause for this disconnection in form:
( ̅[ ] ̅[ ])
Thus we can write whole disconnections ( between two different variables ) as binary clauses
but with ternary variables and using disjunction between them we have a Ternary Formula for
3-RSS problem. Thus we can show a 3-RSS problem with variables set instance with a
Ternary Formula with:
⋀
̅̅̅[ ] ̅̅̅[ ] { }
For example:
( ̅[ ] ̅[ ]) ( ̅[ ] ̅[ ]) ( ̅[ ] ̅[ ])
We can call such a formula also as Ternary-CNF or TCNF formula. In the next chapters we
will discuss resolution rules and the ternary version of theory of resolution and will prove this
theorem.
7. Ternary Algebra and 3-Colorability problem
3-Colorability is the question of testing whether a graph is colorable using 3 colors or not as
any two adjacent nodes have the same color ( see [4] ). Whereas 3-Colorability is
immediately a 3-RSS problem thus we can write a 3-Colorability instance using Ternary-
Algebra but we use here a new operator namely Ternary XOR ( TXOR ) and write 3-
Coloring using TXOR operators.
7.1. TXOR and TEQUAL
If we multiply a ternary variable two time with a ternary variable the results will be red if
and only if color of and color of be the same and will be a different color if and only if
color of and color of be different.
We will establish an operator namely TEQUAL and show it by ̇ . And define:
̇ [ ] [ ]
And also opposite of this operator will be TXOR that we define:
̇ ̅[ ] ̅[ ]
7.2. A Ternary Formula for 3-Colorability
11. Consider a 3-Colorability instance defined on vertex of a graph. Some of them are
connected and some are disconnected. We can define a set of variables corresponding
vertices ( nodes ) of graph. The only restriction is that, two vertices ( nodes ) that are
connected to each other must not have the same colors. We can show this situation using
TXOR operator. Consider vertices and are connected. We can write a clause in form:
( ̇ )
Using disjunction between these clauses we have a Ternary Formula for 3-Colorability. Thus
we can show a 3-Colorability problem with variables set with a Ternary Formula with:
⋀
̇
For example:
( ̇ ) ( ̇ ) ( ̇ )
8. Ternary Resolution Rules
In Boolean algebra in a CNF formula, Resolution is a rule that produces a new clause using
old clauses ( See [5] [10] [11] ). For example if we have two clause of form ( ) and
( ̅) where and are conjunction statements and is a variable we can conclude that
( ) is also a clause. In fact we have:
( ) ( ̅) ( )
This rule is known as resolution rule. And is the base of many algorithms for solving 2-SAT
in polynomial time and some heuristics for 3-SAT like DPLL ( see [9] ).
Here we introduce Ternary Resolution Rules as some theorems and prove them.
Theorem 8.1. ( ̅[ ]) ( ̅[ ]) ( ̅[ ]) ( )
Proof. Consider whole be false statements, then whole ̅[ ] and ̅[ ] and
̅[ ] must be true statements. But it means that must not be Red must not be Green and
must not be Blue and whereas every variable like has one of these colors it never happen.
Thus at least one of must be true proving the theorem.
Theorem 8.2. Without loss of generality ( ̅[ ]) ( ̅[ ]) ( [ ])
Proof. Consider both be false statements, then both ̅[ ] and ̅[ ] must be true
statements. But it means that must not be Red and must not be Green and whereas every
variable like has three colors this variable must be blue. Thus one of must be true
or must be blue. That completes the proof.
12. Theorem 8.3. Without loss of generality ( ̅[ ]) ( [ ]) ( )
Proof. Consider both be false statements, then both ̅[ ] and [ ] must be true
statements. But it means that must not be Red and must be Red that they have contrary.
Thus one of must be true. That completes the proof.
Theorem 8.4. Without loss of generality ( [ ]) ( [ ]) ( )
Proof. Consider both be false statements, then both [ ] and [ ] must be true
statements. But it means that must be Red and must be Green and it is a contradiction thus
one of must be true that completes the proof.
In Boolean algebra the resolvent of two clauses containing two literals is a clause also
containing two literals and it explain why 2-SAT problem is solvable in polynomial time
complexity. But in ternary algebra the resolvent of two clauses containing two literals can be
a clause containing three literals.
9. The Resolution Theorem in Ternary Algebra
It is proved that in Boolean algebra if continue a sequence of resolution on clauses leads to an
empty clause then formula is unsatisfiable and if formula be unsatisfiable then always
continue resolution leads to empty clause ( J.A. Robinson 1965 ). It is known as Resolution
Theorem. Here we will prove such theorem for Ternary Algebra. We consider a more general
form of clauses that we used for formulating 3-RSS problem. We let every literal be a color
like [ ] [ ] [ ] or negation of a color like ̅[ ] ̅[ ] ̅[ ] and prove the
theorem in general case.
9.1. The Resolution Operator
Resolution Operator is the function Res that, when applied to a set of clauses, returns the
set ( ) of clauses, where ( ) { }.
( ) is the result of applying Res repeatedly. More formally,
( )
( ) ( ( ))
( ) ⋃ ( )
It is obvious that always there exist a number that:
( ) ( )
9.2. Resolution Derivation
Definition 9.2.1. Let be a set of clauses. A resolution derivation from is a finite sequence
of clauses such that: each is a member of or is a resolvent of two earlier
clauses in the sequence.
13. Definition 9.2.2. A resolution derivation of a clause from is a resolution derivation
from such that .
It is obvious that when ( ) then there is a resolution derivation of from .
9.3. Resolution Theorem in Ternary Algebra
Lemma 9.3.1. Let be a set of clauses and let be a propositional variable occurring in .
Let
( )
( )
( )
For example ( ) means:
Keeping all clauses in F in which any of literals consists of occurs.
Removing all clauses in F containing : [ ] ̅[ ] ̅[ ].
Removing [ ] [ ] ̅[ ] from each clause of F that contains
[ ] [ ] ̅[ ].
Then the following statements are equivalent:
1. is unsatisfiable
2. All ( ) and ( ) and ( ) are unsatisfiable.
Proof. Consider there exist a satisfying assignment for one of ( ) ( ) (
) then using that color for it will be immediately a satisfying assignment for . In the
other hand consider there exist a satisfying assignment for then it will be immediately a
satisfying assignment for ( ) ( ) ( ).
Theorem 9.3.1. Resolution Theorem
Let be a set of clauses then the followings are equivalent:
1- is unsatisfiable
2- { } ( )
Proof.
Let ́ be the set of added clauses by resolution operator we have ́. If { } ́ then ́ is a
false statement. Thus must be false by well-known facts of Boolean algebra.
Proof.
14. By strong induction on the number of literals in . Assume has literals and that the result
holds for all finite unsatisfiable sets of clauses with fewer than literals. Take a propositional
variable in . By the Lemma 9.3.1, all ( ) ( ) ( ) are unsatisfiable
and have fewer than literals. By induction hypothesis,
{ } ( ( )) { } ( ( )) { } ( ( ))
So, we have that:
There is a resolution derivation of { } from ( )
There is a resolution derivation of { } from ( )
There is a resolution derivation of { } from ( )
If each is a clause of or if each is a clause of or if each is a clause of then we
have a derivation of { } from . Otherwise, If is a clause in the resolution derivation
of { } from ( ) such that is not in F, then replace by ̅[ ] or
[ ] or [ ]. This way we obtain a resolution derivation of one of ̅[ ] or [ ] or
[ ] from . By a similar argument we can prove that we have resolution derivations of one
of ̅[ ] or [ ] or [ ] from F and one of ̅[ ] or [ ] or [ ] from F. Operating
Resolution Rules one these three clauses leads to { }. That completes the proof.
10. Conclusion
In this paper we showed that we can write complex number in a chromatic coding and do
some calculation on them directly. However more researches regarding chromatic number
and their property are essential. We used Ternary CNF formula for coding 3-RSS problem
and showed 3-Colorablity problem by TXor clauses. We proved the resolution theorem in
Ternary Algebra literature. Author wishes that results uses by him or others to extending
algorithms for NP-Complete problems like 3-RSS.
11. References
1- The Complexity of Theorem-Proving Procedures, Stephen A. Cook, University of Toronto 1971
2- 21 NP-Hard problems, Jeff Erikson, 2009
3- Reducibility among Combinatorial Problems, Richard M. Karp, University of California at Berkley
1972
4- Improved Algorithms for 3-Coloring, 3-Edge-Coloring, and Constraint Satisfaction, David
Eppstein
5- Logic and Computation, Phokion G. Kolaitis, University of California Santa Cruz & IBM
Research – Almaden
6- Many facets of complexity in logic, Antonina Kolokolova, Memorial University of Newfoundland
7- A LINEAR-TIME ALGORITHM FOR TESTING THE TRUTH OF CERTAIN BOOLEAN
FORMULAS, Bengt ASPVALL, Michael F. PLASS and Robert Endre TARJAN, Computer Science
Department, Stanford University, Stanford, CA 94305, U.S.A.
15. 8- An On-Line Satisfiability Algorithm for Conjunctive Normal Form Expressions with Two Literals,
John F. Kolen, Institute of Human and Machine Cognition, University of West Florida
9- Directional Resolution: The Davis-Putnam Procedure, Revisited Rina Dechter and Irina Rish ,
Information and Computer Science University of California, Irvine
10- M. Alekhnovich,Mutilated chessboard problem is exponentially hard for resolution, Theoretical
Computer Science 310 (1–3) (2004) 513–525.
11- Resolution for Max-SAT, María Luisa Bonet a , Jordi Levy b, , Felip Manyà b, Elsevier
Artificial Intelligence