Научная статья на тему 'Logical-algebraic models for representing and processing discrete data'

Logical-algebraic models for representing and processing discrete data Текст научной статьи по специальности «Математика»

CC BY
74
30
i Надоели баннеры? Вы всегда можете отключить рекламу.

Аннотация научной статьи по математике, автор научной работы — Sitnikov D.E.

This paper suggests a method for discovering dependencies between selected data features. A knowledge base containing links between information features is represented in the form of a logical equation with finite predicates or a system of such equations. Special classes of equations describing complicated hierarchical data structures are considered. We obtain new knowledge about logical links in the data by eliminating variables from these equations with the help of procedures involving the use of logic quantifiers. The results of these procedures are dependencies between the features that are easier to interpret than the dependencies represented by the original equations. The elimination procedures do not lead to an increase in the size of the original formula and there are possibilities of parallel calculations. General ideas on building logic circuits for eliminating nonsalient variables with the help of parallel calculations have been discussed. Owing to the specific structure of logic formulae describing links between discrete features, necessary dependencies can be obtained without having to use extra gates in a logic circuit.

i Надоели баннеры? Вы всегда можете отключить рекламу.
iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.
i Надоели баннеры? Вы всегда можете отключить рекламу.

Текст научной работы на тему «Logical-algebraic models for representing and processing discrete data»

LOGICAL-ALGEBRAIC MODELS FOR REPRESENTING AND PROCESSING DISCRETE DATA

SITNIKOV D.E.

sitnikov@ic.ac.kharkov.ua

Abstract. This paper suggests a method for discovering dependencies between selected data features. A knowledge base containing links between information features is represented in the form of a logical equation with finite predicates or a system of such equations. Special classes of equations describing complicated hierarchical data structures are considered. We obtain new knowledge about logical links in the data by eliminating variables from these equations with the help of procedures involving the use of logic quantifiers. The results of these procedures are dependencies between the features that are easier to interpret than the dependencies represented by the original equations. The elimination procedures do not lead to an increase in the size of the original formula and there are possibilities of parallel calculations. General ideas on building logic circuits for eliminating nonsalient variables with the help of parallel calculations have been discussed. Owing to the specific structure of logic formulae describing links between discrete features, necessary dependencies can be obtained without having to use extra gates in a logic circuit.

Introduction

When information about obj ects and processes is formalised in knowledge bases, there is often the need to deal with features that have discrete values, for example gender (male/ female), marital status (married/single/divorced), or financial state (low, medium, high). When such information has a complicated logical structure, various methods that use discrete mathematics and logical equations can be applied to formally represent this. Logical equations are often applied to pattern recognition problems that have complicated logical dependencies [1,2]. Methods of pattern recognition using logical equations usually deal with variables taking on the values 0 or 1 depending on whether or not a given object has a particular property. Such Boolean variables denote the properties and features in the objects being recognised by considering definite combinations of these variables from which the presence or absence of object properties can be determined. Dependencies between the given variables are written in the form of logical equations, and these are then transformed mathematically to discover new knowledge about the objects and their associated properties.

A discrete feature can take on any value from a finite set, e.g. the feature colour can be “black”, “white”, “blue”, or “green” etc. For our purposes, it is convenient to use finite predicates for the representation of logical dependencies. The formal language of finite predicate algebra [3] allows the combination of an algebraic approach to pattern recognition with different tools of predicate calculus. Finite predicate algebra utilises the operations of conjunction, disjunction and negation as

used in Boolean algebra, but these are applied to predicates of the variables that can take on discrete values, and not directly to the variables as used in Boolean algebra. When formulae in finite predicate algebra are constructed, so-called “recognition” predicates are used. For example, xa is a predicate that is equal to 1 if and only ifthe variable x takes on the value a. It is said that this predicate “recognises” the symbol a. Equations of finite predicate algebra are a natural generalization of Boolean algebra equations, and they allow manipulating arbitrary feature variables defined on finite sets of elements. Using such equations for building inferences in knowledge bases allows the extension of the potential of logical methods for pattern recognition and knowledge discovery through the identification of salient features.

Rep resenting information on discrete objects with the help of finite predicates

We represent information on discrete objects in the form of a logic equation:

F(xi,x2, ..., xm,yi,y2, ..., yn) = 1,

where F - a finite predicate represented as a formula with elementary recognition predicates and Boolean operations;

x1, x2, ., xm, y 1, y2, ., yn—discrete variables taking on their values from a finite alphabet (may be different alphabets).

The variables x1, x2, ., xm represent discrete objects and the variables y1, y2, ..., yn represent discrete features of these objects. For example, x1, x2, ..., xm can be used to describe various diseases and y1, y2, ., yn can describe the symptoms of the diseases. Although the above interpretations for the variables x1, x2, ..., xm and y1, y2, ..., yn are different, from the formal point of view it is not important whether objects or features are considered and only logic links between them matter.

An expression with finite predicates can be implemented in the form ofa logic circuit. For example, a circuit for the formula (xa v xc)&(yb v yd) can be constructed as follows:

Figure 1. Implementation of a predicate formula Here an element

F igure 2. Logic gate “recognising” a symbol

outputs a, if and only if the input is a. The other logic gates do not differ from those implementing Boolean logic.

Discovering logical links between discrete features

If a logic equation contains many variables it is often necessary to investigate logical links between some of them. In order to do that, we must eliminate from the original equation all the non-salient variables using a quantifier 3 [4]. We can then

R&I, 2003, Ns 3

157

investigate the resulting equation with a smaller number of variables that describe all possible combinations of values of the target features.

The main difficulty encountered in trying to eliminate discrete variables lies in the fact that the formal application of the operation 3 to a predicate leads to an exponential increase in the size ofthe original formula. For instance ifwe let x1 e {a, b, c}, then:

3 xj G(xj, X2) = G(a, X2) v G(b, X2) v G(c, X2). (1)

In this case the formula size has increased three times. We considered a large class of predicates for which there is an efficient algorithm for the elimination ofvariables without any increase in the size of the original formula. To simplify the elimination procedure we used the following properties of the quantifier 3 :

1. 3 x xa =1.

2. 3 x (P(x) v Q(x)) = 3 x P(x) v 3 x Q(x).

3. 3 x (P(x) & Q(y)) = 3 xP(x)& Q(y).

4. 3 y (P(x) ^ Q(y))=P(x) ^ 3 y Q(y).

5. Suppose Pi (x) & Pj (x) = 0, i ^ j, i,j = 1, 2,...,k. Then

3 y ((P1 (x) ^ Q1 (y)) & (P2 (x) ^ Q2 (y)) & . & (Pk (x) ^ Qk (y))) =

= (P1 (x) ^ 3 y Q1 (y)) & (P2 (x) ^ 3 y Q2 (y)) & ... & (Pk (x) ^ 3 y Qk (y)).

6. If the identity Pi (x) = 0 is not true for i = 1, 2, k and Pi (x) & P_j (x) = 0 for i ^ j, i, j = 1, 2, k then

3 x ((P1 (x) ^ Q1 (y)) & (P2 (x) ^ Q2 (y)) & . & (Pk (x) ^

Qk (y))) = Q1 (y) v Q2 (y) v ... v Qk (y).

Properties 1 to 6 allow us to define special predicate types that can be more easily processed with algorithms for variable elimination. We recursively constructed a special predicate class A x as follows:

- All the predicates xa, xb, ., xc “recognizing” letters from the domain for the variable x belong to A x .

- All the predicates that do not depend on the variable x belong to A x .

- If predicates Pi and P2 belong to A x then the predicate P = P1 v P2 belongs to A x .

- If a predicate P1 belongs to A x , and a predicate P2 does not depend on x, then the predicate P = P1 & P2 belongs to A x

- If a predicate P1 does not depend on x, and a predicate P2 belongs to A x, then the predicate P=P1 ^ P2 belongs to A x .

- If predicates P1, P2, ., Pk do not depend on x; Pi & Pj = 0 for i No j, i, j = 1, 2, ..., k; predicates Q1, Q2, ..., Qk belong to

A x ; then the predicate P = (P1 ^ Q1) & (P2 ^ Q2) & ... & (Pk ^ Qk) belongs to A x

- If predicates P1, P2, ., Pk depend only on x; Pi & Pj = 0 for i ^ j, i,j = 1,2,., k; for any i = 1,2, ..., k the identity Pi = 0 is not true; predicates Q1, Q2, ., Qk do not depend on x; then

the predicate P = (P1 ^ Q1) & (P2^ Q2) &...& (Pk^ Qk) belongs to A x.

One can easily eliminate the variable x from any predicate belonging to this class. The algorithm for the elimination of the variable x looks for blocks connected with the conjunction or disjunction operations, and spreads the quantifier 3 throughout the formula using properties 1 to 6. We must note here that knowledge of the hierarchical structure of the original formula facilitates the elimination ofvariables, and if we do not know the structure of the formula in advance we will therefore have to recognize it. At present, we do not have an effective algorithm that would allow us to find out whether

a predicate belongs to the class A x or not. Nevertheless, in case we can represent knowledge about discrete object features as a predicate formula belonging to the above class, we will be able to quickly eliminate variables. In this case the complexity of the algorithm grows linearly with respect to the length of the formula, and there is the possibility of parallel calculations dramatically reducing the time required for elimination. For example, ifwe consider the expression:

P1 V P2 V ... VPn

where the predicates P1, P2, ., Pn belong to A x . we can see that the elimination ofthe variable x may be performed for each predicate in parallel. Hence if we have tools for parallel calculations, the time required for elimination will be equal to the maximum time of the elimination of the variable in the predicates P1, P2, ., Pn taken separately. It may be argued that the requirement for exact information about the formula structure is too strong a restriction to be placed on the knowledge base. The argument against this is that for relational

x y z

a1 b1 c1

a2 b2 c2

representations there are much stronger limitations on the knowledge structure anyway. Let us consider the following relational table with the fields x, y and z:

We can represent this table as a logical equation in the perfect disjunctive normal form:

xa1 yb1 zc1 v xa2 yb2 zc2 = 1. (2)

In the general case it is obvious that any relational table can be represented in the form of a logical equation, the formula on the left side ofthe equation being in the perfect disjunctive normal form. The class A x of finite predicates described above includes all possible disjunctive (not necessarily perfect) normal forms. This means that the way of knowledge representation in the form of logical equations containing formulae that belong to the class A x is more general than relational representation. Of course using such a logical method makes sense only in cases where there are many complicated logical dependencies in data features.

As a result of the elimination of variables with the help of the quantifier 3 , we obtain the sets of values of the salient features for which there exists at least one possible set of values ofthe other features. However, if we want to obtain the sets ofthe salient features that satisfy the equation irrespective

158

R&I, 2003, N 3

of the values that the other features take on [5], we should eliminate variables with the help of the quantifier v . When applying this quantifier we encounter the same complexity problems as in the case of using the quantifier 3 . To resolve the problems connected with an exponential growth in the size of the formula in a logical equation, we use the following properties of the quantifier v :

7. V x xa=0.

8. v x (P(x) & Q(x)) = v x P(x) & v x Q(x).

9. V x (P(x) V Q(y))=v x P(x) V Q(y).

10. v y (P(x) & Q(y))=P(x) & V y Q(y).

11. Suppose Pi (x) & Pj (x) = 0, i^ j, i,j = 1, 2,...,k. Then

V y ((P1 (x) & Qj (y)) v (P2 (x) & Q2 (y)) v . v v (Pk (x) & Qk (y))) = (P1 (x) & v y Q1 (y)) v

V (P2 (x) & V y Q2 (y)) V ... V (Pk (x) & vy Qk (y)) (3)

12. Ifthe identity Pi (x) = 0 is not true for any i = 1,2, k and

Pi (x) & P_j (x) = 0 for i ^ j, i,j = 1, 2, k then:

V x ((P (x) & Q! (y)) v (P2 (x) & Q2 (y)) v . v

V (Pk (x) & Qk (y))) = Q1 (y) & Q2 (y) & ... & Qk (y). (4)

The predicates Pi(x) in properties 11 and 12 canbe interpreted as hypotheses for possible values of the feature x, the predicates Pi(x) defining domains for values of this feature that do not have common elements.

We must mention here as well that if the additional condition v Pi(x) = 1 (5)

is satisfied then the expressions (P1 (x) ^ Q1 (y)) & (P2 (x) ^ Q2 (y)) & ... & (Pk(x) ^ Qk (y)))

(6)

and

((P1 (x) & Q1 (y)) v (P2 (x) & Q2 (y)) V ... V (Pk(x) & Qk (y))

(7)

on the left side of (2) and (4) are formulae representing the same predicate (it can be easily proven).

The above statement allows us to simplify the elimination procedure forboth quantifiers 3 andv since we cantransform logical equations into a form that is convenient for application ofthese particular quantifiers. Condition (5) can be interpreted as the requirement for the hypotheses Pi (x), P2(x),., Pk(x) to cover all possible values of the discrete feature x.

Let us now recursively define a class of finite predicates for which the elimination ofvariables with the help of the quantifier V does not lead to any increase inthe size of the original formula. Consider the set E of finite predicates with the set of variables {x, y, ., z}. Let us define a subset O x of E as follows:

- All the predicates xa, xb, ., xc recognizing symbols from the domain for the variable x belong to O x .

- All the predicates that do not depend on the variable x belong to O x .

- If predicates P1 and P2 belong to O x then the predicate P = P1 v P2 belongs to O x .

R&I, 2003, N 3

- If a predicate P1 belongs to O x , and a predicate P2 does not depend on x, then the predicate P = P1 v P2 belongs to O x .

- If a predicate P1 does not depend on x, and a predicate P2 belongs to O x , thenthe predicate P=P1 & P2 belongs to O x .

- If predicates P1, P2, ., Pk do not depend on x; Pi & Pj = 0 for i^ j, i, j = 1, 2, ..., k; predicates Q1, Q2, ..., Qk belong to

0 x ; then the predicate

P = (P1 & Q1) V (P2 & Q2) V ... v (Pk & Qk) belongs to O x .

- If predicates P1, P2, ., Pk depend only on x; Pi & Pj = 0 for

1 ^ j, i,j = 1,2,., k; for any i = 1,2, ..., k the identity Pi = 0 is not true; predicates Q1, Q2,., Qk do not depend on x; then the predicate P = (P1 & Q1) v (P2 & Q2) v . v (Pk & Qk) belongs to O x.

The algorithm for the elimination of the variable x looks for blocks connected with the conjunction or disjunction operations, and spread the quantifier v throughout the formula using properties 7 to 12. As in the case of the elimination procedure using the quantifier 3, to effectively eliminate variables with the help of the operationv we must know the hierarchical structure ofthe original formula in advance. If the structure is known then the time of calculation grows linearly with respect to the length ofthe original formula. As in the case of using the quantifier 3 , there is a possibility of eliminating variables inparallel since properties 7 to 12 allow us to apply the quantifier to a block of a formula without knowing the result of the elimination of variables in the other blocks.

Logic circuits fo r eliminating variables

The classes A x and O x allow us to formally describe complicated hierarchical discrete structures and efficiently obtain deductive inferences from them. In particular, if we wish to input a value for a certain variable of the model represented in the form of a logic equation and output all possible values of anothervariable, the elimination procedure will quickly cope with this problem. It seems interesting to construct logic circuits that would allow eliminating discrete variables with the help of modern parallel hardware. We suggest the following general ideas onbuilding such circuits:

1. As far as knowledge representation is concerned, a circuit should implement the set of Boolean operations and elementary recognition predicates needed to represent the structure under analysis.

2. A circuit should be able to “spread” the quantifier across its elements in parallel in accordance with the quantifier properties described in this paper.

Consider a highly simplified example of eliminating variables in parallel. Suppose we are given the following equation:

(xa& yc v xb&(ya v yb))&(za v zc) v xa&ya&zc = 1, (8)

where the variables x, y and z take on their values from the alphabet {a, b, c}. Suppose also that we need to obtain the dependency between x and z. For this purpose we need to eliminate the variable y with the help of the existence quantifier. It can be checked that the predicate on the left side of the equation belongs to A x . Let us denote

iНе можете найти то, что вам нужно? Попробуйте сервис подбора литературы.

P1 = (xa& yc v xb&(ya v yb))&(za v zc), P2 = xa&ya&zc,

159

P11 = (xa& yc v xb&(ya v yb)), P12 = za v zc, P111 = xa& yc, P112 = xb&(ya v yb).

y=a

Original circuit

The process of eliminating the variable y using parallel calculations can be schematically represented as follows:

P -

P11

and

P12

P111

or

or

P112

x

or

a c

-> z v z

P2

xa&z

y=b

Original circuit

lf>

y=c

Original circuit -

Figure 5. A circuit (with extra gates) eliminating the variable y without taking into account the specific formula structure

Figure 3. Eliminating the variable y in parallel.

As a result, we obtain the following equation:

(xa V xb)&(za V zc) V xa&zc = 1,

which describes the dependency between the variables x and z. Note that owing to the parallel calculations the elimination has been accomplished in three steps. The formula on the left side of the last equation is simpler than the original one containing three variables.

We will use the above example to demonstrate how logic circuits for eliminating non-salientvariables canbe constructed and how necessary dependencies can be obtained without having to use extra logic gates. The original formula (8) can be implemented with the help of the following circuit:

Figure 6. A circuit (without extra gates) eliminating the variable y in accordance with the elimination procedure taking into account the specific formula structure

Conclusions

In this paper we have outlined an approach to representing discrete information structures in the form of logic equations of special types. The structure of such equations allows us to discover logic links between discrete variables by eliminating extra variables with the help of parallel elimination procedures. Logic equations obtained as a result of the application of the elimination procedures represent links between target variables, ignoring all the other variables, which means extracting salient information without having to consider non-salient links. In this paper we have suggested general ideas on building logic circuits eliminating nonsalient variables with the help of parallel calculations. Owing to the specific structure of logic formulae describing links between discrete features, necessary dependencies can be obtained without having to use extra gates in a logic circuit.

a

x

Figure 4. A circuit with three variables

This circuit requires 18 logic gates and has a maximum of 6 delays (if passing one logic gate is considered as one delay). The formal applicationofthe quantifier3 requires 18*3+1=55 logic gates and causes 6+1=7 delays as can be seen from the following scheme (fig. 5).

Using the fact that the original formula belongs to the class A x we can eliminate the variable y without having to add extra gates. For this particular formula we just need to input some values in the original circuit. The resulting circuit represents the dependency between the target variables x and z (fig. 6). 160

References: 1. Gorelik A.L., Skripkin V.A. Recognition Methods. Moscow: Visha Shkola, 1984. P. 82-120. 2. Gorelik A.L., Gurevich I.B., Skripkin V.A. The Current State of the Recognition Problem. Moscow: Radio i Svyaz, 1985. P.98-103.3. Shabanov-Kushnarenko U.P. Theory of Intelligence: Mathematical Tools. Kharkov: Visha Shkola, 1984. P.12-41. 4. SitnikovD.E., D’CruzB., SitnikovaP.E. Discovering Salient Data Features Based on Composing and Manipulating Logical Equations, in Ebecken, C.; Brebbia, C.A.; (eds.), Data Mining II: Proc. 2nd International Conference (Cambridge), WIT Press, 2000. P.241-248. 5. SitnikovD.E., D ’CruzB., Sitnikova P.E. A Methodfor Knowledge Representation and Discovery Based on Composing and Manipulating Logical Equations, in Zanasi, A; Brebbia, C.A.; Ebecken, C.; Melli, P.; (eds.), Data Mining III: Proc. 3rd International Conference (Bologna), WIT Press, 2002. P.21-30.

R&I, 2003, N 3

i Надоели баннеры? Вы всегда можете отключить рекламу.