In this section we are presenting our new system. First we define what the interval-values mean in a mathematical way. After this we extend some logical operators to the interval-valued system (based on [5, 6]). Some non-logical oper- ators are also shown. In the second subsection of the section we show that our system is an extension of the traditional computing devices. The interval-valued device (using some restrictions for the used interval-values) can simulate the
170 B. Nagy
traditional computing. Finally, in this section a method is presented how our device solves the SAT problem in efficient way.
4.1 Mathematical Description of the System
In this section, – using mathematical accuracy – we describe our model of com- putation. The computing device is almost similar to the processing unit of a traditional computer, but using interval-values in the computation instead of bytes.
The Interval-values In the interval-valued computing system we will use interval-values above [0,1]. We give an iterative definition:
Each interval [a, b] with 0≤a≤b ≤1 is an atomic interval which contains all the pointsxbetweenaandb(a≤x≤b). With special choosinga=bwe receive that each point of the interval [0,1] is an atomic interval itself.
The union and the difference of two interval-values are interval-values. (the union of two interval-values consists of each point which occurs at least one of the orig- inal one, while the difference of the interval-valuesAandB contains each point which is inAbut not in the interval-valueB)
Each interval-value can be constructed from atomic interval-values using only operations union and difference.
We have two special interval-values: the empty and the full interval. We will refer them with the signs⊥andT, respectively. They can be seen in Figure 1. T is an atomic interval: [0,1] and ⊥ can be obtained as the difference of any interval-value with itself (or difference of any interval-value and T).
Fig. 1.Graphical representation of the interval-values⊥andT
Logical Operations with Interval-values In this part we present a natural extension of the Boolean operators of classical logic to the interval-valued system [5]. Each point of [0,1] is either in the interval-value or not. We use the basic connectives of the interval-values as the connectives work in classical logic for each of the points of the interval [0,1]. More precisely, letA(x) the characteristic function of the interval-value A, i.e.A(x) = 1 if x∈A andA(x) = 0 ifx /∈A.
An Interval-valued Computing Device 171 Let the characteristic function of interval-value B be B(x). Then the interval- value resulted by a logical operator acting on interval-values A,B, contains all the points xwhich have value 1 using the same logical operations between the characteristic values of the interval-values at point x. Table 4 shows what this procedure give for the basic logical connectives.
Table 4.The basic logical operators for interval-values Name negation conjunction disjunction implication
Sign ¬A A∧B A∨B A→B
Value T\A A∩B A∪B ¬(A\B) =¬A∪B Set theoretically: complement intersection union
It is trivial that the negation of an interval-value is an interval-value (the result is the difference of T and the interval-value). The disjunction and the implication of two interval-values are interval-values as well, as Table 4 shows.
Fig. 2.Examples for logical operations with interval-values, negation (left), conjunction and disjunction (right)
Now, we are proving it for the conjunction, by using the set-theoretical De- Morgan’s law.A∩Bis equal to¬(¬A∪ ¬B) thereforeA∧Bis an interval-value whenAandB are interval-values.
Figure 2 shows some examples for acting logical connectives among interval- values. Theoretically, the logical operations of interval-values act in continuum
172 B. Nagy
many points in a parallel way. Note, that in graphical representation – for the sake of simplicity – we deal with points only when they play an important role, elsewhere we represents only the interval components with non-zero length.
Non-logical Operators Similarly as the traditional computer has more oper- ations, to use our system as a general computing device we need to introduce some other operations. To make our system more efficient we will investigate the shift operators in two different ways.
But, first we introduce the first-length function which will help us. This function assigns a real number to each interval-value, namely the length of its first component. More precisely:
Flength(A) = b−a, if A contains the open interval (a, b) and A does not contain any interval (a, c) with c ≥ b, moreover the difference of A and [a, b] does not contain any pointxwithx < a.
Flength(A) = 0, in other cases.
By the help of the previous function we investigate two kinds of shift opera- tors. Both of them have two operands. The left-shift operator will shift the first interval-value by first-length of the second operand to the left, and removing the part which is shifted out of the interval [0,1]. Opposite to this, we define the right-shift operator in a circular way, i.e. the parts shifted above 1 will ap- pear at the other end of [0,1]. Mathematically, let Lshift(A, B) and Rshift(A, B) be the interval-values given after Awas shifted to the left and to the right by Flength(B). (Similarly, we use the notation as the characteristic function of the interval-value.) Then,
Lshift(A, B)(x) =A(x+Flength(B)) if 0≤x+Flength(B)≤1, and Lshift(A, B)(x) = 0 in other cases.
Rshift(A, B)(x) =A(frac(x−Flength(B))), where x <1. The functionfrac gives the fractional part of a real, i.e. frac(x) =x−int(x), whereint(x) is the greatest integer which is not greater thanx. Finally, for completeness let
Rshift(A, B)(1) = Rshift(A, B)(0).
In Figure 3 some examples are shown both for operations Rshift and Lshift. The second (ancillary-) operands are shown with grey colour to help understand- ing, but they are not real parts of the resulted interval-values.
Note, that with Lshift one loose all the information which go outside of the interval [0,1]. Opposite to this case, using Rshift only the information at the point 1 will loose.
These operators are very effective ones, with combined use of them one can move or delete any part of an interval-value. The deletion can be in the following way. Use the Rshift to shift the interval-value such a way that the part – which should be deleted – begins at 0. Then, using Lshift the chosen part [0, a) will be deleted. After this cutting, using Rshift again the remained part can be shifted back to its original place.
An Interval-valued Computing Device 173
Fig. 3.Examples of shift operators with interval-values
Now we are presenting another operator with which one can multiply the interval-values, namely the (Fractalian) Product. LetAcontainkinterval com- ponents with ends ai,1, ai,2(1≤i ≤k) andB containl components with ends
bi,1, bi,2(1 ≤i ≤l). Then let the value of C = A∗B be the following: let the
number of components ofC bek·l. For this process we can use double indexes for the components ofC. Let the starting and ending point of the ij-th compo- nent be ai1+bj1(ai2−ai1) andai1+bj2(ai2−ai1) respectively. An endpoint
belongs to the interval iff the original endpoints belong to the interval-values of the original interval-valuesAandB.
As we can see in the definition, this product looks like the Cartesian product; the indexes works in the same way. The componentij ofC comes from thei-th component ofAand thej-th component ofB. Moreover, it is easy to show, that the sum of the lengths of the components of A∗B is exactly the same as the product of the sum of the length of the components of A and the sum of the length ofB. Note that the (Fractalian) Product is not a symmetric operator.
In Figure 4 there are examples shown.
4.2 Modelling Traditional Computing Devices with the Interval-valued Device
In this part we show that the interval-valued system can easily simulate a tra- ditional computing device. Suppose that the traditional device use n bits in a
174 B. Nagy
Fig. 4.Examples for Product of the interval-values
byte. Take the interval-values [m/n,(m+1)/n] (for 0≤m≤n−1), each of them represents the (m+ 1)st bit. When the ALU of a classical computer works on some bytes then the interval-valued device uses the interval-values representing the bytes.
Modelling logical operators is trivial therefore we omit them. The shift op- erators need for example the atomic interval-value P = [0,1/n]. Left-shift can also be simulated in a trivial way. We show the simulation method of right-shift: using Rshift is not enough in its pure form, because of its circular property. It is easy to show that Rshift(Lshift(Rshift(A, P), P), P) gives the desired result shifting the interval-value to the right with eliminating the shifted-out part.
Now we introduce an abbreviation: let Rshift(A,2B) mean that we use twice the operator with the same second operand: Rshift(Rshift(A, B), B). We will use this abbreviation with any positive integers (here up ton). Similarly: Lshift(A, kB) =def
Lshift(Lshift(. . .(Lshift(A, B), . . .), B), B) using itktimes.
The simulation of the Add operation is going in the following way:
LetA and B be two interval-values which represent numbers as bit-values. Using the shift operators we can translate the Add operator: First we construct the interval-value of overflowC. The last bit of Cis
Cn= Rshift(Lshift(A∧B,¬P),¬P).
Note that here Lshift(A∧B,¬P) has the same meaning as shifting by the value (n−1)P. Similar statement holds for the Rshift.
An Interval-valued Computing Device 175 In the iteration method (we gather the bits and add a new one in each step) igoes fromn−1 to 2 decreasing by 1 in each step:
Ci=Ci+1∨Lshift(Rshift(Rshift(Lshift(A∧B,(i−1)P),(i−1)P)∨
Rshift(Lshift(A∧Lshift(Ci+1, P),(i−1)P),(i−1)P)∨
Rshift(Lshift(B∧Lshift(Ci−1, P),(i−1)P),(i−1)P),(n−i)P),(n−i)P).
(The last value,C2contains all the overflow bits that we need to the calcula-
tion. The first overflow bit – which is the overflow bit actually, – would be given by only the next step of these iteration with the value of C1 which we do not
need to the operation.) And now we use ‘xor’ to get the sum ofAandB: A+B= (A⊕B)⊕Lshift(C2, P).
As we showed the interval-valued system can simulate the classical com- puting with finitely many bits in a byte. To the simulation we used only re- stricted interval-values, which can be obtained from the atomic interval-value P = [0,1/n] by logical operations and shifts. Therefore one can say that the interval-valued device is an extension of the classical one. Moreover, in logical computation our system looks like a system with continuum-many bits in a byte: each point of [0,1] can represent a bit.
4.3 Solving SAT Problem with the Interval-valued Device
As one of our last results, showing the theoretical efficiency of the interval-valued computing device we solve the SAT problem. The SAT problem is the following: given a formula in propositional logic, decide whether it is satisfiable or not (it means logical falsity when it is unsatisfiable). This problem is an NP-complete problem and plays very important role in complexity-theory.
Usually only formulae in conjunctive (or ink-ary conjunctive) normal form are used, but in this paper we do not use any restriction about the forms of them.
Assume that there are number n variables occur in the formula. Let the interval-value be assigned to thei-th variable
Ai = 2i−1− 1 [ j=0 · j 2i−1, 2j+ 1 2i ¶ .
One can compute them using the product operator:Ai+1 =Ai∗[0,0.5)∨ ¬Ai∗
[0,0.5).
Then one can evaluate the logical formula using interval-values Ai. If the
result has the value⊥, then the formula is unsatisfiable. Elsewhere the formula is satisfiable, moreover if the first-length of the result is 1 then the formula is a Boolean tautology. We show that the formula can be evaluated to true when the result using interval-values differs with ⊥. Assume that the characteristic
176 B. Nagy
function of the result is 1 at x (such a value must exist in an interval-value which is not equal to ⊥). In this case let the values of the formula evaluated by Boolean variables be the following: let the value of thei-th Boolean variable be the characteristic value Ai(x). With these values the propositional formula
must evaluate to true, similarly with the interval-value at pointx. The process can be seen in the next example (see Fig. 5). Let the formula be ¬((B∧C)→ ¬(C∨(D→ ¬B))). The figure shows that this formula is satisfiable (it is true whenB andC are both true), but it is not a Boolean tautology.
One can see that to check the satisfiability of a formula we need interval- values not more than the length of the formula. More precisely, counting the number of variables and logical connectives, their sum gives an upper bound to the number of interval-values are needed for the calculation, because without using lazy evaluation we need the interval-value of all the variables, and of each subformula of the original.
Calculating the satisfiability of a formula with interval-values looks like to the evaluation going in parallel way, building the Boolean truth-table of the formula by lines.
An Interval-valued Computing Device 177
5
Conclusion
In our paper we investigated a new theoretical model of computing. Our natu- rally motivated device works with interval-values. The interval-values are used as bytes in traditional computers. An abstract mathematical description of the system is given. Beside the logical operators, some non-logical operators are also defined. The interval-valued computing device is an extension of the classical computing devices. To present its applicability and efficiency we showed how it can solve the SAT problem. The key-point is that the system use parallelism in a natural way because its architecture.
Note, that in [5] some other non-logical operators were introduced, such as mirror of intervals. Using them the computation can be in a faster way. Note also, that for simplicity in practice one can use only closed intervals by closing the result after each operation.
It is a matter of a future work to analyze the practical applicability of the interval-valued system (or one of its restricted forms). Both physical realisation and the way of possible programming of the system can be interesting. Interesting questions about the system, that how efficient it can be. It may solve EXPTIME or PSPACE problems in polynomial time. By simulating classical computing the computing power should be at least the level of Turing machines, but in this system one can use continuum many values (moreover the number of possible interval-values is more than continuum), therefore the power can be more. How one can use it in a more efficient way?
References
1. Bell, J.L. and Machover, M., A course in mathematical logic, Elsevier Science, Amsterdam, New York, Oxford, North-Holland, 1977.
2. Calude, C.S. and Paun, G., Computing with Cells & Atoms: An Introduction to Quantum, DNA & Membrane Computing, Taylor & Francis, London, 2001 3. Davidson, M.W. and Rill, R.L., ”Photomicrography: Common Ground for Science
and Art,”Microscopy and Analysis 11, pp. 7-12, 1989.
4. H´ajek, P.,Metamathematics of Fuzzy Logic, (Trends in Logic4), Kluwer Academic Publ., Dordrecht 1998.
5. Nagy, B., ”Interval-valued logic as a generalization of many valued logics,” Tech- nical Report 2002/20., Institute of Mathematics and Informatics, University of Debrecen, submitted to publication
6. Nagy, B., ”Intervallum-logika,” Thesis (in Hungarian), University of Debrecen, 1998. (earlier version is presented at Hungarian Scientific Student Conference, Eger, Hungary, 1997.)
7. Patterson, D. and Hennessy, J., Computer Organization and Design: The Hard- ware/Software Interface, Morgan Kaufmann, 1997.
8. Tomek, I.,The Foundations of Computer Architecture and Organization, Computer Science Press, New York, 1990.