A model and a language for the fuzzy representation and handling of time

A model and a language for the fuzzy representation and handling of time

Fuzzy Sets and Systems 61 (1994) 153-175 North-Holland 153 A model and a language for the fuzzy representation and handling of time Sen6n Barro Depa...

1MB Sizes 3 Downloads 61 Views

Fuzzy Sets and Systems 61 (1994) 153-175 North-Holland

153

A model and a language for the fuzzy representation and handling of time Sen6n Barro Departamento de Electr6nica y Computaci6n, Facultad de Fisica, Universidad de Santiago, Santiago de Compostela, Spain

Roque Marin Departamento de lnforrn6tica y Autorn6tica, Facultad de Informdtica, Universidad de Murcia, Murcia, Spain

Jos6 Mira Departamento de Inform6tica y Automdtica, Facultad de Ciencias, U.N.E.D., Madrid, Spain

Alfonso R. Pat6n Departamento de lnteligencia Artificial, Facultad de lnform6tica, Universidad Polit~cnica de Madrid, Madrid, Spain Received August 1992 Revised October 1992

Abstract: In this paper we present a model for the representation and handling of fuzzy temporal references. We define the concepts of date, time extent, and interval, according to the formalism of possibility theory. We introduce relations between the temporal entities dates and intervals, interpreted as constraints on the distance between dates and projected onto Fuzzy Temporal Constraint Satisfaction Networks. We introduce a language for the representation and manipulation of temporal entities and relations, which captures some of the terms we use in our expressions in the natural language and therefore, it is a flexible and powerful interface for those systems in which the representation of fuzzy temporal information is necessary. Our approach permits a common interpretation of qualitative and quantitative temporal relations, facilitating the relativization of the meaning of the temporal relations to each specific application context and the verification of relations between temporal entities.

Keywords: Approximate reasoning; artificial intelligence; expert systems; information storage and retrieval; temporal knowledge; temporal reasoning.

1. Introduction

In many application domains of knowledge based systems it is necessary to handle facts that occur and vary in time, and whose temporal arrangement can be of significance in the decision process. For this reason, there is a growing interest in the field of temporal reasoning, which encompasses formal aspects (ontological, representation and reasoning aspects), implementation aspects (computational efficiency) and applications (planning, scheduling, monitoring,...). When approaching real problems, in most of them there is not enough information available for determining with total precision and certainty the absolute dates in which events happen. Because of this, conventional methods for the representation and handling of time usually include some way of modelling the uncertainty in the references to time. Thus, for example, the interest generated by Allen's logic of temporal relations [1] is due, in part, to its capability of handling incomplete temporal knowledge. In Allen's model, the state of Correspondence to: Dr. S. Barro, Departamento de Electr6nica y Computaci6n, Facultad de Fisica, Universidad de Santiago, 15706 Santiago de Compostela, Spain. 0165-0114/94/$07.00 Q 1994---Elsevier Science B.V. All rights reserved SSDI: 0165-0114(93)E0197-Z

154

S. Barro et al. / Fuzzy representation and handling of time

knowledge about a given problem is expressed by means of qualitative temporal relations between intervals, such as before, overlaps, or meets. These relations refer only to the relative disposition of the intervals on the time axis, and not to their absolute location. Also, the logic disjunction between primitive temporal relations permits the representation, in an elementary manner, of our lack of knowledge about the exact relation between two intervals. Once a new temporal relation between different intervals has been expressed, a mechanism for the propagation of constraints infers new relations, making the most of known information. Qualitative temporal relations, however, are too vague for many practical applications. To say that time interval il is before time interval i2, implies a total imprecision in the absolute temporal location of il and i2. Also, it imposes an almost total imprecision in the temporal distance between them: we know that this distance is positive, but it can have any value in the range (0, ~]. When we work in a real domain, such as, for example, many areas of medicine, we find that it is necessary to combine pieces of information whose date is known with total precision (data from clinical tests or data from clinical explorations) with pieces which are imprecisely located (subjective symptoms or vaguely remembered previous facts). In many cases, the known temporal relations, although imprecise, include some information of a quantitative nature, such as in the case of the following expressions: 'it happened three or four days after the beginning of pain', 'it appeared shortly before the fever' or 'it lasted around three months more than the proteinuria episode'. Temporal maps [2] and temporal constraint networks [3] are capable of capturing quantitative temporal relations. However, the way in which they represent imprecision is by limiting error ranges, in a manner similar to the one proposed by Kahn and Gorry [9], and thus, the linguistic nuances of the previous examples are lost in these models. The approximate representation and reasoning model provided by fuzzy theory can achieve valid solutions for these problems. However, some of the previous attempts at modelling imprecision and temporal uncertainty by means of fuzzy theory pursued a generalization of Allen's qualitative temporal relations, but did not consider information of the quantitative type. In Dutta's model [5, 6], time is described using a set of precise disjoint intervals, which can be of different lengths. This set is the discourse universe used for the definition of fuzzy events. This way, given an event e, /~i(e) represents the degree to which e occurs in interval i, associating to it the double interpretation of intensity of occurrence and possibility of occurrence of e in i. This model introduces qualitative temporal relations between events by means of definitions based on the comparison of the precise time intervals which make up the support of each event. Kim and Oh [11] also consider intervals as temporal primitives, and introduce a model for the imprecise representation of qualitative temporal relations between events. In both of these approaches the starting concepts are facts which have a variable possibility of occurrence in time. The starting point of the model proposed by Dubois and Prade [4] for the representation and processing of fuzzy temporal knowledge is more general. Their model, based on possibility theory, introduces dates (possibility distribution in a continuous linear time scale) and intervals (fuzzy set of time points between two dates) as primitive temporal elements. They define the possibility and the necessity of verifying the temporal relations between the intervals described by Allen, starting from a previous definition of fuzzy temporal relations between dates. The generality of his approach facilitates the application of linguistic modifiers to the temporal relations between dates and intervals, and at the same time establishes the foundations for the introduction of quantitative temporal relations. Starting from the same primitives, Qian [15] approaches not only the representation and reasoning with fuzzy time, but also its integration with fuzzy proposition reasoning. His proposal permits the manipulation of fuzzy temporal quantitative and qualitative relations in the rules, but not the representation of fuzzy temporal constraints in the data set to which they are applied. In our work, we present a model and a language for the representation and manipulation of fuzzy temporal references. The objective is to be able to treat the uncertainty and imprecision present in the temporal references to facts and knowledge in multiple application domains. In particular, in the next section (Section 2) we will analyze a simple case in medicine. From this case we also extract multiple examples by means of which we will illustrate the presentation of the model. This model will start using

S. Barro et al. / Fuzzy representation and handling of time

155

the definition of date proposed by Dubois and Prade, to which we add the definition of time extent, as an additional primitive concept of the model (Section 3). The definition of temporal entities is completed by introducing the definition of interval from the definitions of date and time extent. Finally, we define fuzzy temporal constraint satisfaction networks. In Section 4 we introduce a language for the representation of temporal entities that permits fuzzy temporal references which are close to our expressions in the natural language. Finally, we introduce a general scheme for the verification of temporal relations based on the concept of distance between dates.

2. Fuzzy temporal expressions in medical domains The chronology of events has a crucial relevance for understanding the evolution of dynamic systems and is the key in monitoring tasks and in process control, planning, scheduling, etc. A paradigmatic case is the medical domain, where we find multiple examples in which the diagnostic, prognostic and therapeutic evaluations not only depend on the known events, but also on their temporal arrangement. The following example corresponds to a real case from which we have selected the most significant events.

Example. A 77 year old patient is interned in the Intensive Care Unit (ICU) at 21:15 February 15, 1993, after arriving at the Emergency Ward in a critical state. The patient presents retrograde circulatory failure and anterograde circulatory failure. A little more than a year ago she was diagnosed moderate renal insufficiency. Since then she undergoes periodic checks at the Nephrology Service. The last one was January 18th, 1993. In this check Creatininemia (3.1 mgr/dl), Natremia (140 mEq/1) and Kaliemia (4.5 mEq/l) controls were carried out. 5-6 months ago she started to have selflimited palpitations. Some days later, dizziness and asthenia, also of short duration, appeared. These episodes arose in a state of rest and have shown growing frequency and duration. The patient comments that since about a month ago she suffers permanent dyspnea and asthenia, that were not detected in the last Nephrological check. The arrival at the Emergency ward happened at 16:50, motivated by a fast worsening of her dyspnea and her general state, which, according to the patient started around 10 o'clock in the morning. The relevant complementary exams have been: - Renal function: Uremia 107 mgr/dl; Crs 3.38 mgr/dl; Natremia 141 mEq/1; Kaliemia 7 mEq/1. - E C G : Third degree Auricular-Ventricular Blocking (AVB) at 50 l/m; alternating blocking of a branch. Figure 1 shows a temporal graph of the events. The temporal distribution of the findings can be inferred from the multiple temporal references cited in the example and is absolutely relevant from the clinical point of view. To reach a correct diagnosis implies evaluating the duration and arrangement of the events in time. For example, the long duration of the dyspnea discards as a possible cause, an acute infectious pathology of the respiratory tract. In the same way, the fast deterioration of the patient points towards the existence of a triggering factor outside the natural evolution of the moderate renal insufficiency suffered by the patient. Finally, the following temporal sequence of clinical events can be deduced from the available data, some of them are implied by the arrangement in time of certain manifestations: (1) Moderate renal insufficiency (diagnosed a little more than a year ago). (2) Bradycardia-Tachycardia syndrome (suggested by the temporal sequence of palpitations, dizziness and finally, dyspnea and asthenia). (3) Evolution towards AVB and low cardiac output (manifested through dizziness and asthenia). (4) Renal imbalance and consequent potassium alteration. (5) Evolution to advanced AVB, potentiated by the hydroelectrolitic alteration.

156

S. Barro et al. / Fuzzy representation and handling of time Beginning of

Worsening of Dyspnea

-__10:00, 15 FEB, 93

"°l

Internmenttn

I ~

Emergency Ward

Moderate Renal

~_Q ~ee~,°r~g~e7~ .... )

Instrflciency

>° W enal FuncUo

Internment in ICU

"-....~mmatJon ~ J

~ 1 21:15, 15 FEB. 93

T= 1 Month

/ Beginning of PalpitaUons

I I

~

Last Revision at Nephrology Service

~0

/ Asthenia ~ t I

% "

Dyspnea

~

_

18 JAN, 93

_

Beginning of D~zzkness and Asthenia

I g Frecuency

)

Fig. 1. Temporal graph associated with the events that happened in a medical case. The boxes show the significant events, whose location in time is given in an absolute fashion (specified in the box itself) or relative to other events (indicated by means of an arrow and the distance in time between the two related events). The additional information associated with each event is shown in an ellipse linked to it. This information is used, in some cases, for discriminating events. For example the permanent character or not of the asthenia.

Based on this temporal sequence of events, the diagnostic for the patient was Dyspnea caused by retrograde failure due to AVB. This diagnostic was confirmed by the positive evolution of the patient when she was treated by means of a temporal pacemaker. Later, other complementary examinations confirmed the diagnostic, and a definitive pacemaker was put in place. In order to handle problems of this nature, some medical systems include models for the representation and manipulation of precise times [8, 16]. However, in the previous example we find expressions such as 'some days after' or, 'around 10', which require the representation of imprecise temporal relations, either qualitative or quantitative, between instants and intervals. The enumeration of the findings in clinical reports is frequently full of temporal vagueness, being dominant when subjective symptoms are told from memory. Certainly, the human perception of time elapsing is indirect and imprecise, and its reliability cannot be compared, for example, with the direct appreciation of space through vision. The need of using models for representing and reasoning with temporal knowledge, capable of a

S. Barro et al. / Fuzzy representation and handling of time

157

better approximation to the expressions and nuances of natural language seems clear. Our work in medical applications of knowledge based systems has led us to the development of a model for the representation and manipulation of fuzzy temporal references we will describe in the following sections.

3. Basic temporal entities In medical domains, the clinical meaning of the facts depends on the temporal context in which they occur and their interpretation is the basic objective of the expert systems based on temporal reasoning. However, a previous task is the identification of temporal relations among the facts from incomplete and imprecise information on their distribution in time. This task can be solved by exclusively manipulating temporal entities, independently from the domain facts associated with them. This is the basic objective of our model, and it corresponds to that of a temporal specialist in the sense of Kahn and G o r r y [9]. Even though a temporal specialist is independent from the domain, its real applicability depends on its expressive characteristics, that is, on the type of temporal entities and the type of relations among them it can handle. In our case we endow the model with the adequate expressive characteristics for medical domains. We will first introduce the basic concepts that make up the temporal ontology of the model. These are the time axis, dates, time extents, and intervals.

3.1. Time We consider time as projected onto a one-dimensional discrete axis r = {to, tl . . . . . ti . . . . }, where, given an i belonging to the set of natural numbers N0, ti represents a precise instant of time. We assume that to represents the time origin, before which there are no known or significant facts about a specific problem. We consider a total order relationship between precise time instants (to < t~ < • • • < tg < • • .), where, for every i ~ ~o, t~+l - t~ = At, being At a constant. That is, we assume uniform distance between the successive precise instants of time, so that each ti will represent a distance i • At to the time origin to. To assume a discretization of the time axis implies a simplification of its computational handling and avoids the problems derived from differentiating between open and closed intervals. On the other hand, it does not become a limitation with respect to considering a continuous time axis if we can increase the discretization level as much as necessary for a specific application, where we will define as discretization factor the value fd = At, such that any two events happening in instants of time which are separated by less than At, can be taken as simultaneous. The discretization factor will depend on the variability of the information being handled. For example, in a very simple case of an application to the processing of a sampled signal, the discretization factor will coincide with the sampling period.

3.2. Dates Following Dubois and Prade [4], we call date any fuzzy instant of time a represented by a possibility distribution ~, over v. This way, given a precise instant of time t E r, ira(t) ~ [0, 1] represents the possibility of a being precisely t. The extreme values 1 and 0, represent, the absolute possibility and null possibility of a being t, respectively. By means of ~a we can define a fuzzy subset A of v, which contains possible values of a, assuming that A is a disjoint set, in the sense that its elements represent mutually excluding alternatives for a. Considering tZA as the membership function associated with A, we will have that v t ~ r,

~.(t) = ~A(t).

In general, we will indistinctly use membership functions and possibility distributions associated with the different temporal concepts we will define. We call support of a fuzzy subset A any set of values t E r such that Iza(t) > 0, and core of A any set of values t ~ v such that tZA(t) = 1. We always assume that Jra is normalized, that is, that the core of A is not an empty set, existing at least one completely possible t for a: ::It ~ z-,

~z~(t)= 1.

S. Barro et al. / Fuzzy representation and handling of time

158

9:50

9:55

' 10:00

i0:05

10:10

a)

A

21:15

,

,

L

I~

T

b) Fig. 2. (a) Representation of a fuzzy date associated with the concept 'around 10:00'; trapezoidal distribution A = (9:50, 9:55, 10:05, 10:10)~, (b) Representation of the precise instant '21:15'.

We also consider that 7ra is unimodal. That is: Vt, t', t" ~ r, t < t' < t",

7ra(t')/> min(lra(t), x,(t")).

Both assumptions are verified, for example, by representing Jr, using a trapezoidal distribution A = (~,/3, 3', 6)~, ~ ~
We introduce the concept of time extent in order to represent quantities of time, as, for example, the time elapsed between two dates. A fuzzy time extent b is represented by a possibility distribution, 7rb, over the set of integer numbers 0, where the elements of fl represent units of time fa (Figure 3). This way, given a m e D, Jrb(m) E [0, 1] represents the possibility of b being precisely m. The extreme values, 1 and 0, represent, respectively, the absolute and null possibilities of b being m. As in the definition of

S. Barro et al. / Fuzzy representation and handling of time

170'

175'

180'

185'

159

190'

Fig. 3. Representation of a fuzzy time extent or fuzzy amount of time associated with the concept 'approximately 3 hours', considering that f t = 1 Minute; trapezoidal distribution B = (170, 175,185, 190)D.

date, by means of Jrb we can define a fuzzy disjoint subset B of Q, which contains all the possible values of b. Given an ordered pair of fuzzy dates (a, e), the time elapsed between them or the temporal distance between a and e, is given by a fuzzy time extent. This temporal distance is represented by means of a possibility distribution rCD~.,~), over B, where, given a m c Q, zcD~.,e)(m) represents the possibility of the distance between the two dates being exactly m: V m E O,

ge(t)).

Jro(.,e)(m) = sup min(tc.(s), ??z -

g

t,s

E

s

r

We will denote as D~..e) the fuzzy subset of Dthat contains all the possible values for the temporal distance between a and e. Assuming trapezoidal distributions, and being A = (tea, ~a, "Y,, ~ a ) r and E = (ae, /3e, ~/e, 6c)~, we will have that the temporal distance between the two dates is (Figure 4): D(~,~) = (a~ - 6~, j8~ - Ya, Ye - ~a, 6e

-

-

Ola)O"

This definition of distance provides information not only about the separation, but also about the relative disposition of the dates on the r axis. More specifically, JrD(.,~) does not coincide with rCo(e,~), except, obviously, when the distance is given by the singularity 0. The distributions zrO(a.,.) and ;rot,..) are symmetric with respect to element 0 of Q, that is, ZrD(.,~)(m) = I r o ( , , a ) ( - m ) , V m ~ D. As can be observed, introducing the time extent as one more primitive of the model allows talking not only about quantities about time but also about distances between temporal entities. This concept

i'\ i \, 9:50

9:55

. . . . 10:05

10:00

\\ 10:10

16:50

I /

/

\

0

.

.

.

.

6h40'

.

.

.

.

6h45'

.

6h50'

\

6h55'

\

\

\\ 7h

Fig. 4. Representation of the temporal distance (lower part) between the two dates 'approximately 10:00' and 't6:50'.

S. Barro et al. / Fuzzy representation and handling of time

160

can be used, as we will see, as a mechanism for expressing relative temporal references and in the verification of relations among temporal entities. Using dates and time extents as operandi (taken as fuzzy numbers [10], over z and D, respectively) and defining the fuzzy addition (@) and subtraction ( ® ) operations over them, we will introduce a fuzzy temporal arithmetic that will later be useful. In particular, the fuzzy addition or subtraction between a date a and a time extent b, produces a new date e. Thus, E--= A • B or E = A G B, are defined as

Vt ~ z,

Ize(t) =

Sup min(/za(t'), /zB(m)) t=t'*m.fd t'Ez,m~O

where * represents operand + or - , depending on whether we are considering a fuzzy addition or subtraction, and fa is the discretization factor assumed in the representation of b. In a similar way, the fuzzy addition or subtraction of two time extents b and c, produces a new time extent d. Thus, D = B @ C or D = B O C, are defined as

Vm c O, tXo(m)

=

Sup

m=m'*m" ttl',tn"~

min(/x,(m'), tzc(m"))

being the meaning of * the one commented before.

3.4. Intervals An interval is a period of time defined by its limits or extremes, which are dates, and its temporal duration, which is a time extent defined as the temporal distance between the extremes or limiting dates of the interval. We will denote as I~a,e,a) the interval limited by dates a and e, with a temporal duration d. For the definition of an interval to make sense it is necessary for the interval to 'begin before ending'. For this reason, we assume that D, the fuzzy subset which defines the possible values of the duration of the interval, will be unimodal and normalized, and its support will be included in the set of positive integer numbers. That is, V m E D, m <~O, tZD(m) : O. This definition of interval is less restrictive than the one given by Dubois and Prade [4], as it does not impede the existence of overlap between the supports of the initial and ending dates. Besides, it allows greater flexibility in the representation of intervals, combining extreme dates and persistence. However, an interval defined this way may include inconsistent or redundant information. If we consider that tZt(a,e,d)(ta, re) ~ min{/zz(t~), tZE(te), IZO(te- ta)}, represents the possibility of t~,te ~ Z, being the beginning and ending instants, respectively, of the interval I~,e,a), we will say that I
Vm • l,

Id.D(l(al,el,dl),l(a2,e2,d2))(m) = Id.D(el,a2)(m).

Notice that in this case the distributions TgD(l(al,el,dl),l(a2,e2,d2)) and Y~D(l(a2,e2,d2),l(al,el,dl)) a r e not necessarily symmetric with respect to element 0 of D. The temporal entities date and interval allow us to represent fuzzy temporal references expressed in a direct way: '21:15', 'February, 12th', etc. However, it is frequently necessary to specify the temporal arrangement of events in relation to other events. This happens in the medical example of Section 2, whose structure of temporal relations between the events (Figure 1) must be preserved in the computational representation. For this, we introduce the concept of Fuzzy Temporal Constraint Satisfaction Networks (FTCSN), that permits the representation and manipulation of fuzzy temporal

S. Barro et al. / Fuzzy representation and handling of time

161

relations among temporal entities (general concepts on fuzzy constraints can be reviewed in [18]). We will follow a homogeneous approach, introducing the definitions of all the temporal relations among temporal entities in terms of time extents: one fuzzy temporal relation between two temporal entities can be interpreted as fuzzy constraints or bounds on the temporal distance between dates, and this will be a valid approach for quantitative and qualitative relations. Also, it facilitates the relativization of the meaning of the temporal expressions to each specific application context, by just relativizing the meaning of the temporal distances themselves. 3.5. F u z z y temoral constraint satisfaction network We define a Fuzzy Temporal Constraint Satisfaction Network (FTCSN) L, as a finite set of n + 1 nodes { N o , . . . , N,}, and a finite set of directed arcs P. Each node Ni is associated with an unknown date X/, except node No that represents the precise instant to, or time origin. Each arc P(i,j) ~ P, originating in node N, and ending in node Nj, is associated with a time extent, zrr(~a), that reflects the existence of a (binary) constraint over the possible temporal distance between dates Xi and X r More specifically, given a precise duration m E D, zre(ij)(m) represents the possibility of the temporal distance from date Xi to date Xj taking exactly a value of m. Consequently zrp(~,j) implies a joint constraint over the possible values of dates X~ and X# so that, in the absence of other constraints over dates X~ and Xj, the assignment X~ = t i and Xj = tj is possible if l~p(i,j)(tj t~) > 0 is satisfied. The absence of constraints between nodes Ng and Nj of a FI?CSN, is equivalent to considering an arc P(~,j~ between both nodes whose associated distribution is the unit distribution 7ru, defined as: zrv(m) = 1, Vm E I. Really, if N/= No and N / ~ No, the associated distribution is the step distribution ~s, defined as: Zrs(m)--1, Vm > 0 and Zrs(rn)= 0, Vm ~<0. However, we do not consider this fact as it is irrelevant to the following analysis. Also, in a FTCSN we do not consider arcs such as P(~,m taking into account that zre(~,i3(0)= 1 and l~p(i,i)(m ) ~-0, V m ~ 0 ~ D. Finally, every time extent ]r,p(i,j) , associated with arc P(/,j~, defines a time extent ZCp~j,~, associated with arc Pt~,i~, symmetric to it, that is, ~p(i,j)(m) = ~p(j,i)(--m), V m e I. A date a, expressed in a direct way through a distribution zra over r, is projected onto a k-TCSN through a node Na and an arc Pm,~), so that -

-

V m E D, lrpm,~)(m ) = z ~ ( m "fd). A date a is expressed relative to another date e by means of a distribution ZCO(e,a~over Dthat reflects the temporal distance between e and a. This relative expression is projected onto the FTCSN through two nodes N, and N,, and an arc P(e.a) associated with the distribution Zrp(e,,), so that Vm ~ l, ~P(e,a)(m) = P~D(e,a)(m). Finally, an interval I(.,e,d~ is projected onto a FTCSN through two nodes Na and Ne, projecting the dates a and e, respectively, and through an arc P(~,e~, whose associated time extent coincides with the duration d of the interval. That is Vm c D, ZCe(.,e~(m)= Jrd(m). We say that an n-tuple of precise instants of time T = (tl . . . . . tn) ~ r" is a possible solution of network L, with possibility zrL(T), if and only if it satisfies all the constraints of the network, that is, Vi,j, 0 <~ i <~ n, 0 <-j <~ n, 7gp(ij)(tj t~) > 0, being I~L(T ) ~=min~j{~rp(ga)(t~ ti)}. That is, we consider the conjunction of constraints of the network (which from now on we will denote as zrp(0,o)AZrpm,l)^'--^~rp(.,.~), as the condition to be verified by any solution of the network, T. According to this definition, we say that a network L is consistent if and only if there is at least one solution T = (t~ . . . . . t.) that verifies all the constraints of the network with a possibility equal to 1. That is, 3 T e r ~, I~L(T ) = 1. We say that a network M is equivalent to L if and only if V T ~ rn, ~rL(T) = try(T). Given a FFCSN L, there always exists a network M equivalent to L that is minimum, this is, it is made up of constraints M ~re(~,~, which limit the domains of possible values of each variable to the minimum set of values compatible with all the constraints of L. The determination of each constraint Z~Mpt;a)results from the intersection of the possibility distributions associated to the constraints derived from all the paths of network L between nodes N~ and Nj with lengths between 1 and n. We have proved that there exists an -

-

S. Barro et al. / Fuzzy representation and handling o f time

162

algorithm of complexity O(N 3) for the determination of the consistency of a network L and for obtaining its minimum network [13]. Once M has been computed, the generation of solutions and the response to queries about the distribution of the temporal entities are simple tasks with complexity O(1) and O(0), respectively. This last question will be studied in Section 5. As an example, in Figure 5(a) we show a part of the FTCSN for the previous Figure 1; obtaining its equivalent minimum NO to = 1 January,

1993

(-OO-0~0o,0o}

N1

Intem~ent m ICU

.(-~'-~'~)

L a s t Revision a t Nephrology Service

N2

L a s t Revision a t Nephrology Service

N2

Beginning of Permanent D y s p n e a and A s t h e n i a

N3

b)

NO

I January,

N1

Interrurnent in I C U

••

1993

I

(28,28,28,28)

141

Beginning of Permanent D y s p n e a and Asthenla

J

N3 Fig. 5. (a) FI'CSN that represents a part of the graph of Figure 1. As a simplification we assume fa = 1 day, so that, for example, the date of internment in the ICU is taken as February 15th, 1993. Trapezoidal distributions are used for representing the time extents, (b) Minimum network of (a). Notice, for example, that the directly explicited time of 'approximately one month' between the 'beginning of permanent dyspnea and asthenia' and the 'internment in ICU', is bounded by the time indirectly determined through the node of 'last revision at Nephrology Service'.

S. Barro et al. / Fuzzy representation and handling of time

163

network (Figure 5(b)) we can answer questions about the absolute or relative disposition of the events in a more precise manner than over the network corresponding to the initial information.

4. Language for expressing fuzzy temporal entities In this section we are going to introduce a language that will allow us to express fuzzy temporal entities and project them onto a FTCSN. This projection is achieved by obtaining the time extents associated with arcs between the nodes involved in each new expression. This language admits the specification of temporal entities relative to other temporal entities, both through qualitative and quantitative relations. It also permits handling the imprecision of natural language, and, therefore, it is a flexible and powerful interface for those systems in which the representation of fuzzy temporal information is necessary. For the sake of simplicity, both in the definition of the grammar and in later examples, we represent possibility distributions through trapezoidal forms. Nevertheless, remember that the only limitation to our model is that the possibility distributions with which we operate must be unimodal and normalized. The rewriting rules of the grammar associated with this language are: (R1) (R2) (R3) (R4)

(Temporal entity)::= {(Date) ] (Interval) (Date)::= {(Direct date) ] (Date relative to date) ] (Date relative to interval)} (Direct date)::= (](Date-Date Relation)](Absolute Date)) (Absolute date)::={t I (a,/3, 7, 6)3 [ NOW [ YESTERDAY [ LAST_WEEK] • • .} (RS) (Date-Date Relation)::= {(Time distance) I [APPROXIMATELY] EQUAL} (R6) (Time distance)::= ([(Time extent)](Yime direction)) (R7) (Time extent)::= ([[(Time extent)](Expansion operator)](Absolute time extent)) (R8) (Time direction):: = {BEFORE [ AFTER} (R9) (Absolute time extent)::= ([APPROXIMATELY] (Temporal quantity)[(Temporal unit)]) (R10) (Expansion operator)::= {LESS_THAN r MORE_THAN} ( R l l ) (Temporal quantity)::= {m [(a,/3, 7, 6)0 ]LITTLE [ MUCH [ SOME[ • • .} (R12) (Temporal unit)::= {...[SEC [ MIN [ H[ • • .} (R13) (Date relative to date)::= ((Date-Date Relation)(Date label)) (R14) (Date label) :: = Any_explicit_date_label (R15) (Date relative to interval)::= ((Date-Interval Relation)(Interval label)) (R16) (Date-Interval Relation) :: = {[(Time extent)]{AFTER [ BEFORE}[[(Date-Date Relation)] {BEGINNING I END} [ BELONGS} (R17) (Interval)::= {(Direct interval) I (Interval relative to date) ] (Interval relative to interval)} (R18) (Direct interval)::= ({((Date), (Date), (Time extent))[ YESTERDAY ] THIS_WEEK]...}) (R19) (Interval relative to date)::= ((Interval-Date Relation)(Date label)) (R20) (Interval-Date Relation) :: = {[(Time extent)]{AFTER pBEFORE} [ [APPROXIMATELY] {STARTS_IN [ FINISHES_IN} [ ENCOMPASSES} (R21) (Interval relative to interval)::= ((Interval-Interval Relation)(Interval label)) (R22) (Interval-Interval Relation) :: = {[(Time extent)] {AFTER [ BEFORE} ] [APPROXIMATELY] {STARTS I STARTED_BY [ EQUALS I FINISHES J FINISHED_BY ] MEETS [ MET_BY} ]{CONTAINS [ DURING I OVERLAPS] OVERLAPPED_BY}} (R23) (Interval label)::= Any_explicit_interval_label In the definition of the rules we have used the following metasymbols: ::= is the rewriting

164

S. Barro et al. / Fuzzy representation and handling o f time

metasymbol, [ ] indicates the optionality of its content, parentheses are delimiters, I separates the mutually excluding options delimited by { } and ( ) indicates that its content is a non-terminal element which can be decomposed into simpler elements. For simplicity, we have omitted some terminal symbols which make the grammar unambiguous; e.g. YESTERDAY as a direct date should be asserted as DATE (YESTERDAY), and as a direct interval as INTERVAL (YESTERDAY). Strictly speaking, expressions such as Y E S T E R D A Y or LAST_WEEK, in rule (R4), are dates that are not referenced in an absolute manner, they are referenced with respect to the current time. Nevertheless, in any system with a real time clock they can be trivially transformed into the corresponding absolute dates. In rule (R16) the expression of a 'Date±Interval Relation', by means of '[(Time extent)] {AFTER IBEFORE}' can be taken as a particular instance of '[(Date-Date Relation)] {BEGINNING I END}', we have nonetheless kept it in order to increase the flexibility and symmetry of the grammar proposed. The objective of the language introduced is, however, to show the possible expressive capacity in the expression of fuzzy temporal entities, avoiding redundancies. For this reason we have not considered those temporal relations that can be expressed using strings of simple relations connected by means of the logic connectors AND, O R and NOT explicitly (this aspect will be analyzed later). In any case, to introduce in the language the syntactic and semantic criteria in order to handle directly, for instance, expressions of the type 'BETWEEN (SOME MINUTES AND ONE H O U R ) AFTER', is easy and can be of interest in certain applications. In addition to this syntactic or rewriting rules, some semantic rules that associate meaning to the temporal entities expressed here must be defined. In this sense, it is evident that the references to the past (before in 'half an hour before 2') must be associated with displacements to the left in the time axis r and references to the future with displacements to the right. This idea allows us to consider a treatment of temporal references by means of fuzzy arithmetic, where dates and time extents are the operandi (dates and time extents can be understood as fuzzy numbers over T and n, respectively) and the fuzzy arithmetic addition (@) and substraction (@) the operators. The temporal entities expressed by means of this language must be projected onto a FTCSN. In order to do this it is necessary to calculate the time extents that must be associated with the corresponding arcs in the FTCSN. For obtaining these temporal extents from a temporal reference expressed according to the previous syntax, we consider some semantic criteria we enumerate in Tables 1 and 2. In particular, in Table 1 we present the meaning of those expressions of the language involving predefined operators and/or distributions and in Table 2 we show how the temporal extent that permit the projection of a temporal entity onto a FTCSN are obtained. Observe that the relative expression of intervals may be achieved using the primitive relations defined in rules (R19)-(R23), or in a more general way, expressing its limiting dates in a relative way (R18). Let us give an example in which the date expressed as a 'Date relative to date' by means of rule (R13), is projected onto a FTCSN by means of the distribution over I associated with the corresponding 'Date-Date Relation'. We consider again the clinical case of Section 2, where it is stated that the 'beginning of permanent Dyspnea and Asthenia' took place A P P R O X I M A T E L Y ONE MONTH B E F O R E 'internment in the ICU'. This way, following the notation of nodes in Figure 5, we will have (considering fa = 1 day): 7I~P(NI,N3) ~- ]~APPROXIMATELY-1 M O N T H - B E F O R E ZX ((APPROXIMATELY 1 MONTH) BEFORE)

= (((-7, - 3 , 3, 7)uO(28, 30, 31, 31)0 BEFORE) = ((21, 27, 34, 38). BEFORE) = (-38, -34, -27, -21)u. Let us consider now that instead of referencing the temporal disposition of the 'beginning of permanent Dyspnea and Asthenia' relative to another date (node of the FTCSN) we do it in a direct way following rule (R3) (relative to an absolute date). That is, 'beginning of permanent Dyspnea and Asthenia' A P P R O X I M A T E L Y ONE MONTH B E F O R E 'February 15th'. Considering to = 1-January1993, and fd = 1 day, we can represent this expression and evaluate its meaning (associated distribution)

S. Barro et al. / Fuzzy representation and handling of time

165

Table 1. Meaning of expressions with predefined operators and distributions. [ ] indicates the optionality of the content, when it is not specified it is equivalent to considering a null time extent, (0, 0, 0, 0)~. - ( t r ) indicates the distribution that is symmetric to 7r. To frame a distribution between [ ITemporal unit, indicates its conversion from the specified temporal units to fd (default value). The introduction ~ ( - ~ ) as the identifier of the higher (lower) limit of the r axis and the fl axis is very interesting for the manipulation of certain temporal references. In the specific case of r, the symbol - ~ is interpreted as to. Temporal quantities such as LITFLE, MUCH, . . . , have a meaning which can be sensitive to the context of a specific temporal reference. For this reason, we define them as relative distributions which depend on the temporal unit specified in the instantiation of rule R12, taking fa as the default temporal unit. In a similar way, the temporal extension associated with APPROXIMATELY must depend on the distribution it modulates; the degree of approximation referenced in 'approximately one month' is not the same as in for example 'approximately one hour' Expressions with predefined operators and distributions

Possibility distributions

(R4) (Absolute date) =- TCAbsoluledate tcT

NOW YESTERDAY . . . . (R5) (Date-Date Relation) =-/~Date-Date_Relation [APPROXIMATELY] E Q U A L (R6) (Time distance)::= (BEFORE) (AFTER) ((Time extent) BEFORE) ((Time extent) AFTER) (R7) (Time extent) ~ rCTi. . . . . . . t (LESS_THAN (Absolute time extent)) (MORE_THAN (Absolute time extent)) ((Time extent) LESS_THAN (Absolute time extent)) ((Time extent) MORE_THAN (Absolute time extent)) (R9) (Absolute time extent)-= 7~Absolute ti. . . . tent ([APPROXIMATELY] (Temporal quantity) [(Temporal unit)]) ( R l l ) (Temporal quantity) -= '~'Temporal quality me0 LIq'TLE,... (R18) (Direct interval) YESTERDAY . . . .

(t, t, t, t)r (/current, /current,tcurrent, t..... nt) r (BeginningVESTERDAV, BeginningVESTERDAV, EndyEsTERDAY, EndvEsTERDAY)~. . . .

[~r~01-~[(- ~A~.ox, --~A~ox, t3A~.o..,. ~.~.ox)d

nog (1, 1, ~, ~)~ --(/TTi . . . . . . . . d) ['] /2"*0 ~Timc extent O /~'q)

(~'Absol. . . .

i ........

(]rAbsol . . . .

i

®(1, 1, ~, ~)0 n (0, O, ~, :¢)~

........... ( ~ ( I , 1, 0% oc)n)

(~Absolute ti. . . . . . . . . . (~ ~Ti . . . . . tent) [-) (0, 0, 0% oc)0 ]/'Absolute time extent ~ 7gTirne_extent I[lr-ol



]rTemporal q . . . . ity ITemporal unit

(m, m~ m, m)D

(C~.tt,e. /3.tt,~. ~/.tt.e. a,it.e)0 .... ((BeginningyESTERDAV, BeginningVESTERDAV, BeginningVESTEaDgy, BeginningVESTERDgy) ~, (EndyEsTERDAY, EndvEsTERDA¥, EndyEsTERDAY, EndyEsTERDAY), (DurationDAV, DurationoAv, DurationDAV, DurationDAV)0

as follows: ( ( ( A P P R O X I M A T E L Y 1 MONTH) B E F O R E ) 7rlS-Veb-1993) = ((--38, --34, --27, --21)0 O ~r15-Veb-a993) = (8-Jan-1993, 12-Jan-1993, 19-Jan-1993, 25-Jan-1993). That is, the 'beginning of Dyspnea and Asthenia' can be located between January 8th and 25th, 1993, and with higher possibility between January 12th and 19th, 1993. Figure 6 shows this calculation procedure graphically. Converting the resulting distribution over the domain D, we obtain a time extent that, associated with

166

S. Barro et al. / Fuzzy representation and handling of time

Table 2. Projection of temporal entities onto a FTCSN. The meanings of ~r>o, ~r0 and ~V(i,u)<'---TO>O,an induced time extent ~re(o,.)~ Z~>oappears. Finally over a FTCSN, 'Any_explicit_date_label' identifies a node No, whereas 'Any_explicit_ interval_label' identifies two nodes (No, Ne), associated with the beginning and end of the interval referenced, respectively Temporal entities

Time extents on a ~CSN

(R3) iV,.::= ([(Date-Date Relation)](Absolute date)) (R13) Ni::= ((Date-Date Relation)N.)

~P(a,i) +-- ~Date-Date_Relation

(R15) Ni :: = ((Date-lnterval Relation)(No, N~)) ((Time extent) AFTER (No, N~)) (AFTER (N., Ne)) ((Time extent) BEFORE (No, N~)) (BEFORE (N., Ne)) ([(Date-Date Relation)] BEGINNING (N., Ale)) ([(Date-Date Relation)] END (N., Ne)) BELONGS (No, N~)) (R19) (Ni, N., ~P(i,u))':: ((Interval-Date Relation)N.) ((Time extent) AFTER N.) (AFTER N.) ((Time extent) BEFORE N.) (BEFORE N.) ([APPROXIMATELY] STARTS_IN Na) ([APPROXIMATELY] FINISHES_IN N.) (ENCOMPASSES N.) (R21) (Ni, Nu, np(i,u) ) :: = ((Interval-Interval Relation) (N., N~)) ((Time extent) AFTER (No, Ne)) (AFTER (N., X~)) ((Time extent) BEFORE (N., N~)) (BEFORE (N., N~)) ([APPROXIMATELY] STARTS (No, N~)) ([APPROXIMATELY] STARTED_BY (No, N~)) ([APPROXIMATELY] EQUALS (N., N.)) ([APPROXIMATELY] FINISHES (N~, Ne)) ([APPROXIMATELY] FINISHED_BY (N., Ale)) ([APPROXIMATELY] MEETS (N., N~)) ([APPROXIMATELY] MET_BY (N., N~)) (CONTAINS (N~, N~)) (DURING (No, N~)) (OVERLAPS (N,,, N~)) (OVERLAPPED_BY (N,. N.))

arc

P(0,'beginning_p .......

t_dysp . . . . . .

][P(O,i) ¢z---l[I~'Date-Date Relation] @/t'Absolute_datel~

~gP(e,i) <"-//'Time extent n ~>0 ~P(e,i) ~ /l'>0 E P(a,i ) ~ -- ( /lTTime_extent) f-) ~<0 ]~P(a,i) <--- 2~<0 ~P(a.i) <--- [~Date Date_Relation] l~ p(e,i) <'-- [/l'Date_Date_Relation] I~P(a.i) <--- 1~'>0~ ~P(e,i) ~ ]17<0

~f P(a,i) (-- ~Time_extent f') ~>0; ~P(i.u) ~-" /g>O 7~P(a,i) <"-/17>0; ~P(i.u) ~ K>O 7gP(a,u) ~

-- (ffTime_extent) O if<0; ltP(i,u) ~ 7f>O

~P(a,u) <-'- ~'<0; 7~P(i,u) <--- ~'>0 ~P(a,i) <--- [~'--0]; ~P(i,u) <"- ~'>0; ltP(a,u) ~ [ ~ 0 ] ; ffP(i,u) ~ ;t/'>O; ][P(a,i) <---]~'<0; ][e(a,u) <"- 7~>0; 7~P(i,u) <'---1~'>0

~P(e.i) <---/rTime_extent n /~'>0; ~P(i,u) <"-/Z'>0 ~P(e,i) <---/17>0; ~P(i,u) ~---/l'>O ~P(a,u) ~'- --(7rTi . . . . . tent) ('~ ~<0; ~P(i,u) ~ ~>0 ~P(a,u) <'-- ]r0 ~P(a,i) <---[/~'=0]; gP(e.u) <"--~<0; lrP(i,u) <---/17>0 ~P(a,i) 7CP(a,i) ff P(a,O ffP(a,i)

<'---[~=0]; ~P(e,u) ~'- [~'=o]; lrP(e.u) ~ R'>O; l~ P(e,u ) ~ ~'-- if
~ /r>o, I~P(i,u) ~ <--- [//'-0]; ~P(i.u) [/l"~0]; lf P(i,u ) ~ [7/'=0]; lrP(i,u) ~

~>o ~'- 7t'>o

~>0 if>0

7re(.,.) ~ [1r-o]; 7re(i,.) ~ Jr>o ffP(e,i) ~-- [/l'=0]; /l"P(i,u) ~ / t ' > o ~P(a,i) ~ ~'<0; P(e,u ) ~-- if>0; ~P(i,u) <"- ~'>0 )'CP(a.i) <'--~'>0; l~P(e,u) <"--]Z'<0; ~P(i,u) <'---~'>0 7~P(a,i) <--- ]Z'<0; ~P(a,u ) 6"- 1~'>0~ ]~P(e,u) ~-- 1[<0; ][P(i,u) (--- 7E>0 ][P(a,i) <---/[>0; ~P(e,i) 6--~<0, ][P(e,u) <---1[>0; I[P(i,u) +---/~'>0

thenia'), permits projecting the date onto a FFCSN relative to the time

origin:

I~P(NO,N3) = 1(8-Jan-1993, 12-Jan-1993, 19-Jan-1993, 25-Jan-1993)~l, = (7, 11, 18, 24)v N o t i c e t h a t this d i s t r i b u t i o n d o e s n o t c o i n c i d e w i t h the o n e o f F i g u r e 5 ( b ) , as t h e l a t t e r r e f l e c t s the d i s t r i b u t i o n tee(re.m) M associated with the minimum network M resulting from considering additional constraints.

S. Barro et al. / Fuzzy representation and handling of time

167

/'

(((APPROXIMATELY I MONTH} BEFORE} 15 FEB 93)

0 12 JAN 93

19 JAN 93

(APPROXIMATELY 1 MONTH} BEFORE

-38

-34

-27

-21

15 FEB 9 3

2 5 J A N 93

8 JAN 93

IMATELY

-7

-3

3

7

I MONTH

21

27 283031

34

38

Fig. 6. G r a p h i c r e p r e s e n t a t i o n of the evaluation of the expression: ' a p p r o x i m a t e l y one m o n t h before F e b r u a r y 15th, 1993'.

4.1. Linking temporal references It is possible to consider linking multiple simple temporal references by means of the conjunction, disjunction and negation logic connectors. This way the expressive power of the language when referencing temporal entities is increased. We must, nonetheless, make some comments on this aspect. Let us assume a FTCSN L and a set of simple temporal expressions defined by means of this language and which we will denote as {El . . . . . Ej}. The projection of Ej onto L induces temporal constraints associated with the arcs of the network, which, in a logic notation using the conjunction symbol can be expressed as /t'L),e(o.o) A/t'Ej, p(0,1 ) A • • • ^ l~Ej,P(n,n).

In general, most of the possibility distributions will be equal to the unit distribution zru, which, as we have already pointed out is riot shown in the FTCSN. Given the temporal expression resulting from the conjunction of the temporal expressions {El . . . . . Ej}, represented as E l ^ ' - ' ^ Ej, its projection onto L will induce a temporal distribution between each two nodes N~ and Ne of the network, given by ]'CEI^...AEJ, P(a,e) ~ ('~ ]I~Ej, p(a,e ). J

In the projection of successive temporal expressions onto a FTCSN their conjunction is implicitly assumed. Figure 7 shows an example of the conjunction of temporal expressions.

168

S. Barro et al. / Fuzzy representation and handling of time

to = a)

1 January.

1993

r

Internment

L a s t Revision a t Nephrology

In I C U

Service

. do f P e ° ° e n t

b) I January,

1993

/ Internment

, in ICU

ql I

128.28,28,281

L a s t Revision a t Nephrology

Service

"••

Beginning of P e r m a n e n t D y s p n e a and Asthenla

Fig. 7. (a) Example of Figure 5 with the assumption that the 'internment in ICU' occurs MORE_THAN 3 WEEKS AFrER AND LESS_THAN 5 WEEKS AFTER 'beginning of permanent Dyspnea and Asthenia'. (b) Minimum network of (a).

Given the temporal expression resulting from the disjunction of the temporal expression as E l y ' " vEj, its projection onto L will be obtained considering the J FTCSN derivatives of the projection separately for each of the J temporal expressions over L. If we call Lj the j-th resulting FTCSN and Mj its minimum network, the network resulting from projecting the disjunction expression we mentioned onto L is given by the union of the distributions associated with the arcs between every two nodes of the minimum networks:

{El,..., Ej}," represented

7~Elv...vEJ, P(a,e)

~ J

I~P(a,e)

S. Barro et al. / Fuzzy representation and handling of time

169

to = i January, 1993

a)

~'

9

/

\ Last Revision at N e p h r o l o g y

Internment in ICU

Service

%

I~g~nnn~enga~f ~sr I~ ea~eant

b) tO = i January, 1993

~6

"-a

3 Internment in ICU

I"l

(28,28,28,28) I

B e g i n n i n g of Permanent D y s p n e a and Asthenla

/

Last Revision at Nephrology Service

/

Fig. 8. (a) Example of Figure 5 under the assumption that the interval (Nqast_check nephrology_service, , N.beginning_permanent dyspnea_ a s t h e n i a ' , ~'>0) B E F O R E O R E N D S _ I N N, I. . . . . . . . t icu., (b) Minimum network of (a).

Figure 8 shows an example of the disjunction of temporal expressions. This method for solving the disjunction of temporal expressions is general, simpler particular cases can be contemplated, but we are not going to go into them. In addition, the time extents associated with the arcs of a FTCSN are disjunctive distributions. That is, the values belonging to their support are mutually excluding candidates for the representation of the precise value of the time extent. Let Ej be a temporal expression that, represented in logical notation by the distributions associated with its projection onto a FTCSN has the form }'~ Ej, P(O,O) A I~ Ej, P(O,1 ) A " " " A }'~Ej, P ( n , n )"

170

S. B a r r o et al. / F u z z y representation a n d handling o f time

Its negated expression ~Ej, will be -'3( Tr Ej, P(O,O ) A ~ri~Ej.P(O,1 ) A " " " A ]?~E],P(n,n )) ~- "3( ]~ Ej, P(O.O)) V - 3 ( TgEj, P(O,l )) V " " " V -"l( ]~ Ej, p(n,n ))

where ~(lr) denotes the complementary distribution of it. That is, Vx, ~lr(x) = 1 - tr(x). Eg. Assuming the 'Date-Date Relation': ZCNO(BEFORE)= ~rBEFORE = (0, 0, ~, ~). The negation can also operate over time distances, time extents, etc. In this case it complements the possibility distribution that would represent the time extent before the negation. XNOT(MUCmBEFORE =- --(-"lit'MUCH) ~/'r<0.

Eg. According to our algorithm for the calculation of minimum networks [13], the temporal expression resulting from the combination by means of logic connectors of simple temporal expressions can be projected onto a FFCSN only if all the constraints induced on the arcs of the FTCSN are associated with normalized and unimodal distributions. This constraint is formally analogous, although outside a fuzzy methodology, to the one considered in the time-point algebra scheme, in which the limitation of possible relations between points to the set { <~, < , = , />, > , ?}, where ? is identified with the absolute lack of information about the relation between two points (for us lrv), seeks to simplify handling temporal networks without significantly limiting the possibility of manipulating the usual temporal expressions in many domains [17].

5. Verification of fuzzy temporal relations An additional problem to that of representation is that of testing the degree to which a certain relation between temporal entities is verified. Establishing a relation between temporal entities has been treated through the imposition of constraints over the possible values for the distance between dates. Following an inverse procedure we can consider testing if a specific relation between temporal entities is verified. In order to do this it is necessary to calculate the compatibility between constraints that identify the temporal relation and the distances between the dates that define the temporal entities involved in the relation (irrespective of whether they are simple dates or intervals). Following possibility theory, the fulfilment degree of a relation between temporal entities will be specified by two values: the possibility degree / / a n d the necessity degree N. The later measures the certainty in the verification of the relation and is given by the impossibility of verifying the complementary relation. To obtain the fulfilment degree of a relation between temporal entities projected onto a FTCSN L, implies knowing the distances between the dates that define these entities with the maximum possible precision. In order to do this we must consider the minimum constraints between dates, or operate over the minimum network M of L. This way, we will assume from now on that we operate over a minimum and consistent FTCSN M. In general, a fuzzy temporal relation (FFR) is made up of simple relations between temporal entities defined following the language we presented ('Date-Date Relation', 'Interval-Date Relation' or 'Interval-Interval Relation' depending on what temporal entities are being related), linked by means of conjunction, disjunction and negation connectors. For example, on the graph of Figure 1, we could question the following temporal relation between intervals (represented from the nodes associated to their limiting dates): (N'last_check nephrology . . . . . ice', N'beginning_p . . . . . . . t_dysp . . . . . . thenia') (BEFORE (NOT (MUCH) BEFORE) (N, beginning_palpitations, , N, int . . . . . t_lCU') ?

OR OVERLAPS) A N D

Any F r R can always be expressed through a disjunction of simple relations linked using a conjunction connector. We will call this representation the normal form of a F-FR. In the case of the

S. Barro et al. / Fuzzy representation and handling of time

171

expression of the previous example, its normal form is ( N'last_check_nephrology . . . . . ice', N+beginning_p . . . . . .

nt dysp . . . . . . thenia')

(BEFORE AND (NOT(MUCH) BEFORE)) OR (OVERLAPS

AND

(NOT(MUCH)

BEFORE))

( N , beginning palpitations', N'int . . . . . .

t I C U ' ) .9

Consider a FFR R expressed in its normal form: R = (R,~A'''AR,u)

v(R2, A . . . A R 2 v ) v . . .

where each R u represents a simple fuzzy temporal relation. If we consider the possibility distributions associated with the possible projection of R onto a minimum F-FCSN M, we obtain, using the same logic notation, the following expression: (T[R1,P(0,0)

A

" " " A

ITRl,P(n,n))

V (]'CR2,P(0,0)

A

" " " A

lTR2,P(n,n))

V"

" "

being n the number of nodes of M, not counting the time origin and tT Rk.P(i,j) = ~ fl~Rku,P(i,j). 11

In the case of the previous example, and not representing those distributions that coincide with the unit distribution we would have {(TCRI,P('Iast check nephrology_service', 'beginning_permanent_dyspnea asthenia') = 717>0) A (7~Rl,PCbeginning_palpitations,, 'beginning~p . . . . . . .

t_dysp . . . . . . thenia') = (]~'<0 A ( -- ( ~ M U C H )

A Tg
A ('~'RI,P('beginning_palpitations', 'i ........... I('U') = ~'>0)} V {(~R2,P('last check nephrology . . . . . ice','beginning_p. . . . . ent_dysp . . . . . . thenia') = ~'>0)

A (~R2.P('bcginning_palpitations', "beginning_p. . . . . . . . . dysp. . . . . . henia') = ( ~ > 0 A ( - - ( ~ M U C H )

(~ J~'<0)))

A (~R2.P('beginnin~palpitations', qast check nephrology service') ~ T(<0) A (.TL'R2,/,(.internment ICU','beginning permanent dyspnca_aslhenia') = 7"(<0)

A (JTR2,PCbcginning_palpilations, ,int . . . . . . t_ICU') = ]r >0)},

assuming R l is related with (BEFORE AND (NOT(MUCH) BEFORE)) and R2 with (OVERLAPS AND (NOT(MUCH) BEFORE)). Following the same notation as before, network M could be expressed by means of the conjunction of the possibility distributions associated with the arcs of the network, and thus M = ( / ' ~M ' P ( O , O ) A ' ' " A TC~4(n,n)).

To find the fulfilment degree (with respect to possibility and certainty) of R over M, implies evaluating to what extent the possibility distributions associated with R and M are compatible. In particular, R will be possibly true if and only if there is a solution T of M that satisfies (with non-null possibility degree) expression R. This way, the possibility H of verifying R over M is given by the following expression: II(R, M) = max min {Comp(zRk,P(i,j), Zp~ii))} k

i,j

S. Barro et al. / Fuzzy representation and handling of time

172

defining the compatibility of two time extents as Comp(/~nk, e(i,j)' ;¢P(ij) M -__ max min{rc nk,e(ij)(m ), ~rp~ij)(m)}. rn~0

In a similar way, the necessity or certainty in the fulfilment of relation R will be given by N ( R , M ) = 1 - II(-~g, M).

It can easily be seen that the possibility and necessity of verification of the expression in the previous example are null. Specifically, M

~l~P('beginning_palpitations',

'beginning_p. . . . . . .

t_dysp. . . . . . thenia,)(m) = 0,

V m < 0,

and consequently presents a null compatibility with ~ R 1, P('beginning_palpitations', 'beginning_permanent dyspneaasthenia') •

On the other hand, the part associated with (R2) cannot even be considered as /lYg2,P('beginning_palpitations', 'beginning_p . . . . . .

nt_dyspnea_asthemia,)(m)= 0,

Vm ~ D.

Let us give an example, again extracted from Section 2, and assume that we operate over the minimum FTCSN of Figure 5(b), say M. A key criterium for discarding as a cause for dyspnea an acute infectious pathology is the persistence of the dyspnea for some weeks. To evaluate this fact in the specific case of the patient requires testing if the Dyspnea started more than some weeks before her internment in the ICU. In order to see this we consider the verification of the following temporal relation between dates: N'beginning_pe . . . . . . Considering

t_dysp . . . . . . thenia'

M O R E _ T H A N SOME WEEKS B E F O R E

N , in t . . . . . .

t_ICU '?-

to = 1-January-1993 and fd = 1 day:

~P~'beginning_permanent_dysp . . . . . . thenia', 'int . . . . . .

t_ICU') = (21, 27, 27, 27),

SO that /T M P('internment_ICU','beginning_permanent_dyspnea a s t h e n i a ' )---

( - 2 7 , -27, -27, -21).

On the other hand (Table 2): ~'MORE THAN-SOME-WEEKS-BEFORE, P('internment_ICU', "beginning_permanent_dyspnea_asthenia')

= ( ( M O R E _ T H A N (SOME WEEKS)) B E F O R E ) = ( ( M O R E _ T H A N (18, 25, 39, 46)0 B E F O R E ) = (((18, 25, 39, 46)~ • (1, 1, o% ~)1) B E F O R E ) = ((19, 26, 0% ~)~ B E F O R E ) = ( - ~ , - ~ , -26, -19)B. This way: /-/(N'beginning_p . . . . . .

t_dysp...... thenia' M O R E _ T H A N SOME WEEKS B E F O R E N,i.t. . . . . . t_lCU,, M)

= Comp{(- o% - ~ , -26, -19)0, (-27, -27, -27, - 21)} -- 1,

S. Barro et al. / Fuzzy representation and handling of time MORE_THAN-SOME-WEEKS-BEFORE

173

//// ...............................................

M

/

--0.4

o

i

i

i

t

i

!

i

q

i

i

-27 -26

i

i

i

-21

i

i

p

r

i

i

Ii

-19

Fig. 9. Graphic representation of the calculation of the possibility and necessity of the expression N.besm,~,e._p¢~ma,e,tdysp,ea a~the,ia" M O R E _ T H A N SOME W E E K S B E F O R E N.i, t. . . . . . t ~ctJ"? considering the minimum network of Figure 5(b).

and MORE_THAN SOME WEEKS BEFORE N, int. . . . . . t_lCU', M ) = 1 - Comp{(-26, - 19, ~, w)n, (-27, -27, -27, -21)} -~ 0.6.

N(N'beginning_permanent_dysp. . . . . . thenia'

Consequently, in this medical case, the fact that the patient's dyspnea is due to an acute infectious pathology can be practically discarded. Figure 9 shows graphically this calculation process. It is possible to consider other more elaborate types of consultations, as for example, obtaining all the temporal entities of a FTCSN that verify a given temporal relation. The model proposed for the representation and verification of FTR over FTCSN provides the formal base for solving this type of questions. This aspect, however, is outside the contents of this work and we will not treat it.

6. Conclusions

Many of the conventional techniques for handling temporal information are similar in their nature to the ones used in physics [7]. In the analysis of physical processes, time is considered an independent variable, orthogonal to the rest of the variables describing the system; the predicates handle time as one more variable. The advantage of this approach is that it permits the separation of the handling of time from the treatment of the domain variables [12, 14]. We can develop what Kahn and Gorry [9] call a time-specialist separately. This is a module that handles temporal references expressed in some representation language, and, from them, can perform deductions and answer questions about time, maintaining a high degree of independence from the domain. Our general approach is based on the same strategy. We are interested in the practical applications of temporal reasoning in medicine. However, the first step has been to introduce a model for handling time which is independent from the domain, but whose expressive features are adequate for the representation of temporal nuances required in medical applications. This model takes into account practical considerations with respect to the ease of its computational implementation. Its representation language and temporal inference mechanisms can be smoothly integrated with those of the domain. The model we propose for the fuzzy representation and handling of time starts from the primitive concepts of date and time extent, from which the concept of interval is introduced. The formalization of these concepts is founded on possibility theory and follows, in part, the proposal of Dubois and Prade [4]. On this base we have defined a representation language for temporal entities that makes the construction of statements involving fuzzy temporal expressions possible, captures some of the terms we use in our expressions in the natural language, and accounts for the imprecision in our appreciation of time. The expressions are combinations of intuitive and simple to construct terms and have a simple translation which is reduced to the application of fuzzy arithmetic operators to possibility distributions introduced by the user or predefined. Due to the fact that the language permits parametrized distributions that depend on the temporal unit specified, the relations are also sensitive to the context

174

S. Barro et al. / Fuzzy representation and handling of time

in which they are used. These relations between temporal entities are interpreted as constraints on the distance between the elements being related, and directly projected over a FTCSN. The model provides a homogeneous framework for the representation of qualitative and quantitative, precise or imprecise relations. In addition to the introduction of a language for the representation of temporal entities, the main differences with a previous fuzzy temporal model by Dubois and Prade [4] can be summarized in two points: (a) the introduction of the concept of fuzzy temporal constraint satisfaction network, (b) the mechanism proposed for testing the temporal relations verified by the events. The first one leads to the reduction of all the relations to a homogeneous representation by means of time extents. Furthermore it permits combining multiple information pieces, minimizing the effect of the propagation of imprecision. With respect to the second, Dubois and Prade propose a different approach for testing the temporal relations. For example, the possibility of two dates, a and b, verifying a relation R, is calculated through the following expression:

H(a R e) = sup min(zcR(S, t), tea(s), ~e(t)) S,IET

where 1rR(S, t) is a fuzzy relation defined in r 2, that models the relation between specific dates. For the case of relations between intervals, they introduce different expressions. We believe that our approach presents some advantages: (a) It is especially adequate for the elicitation of knowledge, as it permits splitting the definition of structured relations into a composition of time extents. These elementary time extents are very intuitive and simple to construct. At the same time it permits the approximation of a contextual relativization of temporal relations. (b) The reduction of the relations to time extents permits the introduction of a single expression for testing all the types of relations, providing a homogeneous treatment. (c) In many cases it is interesting to manipulate the 'meaning' of a temporal relation expressed as a bound between distances, as we do in fuzzy temporal constraint satisfaction networks. (d) Our approach based on time extents makes the introduction of a representation language that generates all the types of temporal relations feasible. Do not forget that, unlike the qualitative case, there are infinite possible quantitative relations and they cannot be defined case by case. In another work [13] we present an algorithm that starting from a FI'CSN L and through the combination of fuzzy temporal constraints permits the calculation of its minimum network and a consistency test. This algorithm has a complexity of O(N3), where N represents the number of nodes of the network. We are currently working in improving the efficiency of the algorithm by simplifying it for specific network topologies. Another interesting point for improvement is to permit expressing and manipulating constraints that operate over time extents in a FTCSN. This way we could consider expressions of the type: (Ni, N,, fl~e(i,u)) ::~- ( V E R Y _ O V E R L A P P E D _ B Y (Na, Ne)); the projection of this temporal expression onto a FTCSN requires, in addition to the time extents associated with the relation ' O V E R L A P P E D _ B Y ' (Table 2): ~P(a,i) ~-- 7~>0; 7gP(e,i) ~-- ~0, a new constraint imposed by the modifier 'VERY'. Intuitively, we can assume that this modifier imposes a constraint that relates the time extents associated with the distances between limiting dates of the related intervals: ~P(i.e) NOT(MUCH)-SMALLER 7re(i,,). In essence, handling of this type of expressions requires handling relations between durations, which at the instant level, correspond to quaternary constraints. We are now working on the development of non NP-hard algorithms that permit the manipulation of FTCSNs with constraints of this type. Finally, the model we propose constitutes the core from which we are developing a Fuzzy Expert System capable of reasoning not only with events whose temporal arrangement can be imprecise or uncertain, but where the definition of the events or the information to which they are associated can also be imprecise, making an integration of the reasoning mechanisms necessary.

S. Barro et al. / Fuzzy representation and handling of time

175

Acknowledgements This work was supported by the Spanish CICYT under project TIC 90/496 and by the Xunta de Galicia under project XUGA20601B92. We wants to thank F. Palacios for providing and discussing the medical case presented and J.A. Vila and A. Bugarin for their collaboration in the graphical part of this work. We also wish to thank the comments of the anonymous referees that have contributed to the improvement of this work. Finally, the first author wishes to thank the Xunta de Galicia for its economic support and Professor P. Ligomenides for his assistance during the author's stay at the Electrical Engineering Dept., University of Maryland at College Park, USA, where part of his contribution to this work was carried out.

References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]

J. Alien, Towards a general theory of action and time, Artificial Intelligence 23 (1984) 123-154. T. Dean and A. McDermott, Temporal database management, Artificial Intelligence 32 (1987) 1-55. R. Dechter, I. Meiri and J. Pearl, Temporal constraint networks, Artificial Intelligence 49 (1991) 61-95. D. Dubois and H. Prade, Processing fuzzy temporal knowledge, IEEE Trans. on Systems, Man and Cybernetics 19(4) (1989) 729-744. S. Dutta, Temporal reasoning in medical expert systems, in: Proc. Symposium on the Engineering of Computer-Based Medical Systems (Minneapolis, 1988) 118-122. S. Dutta, An event based fuzzy temporal logic, in: Proc. 18th IEEE Int. Syrup. on Multiple-Valued Logic (Palma de Mallorca, 1988) 64-71. A. Galton, Temporal logic and computer science: an overview, in: A. Galton, Ed., Temporal Logics and their Applications (Academic Press, London, 1987) 1-52. J. Hunter, I. Kirby and N. Gotts, Using quantitative and qualitative constraints in models of cardiac electrophysiology, Artificial Intelligence in Medicine 3 (1991) 41-61. K. Kahn and G. Gorry, Mechanization of temporal knowledge, Artificial Intelligence 9 (1977) 87-108. A. Kaufmann and M. Gupta, Introduction to Fuzzy Arithmetic: Theory and Applications (Van Nostrand Reinhold, New York, 1985). H. Kim and K. Oh, A new representation model in uncertain temporal knowledge, in: Proc. IFSA'91, (1991) 113-116. R. Marfn, M. Taboada, J. Mira, A. Barreiro, R.P. Otero and M. Pereira, Representation of temporal knowledge in obstetrics, in: Proc. 4th Int. Symp. on Knowledge Engineering (Barcelona, 1990) 71-76. R. Marfn, S. Barro, A. Bosch and J. Mira, Modelling the representation of time from a fuzzy perspective, Cvbernetics and Systems: an International Journal, in press. W. Perkins and A. Austin, Adding temporal reasoning to expert-systems-building environments, IEEE Expert, February (1990) 23-30. D.Q. Qian, Representation and use of imprecise temporal knowledge in dynamic systems, Fuzzy Sets and Systems 50 (1992) 59-77. N. Sager, C. Friedman and M.S. Lyman, Medical Language Processing: Computer Management of Narrative Data (Addison-Wesley, Reading, MA, 1987). P. van Beek, Temporal query processing with indefinite information, Artificial Intelligence in Medicine 3 (1991) 325-339. R.R. Yager, Some extensions of constraint propagation of label sets, International Journal of Approximate Reasoning 3(6) (1989) 417-436.