Representation and Reasoning of Fuzzy Temporal ... - CiteSeerX

3 downloads 0 Views 361KB Size Report
A model for processing fuzzy temporal knowledge and reasoning which is based on the concept of fuzzy sets and original interval algebra is proposed in the ...
Representation and Reasoning of Fuzzy Temporal Knowledge Nor Azlinayati Abdul Manaf1 and Mohammad Reza Beikzadeh2 1

Faculty of Information Technology 2 Faculty of Engineering Multimedia University Cyberjaya, Selangor, Malaysia {azlinayati.manaf, drbeik}@mmu.edu.my

A model for processing fuzzy temporal knowledge and reasoning which is based on the concept of fuzzy sets and original interval algebra is proposed in the paper. This paper is organized as follows. The basic concept of Allen’s interval algebra is discussed in brief in next section. Then, the explanation of the formal representation of the fuzzy temporal knowledge as temporal intervals is given followed by the description of Fuzzy Temporal Knowledge reasoning framework. A brief explanation on the algorithm is presented and an example of the use of the proposed model for designing a knowledge base, as well as reasoning, is illustrated in the last section.

Abstract—This paper proposes a model for fuzzy temporal knowledge representation and reasoning. It includes the frameworks that incorporate fuzziness with temporal intervals, representation of the knowledge and reasoning qualitatively and quantitatively. An interval-based fuzzy membership representation is defined as an extension to the precise temporal interval. To deal with planning and scheduling in this framework, a simple decision problem is shown. Keywords—temporal, reasoning, uncertainty, fuzzy

I. INTRODUCTION The concept of temporal knowledge is required in a wide range of disciplines including business, computer science, engineering, medical, etc. For example, a lot of applications in the area of computer systems involve the representation of time such as databases, expert systems and applications in Artificial Intelligence (AI) in general. There are several ways to represent temporal information including constraint propagation and duration-based representation [1], absolute dating system [2], temporal constraints network [3], Petri nets with time concepts [4], etc.

II.

ALLEN’S INTERVAL ALGEBRA

A. Allen’s Interval-based Temporal Logic Allen’s interval based temporal logic and temporal reasoning based on this logic has been described in detail in [1]. In brief, the primitive notion of time in Allen’s work is denoted by interval and there exist relations between two time intervals. He has defined 13 possible simple relations between two intervals as shown in Table 1, that precisely characterize the relative starting and ending points of the intervals.

Amongst the influential one is a work by Allen [1]. He developed a constraint propagation algorithm based on intervals rather than points because it can represents any disjunction of the thirteen possible simple relationships between intervals that can capture 213 different possible constraints between any two intervals [1]. In the past few years, these relationships are cited by most of the researchers as Allen’s Interval Algebra (IA).

In reality, there is only one of the 13 possible mutual exclusive relations that exists at any one time. However, the knowledge about relations between two intervals in reasoning system is usually incomplete and only the possible relations between them are known. These simple relations are expressed as a vector interpreted as the disjunction of its constituent relations.

In all of these models, temporal information is assumed to be always precise. However, in many applications in practical domains of intelligent systems, knowledge about time to be implemented is usually pervaded with uncertainty and vagueness. Tremendous efforts have been shown by many researchers in order to represent and reason such knowledge. Some of the proposed models use Zadeh’s fuzzy set theory like Qian’s model [5], possibility theory [6], concepts of processing fuzzy temporal knowledge proposed by Dubois and Prade [2], fuzzy temporal constraint network by Vila and Godo [9] and model based on fuzzy time Petri net [7].

There are two operations, addition and multiplication, defined on temporal relation vector that are necessary in temporal reasoning. The addition operation is defined as intersection between two distinct vectors to provide the least restrictive relations that exist in both vectors. The necessity to add two vectors occurs from a situation where several distinct information about the possible relations between two intervals exist. For example, say the relation between interval X and Y has been obtained as V1 = (b, m, o, s) and V2= (o, s, d). In order to find the relation between X and Y, the two vectors are added, V1 © V2 = (o, s).

1-4244-0023-6/06/$20.00 ©2006 IEEE

CIS 2006 790

TABLE I.

their constituent relations result in intervals with remaining possible relations between them.

13 POSSIBLE RELATIONS FOR ALLEN’S I NTERVAL ALGEBRA Relations X before Y

Symbol b

Y after X

bi

X meets Y

m

Y met by X

mi

X overlaps Y

o

Y overlapped by X

oi

X finishes Y

f

Y finished by X

fi

X during Y

d

Y during by X

di

X starts Y

s

Y started by X

si

X equals Y

eq

x

Applying a constraint to a consistent temporal network implies in removing one or more relations from one of the edges. This may results in inconsistency of the network. In order to preserve the consistency of the network due to changed relation(s) between two intervals, some other edges may require to be restricted by removing one or more relations from them. Each consequence restriction is a new constraint and should be propagated in the whole network and this process continues until all restrictions are propagated in the network and a consistent network is produced. The constraint propagation algorithm has been described in details in Allen’s model in [1].

y x

y

x

y x y x y x

III.

y

As mentioned in the previous section, Allen’s intervalbased temporal logic is a powerful tool for reasoning about temporal knowledge especially in the application like scheduling and planning. However, this model only deals with precise time interval, whereas temporal information in practical is always pervaded with vagueness and uncertainty. In our model, we have introduced the element of uncertainty in the temporal information using fuzzy set that is later applied to the temporal interval. Allen’s interval algebra will later be used to reason about the temporal problem. Each event is represented as an interval and the possible relations between each interval are defined.

x y

The multiplication operation defines transitive relations between pairs of vectors that relate three intervals. It is also known as vector composition. Suppose, V1 defines the relations between interval X and Y, and V2 defines the relations between interval Y and Z. The composition between V1 and V2, results in the least restrictive relations that is permitted between X and Z. For example, V1 = (b, m) and V2 = (b), the vector composition gives the possible relations between X and Z as V1 ¯ V2 = (b). The composition between two relations is done using transitivity table offered by Allen [1].

A. The knowledge representation The representation of temporal intervals as fuzzy intervals plays very important role in reasoning about fuzzy temporal knowledge. For this purpose, for each interval pervaded with fuzziness, a series of fuzzified intervals that has been calculated with the fuzzy values was derived. To show how we represent the temporal intervals as fuzzy interval, let us consider the following statement.

B. Temporal Network and Constraint Propagation Temporal knowledge in Allen’s model is represented through temporal network, which is a directed complete graph. Each node represents the interval while the arcs connecting each node represent the temporal relation vectors containing all possible simple relations between two intervals. A simple example of temporal network representing knowledge about three intervals is illustrated in Figure 1.

“Fred takes about 20 minutes to get to work” From the above statement, we can derive two important points which are:-

(b,m,o)

A

B (b)

FUZZY TEMPORAL LOGIC

(b,m)

C



Interval for Fred’s journey is 20 minutes.



Fuzziness “about” 20 minutes that might be represented as the following membership function as in Fig. 2(a).

To represent a fuzzy membership function as temporal representation, several fuzzy values are selected to be in the temporal representation.

Figure 1. A simple three nodes temporal network

In any relation network, including temporal network, it is very crucial to preserve the consistency, otherwise it contains contradicted information. For example, if we change all relations in Figure 1 to (b,m), the resultant network would be an inconsistent temporal network because the relation is not true for interval A and C. In a consistent temporal network, if any vector is restricted to any one of its constituent relations, there is at least one restriction for every other vector to one of

Consider the fuzzy membership function fuzziness “about x” in Fig. 2(a). In order to represent fuzzy temporal membership function, we first select several fuzzy values at different point on x-axis of the original fuzzy membership function as shown in Fig. 2(b). It is very important when selecting these values, in order to at least maintain the shape of the original fuzzy membership function.

791

above results in the following set of fuzzified intervals shown in Fig. 3.

The resulting fuzzy temporal membership function after selection process is shown in Fig. 2(c) and can be represented as a set of fuzzy values as follows:

20 min

about_x = { 0.2, 0.5, 0.9, 1.0, 0.9, 0.5, 0.2 }

1.0

From the given example, it is known that Fred takes about 20 minutes to get to work. This means, the journey does not exactly take 20 minutes. The duration of the journey can be less or more than 20 minutes.

fv

I

− fv

I

+ fv

19 min

21 min

15 min

25 min

12 min

28 min

0.9

We introduced a function called conversion function to convert the ideal case time interval to a set of fuzzified intervals corresponding to the fuzzy values selected.

0.5 0.2

Figure 3. Set of fuzzified intervals for Fred’s interval with fuzziness “about”

about x

These values are added to the knowledge base and used later in determining the updated relationships and transitivity relations among intervals.

x (a)

B. Reasoning fuzzy temporal knowledge There is one assumption that can be defined from the fuzzified intervals in Fig. 3. For all fuzziness that are pervaded with a movement action, equations (1) and (2) might also represent fast and slow fuzziness, respectively, i.e., if the person did the action fast, then, the interval will be shorter than the normal interval and vice versa. In the given example, if Fred takes only 12 minutes to arrive to work, most probably, he drives faster or if Fred takes 28 minutes to arrive to work, there might be a possibility that he drives slower. To represent the fuzzy values for these fast and slow fuzzy concepts, we use the inverse value (1 – fv) of the fuzzy values defined in the original fuzziness i.e., for fvabout_x = 0.9, the corresponding fuzzy values for fast and slow are fvfast = fvslow = (1 – 0.9) = 0.1. The corresponding fuzzy values for fast and slow membership function are shown in Fig.4.

(b)

(c)

Figure 2. (a) Fuzzy membership function, (b) Selected fuzzy values, and (c) Fuzzy temporal membership function

As we all know, for a normal fuzzy membership function, there must be only one maximum point or peak point in each function. Thus, we can easily separate the membership function into two parts, I −fv and I +fv where I −fv and I +fv represent the left side and right side of the function with respect to the peak point, respectively as shown in equations (1) and (2) below.

20 min

fvabout_x

fast

slow

19 min

21 min

15 min

25 min

12 min

28 min

0.9

0.1

0.5

= I − ((1 − fv ) × X

)

(1)

I +fv = I + ((1 − fv ) × X

)

(2)

I

− fv

0.2

fvfast/slow

0.5 0.8

Figure 4. Corresponding “fast” and “slow” fuzzy values

Therefore, from the above assumption, we can add to our reasoning the knowledge that if he wants to arrive early to work, he should drive faster and if he drives slower, he would arrive take longer time to arrive to work.

where I is the length of original interval, fv is the selected fuzzy value and X is the factor that determine distribution of the fuzzy values across the x-axis.

For the reasoning purpose, each derived fuzzified interval is added to the knowledge base. Then, all the possible relations between each interval in the network will be updated.

For the given example, assume the following values are used, I = 20 and X = 10 (meaning the distance from peak value to the minimum or maximum value of the function distribution is 10 units). Applying the conversion function using the fuzzy values from the fuzzy temporal membership function define

792

To illustrate how the reasoning about the knowledge is done, let extend the previous example to be as follows.

IV. SYSTEM MODEL The first stage of this model is the transformation of the problem scenario into a temporal relation network representation. In this representation, each node represents the interval for action presents in the given scenario and the arc between the nodes represents all possible temporal relationships between them. The temporal relations are based upon the model of Allen’s Interval Algebra that comprises 13 possible relations between two intervals as shown in Table 1.

“Fred takes about 20 minutes to get to work. John leaves to work 5 minutes later than Fred and arrives a few minutes earlier than Fred.” The information can be illustrated in terms of temporal interval as below (assuming that ideal case for a few minutes later is 5 minutes). The temporal relation between the two intervals is John { during } Fred.

The design proceeds with defining the membership function for all fuzziness present in the scenario. Each interval associated with fuzziness defined is then fuzzified to get a set of fuzzy intervals. For each combination of these fuzzy intervals, the relations between them are then generated. Each time a new relation is added to the temporal network, the system will check for the consistency of the network so that there will be no contradiction of information in the network.

John Fred

0

10

15

20

There are two fuzzy elements present in the above example, “about” and “a few”. As for “about” membership function, we have defined it in Section III. Considering that “a few” membership function also takes the same shape as “about” membership function with the selected fuzzy values 0.4, 0.6 and 0.8. The set of fuzzy intervals generated for John’s journey to work after applying the conversion function is shown in Fig. 6.

Finally, the reasoning about the knowledge base in done based on the queries. The algorithm for the overall system is shown in Fig. 5 below. The reasoning stage is subdivided into two parts, design pruning and design selection [8]. Design pruning is a process where the system will eliminate all the illegal paths or relations from the network producing a relation network with a set of valid answers that may be extracted. The elimination process is done based on the constraint specified in the query. By doing this, we might save the computation time in serving the query since all the invalid information has been discarded from the list of possible solutions. Design selection process is then carried out aimed at extracting either one or several optimum solutions depending on the query asked. This is done by a rulebased method implemented with pattern search process based upon the knowledge of temporal relations.

10 min 1.0

fv

I

− fv

I

+ fv

9 min

11 min

8 min

12 min

7 min

13 min

0.8 0.6 0.4

Figure 6. Set of fuzzified intervals for John’s interval with fuzziness “a few”

Represent actions as temporal intervals

Using the set of fuzzified intervals in Fig. 3 and Fig. 6, we generate all possible pairs of intervals from both sets together with the possible relations for each pair. The generated information is added to the knowledge base. Now, we asked the following query to the system, “Is it possible for Fred to arrive to work before John?”.

Define/generate the temporal relations between each interval

Define the fuzziness corresponds to each action

5

From this query we know that if Fred is to arrive to work before John, the temporal relation between them should be Fred { overlaps } John. So, we search through all the pairs of interval generated and look for pairs that contain overlaps relation between them. As the result, we manage to get 8 possible pairs of intervals and one of the optimal pair is shown the Fig. 7, where the intervals for Fred and John are 12 minutes (fv = 0.2) and 8 minutes (fv = 0.6), respectively. Thus, the answer to the above query is “yes, it is possible for Fred to arrive to work before John”.

Generate all fuzzy interval sets for each action

Generate the transitivity relations among all the intervals

Check for network consistency

Reasoning about the knowledge based on the queries

Figure 5. Algorithm for the overall system

793

John

di

Fred

J1

F1 di

0

5

10

15

bi

20 s, si, = mi

Figure 7. Possible pair for Fred’s and John’s intervals with “overlaps” relation

M1

V. AN APPLICATION E XAMPLE In order to show the main features of this framework, we have extracted a typical problem from temporal reasoning literature [7] with a slight modification to suit our model.

Figure 8. The constraint graph of the above problem

Here are some examples of queries which can be put to the knowledge base:

A. The Problem “Fred, John and Mark have a meeting as soon as last comes to work. Fred leaves home at 7 o’clock. He goes by car and arrives to work about 20 minutes later. John leaves to work 5 minutes later than Fred but arrives a few minutes earlier than Fred. Mark leaves the house at the same time as Fred. He takes a bus. It takes the bus about 20 minutes to the nearest bus station to Mark’s work. It takes him a few minutes more to get to work.”

F1: Fred’s journey to work;



J1: John’s journey to work;



M1: Mark’s journey from home to nearest bus station;



M2: Mark’s journey from the bus station to work.



What is the possible starting time of the meeting? (Assuming the ideal case)



Is it possible for Mark to arrive to work before John if the journey by bus takes exactly 15 minutes?



What Fred has to do to arrive before John? (Assume ideal case for John)

B. The solution Assuming the ideal case interval for “a few minutes” is 5 minutes, the ideal case solution for the above example is shown in Fig. 9. From the scenario, we know that Mark is the last person to arrive to the office. The meeting will start as soon as the last comes to work. So, the possible starting time of the meeting is 7:25.

The problem can be modeled in a network as follows: •

M2

M2 M1 J1

Intervals M1 and M2 can be merged together as one interval to represent Mark’s journey to work, but by keeping it we would like to show that a single problem can have multiple models that describe it.

F1 7:00

7:05

7:10

7:15

7:20

7:25

Figure 9. The ideal case solution (case I)

Next, we list the constraints that built up the scenario.

To answer the second query, we first generate all fuzzified intervals for M1, M2 and J1. Then, we generate all possible combinations of interval between M1, M2 and J1 together with their temporal relations. We know that for Mark to arrive before John, the temporal relation between M1, M2 and J1 is J1 { met by, overlapped by } M1 and J1 { during by } M2, and the temporal relation between M1 and M2 is always M1 { meets } M2.

1) “John leaves to work 5 minutes later than Fred but arrives a few minutes earlier than Fred”: F1 { di } J1 2) “Mark leaves the house at the same time as Fred. He takes a bus. It takes the bus about 20 minutes to the nearest bus station to Mark’s work”: F1 { s, si, eq } M1

The search result obtained from the knowledge base shows only one possible combination satisfied the constraint. The possible combination is shown in Fig. 10, where M1 = 15 minutes, M2 = 2 minutes (fv = 0.4) and J1 = 13 minutes (fv = 0.8). Since we can prove that it is possible for Mark to arrive before John, the answer to the second query is “yes, it is possible for Mark to arrive to work before John”.

3) “It takes the bus about 20 minutes to the nearest bus station to Mark’s work. It takes him a few minutes more to get to work”: M1 { m } M2 The resulting constraint graph is shown in Fig. 8.

794

[8] M2 M1

[9] J1 F1

7:00

7:05

7:10

7:15

7:20

7:25

Figure 10. Possible intervals combination for case II

As for the last query, it asks “what is the necessary action that Fred should take to arrive to work before John, provided that John’s journey to work takes 10 minutes”. We have proved in the Section IV previously that it is possible for Fred to arrive to work before John even if John’s journey takes the ideal case. From the knowledge base, we found only one possible way that Fred can do to arrive before John that is he need to drive faster with fv = 0.8. In this way, Fred’s journey will take only 12 minutes. VI.

CONCLUSIONS

The proposed model based on Allen’s interval algebra and fuzziness is used to present fuzzy temporal knowledge and reasoning process. This model has been developed using WINProlog 4300 on Windows 2000. The major advantage of this model is the simplicity of the model and the straight forward computation. Furthermore, it can be used to reason both qualitatively and quantitatively, while the unified representation of the fuzzy temporal information and the planning utility that the model offers enable reasoning in planning and scheduling process. It also offers the straight forward view of the relations among intervals through the graphical representation. The main applications that can benefit from this model are the applications involving scheduling and planning with uncertainty. In the future, we might extent this concept to point based representations to overcome those problems from temporal rich domains. REFERENCES [1] [2] [3] [4]

[5] [6] [7]

J. F. Allen, “Maintaining Knowledge about Temporal Intervals”, Communications of the ACM 26(11), pp 832-843. D. Dubois, H. Prade, “Processing Fuzzy Temporal Knowledge”, IEEE Transactions on Systems, Vol. 19, No. 4, pp.729-744, 1989 R. Detcher, I. Meiri, J. Pearl, “Temporal Constraint Network”, Artificial Intelligence, Vol. 49, pp. 61-95, 1991 Y. Yao, “A Petri Net Model for Temporal Knowledge Representation and Reasoning”, IEEE Trans. On Systems, Man and Cybernetics, Vol. 24, No. 9, pp. 1374-1382, 1994 D. Qian, “Representation and Use of Imprecise Temporal Knowledge in Dynamic Systems”, Fuzzy Sets and Systems, Vol. 50, pp. 59-77, 1992 L. A. Zadeh, “Fuzzy Sets as a Basis for Theory of Possibility”, Fuzzy Sets and Systems, Vol. 1, pp. 3-28, 1987 S. Ribaric´, B. Dalbelo Basic´, N. Pavesic´, “A Model for Fuzzy Temporal Knowledge Representation and Reasoning”, Proceedings of the IEEE International Fuzzy System Conference - FUZZ-IEEE'99, August 22-25, Seoul, Korea, Vol. 1, pp. 216-221, 1999

795

M. R. Beikzadeh, R. J. Mack, “The Application of Temporal Logic for Flexible Scheduling within a High-Level Synthesis System”, Proc. Of the 34th MidWest Sym. On Circuit and Systems, May 1991. L. Vila, L. Godo, “On Fuzzy Temporal Constraint Networks”, Mathware and Soft Computing Vol. 1, n. 3, pp. 315-334, 1994