Temporal Representation - PowerPoint PPT Presentation

1 / 47
About This Presentation
Title:

Temporal Representation

Description:

Reasoning about time is essential in every day life and thus in computer science ... How can we represent knowledge about events and states that have a temporal ... – PowerPoint PPT presentation

Number of Views:50
Avg rating:3.0/5.0
Slides: 48
Provided by: vsi42
Category:

less

Transcript and Presenter's Notes

Title: Temporal Representation


1
  • Temporal Representation Reasoning
  • Qualitative Quantitative Temporal
    Representation Reasoning
  • My Thanks to Bernhard Nebel

2
Temporal Reasoning
  • Reasoning about time is essential in every day
    life and thus in computer science
  • AI
  • temporal logics, temporal reasoning
  • databases
  • temporal databases, timestamps
  • How can we model time?
  • How can we represent knowledge about events and
    states that have a temporal dimension?

3
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

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

Wed 21/03/04
John arrives
Tomorrow
Today
John arrives
5
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

6
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.

7
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

8
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.

9
Qualitative Temporal Representation
ReasoningMotivation
  • Often we do not want / cannot talk about precise
    times
  • Linear Programming we do not have precise time
    points
  • planning we do not want to commit to time
    points too early
  • scenario descriptions we do not have the exact
    times or do not 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

10
Example
  • Consider a planning scenario for multimedia
    generation
  • P1 display picture 1
  • P2 say put the plug in
  • P3 say the devise should be shut off
  • P4 point to plug 1 in picture 1
  • Temporal relations between events
  • P2 should happen during P1
  • P3 should happen during P1
  • P2 should happen before or directly precede P3
  • P4 should happen during or end together with P2

11
Representation of Qualitative Knowledge
  • Intention Description of temporal configurations
    using a finite vocabulary and reasoning about
    these descriptions
  • Specification of a vocabulary usually a finite
    set of relations (often binary) that are pairwise
    disjoint and exhaustive
  • Specification of a language often sets of
    atomic formulae (constraint networks), perhaps
    restricted disjunction
  • Specification of a formal semantics
  • Analysis of computational properties and design
    of reasoning methods (often constraint
    propagation)

12
Representation of Qualitative Knowledge
  • Applications in . . .
  • Natural language processing
  • Specification of abstract spatialtemporal
    configurations
  • Query languages for spatiotemporal information
    systems/databases
  • Layout descriptions of documents (and learning
    of such layouts)
  • Action planning
  • . . .
  • Many frameworks have been proposed
  • Allens Interval Algebra
  • Point Algebra

13
Allens Interval Algebra
  • Allens interval algebra defines time intervals
    and binary relations over them
  • Time intervals
  • X (X- , X), where the domains of X- and X
    are real numbers, and X- lt X
  • Relations between intervals
  • (1.0,2.0) strictly before (3.0,5.3)
  • (1.0,3.0) meets (3.0,5.3)
  • (1.0,4.0) overlaps (3.0,5.3)
  • Which relations are conceivable?

14
Vocabulary - The Basic Relations
  • How many ways are there to order the four points
    of two intervals?
  • And the converse
  • relations (exchanging
  • X and Y)
  • These relations are
  • pair-wise disjoint

15
The 13 Basic Relations Graphically
16
Language - Disjunctive Descriptions
  • Assumption we dont have precise information
    about the relation between X and Y
  • e.g. X o Y OR X m Y
  • Description of disjunctive information by sets of
    basic relations
  • X o,m Y
  • 213 imprecise relations
  • Example of indefinite qualitative temporal
    description
  • X o,m Y, Y m Z, X o,m Z

17
Multimedia Generation Example
  • P1 display picture 1
  • P2 say put the plug in
  • P3 say the devise should be shut off
  • P4 point to plug 1 in picture 1

P1
d
d
lt,m
P2
P3
d,f
P4
18
Another Example
  • Fred was reading the paper while eating his
    breakfast. He put the paper down and drank the
    last of his coffee. After breakfast he went for a
    walk

19
Reasoning - Important Tasks
  • Find a scenario that is consistent with the
    information provided
  • Find the feasible relations between all pairs of
    intervals
  • a relation B is feasible iff there exists a
    consistent scenario where B is satisfied
  • minimal network
  • derive new knowledge from the existing one
  • Basic binary operations
  • intersection (?)
  • composition (?)
  • also complement, union

20
Intersecting Two Relations
  • Intersection is defined in the usual set
    theoretic way

P1f,bP2 ? P1bP1 P1bP2
P1f,bP2 ? P1mP1 ?
21
Composing Two Relations
P1
d
d
lt,m
P2
P3
?
d,f
P4
Compose the relations P4d,fP2 and
P2dP1 P4dP1
22
Composition of Basic Relations
23
Outlook
  • Using the composition table and the rules about
    operations on relations, we can deduce new
    relations between time intervals
  • What would be a systematic approach?
  • How costly is that?
  • Is that complete?
  • If not, could it be complete on a subset of the
    relation system?

24
Qualitative Temporal Reasoning and CSPs
  • Obviously, temporal networks can be represented
    as CSPs
  • as everything else
  • An IA network is a network of binary constraints
    where the variables represent time intervals, the
    domains of the variables are the set of ordered
    pairs of rational numbers (s,e) slte, and the
    binary constraints between variables are
    represented by the temporal relations between
    intervals
  • s,e are the endpoints of the intervals

25
Reasoning in Allens Interval Algebra
  • Constraint propagation algorithms
  • path consistency
  • Incompleteness
  • NP-hardness
  • The continuous endpoint class
  • Completeness for the continuous endpoint class

26
Composing Constraints The Simple Solution
  • Let Tablei,j be an array of size n x n (n
    number of intervals), in which we have recorded
    the constraints between the intervals
  • Repeat
  • Old Table
  • For each pair (i,j), 1 ? i,j ? n
  • For each k, 1 ? k ? n
  • Tablei,j Tablei,j ?
  • (Tablei,k ? Tablek,j)
  • Until Old Table
  • The algorithms terminates
  • but needs O(n5) intersections and compositions

27
A O(n3) Algorithm
  • relpaths(i,j) (i,j,k),(k,i,j) 1 ? k ? n
  • Q ?i,j relpaths(i,j)
  • While Q ? ? do
  • select and delete (i,k,j) from Q
  • T Tablei,j ? (Tablei,k ? Tablek,j)
  • if (T ? Tablei,j)
  • Tablei,j T
  • Tablej,i (T)
  • Q Q ? relpaths(i,j)
  • fi

28
Example for Incompleteness
D
s,m
s,m
f,f
A
C
o
d,d
d,d
B
D
B
A
f,f
C
29
NP-Hardness
  • Theorem (Kautz Vilain)
  • Determining consistency (CSAT problem) in
    Allens algebra is NP-hard
  • and so is the CMIN problem (finding the minimal
    network)
  • There are special cases that are tractable
    (polynomial)
  • Sets of relations (subsets of the entire set)
    for which the consistency problem is easy
  • Interval formulae X R Y can be expressed as
    clauses over atoms of the form (a op b) where
  • a and b are endpoints X- , X , Y- , Y
  • op ? lt, gt, , ?, ?

30
The Continuous Endpoint Class
  • The Continuous Endpoint Class C is a subset of
    Allens relations A such that
  • there exists a clause form for each relation
    containing only unit clauses
  • i.e. no disjunctions
  • (a ? b) is forbidden
  • Example All basic relations and d,o,s
  • X d,o,s Y ? X- lt X , Y- lt Y,
  • X- lt Y , X gt Y-,
  • X lt Y

X
Y
31
The Continuous Endpoint Class
  • Theorem (van Beek)
  • CSAT(C) and CMIN(C) are solved by the path
    consistency method
  • If a problem in the CEC is 3-consistent then it
    is strongly k-consistent
  • CMIN(C) can be computed in O(n3) time using the
    path consistency algorithm
  • n is the number of intervals
  • C contains 83 relations
  • are there larger sets such that path consistency
    computes CMIN ?
  • probably not
  • are there larger sets that allow polynomial
    consistency testing?
  • yes

32
The Endpoint Class
  • The Endpoint Class P is a subset of Allens
    relations A such that
  • there exists a clause form for each relation
    containing only unit clauses
  • (a ? b) is allowed
  • Example All basic relations and d,o
  • X d,o Y ? X- lt X , Y- lt Y,
  • X- lt Y , X gt Y-, X- ?
    Y-
  • X lt Y

X
Y
33
The ORD-Horn Subclass
  • The ORD-Horn Class H is a subset of Allens
    relations A that permits a clause form containing
    only Horn clauses
  • i.e. at most one disjunction
  • the only allowed literals are (a ? b) , (a b)
    , (a ? b)
  • (a gt b) is not allowed
  • Example All R ? P and o,s,f
  • X d,o,s Y ? (X- ? X), (X- ? X),
  • (Y- ? Y), (Y- ? Y),
  • (X- ? Y-), (X- ? Y),
    (X- ? Y),
  • (Y- ? X), (X ? Y-),
    (X ? Y),
  • (X- ? Y-) ? (X ? Y)

34
The ORD-Horn Subclass
  • Theorem
  • CSAT(H) can be decided in polynomial time using
    path consistency
  • The following relationship holds
  • C ? P ? H
  • C83 , P188 , H868
  • Are there any other interesting subclasses of
    Allens algebra?
  • an interesting subclass should contain all basic
    relations
  • The ORD-Horn is the only maximal tractable
    subclass that is interesting
  • what does interesting mean?

35
Allens Algebra and its Subclasses
  • What is the relevance of identifying subclasses?
  • Theoretical
  • We find the boundary between polynomial and
    NP-hard reasoning problems along the dimension
    expressiveness
  • Practical
  • All known applications either need only P or
    they need more than H!
  • Backtracking search algorithms can benefit from
    subclass identification
  • the branching factor is lowered

36
General Allen CSPs
  • Backtracking algorithm using path consistency as
    a forward checking method
  • Relies on tractable fragments of Allens algebra
  • Split relation into relations of a tractable
    fragment and backtrack over these
  • Refinements and evaluation of different
    heuristics
  • Which tractable fragment should one use?
  • how much is the branching factor affected?

37
General Allen CSPs
  • If the labels are split into basic relations,
    then on average a label is split into
  • 6.5 relations
  • If the labels are split into pointizable
    relations (P), then on average a label is split
    into
  • 2.955 relations
  • If the labels are split into ORD-Horn relations
    (H), then on average a label is split into
  • 2.533 relations
  • Does this difference (0.422) make a difference?
  • Yes on hard problems

38
Summary of Allens Algebra
  • Allens interval algebra is in many cases
    adequate to represent relative orders of events
    with duration
  • The satisfiability problem for general Allen CSPs
    is NP-complete
  • For the continuous endpoint class, minimal CSPs
    can be computed using path consistency
  • For the larger ORD-Horn class, satifiability can
    be still decided using path constistency
  • These classes can also be exploited for
    backtracking in general Allen CSPs.

39
References
40
The Point Algebra
  • Proposed by Vilain and Kautz (1986) the point
    algebra (PA) defines time points and binary
    relations over them
  • Vocabulary There are three basic relations that
    can hold between two time points
  • lt , gt ,
  • Language To represent indefinite information the
    relation between two time points can be a
    disjunction of the basic relations
  • (A lt B) ? (A B) is written as A lt, B
  • The set of all possible relations is ?, lt , ?,
    gt , ? , , ?
  • Semantics Interpretation over the real numbers

41
Reasoning
  • xlt, y ylt, z vlt, y wgty zlt, x
  • Satisfiability Are there values for all time
    points such that all formulae are satisfied?
  • Satisfiability with vw?
  • Finding a satisfying instantiation of all time
    points
  • Deduction Does xy logically follow? Does
    vlt,w follow?
  • Finding a minimal description What are the most
    constrained relations that describe the same set
    of instantiations?

42
Reasoning
  • Basic binary operations
  • intersection (?)
  • composition (?)
  • also complement, union

composition table
43
The Point Algebra - Example
  • Fred put the paper down and drank the last of his
    coffee

paper-
coffee-
gt
lt
lt
paper
coffee
lt
  • Consistent scenario

paper
coffee
44
Translations between Algebras
  • A restricted class of IA networks called
    pointisable algebra (SA) can be translated into
    PA networks without loss of information
  • In SA networks the allowed relations between two
    intervals are only those subsets of I that can be
    translated using the relations lt , ?, gt , ? , ,
    ? into conjunctions of relations between the
    endpoints of intervals
  • paper o,s,d coffee can be expressed as the
    conjunction of point relations (paper- lt paper)
    ? (coffee- lt coffee) ? (paper gt coffee-) ?
  • (paper lt coffee)
  • The allowed relations of SA is a small but
    useful subset of Allens algebra

45
Translations between Algebras
  • What can be expressed in IA but cannot be
    expressed in SA is disjointness of intervals
  • A b,bi B
  • This relation requires a disjunction to be
    expressed as a relation on the endpoints of the
    intervals
  • ((A-ltB-) ? (A-ltB) ? (AltB-) ? (AltB)) ?
    ((A-gtB-) ? (A-gtB) ? (AgtB-) ? (AgtB))
  • The nearest approximation using only conjunction
    is
  • (A-?B-) ? (A-?B) ? (A?B-) ? (A?B) which
    translates to
  • A b,bi,o,oi,d,di B
  • obviously not the same

46
Qualitative Temporal Reasoning and CSPs
  • A PA network is network of binary constraints
    where the variables represent time points, the
    domains of the variables are the set of rational
    numbers, and the binary constraints between
    variables are represented sets of the basic
    points relations
  • The reasoning tasks that we want to solve are
    again
  • finding a consistent scenario
  • finding the feasible relations

47
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
Write a Comment
User Comments (0)
About PowerShow.com