Temporal Representation - PowerPoint PPT Presentation

1 / 40
About This Presentation
Title:

Temporal Representation

Description:

Many choices have to be made when modeling time. Principle: 'Different tasks ... Absolute or relative descriptions of time (date) Discrete or continuous time ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 41
Provided by: vsi42
Category:

less

Transcript and Presenter's Notes

Title: Temporal Representation


1
  • Temporal Representation Reasoning
  • Quantitative Temporal Representation Reasoning

2
Representation and Reasoning with Time
  • Many choices have to be made when modeling time
  • Principle Different tasks require different
    models.
  • Absolute or relative descriptions of time (date)
  • Discrete or continuous time
  • Different sizes of (smallest) time unit
    (granularity)
  • Quantitative or qualitative approach
  • Linear, parallel or branching time
  • Time points or intervals
  • Events, processes or states

3
Absolute vs. Relative
  • compare John will arrive Wednesday, 21st.
  • John will arrive tomorrow.

Wed 21/03/04
John arrives
Tomorrow
Today
John arrives
4
Discrete or Continuous Time
  • Discrete time
  • time steps, next/previous time point
  • like integers
  • t1 t2 t3 t4
  • Continuous time
  • always time in between two time points
  • like real numbers
  • t0 t0.5 t1

5
Size of Smallest Unit of Time
  • Relevant for discrete time (mainly).
  • year, month, day, hour, minute, second,...
  • Choice affects
  • fidelity and precision
  • costs (storage, efficiency)
  • Sometimes, a hierarchical approach, with
    multiple resolutions used together, works best.

6
Quantitative vs. Qualitative
  • For both discrete and continuous time.
  • Qualitative
  • ordering between time points Tk gt T0
  • relative properties Tk - T0 lt Tx - Ty
  • Quantitative
  • absolute size Tk 1.5, T0 0
  • absolute properties Tk - T0 1.5

7
Points or Intervals
  • Time points
  • event E occurs at time Ti.
  • property P holds at time Ti.
  • Time intervals
  • event E takes place during Ti,Tj .
  • property P holds during Ti,Tj .
  • Distinction points/intervals not the same as
    distinction discrete/continuous.

8
Quantitative Temporal Representation Reasoning
  • Often we want and can talk about precise times
  • ILP we have precise time points
  • scheduling we want to commit to exact time
    points
  • timetabling we have the exact times and want to
    state them
  • How do we represent such information?
  • time points actions and events are
    instantaneous, or we consider their
    beginning and ending
  • time intervals all actions and events have
    duration

9
Representation of Quantitative (Numeric) Temporal
Information
  • The Temporal Constraint Satisfaction (TCSP)
    framework of Dechter, Meiri, and Pearl is the
    most widely used framework for the representation
    of quantitative temporal information.
  • In the TCSP
  • Temporal events are represented by intervals
  • Each interval has a starting and ending time
    point
  • Constraints capture distances between time
    points
  • Constraints can be disjunctive (to represent
    imprecise information)
  • The restriction of TCSP where disjunctive
    constraints are not allowed is called a Simple
    Temporal Problem (STP)

10
The TCSP Framework
  • Variables represent time points - starting time
    point and ending time point of intervals
  • Numeric temporal information is represented by a
    set of unary and binary constraints, each
    specifying a set of permitted intervals.
  • Propositions stand for events, and each
    proposition Pi is associated with an interval Ii
    ai,bi. Information about the timing of events
    can be presented by means of constraints on the
    intervals
  • I.e. their associated beginning and ending
    points.
  • Time points are considered as variables with
    continuous domains, where a time point may be a
    beginning or an ending point of some event.

11
The TCSP Framework
  • A constraint is a distance between two time
    points. It is of the form Xj - Xi lt C , if Xi
    and Xj are two time points. Namely, constraints
    are a set of linear inequalities on the Xis
  • Disjunctive sets of constraints are allowed
  • A special variable representing the start of
    events is introduced
  • to capture absolute times
  • We are interested in the following reasoning
    tasks
  • finding all feasible time that a given event can
    occur
  • finding all possible relationships between two
    given events
  • generating one or more consistent scenario

12
Example
  • John and Fred work for a company that has local
    and main offices in Los Angeles. They usually
    work at the local office, in which case it takes
    John less than 20 minutes and Fred 1520 minutes
    to get to work. Twice a week John works at the
    main office, in which case his commute to work
    takes at least 60 minutes. Today John left home
    between 705710 a.m., and Fred arrived at work
    between 750755 a.m. We also know that Fred and
    John met at a traffic light on their way to work.

13
The TCSP Framework (example)
  • J is a proposition standing for event "John going
    to work" and X1, X2 are the starting time and
    ending times of J, respectively. F is a
    proposition standing for event "Fred going to
    work" and X3, X4 are starting time and ending
    time of F, respectively. X0 is the beginning of
    the events.
  • We can represent with inequalities information of
    the form
  • John goes to work either by car (30-40 minutes),
    or by bus (at least 60 minutes).
  • 30 lt X2 - X1 lt 40 or X2-X1 gt60
  • Fred goes to work either by car (20-30 minutes),
    or on foot (40-50 minutes).         20 lt X4 -
    X3 lt 30 or 40 lt  X4 - X3 lt 50

14
The TCSP Framework (example)
  • Today John left home between 710 and 720
  • X0 7.00
  • 10 lt X1 X0 lt20
  • Fred arrived at work between 800 and 810
  • 60 lt X4 X0 lt70
  • John arrived at work about 10-20 minutes after
    Fred left home.
  • 10 lt X2 X3 lt20

15
The TCSP
  • A TCSP involves a set of variables, X1,,Xn ,
    having continuous domains each variable
    represents a time point. Each constraint is
    represented by a set of intervals. An interval
    (Ii)  can be represented by two time points,
    ai,bi, where ai is the starting point and bi is
    the ending point of Ii . 
  • Therefore , set of intervals I1,,
    Ina1,b1,,an,bn
  • A unary constraint, Ti, restricts the domain of
    variable Xi, to the given set of intervals
    namely, it represents the disjunction
  • (a1 ltXi ltb1) V . . . V (an ltXi ltbn)  
  • A binary constraint, Tij, constraints the
    permissible values for the distance Xj Xi it
    represent the disjunction
  • (a1 ltXj - Xi ltb1) V . . . V (an ltXj - Xi
    ltbn)
  • Constraints are always given in a canonical form
    where all intervals are pairwise disjoint.

16
The TCSP
  • A network of binary TCSP can be represented by a
    directed constraint graph. A network of a binary
    TCSP consists of
  • Nodes that represent variables (X1, . . . , Xn),
  • Edges that represent unary and binary
    constraints, which are labeled by the interval
    set.
  • Each constraint, Tij, implies an equivalent
    constraint Tji however only one of them will
    usually be shown in the constraint graph.
  • A special time point, X0, is introduced to
    represent the "beginning of the world". So a
    unary constraint is represented in an equivalent
    binary constraint with X0
  • A solution is a tuple X x1,. . ., xn, if
    the assignment X1 x1, . . . , Xn xn satisfies
    all the constraints. V is a feasible value if
    there is a solution including V. The minimal
    domain is the set of all feasible values of a
    variable.

17
The TCSP
  • There are three operations on binary constraints
    Union, Intersection and Composition. Definitions
    of the three binary operations on TCSP are
  • Let TI1, . . Il and S J1, . . Jm be
    constraints
  • T ? S I1, . . Il , J1, . . Jm
  • T  ? S K1, . . Kn where Kk Ii ? Jj for
    some I and j (admits only values that are allowed
    by both of them) Note that n lt l m
  • T ? S K1, . . Kn where Kk ac,bd for
    some II a,b and Jj c,d Note that n lt l
    m

18
The TCSP
  • For example let C1 1,4), (6,8) and C2
    (0,1, (3,5), 6,7
  • C1 ? C2 1, (3,4), (6,7
  • Let C3 1,2, (6,8) and C4 0,3), (12,15
  • C3 ? C4 1,5), (6,11), (13,17, (18,23)

19
The TCSP
  • A binary constraint T is tighter than S, denoted
    by T ? S, if every pair of values allowed by T is
    also allowed by S
  • The Universal Constraint is the most relaxed
    constraint 
  • Network T is tighter than S if T and S have the
    same set of variables and the partial order ? is
    satisfied for all the corresponding constraints
    namely, for all pairs i, j, Tij ? Sij
  • Two networks are equivalent if they represent the
    same solution set. A network can have many
    equivalent representations. However, there is one
    minimal equivalent network with respect to ?.

20
The STP
  • A TCSP in which all constraints specify a single
    interval is called a simple temporal problem
    (STP). A STP can be represented by a distance
    graph. In such a distance graph, each arc(i,j),
    is labeled by an interval, a, b, representing
    the constraint in inequalities form.
  • An example a distance graph has arc(i,j) which
    is labeled by a,b
  • represents linear inequalities
  • alt Xj - Xi ltb Xj - Xilt b Xi Xjlt -a

21
Solving an STP
  • An STP is consistent if its distance graph has no
    negative cycle. Finding a minimal graph of a
    consistent STP can give a solution of the STP.
  • A Minimal graph can be constructed from the
    directed-graph (d-graph). A consistent STP can be
    effectively specified by a complete directed
    graph, called d-graph, where each edge, i-gtj, is
    labeled by the shortest path length. The d-graph
    represents a tighter of the original STP. A
    d-graph of a consistent STP is the minimal graph
    representation of the STP.
  • The d-graph of a STP can be constructed by
    applying Floyd-Warshalls all-pairs-shortest-paths
    algorithm to the distance graph. The algorithm
    runs in time O (n3), and negative cycles are
    detected simply by examining the sign of the
    diagonal elements dij.

22
Solving an STP
  • All-pairs-shortest parts algorithm 1. for i1
    to n do dii ?0 2. for i,j1 to n do dij ? aij
    3. for k1 to n do    4. for i,j 1 to n do
              dij ? mindij,dikdkj 
  • Floyd-Warshalls algorithm
  • Constructing a distance graph runs in time O
    (n3). It constitutes a polynomial time algorithm
    for determining the consistency of an STP, and
    for computing both the minimal domains and the
    minimal network. Once the d-graph is available,
    assembling a solution requires only 0 (n2) time
    because each successive assignment needs to be
    checked against previous assignments and is
    guaranteed to remain unaltered. Thus, finding a
    solution from minimal graph can be achieved in O
    (n3)

23
Solving a TCSP
  • Solving a General TCSP by STPs
  • Deciding consistency and solving for a TCSP is
    NP-hard.
  • A TCSP can be solved by decomposing the TCSP
    into several STPs and solving each one of them,
    and then combining the results. The complexity of
    solving a general TCSP by generating all the
    labeling and solving them independently is
    O(n3Ke), where K is the maximum number of
    intervals labeling an edge, and e is the number
    of edges.
  • Alternatively we can use CSP search algorithms
    that branch on single intervals

24
Combining Quantitative and Qualitative Information
  • Meiri proposed a new network-based computational
    model for temporal reasoning that is capable of
    handling both qualitative and quantitative
    information.
  • In Meiris model, a temporal object (Oi) can be a
    point or an interval. Intervals correspond to
    time periods during which events occur or
    propositions hold, and points represent the
    beginning and ending points of some events, as
    well as neutral points of time.

25
Qualitative Constraints
  • A qualitative constraint between two objects Oi
    and Oj is a disjunction of the form
  • (Oi r1 Oj) V . . . V (Oi rk Oj)
  • where each of the ris is a basic relation that
    may exist between the two objects. There are
    three type of basic relations.
  • Basic Interval-Interval (II) relations that can
    hold between a pair of intervals (Allens
    relations) denoted by the set b,m,s,d,f,o,bi,mi,s
    i,di,fi,oi,
  • Basic Point-Point (PP) relation relations that
    can hold between a pair of points, denoted by the
    set lt, , gt
  • Basic Point-Interval (PI) relation relations
    that can hold between a point and an interval,
    and basic Interval-Point (IP) relations that can
    hold between an interval and a point.

26
Qualitative Constraints
The basic relations between a point, p, and an
interval, I I- ,I
27
Qualitative Constraints
  • Qualitative constraints of Meiris algebra (QA)
    are all legal constraints
  • 213 II relations, 23 PP relations, 25 PI
    relations and 25 IP relations. Two binary
    operations are defined on these elements
    intersection and composition
  • R' ? R'' the intersection of two qualitative
    constraints is the set-theoretic intersection R'
    ? R''
  • R' ? R'' the composition of two qualitative
    constraint is defined by the following
    transitivity tables

28
Qualitative Constraints
A full transitivity table
Composition of PP and PI relations
Composition of PI and IP relations
29
Qualitative Constraints
Composition of IP and PI relations
30
Quantitative Constraints
  • A quantitative constraint represents an absolute
    location or the distance between points. There
    are two types of quantitative constraints.
  • A unary constraint, on points Pi, restricts the
    location of Pi to a given set of intervals
  • A binary constraint, between points Pi and Pj,
    constrains the permissible values for the
    distance Pj-Pi
  • Two binary operations are defined on these
    elements intersection and composition
  • C' Ã… C'' xxÃŽ I , xÃŽ I
  • C' Ä C'' z x ÃŽ I , yÃŽ I ,xyz

31
Relationship between Qualitative and Quantitative
Constraints
  • The existence of a constraint of one type
    sometimes implies the existence of a constraint
    of the other type.
  • Case 1 If a quantitative constraint, C, between
    Pi and Pj is given then the implied qualitative
    constraint, QUAL(C) is defined as follows
  • If 0 ÃŽ I1, . . ., Ik, then ""ÃŽ QUAL(C).
  • If there exist a value v gt 0 such that v ÃŽ I1,
    . . ., Ik, then "lt"ÃŽ QUAL(C).
  • If there exist a value v lt 0 such that v ÃŽ I1,
    . . ., Ik, then "gt"ÃŽ QUAL(C).

32
Relationship between Qualitative and Quantitative
Constraints
  • Case 2 If a qualitative constraint, C, between
    Pi and Pj is given then the implied quantitative
    constraint, QUAN(C) is defined as follows
  • If "lt" ÃŽ R, then 0, ÃŽ QUAN(C).
  • If "" ÃŽ R, then 0ÃŽ QUAN(C).
  • If "gt" ÃŽ R, then - ,0ÃŽ QUAN(C).

The QUAN translation
33
Relationship between Qualitative and Quantitative
Constraints
  • The intersection and composition operations are
    extended when the constraints are of different
    types. If C is a quantitative constraint and C
    is qualitative, then intersection is defined as
    quantitative intersection
  • C' Ã… C'' C'Ã… QUAN(C'' )
  • Composition depends on the type of C'' . If C''
    is a PP relation, then composition is
    quantitative
  • C' Ä C'' C'Ä QUAN(C'' )
  • If C'' is a PI relation, then composition is
    qualitative.
  • C' Ä C'' QUAN(C' ) Ä C''

34
Example
  • For example let C1 (0,3) be a quantitative
    constraint and
  • C2 lt , be a PP relation, and C3 b,d be
    a PI relation
  • C1 ? C2 (0,3) ? 0,?) (0,?)
  • C1 ? C3 lt ? b,d b,s,d

35
General Temporal Constraint Networks
  • A general temporal constraint network involves a
    set of variables X1, . . ., Xn, each
    representing a temporal object ( a point or an
    interval) and a set of unary and binary
    constraints.
  • When a variable represents a time point, its
    domain is the set of real numbers.
  • When a variable represents a temporal interval,
    its domain is the set of ordered pairs of real
    number, namely, (a,b)a,b ÎÂ , a lt b.
  • Constraints may be quantitative or qualitative.
  • A constraint network is represented by a
    directed constraint graph, where nodes represent
    variables and an arc (i, j) indicates that a
    constraint Cij between variables Xi and Xj is
    specified. The arc is labeled by an interval set
    or by a QA element.

36
Example
  • Given JP1, P2 and FP3, P4 are intervals of
    the events that John and Fred go to work. P0 is
    the beginning of the world. The constraint graph
    of the proposition is

37
Augmented Qualitative Networks
  • An augmented qualitative network is a qualitative
    network a CPA network or a PA network
    augmented by unary constraints on its domain.
  • The simplest way of combining qualitative and
    quantitative information

A CPA network over multiple-interval domains
38
Augmented Qualitative Networks
Complexity of deciding consistency in augmented
qualitative networks
39
Disjunctive Temporal Reasoning
  • Not all kinds of quantitative temporal reasoning
    are expressible using TCSPs
  • Consider the following example from job-shop
    scheduling
  • Let I and J be intervals corresponding to
    operations Oi and Oj. Oi and Oj will be executed
    on a machine that can handle only one operation
    at a time and has a set-up time of 2 minutes. The
    following is a constraint on the scheduling of
    operations Oi and Oj
  • I - J- ? -2 ? J - I- ? -2
  • This constraint cannot be expressed in the TCSP
    framework

40
Disjunctive Temporal Reasoning
  • The Disjunctive Temporal Framework subsumes the
    TCSP and can be used to model a variety of
    temporal reasoning problems from scheduling,
    planning, temporal databases, etc.
  • In this framework a temporal constraint is a
    disjunction of the form
  • X1 X2 ? A1 ? X3 X4 ? A2 ?
  • where each variable Xi ranges over the reals and
    each Ai is a real constant
  • Various algorithms to solve disjunctive temporal
    problems have been developed
  • CSP-based, SAT-based
Write a Comment
User Comments (0)
About PowerShow.com