Close
Home
Collections
Login
USC Login
Register
0
Selected
Invert selection
Deselect all
Deselect all
Click here to refresh results
Click here to refresh results
USC
/
Digital Library
/
University of Southern California Dissertations and Theses
/
00001.tif
(USC Thesis Other)
00001.tif
PDF
Download
Share
Open document
Flip pages
Contact Us
Contact Us
Copy asset link
Request this asset
Transcript (if available)
Content
OBJECT HISTORIES W ITH CONTEXTS AND CONTEXT-RELATED CONSTRAINTS by Dan Tian A Dissertation Presented to the FACULTY OF THE GRADUATE SCHOOL UNIVERSITY OF SOUTHERN CALIFORNIA In Partial Fulfillment of the Requirements for the Degree DOCTOR OF PHILOSOPHY (Computer Science) M ay 1991 Copyright 1991 Dan Tian UMI Number: DP22836 All rights reserved INFORMATION TO ALL USERS The quality of this reproduction is dependent upon the quality of the copy submitted. In the unlikely event that the author did not send a complete manuscript and there are missing pages, these will be noted. Also, if material had to be removed, a note will indicate the deletion. Dissertation Publishing UMI DP22836 Published by ProQuest LLC (2014). Copyright in the Dissertation held by the Author. Microform Edition © ProQuest LLC. All rights reserved. This work is protected against unauthorized copying under Title 17, United States Code ProQuest LLC. 789 East Eisenhower Parkway P.O. Box 1346 Ann Arbor, Ml 4 8 1 0 6 -1 3 4 6 UNIVERSITY OF SOUTHERN CALIFORNIA p THE GRADUATE SCHOOL lh - l) . UNIVERSITY PARK Q C. LOS ANGELES, CALIFORNIA 90007 ^ TSSI S&o a B 1 , 1 * This dissertation, written hy QAM....ZL1.1M... under the direction of hi£. Dissertation Committee, and approved by all its members, has been presented to and accepted by The Graduate School, in partial fulfillment of re quirements for the degree of DOCTOR OF PHILOSOPHY Dean of Graduate Studies D a te..... DISSERTATION COMMITTEE Chairperson To my parents Zi-pu and Li-rong Ill Acknowledgements It is with great pleasure that I thank Professor Seymour Ginsburg, my ad visor, for his enthusiasm and patience in guiding my whole graduate studies at USC. His valuable advice, critique and encouragement made my dissertation re search challenging and exciting. Special thanks go to Professor Richard Hull and Professor Alice Parker, the other members of my dissertation committee, for their helpful comments and encouragement. I would like to extend my thanks to Professor Farhad Arbab, Professor Ming- Deh Huang and Professor Dennis McLeod for their suggestions. My appreciation I also goes to many friends in the Computer Science Departm ent, especially Y. Cho, Dr. G. Dong, Dr. Q. Li, Dr. H. Liu, S. Kurtzman, P. Mi, S. Teng and X. Wang I for their help, comments and support. Finally, I am deeply grateful to my parents \ for their love, understanding and many other reasons. i This dissertation was partially supported under National Science Foundation i grants (CCR-8618907 and IRI-8920930). i I Table of Contents Introduction 1 Preliminary 2 Context-Related Constraints 2.1 Context-local constraints 2.2 Context-autonomous constraints i 3 The Representability Problem I | : 4 The Extended Representability Problem I I i 5 The Context Scheme I ! References Appendix V Abstract In [GT1] the notion of a record-based, computation-oriented data model for describing historical data (called “object history” and represented by a se quence of “computation” tuples over some attributes) was introduced. (This model was studied fairly extensively in a series of papers, e.g., [DG; GG; GSW; GTi].) The primary construct in the model is a “computation-tuple sequence scheme” (CSS), which specifies the set of all possible “valid” object histories for the same type of object. One of the components in a CSS is a finite set of semantic constraints on object histories. In this thesis, four basic notions, namely “con text”, “context scheme”, “context-local” constraint and “context-autonomous” constraint, and a new structure called CCSS, which consists of a CSS and an appropriate context scheme, are abstracted and studied. (The set of valid ob ject histories specified by a CCSS T is defined to be the set of object histories described by the CSS in T .) The principal concern is when the constraints in a CCSS are “related” to its context scheme. The central problems examined are (i) conditions under which a set of object histories can be specified by a CCSS having only context-related constraints; and (ii) the design of desirable context schemes in CCSS. The major results obtained are (i) several necessary and suf ficient conditions for a set of object histories described by an arbitrary CCSS to be described by another CCSS, with the same context scheme and having only context-related constraints; (ii) several necessary and sufficient conditions for a vi j set of object histories described by an arbitrary CSS to be described by a CCSS having only context-related constraints (and certain type of context schemes); and (iii) a condition on constructing new CCSS of interest from existing ones. j I I Introduction 1 In [GT1] the notion of a record-based, computation-oriented data model jfor describing historical data (called “object history” and represented by a se quence of “computation” tuples over some attributes) was introduced, and ex tensively studied in [CG; DG; GG; GSW; GTi]. (Examples of such historical data are checking accounts, credit-card accounts, pension plans, etc.) The pri m ary construct in the model is a “computation-tuple sequence scheme” (CSS), which specifies the set of all possible “valid” object histories for the same type of object. One of the m ajor components in a CSS is a finite set of semantic constraints on object histories. In examining real-life examples, we noticed that i some semantic constraints involve only portions (of the histories) which satisfy certain special properties. The importance of such constraints is that in updat ing an object history, the satisfaction of the constraint by the new history can be checked by examining portions of the history (specifically, suffixes and certain subsequences) instead of the whole history, usually an easier task to do. This observation suggested that an investigation of CSS with these special constraints would be fruitful, both for analysis and design. We therefore abstracted four ba sic notions, namely “context” , “context scheme” , “context-local” constraint and “context-autonomous” constraint, and studied some relevent questions. The pur pose of this dissertation is to present the results of that investigation. j Informally, an object history is a historical record of an object, i.e., an individ- 2 ual entity such as, e.g., a specific person’s checking account. An object history is a sequence of occurrences, each occurrence consisting of some input data and some calculation. (For example, in a checking-account history, one occurrence might be, in part, the amount to be deposited or withdrawn, together with the computation of the new daily-minimum balance and the new balance. In an electricity-usage history, one occurrence might be the current m eter reading and the current price per kilowatt hour, together with the computation of the kwh consumption and the consumer cost.) The set of all possible “valid” object histories for the same type of object is described by a m athematical structure called CSS. The major components of a CSS are (A l) a set of attributes, partitioned into input and eval uation attributes, according to their roles, (A2) functions which calculate values for evaluation attributes, (A3) semantic constraints, and (A4) an initialization which specifies how to start a valid computation-tuple sequence until all evalua tion functions can be applied. In the current study, our attention is focused on a new structure called CCSS. A CCSS consists of a CSS and an appropriate context scheme. The set of valid object histories described by a CCSS is defined to be the set of object histories described by the CSS in the CCSS. Our concern here is when the constraints in a CCSS are “related” to its context scheme. ! Our study of object histories with contexts and context-related constraints focuses on two m ajor questions. The first question considered, and which receives I much of our attention, is under what conditions a set of object histories can be 3 specified by a CCSS having only context-related constraints. The second question, considered only in the last chapter, concerns the design of context schemes in CCSS. Although the answers to these two questions depend on the specific type of context-related constraint, it is of interest to consider whether there exist unified approaches for solving these problems regardless of the specific type of constraint -involved. Our results demonstrate that such unified approaches do exist for the first problem. These results not only simplify the discussion but also provide new perspectives for understanding our central questions. The rest of the dissertation is organized into five chapters plus an appendix. Chapter 1 first reviews the object-history model, and then introduces the no tions of context scheme and CCSS. Chapter 2 formalizes two basic types of context-related semantic constraints, namely the context local and the context autonomous, and discusses several of their basic properties. Chapter 3 addresses ! the representability problem, i.e., when a set of object histories defined by a CCSS can be defined by another CCSS having only context-related constraints, with the same context scheme as well as the same “computation scheme” and initializa tion. In particular, it characterizes when a CCSS is “representable” with respect to several types of context-related constraints. Chapter 4 studies the extended representability problem, i.e., when a set of object histories defined by a CCSS l I can be defined by another CCSS having only context-related constraints, with the same context scheme but possibly different computation scheme and initial- 4 ization. The main results of this chapter characterize when a CCSS is extended ■representable with respect to various types of context-related constraints. Chapter 5 considers two questions on the design of context schemes in CCSS. Specifically, it examines (i) conditions under which a CCSS of interest can be defined from a CSS by choosing an appropriate context scheme, and (ii) strategies for creating desirable context schemes from existing context schemes. Finally, the Appendix consists of a review of two examples which occurred in the literature and are used in the thesis. 5 1 P relim in a ry In this chapter, we first review the model for object histories presented in [GT1], and then introduce the notions of context scheme and contexted computation- ( tuple sequence scheme. For the sake of simplicity, the formalism employed here differs slightly from that given in [GT1]. Let Dorrioo be an infinite set of elements (called d o m ain values) and Uoo an infinite set of symbols (called a ttrib u te s ). For each A in Uoo, Dom(A) (called I the d o m ain of A) is a subset of Dorrioo of at least two elements. All attributes considered are assumed to be elements of Uoo. The symbols A, B and C (pos sibly with subscripts) denote attributes and U (possibly subscripted) denotes a | nonempty finite set of attributes. Let X be a nonempty finite set of attributes and Ai, ...,An some fixed list- i ing of the distinct elements of X . Then <X> denotes the sequence1 Ai...An, j i and D om (< X > ) the cartesian product D om (A i)x...xD om (A n). Also, < X |A j> , denotes the prefix Ai...Aj_i, i > 2. [A su b seq u e n ce of a sequence p\...pm is a sequence of the form p ^ ...pir, where < ... < ir. A p refix of a sequence pi...pm is a subsequence of the form p\...pi for some i > 1.] j We are now able to formalize the notions of occurrence and sequence of oc- | currences as mentioned earlier in the previous section. (Instead of “occurrence” and “sequence of occurrences” we shall use the terms “computation tuple” and i i 1A sequence p \ , ...,pm is frequently written without commas, that is, as pi...pm. i ) 6 “computation-tuple sequence” .) D efin ition . Let <U> be a sequence of attributes. A com p utation tuple over <U> is an ordered pair (<U>,u ), or u when <U> is understood, where u is an element in Dom(<U>). A com p u tation -tu p le sequence over <U> is a nonempty finite sequence of computation tuples over <U>. The set of all computation-tuple sequences over <U> is denoted by SEQ(<U>). Unless otherwise stated, u, v and w, possibly subscripted or primed, always represent computation tuples. Similarly, u, v and w always represent computation tuple sequences. And u, v, w etc., possibly subscripted, denote either the empty sequence or a computation-tuple sequence. To formalize (A l) and (A2) (of the Introduction), we have: ! D efin ition . An attrib u te schem e over <U> is a pair ( < /> , <E>) 2, where I and E are disjoint subsets of U (of input and evaluation attributes, respec- : tively), with I and E nonempty and <U> = <I><E>. [Given sequences <Ui> = A\...Ami and <U2 > = , <U\><U 2> denotes the sequence 1 f I Ax . • • A m i B \ . . . B m 2 . ] j D efin ition . A com p utation schem e (abbreviated CS) over <U> is3 a triple | I C = ( < /> , <E>, £), where 2The m odel we now present is slightly different from the one given in [GT1], in that the state attributes will be treated as evaluation attributes. j 3More precisely, over ( < /> , < E > ). Throughout this paper, the factorization of < U > into . the desired input attributes and evaluation attributes will be obvious. 7 1. (<I>,<E>) is an attribute scheme over <£/>; and 2. £={ ec | C in E , ec a partial function (called an e v a lu a tio n function) from D om (<£/>)Pc x Dom(<17 | C > ) into Dom(C) for some non-negative integer pc}- i The integer pc is called the ra n k of ec, and p(C) = max{pc I ec in £} the ra n k of C. I I Intuitively, the rank of a CS is the minimum number of previous tuples on which each tuple computationally depends. We now illustrate the above concepts. i Example 1.1. Consider a limited check-writing plan of a savings and loan asso ciation. (This is a modified version of the checking-account example given in [GT1].) There are the three usual actions of DEPOSIT, WITHDRAW (by the I account holder) and CHECK (to another party), each followed by a computation of the new balance. A special type of action, INT(EREST), pays interest daily j on the day’s minimum balance (abbreviated DMB) at a current rate. Each date | is assumed to uniquely determine an (interest ) rate. I ! A computation scheme C — ( < /> , <E>, £) over <U> = <!><E> for the check-writing plan is as follows: (a) < / > = ACT(ION), AM(OUN)T, RATE; <E> = DATE, DMB, INT-AMT, BAL(ANCE). 8 The domain of DATE is the obvious set of date values and the domain of ACTION is {DEPOSIT, WITHDRAW, CHECK, INT}. The domains of the ■remaining attributes are any reasonable sets of appropriate nonnegative numbers. If the action is INT, then INT-AMT is the interest at the current rate on the day’s minimum balance; and if the action is not INT, then INT-AMT is 0. (b) £ = {eoATE,eDMB,eiNT-AMT, The evaluation function cbate is the mapping from D om (<(7>) x Dom(<I7|DATE>) into Dom(DATE) defined for all u in Dom(< £/> ), ac in Dom(ACT), am in Dom(AMT) and r in Dom(RATE) by edate{u , ac, am , r) = u(D A TE )+l if u(ACT) = INT it (DATE) if u(ACT) ^ INT. The evaluation function cbmb is defined for all u in D om (<£/>), d in Dom(DATE), i ac in Dom(ACT), am in Dom(AMT) and r in Dom(RATE) by eDJs(a, ac, am , r, d) = min { u(B),it(BAL)— am } if ac = (WITHDRAW or CHECK) and u(ACT) ^ INT « (B )-a m if ac = (WITHDRAW or CHECK) and w(ACT) = INT tt(B) if ac = DEPOSIT I u(B) if ac = INT, 9 where B = DMB if u(ACT) ^ INT and B = BAL if u(ACT) = INT. Note that the rank of e^MB is 1. The evaluation functions gint- amt and 6bal are defined similarly (details om itted), and are of rank 0 and rank 1 resp. □ The purpose of a computation scheme is to select those computation-tuple sequences whose values for the evaluation attributes are ultim ately determined by the corresponding evaluation functions. More formally, we have: i N o ta tio n . For each CS C = (< /> , < E > ,£ ) over <17>, let VSEQ(C) be the set of all u = ui...um (m > 1) in SEQ (<£/>) satisfying the conditions: (*) For each pc < h < m and C in4 E, Uh{C) = ec(uh-Pc, Uh[<U\C>]). \ I Note that u (vacuously) satisfies (*) for a particular C if to < pc- Clearly, VSEQ(C) is an interval-closed set. [An in te rv a l of a sequence p\...pm is a subsequence of the form Pi.-.pj for some i and j, 1 < i < j < to. A set S of sequences is in te rv a l closed, resp. p refix closed, if it contains all intervals, resp. prefixes, of the sequences in < S .] To formalize (A3), we borrow the following notion (appropriately modified) I from relational database theory. A c o n stra in t a over S E Q (< [/> ) is a mapping over S E Q (< t/> ) which assigns to each u in S E Q (< t/> ) a value of “true” or I “false” . If <t(u) = true, then u is said to sa tisfy a , denoted u f= a. The set of 1 I all sequences that satisfy a is denoted by VSEQ(cr). In the sequel, a constraint a is usually defined by the set VSEQ(<r), i.e., a(u) = true iff u is in VSEQ(cr). 4Let < U > = Ai . . . A n and < X > a subsequence of < U > . For each com putation tuple u over I < U > , u [< X > ] is the com putation tuple v over < X > defined by v(A) = u{A) for each A in X. 1 0 Let E be an arbitrary non-empty (not necessarily finite) set of constraints over SEQ(<17>). Then VSEQ(E) denotes the set QresVSEC^er), ^he set {u in SEQ(<17>)| u f= a, a in E}. In the sequel, < 7 0 and < r < u> denote the constraints defined by VSEQ(cr®)=0 and VSEQ(cr<c/>)= S E Q (< t/> ) respectively. The concept of a constraint for computation-tuple sequences given above is too general for our purposes. W ithout a further lim itation, we could obtain extremely pathological sets of computation-tuple sequences. As in each of the previous papers dealing with object histories, e.g., [GG; GTal; GTa2; GTi], all the constraints considered here are “uniform”. These are characterized by the fact th at satisfaction holds uniformly throughout a computation-tuple sequence, i.e., holds in every interval of a computation-tuple sequence. Uniform constraints are natural, m athem atically tractable, cover most situations arising in practice, and j i eliminate many pathological cases. Formally, we have: | D efin itio n . A constraint c r over SEQ (<{/>) is u n ifo rm if, for each u = ux . . ,um over <U>, u f= cr implies Ui.. .Uj f= a for all i and j, 1 < i < j < m. Stated otherwise, a constraint a is uniform if VSEQ(er) is interval-closed. i Henceforth, all given constraints are assumed to be uniform. On the other hand, all constructed constraints have to be proven uniform. t By definition, < 7 0 and < j<[/> are uniform. It is also easily seen that for each non empty (not necessarily finite) set E of uniform constraints, the set Do-gE VSEQ(cr) is interval-closed. Example 1.1 (continued). (c) The set E of constraints consists of: < 7X : If ACT is INT, then AMT is 0. < 7 2 : Every two transactions on the same day must have the same RATE-value. < 73 : There should be no more than three CHECK transactions in each month. The last concept needed for a computation-tuple sequence scheme is (A4), the “initialization” . j i D efin ition . Given a CS C over <U> and a non-empty finite set E of uniform j constraints over SEQ(< [/> ), an initialization (w ith resp ect to C and E) is any prefix-closed subset X of {u in VSEQ(C) n VSEQ(E) | | u \ < max{p{C), 1} }. [| u | denotes the length of u.\ Given an initialization X, let VSEQ(X) denote the I set X U {u in SE Q (<£/>)|u = u iu 2 for some u\ in X of length max{/j((7), 1} }. i The reason that the length of each sequence in X is at least 1 is that every history must begin with some sequence in X. Clearly, VSEQ(X) is prefix closed but not necessarily interval closed. i Example 1.1 (continued). j 1 2 (d) The initialization X is the set {(DEPOSIT, am, r, d, 0, 0, am) | d in Dom(DATE), r in Dom(RATE), am in Dom(AMT)}. Using the previous concepts, we are now ready to define the fundamental notion of computation-tuple sequence scheme. D efin itio n . A c o m p u ta tio n -tu p le seq u en ce sch em e (abbreviated CSS) over (< I> ,< E > ) (abbreviated “over < { /> ” , with <U> = <I><E>) is a triple T = (C, E , X), where 1. C is a computation scheme over <£/>; j 2. E is a non-empty finite set of uniform constraints over SE Q (<U >); and 3. X is an initialization with respect to C and S . , Let p(T), called the ra n k of T, be ma®{l, p(C)}. j A CSS determines valid computation-tuple sequences as follows: D efin itio n . For each CSS T = (C,E,X), let VSEQ(T)=VSEQ(C) fl VSEQ(E) fl VSEQ(X). A computation-tuple sequence is said to be valid (for T) if it is in i VSEQ(T). Thus, a com putation-tuple sequence is valid if it (i) is “consistent” with C, (ii) satisfies each constraint in E , and (iii) is either in the initialization, or its prefix of length p(C) is in the initialization. 13 ACT AMT RATE DATE DMB INT-AMT BAL DEPOSIT 3000 0.00018 03/27/87 0 0 3000 INT 0 0.00018 03/27/87 0 0 3000 WITHDRAW 500 0.00020 03/28/87 2500 0 2500 W ITHDRAW 1000 0.00020 03/28/87 1500 0 1500 DEPOSIT 250 0.00020 03/28/87 1500 0 1750 INT 0 0.00020 03/28/87 1500 0.30 1750.30 CHECK 250 0.00020 03/29/87 1500.30 0 1500.30 INT 0 0.00020 03/29/87 1500.30 0.30 1500.60 DEPOSIT 500 0.00017 03/30/87 1500.60 0 2000.60 Figure 1.1 Since both VSEQ(C) and VSEQ(E) are interval closed and VSEQ(X) is prefix j closed, VSEQ(T) is prefix closed. [This is consistent with the point of view of history th at every prefix of a valid history is valid.] However, VSEQ(T) is not necessarily interval closed. i Example 1.1 (continued). A CSS for the limited check-writing plan is T=(C, E, X), with the components as described in (a)-(d). One valid computation-tuple j sequence for T is given in Figure 1.1. □ As mentioned in the Introduction, we are interested in semantic constraints which involve only certain “parts” of the histories. Consider the constraints < 7 2 and < 7 3 in Example 1.1. Clearly, these constraints are uniform. They also can be described in term s of computation-tuples with certain common properties on j their date values. Indeed, a2 is defined by referring to tuples with the same date values. The constraint < 7 3 is defined by referring to tuples with date values in a 14 single month. Such types of connections between semantic constraints and certain properties of computation-tuples are not uncommon in real world object histories. For example, several constraints about rent collections in the apartm ent-rental ex ample in [CG] are described in terms of rental records with the same tenant name, and some constraints about paper presentations in the seminar-schedule example in [GT1] are described in term s of seminar-occurrence records with the same title of the paper presented. (For the sake of completeness, these two examples are reviewed in the Appendix.) These examples m otivate our investigation on how such connections can contribute to the design and analysis of computation-tuple sequence schemes. We start our study by presenting the following concepts. D efin itio n . A c o n te x t schem e is a triple (<U>, S, f), where <U> is a 1 nonempty sequence of attributes, S an arbitrary set with at least two elements and f a total function (called c o n te x t fu n ctio n ) from D om (<£/>) onto S. Each set { u in D om (<£/>) | f(u)= a }, where a is in S, is called a c o n te x t over <U>. Each sequence u in SEQ(<{7>) is called a (c o n te x te d ) seq u en ce over (<U> , I S, f). I Intuitively, a context scheme (< £/> , S, f) is an abstract classification of prop erties of the tuples in Dom( <{/> ). A pair of tuples u\, u 2 in D om (<{/>) are l regarded as having the same property if they are in the same context. It is easily ; seen from the definition that the set { Pa | a in S }, where Pa={ u in Dom(<U>) 15 | f(u)= a }, is a partition of the set D om (<£/>). Example 1.1 (continued). (e) Let f be the total function from Dom(< £/> ) onto Dom(DATE) defined by f(u)=u(DA TE) for each u in Dom(<U>). By definition, (< {/> , Dom(DATE), f) is a context scheme. □ The concept of context scheme arises naturally in many real-life situations. For example, a context scheme can be obtained for the apartm ent-rental example in the Appendix by mapping each rental record into its TENANT value. In the seminax-schedule example of the Appendix, a context scheme can be obtained by mapping each seminar-occurrence record into its TITLE value. And all students I in a university, all possible majors offered by the university and the association between a student and his/her major can be abstracted as a context scheme. i Clearly, many context schemes can be defined over a given <U>. In the present study, we shall focus our discussion on issues about CSS within a single context I scheme. For this purpose, we now introduce the notion of contexted computation tuple sequence scheme. } D efin itio n . A c o n te x te d c o m p u ta tio n -tu p le seq u en ce schem e (abbreviated CCSS) over ( < /> , < E > ) (abbreviated “over < { /> ”, with <U> — < I> < E > ) is a five tuple T = (C, E,X, S ',/), where (C, E ,Z) is a CSS over <U> and (<U> , S, , f) is a context scheme. The rank of a CCSS T = (C, E ,l, S', / ) (denoted by p{T)) is still max{l, p{C)j. 16 The set of computation-tuple sequences specified by a CCSS T = (C, E,X, S, f) (denoted by VSEQ(T)) is still defined as VSEQ(C) D VSEQ(E) n V SEQ (J). Example 1.1 (continued). A CCSS for the limited check-writing plan is T =(C, E, Z, Dom(DATE), f), with the components as defined in (a)-(e). □ 17 2 C o n te x t-R e la te d C o n stra in ts In this chapter we introduce two types of context-related constraints, namely context local and context autonomous. We then present some results about these constraints regarding their characterization and closure properties under simple j set-theoretic operations. These results will be used in Chapters 3 and 4 to derive our main results about CCSS having only context-related constraints. 2.1 Context-local constraints As mentioned in the Introduction, we are interested in context-related semantic I constraints. In the present section, we introduce a special class of context-related constraints called context local. The importance of this type of constraint is th at in updating an object history under such a constraint, the satisfaction of the i constraint by the new history can be checked with respect to suffixes of the history within certain contexts, a relatively easy task to do. We start our discussion with j the following: | r N o ta tio n . For each sequence u = uiu2...um over (< £/> , S, f), let ||u ||/ = i+i)). [For any a, b, neql(a,b) = 1 if a ^ b and 0 other wise.] Note th at ||u ||/ = 0 for each sequence u of length 1. I Intuitively, ||w||/ denotes the number of context changes in u, i.e., the number of times the value of the context function f over the tuples in u changes. It is easily 18 seen that (1) 0 < ||u ||/ < |w|; (2) ||u||/ < ||“ ||/ f°r each interval v of u; and (3) is ||u i.. .ui\\f + ||«f+i if f(ui) = f( u i+1), and is ||u i . . . Mi||/ + ||tti+i ... M m||/ + 1 otherwise. 1 We now turn to the definition of context-local constraints. D efin ition . A constraint cr over <U> is A:-context local with respect to a I context scheme Af = (< £/> , S, f) if (1) a is uniform; (2) k is a positive integer; and (3) for all u, ||uj|/ > k — 1, u |= cr if F f= cr for every interval v of u such that i I N / = k - l . 5 A constraint cr is con text local (w ith respect to M.) if cr is ^-context local for ! I some k. By definition, < r ® and cr<u> are 1-context local. i Context-local constraints occur frequently in real-life object histories. For example, the constraint < 7! in Example 1.1 is 1-context local. [Indeed, let u = \ I u\...un be a sequence in SEQ(<U>). By the definition of crj, m |= crj iff for each 1 < i < n, u,(A M T)=0 if u;(A CT)=IN T. This is equivalent to the condition th at j for each interval U{...Uj (1 < i < j < n) such that u,-(DATE)= • • • = w/(DATE), «jt(AM T)=0 if Ufc(ACT)=INT for all i < k < j. By definition, oq is 1-context local.] Also, the constraints cr2, cr3 and a4 in the apartm ent-rental example are all 5S ince cr is u n ifo rm , th e reverse also holds, i.e., v |= cr fo r each in te rv a l w o f IZ if u f= cr. i --------------------------------------------------------- I 19 1-context local with respect to the context scheme mentioned in the Appendix. However, there are constraints which are not context local. We shall show in the ■next chapter th at the constraints cr2 and < 7 3 in Example 1.1 are not context local. Intuitively, a constraint is ^-context local if the validity of a sequence u for the constraint can be checked by examining all intervals of u with exactly k — 1 context changes. Thus, the satisfaction of a fc-context local constraint by a sequence under addition of a new tuple can be m aintained by examining satisfaction of 1 each suffix of the new sequence with exactly k — 1 context changes. This idea can be considered as a generalization of local constraints, a concept first introduced in [GT1] and studied in [CG; DG; GSW; GT2]. Indeed, we shall prove in our next result th at all local constraints are also context local. (This result will be used in Chapters 3 and 4.) First, however, we review the concept of local constraint and present some formalism. D efin ition . A (uniform) constraint a over <U> is k-local (k > 1) if, for all j 1 u = u\ ... um (m > k), u \= cr if Ui... Ui+k-\ (= cr for each i < m — k - f 1. A constraint is local if it is k-local for some k. The family of all k-local (local) I constraints over <U> is denoted by £<£/> (£<[/>)• Clearly, c r ® and c r< u > are 1-local. It has also been proved [GT1] that (1) 1 each k-local constraint is also /-local for all I > k; and (2) for each non-empty (not necessarily finite) set £ of k-local constraints, the constraint cr defined by VSEQ(cr)=f|TeSV SEQ (r) is k-local. As we shall see below, similar results are I 20 also true for context-local constraints. We now introduce some formalism which simplifies our discussion. N o ta tio n . For each sequence u over (<U>, S, f) and positive integer k, let Int{(u)— {v | v an interval of u and ||v||/ — k — 1}. For each subset W of SEQ(<Z7>), let Int{{W)= [Jwew In tk(W). It immediately follows th at (1) /n ff(u ) ^ 0 iff ||u ||/ > k — 1; (2) a uniform constraint < r is fc-context local iff for each u, $ ^ In tk(u) C VSEQ(cr) implies It is in VSEQ(cr); and (3) v an interval of w implies Int{(y ) C Int{(w). We are now ready to show that all local constraints are context local. Indeed, our result is actually stronger and states that all fc-local constraints are A:-context local. P rop osition 2.1. Let A4=(<U>, S, f) be a context scheme. Then each k-local constraint over <U> is & -context local with respect to JA. I Proof. Let a be k-local and u such th at 0 ^ Int{.(u) C VSEQ(<r). It suffices to show th at u is in VSEQ(cr). To this end, let w be an arbitrary interval of u of i length k. Since Int{(u ) ^ 0, w exists. Furthermore, there exists v in Int{(u) such i th at j I < (1) w is an interval of v. Since In tk(u) C VSEQ(tr), i (2) v is in VSEQ(cr). By (1), (2) and the fact that cr is uniform, w is in VSEQ(cr). Thus, all intervals i 21 of u of length k are in VSEQ(cr). Since cr is k-local, u is in VSEQ(cr). □ Although not shown here, it can be proved that the converse is not true, i.e., there exist fc-context local constraints which are not local. As mentioned above, context-local constraints have some interesting proper ties th at are similar to those of local constraints. For example, let cr be a ^-context local constraint with respect to Ai —(<U>, S, f). Then cr is also /-context local with respect to M. for all I > k. [Indeed, let u be a sequence in SEQ (</7>) such th at ||u||/ > / — 1. Suppose w j= cr for all intervals w of u such that ||tF||/ = / — 1. To see that T t f= cr, let v be an arbitrary sequence in Since / > k, there exists an interval w of u such th at ||w ||/ = / — 1 and v is an interval of w. Com bining this with the assumption that w |= cr and that cr is uniform, v f= cr. Since a is fc-context local, u cr.] In particular, if cr; is fc;-context local for i = 1, ...,n, then each cr, is m ax{kj \ j}-context local. I I Another property held by fc-context local constraints is their closure under i 1 “arbitrary intersection”. This result, now proved, will be used frequently in the i sequel. P rop osition 2.2. Let (< £/> , S, f) be a context scheme. For each non-empty (not necessarily finite) set E of ^-context local constraints over <U>, the constraint a' defined by VSEQ(cr')=p|£reE VSEQ(cr) is fc-context local. Proof. Since E is a set of uniform constraints, fL es VSEQ(cr) is interval-closed and hence cr' is uniform. It remains to show that for each u in SEQ(<U>) such 22 that Intl(u ) 7^ 0, « (= cr' if Int{(u ) C VSEQ(cr'). I To this end, let u in SEQ (<£/>) be such that 0 7^ In tl(u ) C VSEQ(<r'). By the definition of cr', C VSEQ(cr) for each cr in E. Since E is a set of fc-context local constraints, u is in VSEQ(cr) for each a in E. Hence, It j= cr'. □ Let k be a positive integer and W C SEQ (<f7>). It follows from the above proposition th at there exists exactly one fc-context local constraint cr such that i W C VSEQ(<t) C VSEQ(<t/) for each ^-context local constraint < j‘ such that W C VSEQ(cr'). [Indeed, let E be the set of fc-context local constraints a' such that W C VSEQ(<r'). Since W C SEQ(< £ /> )= VSEQ(<t< C />), aKU> is in E. By Propo sition 2.2, the constraint a defined by VSEQ(<T)=no-/G sVSEQ(er') is Ar-context lo- [ cal. Clearly, W C VSEQ(cr). Now suppose another fc-context local constraint r satisfies the above condition. Since W C VSEQ(cr) and W C V SEQ (r), VSEQ(cr) , c V SEQ (r) and V SEQ (r) C VSEQ(cr). Hence, VSEQ(r)=VSEQ(o-).] In Propo sition 2.3 below, we shall show that the set of valid sequences of this A;-context local constraint can be “derived” from W. This result will be used frequently in the following chapters. First, though, we need some symbolism and a technical t lemma. ! N o ta tio n . Let (< £/> , S, f) be a context scheme. For each positive integer k, I nonnegative integer n, and subset W of SEQ(< £/> ), let V intf> J.(W) = W, V i n t ^ 1\ w ) = V int^l(W ) U {uJ | there exist u\, u2 in V int^l(W ) such that 0 7^ Int{(w ) C Intl({u-i,u2})} 23 and V in t f ^ W ) = U ^o V in tfk{W). Intuitively, Vint< ftk(W ) is the set of sequences whose “valid intervals” . i.e., intervals with exactly k — 1 context changes, can be obtained from sequences in W. Exam ple 2.1. Let < E /> = < A B > , where Dom (A)={a, b} and D om (B )={l, 2}. I Let S={a, b} and f be the total function defined for each (x, y) in D om (< I/> ) by f((x, y))=x. By definition, (< £/> , S, f) is a context scheme. Let W1={(a,l)(a,l)(b,l)(b,l)}. By definition, Vint^{W\)==W\. It is easily seen that Vint^J^ 2(IL i)= { (a,l)(b ,l), (a ,l)(b ,l)(b ,l), (a,l)(a ,l)(b ,l), (a,l)(a,l)(b ,l)(b ,l)} for each / > 1. Thus, j V in tf2(Wi)={(a,l)(b,l), (a ,l)(b ,l)(b ,l), (a ,l)(a ,l)(b ,l), (a ,l)(a ,l)(b ,l)(b ,l)} . Now consider IL2={(a, 1)(6, l)(a, 1)}. By definition, V in t^ ( W 2)=W 2. It is ' easily seen th at for each / > 1, i Vint% (W2)=(b,l){((a, 1)(6,1))» | n > 1 } u { ((«, 1)(6,1))” | n > l} (a ,l) | U (b,l){((o,l)(i, 1))" | n > 0}(a,l) U {((a, !)(&,1))" | n > 1}. Thus, Vin<5»J(W'b)=('>,l){((e,l)(M))” I" > 1} U {((<x,l)(M))" | n > l}(a,l) I U (b,l){((o. X)(6,1))” | n > 0}(a,l) U {((«, 1)(4,1))” I n > !}■ ° j It is clear that for each n and / > k, (1) Vint^JiW ) C V int^k{W), (2) W % C j W2 implies Vint^l(W i) C Vintfy^Wz), and (3) for each u such th at Int{(u) = 0, i u is in Vint^k(W) iff u is in W. 24 We are now ready for the technical lemma. This result establishes several I relationships between an arbitrary set W of sequences and the set VintJ’ k{W) “derived” from W. L e m m a 2 .1 . Let (<U>,S,f) be a context scheme, W a subset of SE Q (<£/>) and k a positive integer. Then (a) V in tfk{W) is interval closed if W is interval closed, (b) for each u in SEQ (<£/>), u is in V in tfk(W) if 0 / Int{(u) C V in tf^ W ) , | and (c) Int{(Vintftk(W))=Int{(W). Proof, (a) Suppose W is interval closed. It suffices to show that Vintfy(W ) is interval closed for each n. By definition, Vint^J.{W) = W is interval closed. Continuing by induction, assume that Vintfy(W ) is interval closed for some n > 0 and that u is in V i n t ^ 1\ W ) . Suppose u is also in Vintfy(W ). Then each interval of u is in V int^l(W ) C Vint*f£1\ W ) by induction. Now suppose there exist and u2 in V intfy(W ) such that 0 ^ Int{.(u) C Int{({u\, « 2})- Consider each interval v of u. If ||u ||/ > k — 1, then 0 ^ Int{.(y) C Int{(u) C u2}). 1 Thus, v is in Vint^'£1\ W ) by definition. If ||?7||/ < k — 1, then there exists v' in Int{(u) such th at v is an interval of n7 . Since Int{(u ) C 7rcif({u1, u2}), v' is either an interval of U\ or u2. By the induction hypothesis and the fact that u\ and u2 are in v' is in Vintfy(W ). Since v is an interval of if and Vint^l(W ) ; is interval closed, v is in Vint^l(W ) C V i n t ^ 1\ w ) . Therefore, each interval v of u is in . Hence, Vint^1 ^ (W) is interval closed, and the induction is extended. j 25 (b) Let u in SEQ (<{/>) be such that 0 ^ In tk(u) C VintJfk(W). Then ||u ||/ = m for some m > k — 1. For each «, 0 < i < m — k + 1, let Hi be the longest prefix of u such that ||u»||/ = k + i — 1. To see that u is in it suffices to show that each Hi is in V in tfk{W). By the definition of u0 and the fact th at 0 7^ In tk(u), Ho is in In tk(u) C VintJfk(W) as desired. Continuing by induction, suppose th at ui is in Vintj?k(W) for some 0 < l < m — k + 1. Consider ui+1. Clearly, ( 1) Int((ui+1)y£ 0. By the definition of ui+i, there exists v in In tk(u) such that i (2) Int[(ui+1) C In tf k({uh v}). Since In tk(u) C V in tfk{W), v is in V int^k(W). By this and the induction hy- j I pothesis, there exists n > 0 such that both and v are in V int^k(W). Combining this with (1) and (2), ui+1 is in V int^k X ^{W) C V int^kiW ). Thus, the induction is extended. i (c) Since W C V in tf^ W ) , Int{{W ) C Int{{Vintfjk{W)). For the reverse i containment, we first show th at | (3) In tk(Vint^l(W )) C In tk(W ) for each n. j Since V int^k{W) = W, In tk{Vint^k{W )) = In tk(W). Using induction, assume In tk(V int^k(W)) C In tk(W) for some n > 0. Let u b e in By definition, there exists u in V int^k x\ W ) such that v is in Int{(u). Suppose u is also in Vint^l(W ). Then v is in In tk(Vint^k(W)) C In tk(W) by induction. Now 26 suppose there exist ui and u2 in V int^l(W ) such that Int{(u ) Q Int{{{u1,u2}) C Intl(V int^l(W )). By induction hypothesis, In tk(V int^J.(W)) C Int{(W). Thus, Int{(u) C In tk(W ) and v is in In tk(W ) as desired. Hence, In tl(V in t^k l\W ) ) C Int{(W), the induction is extended, and (3) holds. Now let u be an arbitrary element in Int{(Vint™k(W)). By definition, there exists v! in V intf^iW ) such that u is in Int{{u'). By the definition of Vinty^k(W), there exists n > 0 such that u' is in V in t^ iW ) . Combining this with (3), Int{.(vf) C Intl(V int^l(W )) C Intl(W ). This implies that u is in Int{(W). Therefore Int{(VintJ‘ k(Wy) C In tk(W), whence the equality. □ We are now ready for the previously mentioned result. P rop osition 2.3. Let (< {/> , S, f) be a context scheme, W a subset of SEQ(<?7>), 1 I k a positive integer, and a the constraint defined by 6 VSEQ(cr)= V rm<^f c (Interval(W )). Then, (a) a is fc-context local; (b) W C VSEQ(cr); and (c) VSEQ(cr)C V SEQ (r) for each A;-context local constraint r such that \ \ W CV SEQ (r). Proof. Consider (a). By Lemma 2.1 (a), the set V m ty^(Interval(W )) is interval closed. Thus, cr is uniform. Now let u be a sequence in SEQ(<L/>) such th at I 6For each u in SE Q (<£7>), Interval(u) denotes the set of intervals of u. For each W C ! f S E Q (< t/> ), Interval(PF)= U «gw Interval(S). 27 ||w||/ > k — 1 and Int{(u) C T m i^ In te rv a ^ J T )). Clearly, 0 Int{(u). By Lemma 2.1 (b), u is in Tm ^(Interval(V T))=V SEQ (<7). Thus, cr is fc-context local. Consider (b). By definition, W C Interval (IT) C y m t“ fc (Interval(W )). Turning to (c), let r be an arbitrary context local constraint such that W C V SEQ (r). Consider each u in T m f^ f c ( Interval (IT)). Suppose Int{(u) = 0. ’ Then u is in Interval(IT) by (3) following Example 2.1. Since W C V SEQ (r) and r is uniform, Interval(W ) C Interval(V SEQ (r))=V SEQ (r). Thus, u is in Interval(TT)CVSEQ(r) as desired. Now suppose Int{(u) ^ 0. Then Int{(u) C Intl(Vinty> k(lnteTval (IT))) = Int{( Interval (IT)), by Lemma 2.1 (c) C Interval (IT), by definition C Interval(V SEQ (r)), by assumption =V SE Q (r), since r is uniform. i T hat is, (*) Int{{u) C VSEQ(<r'). By (*) and r being /c-context local, it follows that u is in V SEQ (r). Thus, VSEQ(<r) C V SEQ (r). □ C o rollary. Let (<U>, S, f) be a context scheme and k a positive integer. Then a constraint a over <U> is Ar-context local iff VSEQ(cr)=TmAy°f c (VSEQ(<r)). 2 8 2.2 Context-autonomous constraints We now introduce another class of context-related semantic constraints, the “con text autonomous”. This type of constraint is im portant because (i) the validation th at a sequence satisfies such a constraint can be carried out in parallel on each longest subsequence of single context (defined below) of the sequence; and (ii) ad ditional properties of the constraint which may only hold on valid single-context ! j sequences can be employed to further speed up the validation process. We start our discussion with: I » D efin ition . A sequence u over a context scheme A4 = (<U>, S, f) is called a sequ en ce o f single con text or a sin gle-con text sequence (with respect to M ) if \\u\\f = 0. I Using the above concept, we are now able to present the formal definition of context-autonomous constraints. D efin ition . Let Ai=(<U>, S, f) be a context scheme. A (uniform) constraint cr \ over <U> is con text autonom ous (w ith resp ect to A f) if, for all u, u f= cr I iff v (= cr for each subsequence v of u satisfying the following two conditions: (1) v is of single context; and (2) there is no subsequence w of u such th at ||uJ||/ = 0, v ^ uJ, and v is a i subsequence of w. Stated otherwise, cr is context autonomous if, for each u, u a iff v |= a for all longest single-context subsequences u of u. j 29 Intuitively, a constraint a is context autonomous if the validity of a sequence for a is equivalent to the validity of all its longest single-context subsequences for cr. This suggests th at the satisfaction of a context-autonomous constraint by a sequence can be checked by examining all its longest single-context subsequences, a relatively easy task to do because of the “divide and conquer” nature of this process. By definition, erg and cr<u> are context autonomous. Context-autonomous constraints occur frequently in real-life object histories. I For example, the constraint cr2 in Example 1.1 is context autonomous. Also, the constraint cr3 in the apartm ent-rental example and the constraint a\ in the seminar-schedule example are all context autonomous with respect to the context ! schemes mentioned in the Appendix. The following, which will serve as a running I I example in Chapters 3 and 4, illustrates other context-autonomous constraints arising in real-life situations. Example 2.2 (Research Funding). Consider the history of the research funding records of a research-awarding foundation (such as the National Science Founda tion). Each funding record consists of five attributes, namely GN, PI, AMOUNT, DATE, and YAT. Each funding occurrence is represented as a 5-tuple u. Here, (a) u(GN) is the grant number for a research project, (b) u(PI) is the principal , investigator of the project 7, (c) u(AMOUNT) is the amount of money awarded 7We assume that each project has exactly one principal investigator. If there are two or more ! i principal investigators, than a code name will be used. 30 (possibly one of a series) on the project, (d) u(DATE) is the year, month, and day on which the award is being listed, and (e) u(YAT) is the calendar-year amount to date of all research awards of the foundation. Also, Dom(PI) is the set of people names, Dom(GN)=Dom(AM OUNT)=Dom(YAT) the set of all positive integers, and Dom(DATE) the set of all date values. GN, PI, AMOUNT, and DATE are input attributes and YAT is an evaluation attribute. Thus, <U> — < I> < E > , where < / > =G N PI AMOUNT DATE and <E>= YAT. The evaluation func tion eyAT is defined for all u in Dom(< £/> ), g in Dom(GN), p in Dom(PI), a in Dom(AMOUNT) and d in Dom(DATE) by eYAT(u,g,P, a, d)=u(Y A T)+a if u(DATE) and d are in the same year = a otherwise. In addition, each valid research funding history u = ui...um is assumed to satisfy I i the following four constraints. (a) u \= cri iff for each i, 1 < i < m, u,(DATE) C ut+1(DATE), where I [I denotes calendar-wise ordering. (The funding records are listed in calendar j order.) J (b) u (= < r2 iff for each i and j, 1 < i,j < m, U{(GN)=ttj(GN) implies that j Mj(PI)=Wj(PI). (Each grant can only be headed by a single principal investigator.) (c) u cr3 iff for all i and j, 1 < i < j < m, such th at u4(GN)=Mj(GN), Ui(DATE) and Uj(DATE) are within 48 consecutive calendar-months. (Each grant spans at most five years.) 31 GN PI AMOUNT DATE YAT 1 Smith 80,000 11/07/86 80,000 2 Robinson 18,000 01/10/87 18,000 4 Jones 25,000 01/15/87 43,000 3 Adams 15,000 02/01/87 58,000 5 Jefferson 12,000 04/23/87 70,000 9 Hoover 10,000 05/16/87 80,000 11 Jones 20,000 07/08/87 100,000 6 Anderson 50,000 08/17/87 150,000 7 Brown 45,000 09/01/87 195,000 8 Charles 30,000 11/23/87 225,000 10 Thomas 25,000 12/10/87 250,000 3 Adams 20,000 01/06/88 20,000 1 Smith 15,000 01/ 21/88 35,000 12 Edward 20,000 02/ 02/88 55,000 2 Robinson 10,000 02/03/88 65,000 Figure 2.1 (d) u f= cr4 iff for all i and j, 1 < i < j < m, such th at «i(GN)=Uj(GN), , Uj(DATE) and Uj(DATE) are in different calendar years. (Each project receives money at most once a year.) t The initialization for the research funding histories is I 1 1 J= { (g , p, a, d, a) | (g, p, a, d, a) in Dom (<£/>)}. Finally, let / be the total function defined from D om (< f/> ) onto Dom(GN) by 1 /(u )= u (G N ) for each u in Dom(<£7>). By definition, (<U>, Dom(GN), f) is j a context scheme. Thus, the research funding histories can be specified by the 1 I CCSS T ={{<!>, <E>, {cyat}), {<ti, < r2, < r3, cr4}, X, Dom(GN), / ) . One valid 32 com putation-tuple sequence for this CCSS is given in Figure 2.1. Clearly, cr2, < 7 3 and cr4 are all context autonomous. Furthermore, the set of lengths of the single-context sequence in VSEQ(cr3) is bounded. It will be shown in Chapter 4 th at the CCSS T is equivalent to another CCSS having only context- autonomous constraints. □ Before examining the properties of context-autonomous constraints, we in troduce a notation which simplifies the discussion. N o ta tio n . For each u over (< £/> , S, f), let Lon/(u) be the set of all longest single context subsequences v of u. For each subset W of S E Q (< t/> ), let Lonf(W)== Ufg w Lonf {w). Note th at each tuple occurrence appearing in u is in exactly one sequence in i Lonf{u). For example, let u be the sequence as shown in Figure 2.1. Then (1, Smith, 80000, 11/07/86, 80000)(1, Smith, 15000, 01/ 21/ 88, 35000), j (2, Robinson, 18000, 01/10/87, 18000)(2, Robinson, 10000, 02/03/88, 65000), j (3, Adams, 15000, 02/01/87, 58000)(3, Adams, 20000, 01/06/88, 20000) and ! (4, Jones, 25000, 01/15/87, 43000) are all in Lorif(u). It is also easily seen th at Lonf(Lonf(W))=Lonj(W), and Lorif(W ) is interval closed if W is interval closed. Using the above notation, we immediately have: A lte rn a tiv e D efin itio n . A (uniform) constraint a is c o n te x t a u to n o m o u s if, 1 for each u, u is in VSEQ(cr) iff Lonf(u) C VSEQ(cr). ' 33 We now establish the closure of context-autonomous constraints under “ar bitrary intersection” . P ro p o s itio n 2.4. Let (<U>, S, f) be a context scheme. For each non-empty (not necessarily finite) set E of context-autonomous constraints over <U>, the constraint cr' defined by VSEQ(cr/)=(~)< 7 6 S VSEQ(cr) is context autonomous. Proof. Since E is a set of uniform constraints, fL es VSEQ(<r) is interval-closed. Hence, cr' is uniform. Now let u be in SEQ(< £/> ). By the alternative definition of context-autonomous constraint, it suffices to show that u is in VSEQ(cr') iff Lonf (u) C VSEQ (a'). i To see the “if” part, assume Lonj(u) C VSEQ(cr'). By definition of a', Lorif(u) C VSEQ(cr) for each cr in E. Combining this with the fact th at E is a set of context-autonomous constraints and the above alternative definition, it follows that u is in VSEQ(cr) for each a in E. By definition of cr', u is in VSEQ(cr'). Thus, u is in VSEQ(cr') as desired. ! I For the converse, assume that u is in VSEQ(cr'). By the definition of cr', | i I u is in VSEQ(cr) for each a in E. Combining this with the fact that E is a I set of context-autonomous constraints and the above alternative definition, it | I I follows th at Lonf(u ) C VSEQ(cr) for each cr in E. By definition of cr', Lonf(u ) C j I VSEQ(cr'). Hence, cr' is context autonomous. □ It follows from this proposition that for each W C SE Q (<£/>), there ex- j I t ists exactly one context-autonomous constraint a such that W C VSEQ(cr) C 34 VSEQ(cr/) for each context-autonomous constraint a' such that W C VSEQ(<t'). [Indeed, let E be the set of context-autonomous constraints a' such that W C VSEQ(cr/). Since W C SEQ(<f/>)=VSEQ(<7<[/>), cr< y> is in E. By Proposition 2.4, the constraint a defined by VSEQ(cr)=fj<T'6£VSEQ(cr/) is context autonomous. Clearly, W C VSEQ(er). Now suppose another context-autonomous constraint r satisfies the above condition. Since W C VSEQ(cr) and W C V SEQ (r), VSEQ(cr) C V SEQ (r) and V SEQ (r) C VSEQ(<r). Hence, VSEQ(t )=VSEQ(<t).] In Propo- i sition 2.5 below, we shall show that the set of valid sequences of this context- autonomous constraint can be “derived” from W. This result will be used fre quently in the following chapters. First, however, we need some notation and a technical lemma. N o ta tio n . For all u = u\ ... um and v = iq ... vn in SEQ (<f7>), let Shuffle(u, v) be the set of all uq ... wm+n for which there exist 1 <*!< ••• < im < m + n such th at u = wh ... wim and v = wl ... wilL -iWi1+ 1 ... ... wm+n. 1 The above operation is essentially the same as the shuffle operation in formal language theory [HU]. j N o ta tio n . For each u = . . . un over (< £/> , S, f), let Cf(u) = {f{ui) 1 1 i < n). Thus, Cf(u) is the set of all contexts appearing in the tuples of u. Further- I m ore, Cf{u\) C Cj{u2) if U\ is an interval of u2. N o ta tio n . Let (<U>, S, f) be a context scheme. For each nonnegative integer n 35 and subset W of SEQ(<U>), let sJ0)(W) = W , 5^n+1^(t/ E )= 5 ^ (W ) U {w | there exist ux, u2 in S f l\ W ) such that C/(ui) fl Cf {u2) = 0 and w is in S h u ffle (u i,u 2)} a n d Sf(W) = U „ > o S } ” > ( W 0 . Intuitively, each sequence in 5y°(W) is obtained by shuffling sequences with disjoint context occurrences in W. Clearly, Wx C W2 implies S f (Wi) C S f { W 2). Also, S f { S f { W ) ) = S f( W ) . We axe now ready for our technical lemma. This result establishes several re- lationships between an arbitrary set W of sequences and the set S f )(W) “derived” from W. ( L em m a 2.2. Let (<U> , S, f) be a context scheme and W an arbitrary subset of SEQ(<?7>). Then (a) S f > (W) is interval closed if W is interval closed, (b) Lorif(W)=Lonf(Sj?(W)), and (c) for each u in SEQ (<U>), u is in S j ’{Lorif(W)) iff Lortf(u) C Sf°(Lonf(W)). ; Proof, (a) Suppose W is interval closed. It suffices to show that is interval closed for each k > 0. Clearly, = W is interval closed. Continuing by | j induction, assume th at S ^ (W ) is interval closed for some k > 0 and that u is a sequence in 5'yfe+ 1)(VE). Suppose u is also in S '^ (W ). Then each interval of | u is in C l S'yfc+1^(I/E ) by induction. Now suppose there exist v and w in Sfk\ \ ¥ ) such that Cf(v) fl Cf(w ) = 0 and u is in Shuffle(v^w). Consider each interval U\ of u. Suppose that Ui is an interval of either v or w. Since v and w j 36 are sequences in and is assumed to be interval closed, ux is in S { fk)(W) C S f +1)(B 0 as desired. Suppose that ux is neither an interval of v nor of w. Then there exist interval vx of v and interval wx of w such that ux is in S h u ffle (v x,w x). Since Cf(v) C\Cf(w) = 0, Cj(vx) C C/(v) and Cf(wx) C Cf(w), it follows that Cf(vx)C\ Cf(wx) = 0. Since v and w are sequences in Sjk\ W ) and Sfk\ W ) is assumed to be interval closed, vx and wx are in Sfk\ W ) . Combining this with the definition of 5 jA +1^(W), ux is in 5y!+1^(W 'r) as desired. Thus, each interval of u is in S^kJrl\ W ) . Therefore, Sjk+1\ W ) is interval closed and the i induction is extended. (b) Since W C 5^°(W ), Lonf(W) C Lonf(Sf> (W)). For the reverse contain- j m ent, we first show that j ! (1 ) Lonf(Sjn\ w ) ) C L onj(W ) for each n > 0. , Since = W , Lonf(Sj> \ W ) ) — Lonj(W). Continuing by induction, as sume that Lorif(Sfr i\ w )) C Lonf(W ) for some n > 0. Consider each u in i Lonj(S( f l+1\W )). By definition, there exists w in 5yn+1^(W ) such that u is in Lonf(w). Suppose w is also in 5yn^(W). Then u is in Lonf(S^n\ w ) ) C | Lonj(W) by induction. Now suppose there exist wx and w2 in Sjn\ W ) such that J I Cf(wx) fl Cf(u) 2 ) = 0 and w is in S h u ffle (w i,w 2). Thus, Lonj(w)=Lonf(w x) U i Lortf(w2) C Lorif(Sf*\w)). Combining this with the induction hypothesis that Lonf(SfU \ w )) C Lorif(W), it follows that Lorif(w) C L onf(W ) and u is in Lonj(W). Hence, Lorif(S^n+1\ W ) ) C Lorif(W), the induction is extended, and 37 (1) holds. Now consider each u in L on f(Sf> (W)). By definition, there exists w in Sj?(W) such th at u is in Lonf(w). Thus, there exists rt > 0 such that w is in S '^ (W ). Combining this with (1), u is in Lonj(W) as desired. Thus the reverse containment, whence the equality. (c) To see the “if” part, let u be a sequence in S E Q (< t/> ) such th at Lonfiu) i C Sy> (Lorif(W)). For each nonempty subset A of Cf(u), let ua be the longest subsequence of u such that Cj (ua) = A. Since ua = u when A = <7/(«), it suffices to show that ua is in Sf°(Lonj(W)) for each nonempty subset A of Cj(u). j To this end, let A be an arbitrary singleton subset of Cf(u). By definition of j ua, ua is in Lonj(u). Since Lonj(u) C Sf°(Lorif(W)), ua is in S f > (Lonf{W)). \ Thus, ua is in S f > (Lonf(W)) for each singleton subset A of Cf(u). Continuing by induction, suppose for some 1 < n < # (C /(u )), ua is in S f ’(Lonf(W )) for each ! subset A of Cf (u) such that #{A) = n. Let A be an arbitrary subset of Cf(u) such that #(vl) = n -f 1. By definition of ua, there exist subset A! of Cf(u ), where ! 4^{A') = n, and v in Lon/(u ) such that (2) Cf(uA') H C/(v) = 0 and ua is in Shuffle(uA',v) j Since #{A') = n, ua< is in Sf{Lon,j{W )) by induction. Combining this with the fact that v is in Lorif(u) C Sy°(Lonf(W)), there exists m > 0 such that both ua> and v are in S jn\Lonf(W )). Combining this with (2), ua is in Sfm+1\L o n j( W )) I C S f > (Lorif(W)) and the induction is extended. ; ^ i 38 To see the reverse, let u be in Sf(L onf(W )). Then Lonf(u) C Lonf(Sj: > (Lonf(W))), since u is in S f > (Lonf(W )) = Lorif(Lonf(W)), by (b) = Lorif(W), by definition C S f{L o n f {W)). T hat is, Lonf(u ) C Sj?(Lorif(W)), whence the proof. □ We are now ready for the previously mentioned result. P ro p o s itio n 2.5. Let (<U>, S, f) be a context scheme, W a subset of SEQ(<U>) and a the constraint defined by VSEQ(cr)=5'y°(Ton/(Interval(W ))). Then (a) a is context autonomous; (b) W C VSEQ(cr); and (c) VSEQ(cr) C V SEQ (r) for each context-autonomous constraint r such that W C V SEQ (r). Proof. Consider (a). Since Interval(W ) is interval closed, Lony(Interval(W )) is interval closed. By Lemma 2.2 (a), S'y°(Xon/(Interval(W)))=VSEQ(<r) is interval closed. Thus, cr is uniform. Now let u be an arbitrary sequence in SEQ(< £/> ). By Lemma 2.2 (c), u is in VSEQ(or)=5^°(Z/on/(Interval(W ))) iff Lon/(u ) C VSEQ(cr). By the alternative definition, a is context autonomous. Turning to (b), let w be an arbitrary sequence in W. Thus, Lorif(w) C Lorif(W) C Xon/(Interval(W )) C S“ (Lcm /(Interval(W ))). By Lemma 2.2 (c), w I is in S f (Lon/(IntervaI(W ))). Hence, W C S f (Lon/ (Interval(W )))=VSEQ((j). i Finally, consider (c). Let r be an arbitrary context-autonomous constraint such that W C V SEQ (r). Consider each u in VSEQ(er)= S'|°(Lon/(Interval(W ))). I Clearly, Lonf(u) C Lorif (5y°(Lo«/(Interval(VF)))) = Lon/(X on/(Interval(W ))), by Lemma 2.2 (b) = Lony (Interval(l'F)), by definition , C Lon/(Interval(V SEQ (r))), since W C V SEQ (r) = Z on/(V SE Q (r)), since r is uniform C V SEQ (r), since r is context autonomous. T hat is, Lonf(u ) C V SEQ (r). Combining this with the assumption th at r is t context autonomous, u is in V SEQ (r). Thus, VSEQ(cr) C V SEQ (r). □ C o ro llary . Let (< {/> , S, f) be a context scheme. A constraint a over <U> is context autonomous iff VSEQ(<T)=5y0(Lon/(VSEQ(or))). I 40 3 T h e R ep resen t a b ility P ro b lem As mentioned in the Introduction, our main interest is not in the special types of constraints themselves but in the CCSS which can be described by such con straints. In this chapter we consider the represent ability problem by CCSS with context-related constraints, i.e., under what conditions can a set of object his- tories specified by a CCSS be specified by a CCSS having only context-related constraints, with the same context as well as the same computation scheme and initialization. Our m ajor results are characterization theorems for such CCSS. We start with an example of a CCSS T=(C, E, X, S, f) for which there are 1 other CCSS T'=(C, S ', X, S, f) describing the same object histories, in the sense th at VSEQ (T)=VSEQ(T')- Furthermore, these other CCSS have only context- related constraints (or even only one type of context-related constraints). Example 1.1 (continued). As shown in Chapter 2, is 1-context local and < r2 is context autonomous. We now show that for i — 1 and 2, there exist CCSS I i T{=(C, Ej, X, Dom(DATE), f) such that VSEQ(T)=VSEQ(T4 ). Furthermore, Ei has only context-local or context-autonomous constraints and E 2 has only context-local constraints. [It will be shown in Chapter 4 that there is no CCSS T '=(C , S ', X, Dom(DATE), f) such that V SEQ (T)=V SEQ (T') and E' has only context-autonomous constraints.] Consider the constraint < 7 3 in T. Clearly, cr3 is not context local. [Indeed, assume th at ( T 3 is context local for some k. W ithout loss of generality, we i 41 may assume that k > 8. Consider the sequence u = uqU\UqU2Uqu3U 4 . . . Uk-3uo in SE Q (</7>) of length k + 1, where u0(ACT)=CHECK, «;(ACT) # CHECK for all 1 < i < k — 3, and Uj(DATE) ^ Uj(DATE) for all 0 < * < j < I k — 3. According to the context scheme (<U>, Dom(DATE), f), ||u ||/ = k and \\uqUiU0U 2Uqu3U 4 .. .Uk-311/= \\uiUoU2Uqu3U 4 ... Uk-3u0\\f—k — 1. Clearly, both UqU\UqU 2Uou3U 4 . . . Uk-3 and U\UqU 2U ()U 3U 4 ... Uk-3Uo are in VSEQ(<73) but u is not. This contradicts to the assumption that cr3 is A;-context local.] By an analogous argum ent, we can also show th at er2 is not context local. ! Now let Ti=(C, {<Ti, (T 2 ,a^}, X, Dom(DATE), f) be the CCSS over <U>, where < 7 3 is defined by V SEQ (a^)={u |tuples in u are listed in calendar order and all intervals I i of u containing tuples in a single m onth have no more than three tuples whose ACTION-value is CHECK}. Obviously, 03 is uniform. Furthermore, for each u in SEQ(<C/>), u is in VSEQ(ct^) if all intervals v of u containing tuples in 31 different days are in ! VSEQ(o^). Thus, ~oi is 31-context local with respect to the context scheme in the example. i By definition of C, all tuples in each sequence u in VSEQ(C) are listed consec utively in calendar order. Thus, the replacement of < x 3 in T by < 7 3 does not change j the set of valid computation-tuple sequences of T, i.e., VSEQ(Ti) = VSEQ(T). However, T} has only context local or context autonomous constraints whereas T 42 does not. Now let T2={C, {au Wi,a5}, T, Dom(DATE), f) be the CCSS over <U>, where W 2 is defined by VSEQ(<72)={tt | for all intervals uu’ of u, if tt(DATE)=u'(DATE) then u(EA TE)=u'(EA TE)}. | Obviously, W 2 is uniform and 2-local. By Proposition 2.1, < 7 2 is 2-context i l local. Thus, T2 has only context local constraints. It is also easily seen that the replacement of a 2 in T\ by does not change the set of valid computation-tuple sequences of Tx. Thus, VSEQ(T2) = VSEQ(T1)=V SEQ (T). □ The above example shows th at in some cases a CCSS may be replaced by 1 another CCSS which has (i) the same context but possibly different computation scheme and initialization, and (ii) only (one type of) context-related constraints. i This suggests the following question: (•* •) Under what conditions can a given set of object histories be defined by a CCSS having only (one type of) context-related constraints? 1 This question is addressed by the theorems in this and the next chapter. In the present chapter, the question is considered with respect to a fixed CS C and fixed initialization X. In the next chapter, the general question is addressed, th at is, | I the case in which both the CS and the initialization may vary. Before formalizing the above question, we first present some symbolism. I N o ta tio n . For a context scheme Ai=(<U>, S, f), let C C ( C C m ) denote the j (family of ^-context local (context local) constraints with respect to M . Let CAm denote the family of context autonomous constraints with respect to M.. By the definition of context local, it follows that CCm = Ufc>i Hence forth, the subscript M. will be om itted from the above notation when no ambiguity arises. We now formalize the notion of one CCSS being representable by another CCSS with (i) the same context, computation scheme and initialization, and (ii) all its constraints of a special type. D e fin itio n . Let T be a family of constraints over <U>. A CCSS T=(C, E, X, S, f) over <U> is an JF-CCSS if each a in E is in T . T is ^ -re p r e s e n ta b le if there is an .F-CCSS T ’=(C, S ', X, S, f) such that VSEQ (T)=V SEQ (T'). In particular, both T and T\ in the previous example are CX31-representable. Also, as indicated in the Appendix, the CCSS describing the apartm ent-rental histories is C £12-representable. I Since a fc-context local constraint is also /-context local for each / > k, a [CCk U C*4)-representable (C£f e -representable) CCSS T is also (C£l U CA)- representable (CE^representable) for each I > k. t In the rest of this chapter, we shall present conditions under which a CCSS T=(C, E, X, S, f) is ^-representable, with T being CCk, CA , C£k U CA, and CC respectively. We start by considering a characterization for T to be C£k, respectively CA, representable. To this end, Theorem 3.1 below, we introduce 44 some formalism and two lemmas. N o ta tio n . For each CCSS T=(C, E, X, S, f) over <U>, let Wt =VSEQ(T ) U [SEQ(<{/>)- (VSEQ(C) fl VSEQ(X))]. Then crjma and afar denote the constraints over <U> defined by VSEQ(crfma)=Interval(V SEQ(T)) and VSEQ(<r£r)= {u| Interval (u) C Wt }- Clearly, both crjma and crjar are uniform. It is also easily seen that VSEQ(cr^na) C VSEQ(cr^r). Indeed, since V SEQ (T)= VSEQ(C) n VSEQ(E) n VSEQ(X), VSEQ(T) C VSEQ(E). Combining this with the fact that VSEQ(E) is in terval closed, VSEQ(crfmo)=Interval(V SEQ(T)) C VSEQ(E). Now let u be in VSEQ(cr^na). Consider each interval v of u. Since is uniform and V SEQ (cr^a) C VSEQ(E), v is in VSEQ(E). If v is also in VSEQ(C) fl VSEQ(X), then v is in VSEQ(X) C WT. If v is not in VSEQ(C) n VSEQ(X), then v is in [SEQ(<{7>)- VSEQ(C) fl VSEQ(X)] C WT. Thus, Interval(u) C WT and u is in VSEQ(cr£r). j Hence, V S E Q ^ ) C V S E Q K ,). The following lemma asserts that for a given CCSS T=(C, E, X, S, f), \ I f V SEQ (cr^0) (VSEQ(<r^r)) is the “smallest” ( “largest”) set in the sense that for each T'=(C, S ', X, S, f), VSEQ(T)=VSEQ(X') iff VSEQ(ajma) C VSEQ(E') (VSEQ(E') C VSEQ (a£,))- , L e m m a 3.1. Let T=(C, E, X, S, f) and T'=(C, E', X, S, f) be CCSS over <U>. Then V SEQ (r)=V SEQ (TO iff V S E Q ^ J J C VSEQ(E') C VSEQ(<tL)- i Proof. For the “if” part, suppose VSEQ(cr^na) C VSEQ(E') C VSEQ(<7,ar). It ' 45 suffices to show that VSEQ(T)=VSEQ(:T'). Since VSEQ(T) C Interval(VSEQ(3’))=VSEQ((7^na), V S E Q (r) C V SEQ (S'). Combining this with the fact th at VSEQ(T) C VSEQ(C) fl V SE Q (J), it follows that VSEQ(T) C VSEQ(C) n VSEQ(E') n V S E Q (J)= VSEQ(T'). T hat is, VSEQ(T) C VSEQ(T/). For the reverse containment, let u be an arbitrary sequence in VSEQ(T'). By the definition of T', u is in VSEQ(E') C VSEQ(cr^r). Thus, u is in W r= V S E Q (r) U [SEQ(<*/>)- (VSEQ(C) n VSEQ(T))]. Combining this with the fact that u is in VSEQ(T') C VSEQ(C) fl VSEQ(Z), it follows th at u is in VSEQ(T). Thus, VSEQ(T') C VSEQ(T), whence the equality. j For the “only if”, suppose V SEQ (T')=V SEQ (T). Since V SEQ (T)=V SEQ (T') C VSEQ(E'), ! VSEQ(crfma) =Interval(VSEQ(T)) C Interval(VSEQ(S')) j I =V SEQ (E'), since VSEQ(E') is interval closed. | i I To see th at VSEQ(E/) C VSEQ(<rjj[p), let u be in VSEQ(E'). It suffices to show th at I n t e r v a l (If) C W t - To this end, consider each interval v of u. Since If is in i VSEQ(E') and VSEQ(E') is interval closed, v is in VSEQ(E'). Clearly, v is either in VSEQ(C) D V SEQ (J) or in SEQ(<*7>)- (VSEQ(C) n V SEQ (J)). Combining this with the assumption th at VSEQ(T,)=VSEQ(T’ ), it follows th at v is in Wt - i Thus, Interval(u)C WT and VSEQ(E/) C VSEQ(<r£r). □ 46 It immediately follows from Lemma 3.1 that for a CCSS T=(C, E, I , S, f) and an arbitrary family of constraints F, T is ^"-representable iff there exists a finite subset E ' of F such that VSEQ(ofma) C VSEQ(E,) C VSEQ(a£,.). For the second lemma, we need the following concept. jD efinition. A family F of uniform constraints over <U> is closed u n d e r a r b itr a r y in te rse c tio n if, for each non-empty (not necessarily finite) set 'EOF, i the constraint a defined by VSEQ(<7)=nT ei;VSEQ(T) It follows from Proposition 2.2 and Proposition 2.4 th at for a given context scheme A4, both CCk and CA are families of constraints closed under arbitrary intersection. Let F be a family of constraints over <U> closed under arbitrary intersection and containing cr<*/>. It follows from the above definition th at for each W C i S E Q (< I/> ), there exists exactly one constraint a in F such that W C VSEQ(cr) i C VSEQ(cr/) for each constraint ex' in F such that W C VSEQ(cr'). [Indeed, i let E be the set of all constraints a' in F such th at W C VSEQ(ex'). Since W C SE Q (<l/’ >)=VSEQ(cr<i7>), < x< u> is in E. Since F is closed under arbitrary Jintersection, the constraint a defined by VSEQ(cr)= fl^'es VSEQ(cr/) is in F . Clearly, W C VSEQ(cr). Now suppose another constraint r in F satisfies the above condition. Since W C VSEQ(cr) and W C V SEQ (r), VSEQ(cr) C V SEQ (r) ! and V SEQ (r) C VSEQ(cr). Hence, VSEQ(r)=VSEQ(cr).] This leads to a central I i notion in our discussion. : 47 N o ta tio n . Let X " be a family of constraints over <U> closed under arbitrary intersection and containing cr<u>. For each set W C SE Q (<£/>), let ay 7(W) denote the (unique) constraint in X such that W C VSEQ(cr^(W)) C VSEQ(o"') for each constraint < r' in X such th at W C VSEQ(ct'). It follows from Propositions 2.3 and 2.5 th at for a context scheme (<U>, S, f) and WCSEQ(<U>), V S E Q ^* (V F ))= V m ^ (In terv al(V S E Q (V F ))) and VSEQ(crc>1(W))=iSy0(£orcy(Interval(VSEQ(Wr)))). Using the above notation, the following lemma characterizes when a given CCSS is X-representable. L e m m a 3.2. Let X be a family of constraints over <U> closed under arbitrary in- I tersection and containing cr<u>• Then a CCSS T —(C, E, X, S, f) is X-representable iff VSEQ(X)=VSEQ(C, {^(V SEQ C T))}, X, S, f). Proof. The “if” part is obvious. For the “only if”, assume T is X-representable, 1 i.e., there exists an X-CCSS T'={C, S ', X, S, f) such th at VSEQ(T)=VSEQ(r). By Lemma 3.1, i (1) VSEQ(<rfmJ C VSEQ(E') C VSEQ(<tL). Now let a be the constraint defined by VSEQ(<r)=VSEQ(E/). Since 0 E' C X and X is closed under arbitrary intersection, < 7 is in X ". By (1), VSEQ(T) C VSEQ(<7s T mJ C VSEQ(cr). By definition of < 7 :r(V SEQ (r)),V SEQ (crjr(V S E Q (r))) C VSEQ(ff). Thus, VSEQ(< 7jr(VSEQ(71 )))CVSEQ(cr)=VSEQ(E/)CVSEQ(crL)- Hence, 48 (2) VSEQ (o^(V SEQ (T))) C V S E Q ^ ) . Since VSEQ(T) C VSEQ((r:r(VSEQ(T))) and a^(V SEQ (T)) is uniform, it follows that V S E Q (c ^ a)=Interval(VSEQ(jT)) C VSEQ(cr:F(VSEQ(T))). Combining this with (2) and Lemma 3.1, it follows that VSEQ(T)=VSEQ(C, {cr-r (VSEQ(T))}, J , S, f). □ It immediately follows that a CCSS T=(C, E, I , S, f) is .^"-representable iff VSEQ(cr-F(VSEQ(T))) C VSEQ(<r^r). [Indeed, the “only if” part immediately fol lows Lemma 3.2 and Lemma 3.1. For the “if” part, assume VSEQ(<t'? 7 (VSEQ(T))) C VSEQ(<r£r). Now VSEQ(T) C VSEQ(cr^(VSEQ(T))) and ^ (V S E Q (T )) is uniform. Thus, V S E Q (^mJ=Interval(V S E Q (T )) C V S E Q ^ V S E Q tT ))). Com bining this with Lemma 3.1 and the assumption that VSEQ(o"?r(VSEQ(T))) C | i i V S E Q (aL ), it follows that VSEQ(T)=VSEQ(C, { ^ (V S E Q (T ))} , I , S, f). Hence, j T is ^"-representable.] ! We are now ready for the theorem characterizing when a CCSS is ^-context local (context-autonomous) representable. Our result asserts that a CCSS T is A:-context local (context-autonomous) representable iff the set of valid sequences defined by T is not changed when all constraints in T are replaced by a single fc-context local (context-autonomous) constraint “derived” from VSEQ(T). As we shall see shortly, this result can be used to prove th at a given CCSS is not Ar-context local representable. i j T h e o re m 3.1. Let T={C, S, J , S, f) be a CCSS over <U>. Then 49 (a) T is k-context local representable for some k > 1 iff VSEQ(T)=VSEQ(C, {<t}, X, S, f), where a is defined by VSEQ (<7)=V m t^(Interval(VSEQ(T’))); (b) T is context-autonomous representable iff VSEQ(T)=VSEQ(C, {<r}, X, S, f), where cr is defined by VSEQ(cr)=1 S'|:> (Lon./(Interval(V SEQ (r)))). Proof. Consider (a). Since is 1-context local, it is fc-context local. By Proposition 2.2, CCh is closed under arbitrary intersection. By Proposition 2.3, VSEQ(crc^ (V S E Q (r)))= F m ^ (In terv al(V S E Q (X ))). Hence, by Lemma 3.2, T is (XC^-representable iff VSEQ(X)=VSEQ(C, {<t}, X, S, f), where a is defined by I V SEQ (<r)=Pm t£fc (Interval(VSEQ(T))). (b) The result can be proved by an analogous argument to that in (a). □ i From Theorem 3.1 and the discussion after Lemma 3.2, we obtain the follow ing set-containment characterization for the fc-context local (context-autonomous) representability problem. C o ro llary . Let T=(C, E, X, S, f) be a CCSS. Then I i (a) T is k-context local representable for some k > 1 iff ! U m f£fc (Interval(VSEQ(:r))) C VSEQ(crL); j (b) T is context-autonomous representable iff { S f (Xon/ (Interval(VSEQ(X)))) C VSEQ(<t^). j i Using Theorem 3.1 (b), we now show that the research-funding-history CCSS introduced in Chapter 2 is not context-autonomous representable. Example 2.2 (continued). Let wx=(l, Smith, 80000, 11/07/86, 80000) and U 2—( 2 , j 50 jRobinson, 18000, 01/10/87, 18000). Since u\u 2 is a prefix of the sequence in ‘ Figure 2.1, u\u 2 is in VSEQ(T). Now consider the sequence u 2u\. Since u\u 2 is in VSEQ(T), u 2u\ is in S'/= (Z/on/(Interval(V SEQ (r)))). By definition of eyATi u 2u\ is in V S E Q (< /> , <E>, {eyAT})• Finally, it is easily seen that u 2u\ is in VSEQ(Z). Thus, u2ui is in V S E Q ((< /> ,< £ > ,{ eK ^r} ), {a}, X , Dom(GN), f), where cr is defined by VSEQ(<r)=S'y°(i/on/(Interval(VSEQ(T)))). However, u2ui is not in VSEQ(T) because it is not in VSEQ({<7i}). Thus, the condition in Theorem 3.1 (b) does not hold. Therefore, the CCSS T is not context-autonomous i representable. □ We now turn to conditions under which a CCSS T=(C , E, X, S, f) over <U> is (CCk UC*4)-represent able. Clearly, CCk UCA contains cr< jj>. If CC^UCA. is also closed under arbitrary intersection, then the problem can be solved by employing ' Lemma 3.2. Unfortunately, as the following example illustrates, CCk U CA is not closed under finite (and thus not under arbitrary) intersection. i Example 2.1 (continued). Let cr\ be the (uniform) constraint over <U> defined by VSEQ(<Ji)={w | no interval v of u such that ||u||/ = 0 has (a, l)(a, 1) as its subsequence}. i Let < t 2 be the (uniform) constraint over <U> defined by VSEQ(o-2)={w | (a, l)(a, l)(a, 1) is not a subsequence of u}. 51 Clearly, cr\ is 1-context local and < 7 2 is context autonomous. We shall show that the constraint cr defined by VSEQ(<7)=VSEQ((j1) fl VSEQ(cr2) is neither context 1 local nor context autonomous. Assume a is fc-context local for some k. W ithout loss of generality, we may assume k=2m for some m > 3. Consider the sequence H = (a, 1)(6, l)(o, l)((i>, l)(a, 2))m"2(6,1)(«, 1) of length 2(m — 2) + 5 = k + 1. Let u\— (a, 1 )(&,1 )(a, 1)((6, l)(a ,2 ))m-2(&,1) and u 2=(b, l)(a , 1)((6, l)(a, 2))m-2(6, l)(a, 1). By definition, ||« i||/= ||« 2||/=A: — 1 and ||u||/=fc. Clearly, both u\ and u 2 are in VSEQ(<r) but u is not. This contradicts to the assumption th at a is ^-context local. Thus, cr is not context local. Finally, (a, 1)(6, l)(a, 1)(&, 1) is in VSEQ(cr) but (a, l)(a, 1) is not. Thus, a is not context autonomous. □ Our characterization of when a CCSS T=(C , E, X, S, f) is (CCk U CA)- representable, Theorem 3.2 below, requires two lemmas and the following: N o ta tio n . For families T\ and T 2 of constraints over <U>, let A T 2 be the family of constraints {<r|VSEQ(cr)= VSEQ(<7i)nVSEQ(cr2), for some ai in Xi, I * = 1,2}. Clearly, each constraint in T\ A T 2 is uniform. Furthermore, as our next I lemma shows, T\ A T 2 is closed under arbitrary intersection if Xi and T 2 are closed under arbitrary intersection. L e m m a 3.3. Let T\ and T 2 be two families of constraints over <U> closed under : ! 52 arbitrary intersection and containing or<u>- Then (a) T\ A J ~ 2 is closed under arbitrary intersection and contains and (b) for each set W C SEQ(<*7>), VSEQ(<7^A ^ ( I F ) ) = V SEQ (cr^(IF)) D V SEQ (cr^(IF)). Proof. Consider (a). Clearly, cr<u> is in T\ A J-2. Now let E be an arbitrary non empty (not necessarily finite) subset of T\t\Tv- Let Ei be the set of all constraints cr in T\ for which there exist cr' in E and r in Tv such that VSEQ(cr/)=VSEQ(cr) fl V SEQ (t). Similarly, let E 2 be the set of all constraints cr in Tv for which there exist cr' in E and r in T\ such that VSEQ(cr')=VSEQ(cr) fl V SEQ (r). Since E is non-empty, Ei and E 2 are non-empty. Since T\ and Tv are closed under arbitrary intersection, the constraint defined by VSEQ(cri)=V SEQ (Ej) is in T , i = 1, 2. .Consider the constraint a defined by VSEQ(ct)=VSEQ(<t1) D VSEQ(<t2). Since 1 is in T\ and < r2 is in Tv-, cr is in T \ A Tv- Furthermore, VSEQ(cr)=VSEQ(cr1) D VSEQ(cr2) I = v s e q (E i ) n v s e q (e 2) ; =VSEQ(E). Thus, T\ A Tv is closed under arbitrary intersection. I Turning to (b), let W be a subset of SEQ(<{7>). By (a), < rFl/^F 3 (W) is well defined . Since IFC V SE Q (cr^(IF)) and TFCVSEQ(<7^(PF)), JFC V SEQ (cr^(IF)) , 1 fl V SEQ (cr^(IF)). It remains to show that for each cr in T\ f\ Tv such that W C VSEQ(cr), VSEQ(cr:F l (W)) H VSEQ(c7^(IF)) C VSEQ(ct). T o this end, let a be 53 a constraint in Fi A F 2 such that W C VSEQ(cr). Thus, there exists cri in Fi and cr2 in 7 ~ 2 such that VSEQ(cr)=VSEQ(cr1)nVSEQ(<x2). Combining this with the fact that W C VSEQ(cr), it follows that W CVSEQ(<t1) and W CVSEQ(cr2). Thus, VSEQ (<r^(W ))C VSEQ(cr1) and V SEQ (cr^(W ))C VSEQ(<t2). Therefore, VSEQ(o-^(W 0) n V S E Q ( ^ ( iy ) ) c V S E Q fo ) n VSEQ(<t2)= V S E Q (» . Hence, the proof. □. The second lemma characterizes the (Fi U JF2)- representability problem of a i CCSS T in term s of the {Fi A X ^-representability problem of T . L em m a 3.4. Let Fi and Fi be families of constraints over <U> closed under ar bitrary intersection and containing cr<u>. Then a CCSS is (Fi U X ^-representable iff it is {Fi A ^r2)-representable. j Proof. Let T={C, E, X, S, f) be a CCSS over <U>. To see the “if” part, assume T is {F\ A .X 2)-representable, i.e., V SEQ (T)=V SEQ (T/) for some {Fi AX^-CCSS \T'=(C, E', X, S, f). Let E'={<7, | 1 < i < n}. Since c r ,- (1 < i < n) is in Fi A JF2, ! I there exist n in Fi and r/ in F 2 such that VSEQ(<7,)=VSEQ(tj) D VSEQ(r/). ! Thus, VSEQ(E,)=ni<i<nVSEQ(<7l) = f l1<i<n(VSEQ(ri) n VSEQ(r/)) = ( f W n VSEQ(r<)) n ( f W n VSEQ (r/)). i Therefore, VSEQ(T)=VSEQ(r) 54 =VSEQ(C) n VSEQ(E') n VSEQ(J) =VSEQ(C)n[(rii<i<n VSEQ(r,-))n(n1 < ,-< n VSEQ(r/))]nVSEQ(J) =VSEQ(C, {r,- | 1 < i < n} U {r/ | 1 < i < n}, X, S, f). Hence, T is (X\ U X2)-representable. Now assume T is (X iU X ^-representable, i.e., V SEQ (T)=V SEQ (T') for some (Xi U X2)-CCSS T'=(C , S ', X, S, f). Since both Xi and X2 contain cr<u>, there exists a non-empty subset E» of X* (i = 1, 2) such that E' U {cr<i/>} = Ei U S 2. For i — 1 and 2, let a * be the constraint defined by VSEQ(<7;)=n<re£eVEEQ(<7). 'Since Xi and X2 are closed under arbitrary intersection, < J\ is in Xi and cr2 is in X2. Thus, the constraint a defined by VSEQ(cr)=VSEQ(cri) H VSEQ(cr2) is in Xi A X2. Hence, VSEQ (T)=V SEQ (T') =VSEQ(C) n VSEQ(E') n VSEQ(X) =VSEQ(C) D (VSEQ(E')n VSEQ(o - <[7>)) n VSEQ(X) =VSEQ(C) n VSEQ(E' U {< x <!7>}) n VSEQ(X) =VSEQ(C) n (VSEQ(E1)n VSEQ(E2)) n VSEQ(X) =VSEQ(C) n (VSEQCcri) n VSEQ(cr2)) n VSEQ(X) =VSEQ(C) n VSEQ(cr) n VSEQ(X) =VSEQ(C, {a}, X, S, f). Thus, T is (Xi A X2)-representable, whence the proof. □ 55 Although not shown here, it can be proved th at Lemma 3.3 and Lemma 3.4 can be generalized to any finite number of families of constraints closed under arbitrary intersection and containing <J<u>• We are now ready to characterize when a CCSS is (CCk U C A) - represent able. Our result states that a CCSS T is (CCk U C.4)-representable iff the set of valid sequences defined by T is not changed when all constraints in T are replaced by a ^-context local and a context-autonomous constraint “derived” from VSEQ(T). T h eorem 3.2. Let T=(C, E, X, S, f) be a CCSS over <U>. Then T is (CCkUCA)- representable for some k > 1 iff VSEQ(T)=VSEQ(C, { ^ (V S E Q C T )), < rc>l(VSEQ(X))}, J , S, f). Proof. Both CCk and CA contain < r<u>- Furthermore, by Propositions 2.2 and 2.4, CCk and CA are closed under arbitrary intersection. Hence, by Lemma 3.4, (1) T is (CCk U C^4)-representable iff it is {CCk A C^4)-representable. By Lemma 3.3, (2) CCk A CA is closed under arbitrary intersection and contains cr<u>; and (3) VSEQ(crC £ fcA C ^(V SEQ (T))) = VSEQ(<7C £fc(VSEQ(T))) n VSEQ(crc^(VSEQ(X))). By (2) and Lemma 3.2, T is {CCk A CA )-represent able iff VSEQ(T) = VSEQ(C, { ^ ^ ( V S E Q t T ) ) } , X, S, f) 56 = VSEQ(C) D VSEQ(<TC£*A C - /i(VSEQ(T))) n V SEQ (J) = VSEQ(C)n VSEQ(<xC ;C *(VSEQ(T))) n V S E Q ^C V S E Q C T ))) n VSEQ(Z), by (3) = VSEQ(C)nVSEQ({erC£k(VSEQ(T)), < x c>l(V S E Q (r))})nV SE Q (J) = VSEQ(C, {< rc^(VSEQ(r)), ac^(VSEQ(T))}, J , S, f). Combining this with (1), it follows that T is {CCk U CA )-represent able iff VSEQ(T)=VSEQ(C, {crC£k(VSEQ(T)), crc^(V SEQ (T))}, J , S, f). □ By Propositions 2.3 and 2.5, the condition in the statem ent of Theorem 1 3.2 is equivalent to VSEQ(T)=VSEQ(C, { < 7 1, < 72}, X, S, f), where VSEQ(<ri)= U m ^ f c (Interval(VSEQ(T))) and VSEQ(e72) = S f (Ton/ (Interval(VSEQ(T)))). Recall the constraint < j\ in the CCSS T introduced in Example 2.2. Clearly, crx is 2-local. By Proposition 2.1, ax is 2-context local. Thus, T is a (CC2 UCA)- CCSS and therefore is {CL 2 U C.4)-representable. Using Theorem 3.2, we now show that T is not (1 CC1 U C^4)-representable. I Example 2.2 (continued). To see that T is not (C£1UC>l.)-representable, let w j= (l, Smith, 80000, 11/07/86, 80000) and u2=(2, Robinson, 18000, 01/10/87, 18000). I As shown in the example following Theorem 3.1, (1) uxu 2 is in VSEQ(T), (2) u 2ux is in 5 j3(T<?n/(Interval(VSEQ(T)))) and (3) u 2ux is in VSEQ( < /> , < E > , {eYAT}) n VSEQ(X). By (1), u 2ux is in U m f^ In terv a^ V S E Q fT ))). Combining this with (2) and (3), 57 it follows that u 2u 1 is in V S E Q ((< /> ,< E > ,{ey ,4r} ), {01, cr2), X, Dom(GN), f), where < 7 \ is defined by VSEQ(cri)=V’ m t^ > 1(Interval(VSEQ(T))) and cr 2 is defined by VSEQ((T2)=5'y°(Xon/(Interval(VSEQ(T)))). As already noted, u 2u\ is not in VSEQ(T). Hence, the condition in the discussion following Theorem 3.2 does not hold. Thus, the condition in Theorem 3.2 does not hold. Therefore, T is not j I {CC1 U CA)- represent able. □ We now present a condition under which a CCSS is context-local repre sentable. This result is analogous to the characterization of local representability for a CSS shown in [GT1] and states th at a CCSS T is context-local representable iff a certain constraint defined from VSEQ(T) is context local. Note that since CC is neither closed under arbitrary intersection (proof om itted) nor known as the union of a finite number of families of constraints closed under arbitrary in- i tersection, none of the previous results apply. T h e o re m 3.3. Let T=(C, E, X, S, f) be a CCSS. Then T is context-local repre sentable iff & Jma is context local. i Proof. To see the “if” part, assume that crjma is ^-context local for some k > 1. By the fact that VSEQ(<7jm0)CVSEQ(<7£r) and Lemma 3.1, VSEQ(T)=VSEQ(C, X, S, f). Thus, T is CCk- representable. Hence, T is C£-representable. For the “only if”, assume T is CCk-representable for some k > 1. Let j I p=max{p(C), &}+l. It suffices to prove that crjma is p-context local. By the Corol lary to Proposition 2.3 and the fact that VSEQ(<rJno)=Interval(VSEQ(T')), it is 58 enough to show that V m t^(Interval(V SE Q (T )))=Interval(V SEQ (T)). Clearly, Interval(VSEQ(T)) C V m ^ p(Interval(VSEQ(T))). For the reverse containment, it suffices to show that i (1) y m tg (In terv al(V S E Q (T ))) C Interval(VSEQ(T)) for each n > 0. By definition, Fm ^°p(Interval(VSEQ (T))) = Interval(VSEQ(T)). Continu ing by induction, suppose (1) holds for some nonnegative integer n. Consider each u in F m < ^^(In terv al(V S E Q (F ))). Suppose u is in V m t^(Interval(V S E Q (T ))). Then u is in Interval(VSEQ(T)) by induction. Now suppose there exist u\ and t£2 in V m i^(Interval(V SEQ (!T))) such that 0 ^ Int £ (tt) C 7nt^({u1,U2}). Then In tf p(u) C In tf p{{ui,u2}) C /n ^ (y m 4 ^ (In terv al(V S E Q (T )))) = Jn^(Interval(V SE Q (T ))), by Lemma 2.1 (c) C Interval(VSEQ(T)). Let v be the largest prefix of u such that ||u||/ — p — 1. Since v is in Int^(u), v is in Interval(VSEQ(T)). Hence, there exist {fi and v 2 such th at V 1VV 2 is in VSEQ(T). Since VSEQ(jT) is prefix closed, v{v is in VSEQ(T). Therefore, (2) In tffa v ) C Interval(VSEQ(T)) and (3) v{v is in VSEQ(T). j I By the definition of v, Intl(v 1u)= In t^viv) U Int*p(u). This with (2) and the fact th at Int^iu) C Interval(VSEQ(T)) imply i 5 9 (4) Intf(viu) C Interval(VSEQ(T)). By (4) and the fact that Interval(VSEQ(T)) C VSEQ(C), I n t ^ u ) C VSEQ(C). Since each element in Int^(viu) is of length at least p > p(C) + 1 and VSEQ(C) is interval closed, it follows th at each interval of viu of length p(C) + 1 is in VSEQ(C). Thus, (5) v\u is in VSEQ(C). Since Interval(VSEQ(T)) C V m f^p(Interval(VSEQ(X))), it follows from (4) and Lemma 2.1 (b) that v\u is in Vin<~p(Interval(VSEQ(T))). Let er0 be the constraint defined by VSEQ(<70) = E m ^ p(Interval(VSEQ(T'))). Then, (6) x> iu is in VSEQ(<7o). By (3) and the definition of v, (7) vtu is in V SEQ (J). By (5), (6) and (7), it follows that ; (8) vxu is in VSEQ(C, {<r0}, X, S, f). ! Since T is C £f c -representable and p > k, T is C£p-representable. By (a) of Theorem | I 3.1, VSEQ(T)=VSEQ(C, {cr0}, X, S, f). By this and (8), it follows th at v{u is in j i VSEQ(jT). Therefore, u is in Interval(VSEQ(T)). Thus, each u in y m i^ pt '1\lnterval(V SE Q (T ))) is in Interval(VSEQ(X)) and the induction is extended. Hence, (1) holds for all n > 0. □ j We conclude the chapter by showing that the research-funding-history CCSS introduced in Chapter 2 is not context-local representable (and thus not k-context 60 local representable for all k > 1). Example 2.2 (continued). Assume that T is context-local representable. By The orem 3 .3 , crjma is context local. Thus, crjma is k-context local for some positive integer k. By the fact th at VSEQ(cr^na)=Interval(V SEQ (T)) and the Corollary of Proposition 2 .3 , it follows that (*) ym i^(Interval(V S E Q (T )))= Interval(V S E Q (r)). For 2 < i < k, let ut -=(i, p*, a ,, d,-, p,), where (i) pi is in Dom(PI), d8 is a date in 1987, a* and are positive integers, (ii) g& 2 = j/2 and (iii) for each 2 < j < k — 1, yj+i = yj 4- a j+ i and dj C dj+ 1. Let u i= (l, Smith, 80 0 0 0 , 1 1 /0 7 /8 6 , 80 0 0 0 ) and u = (l, Robinson, 18000, 0 1 / 1 0 / 8 8 , 18000). It is easily verified th at the sequences Ut = uiu 2 ... Uk and u 2 = u 2 ... UkU are in VSEQ(T). Furthermore, ||o i||/ = ||7721|/ — k — 1. Hence, the sequence uiu is in V rmty^i .(Interval(VSEQ(T))). However, u\u is not in Interval(VSEQ(T)) because it is not in VSEQ(<72). Thus, (*) does not hold, a contradiction. Therefore, T is not context-local representable. □ 61 4 T h e E x te n d e d R ep re se n ta b ility P ro b lem The representability problem discussed so fax has been focused on keeping the computation scheme and the initialization in a CCSS unchanged. However, this is not the only way that a given set of object histories can be defined by a CCSS having only context-related constraints. In the present chapter we examine the situation when the computation scheme and initialization are allowed to change, i.e., conditions under which a set of object histories specified by a CCSS can be specified by another CCSS having only context-related constraints, with the same context but possibly different computation scheme and initialization. Our major results are characterization theorems for such CCSS. To motivate our study, we return to the research-funding-history CCSS in troduced in Chapter 2. Example 2.2 (continued). As noted when T was defined, cr2, < 73 and a 4 are context autonomous but a\ is not. And in Chapter 2 it was shown th at T is not context- autonomous representable. We now show th at there exists a CCSS T'=(C', i J ', Dom(GN), f) such th at VSEQ(T’ )=V SEQ (T') and £ ' contains only context- autonomous constraints. Consider the CCSS T'={ ( < /> , <E>, {eYAT}), {cr2, cr3, < r4}, X, Dom(GN), I / ) where eYAT is the function defined for all u in D om (<£/>), g in Dom(GN), p in Dom(PI), a in Dom(AMOUNT) and d in Dom(DATE) as follows: 62 eyAr(u, g, p, a, d)=u(Y A T )+a if u(DATE) and d are in the same year and u(DATE) C d = a if u(DATE) and d are not in the same year and u(DATE) [I d undefined otherwise. Clearly, VSEQ(T/)=VSEQ(3n). However, T' has only context-autonomous con straints. □ The above example suggests that a CCSS having some constraints which are not context related may sometimes be replaced by another CCSS with (i) the same context but possibly a different computation scheme and a different initialization and (ii) only (one type of) context-related constraints. Formally, such a replacement is defined as follows: D e fin itio n . Let X be a family of constraints over <U> and r a positive integer. A CCSS T=(C, E, X, S, f) over <U> is r-e x te n d e d .X -rep resen tab le if there j exists an X-CCSS r'= (C ', E', T , S, f) of rank r such that VSEQ (T)=V SEQ (T'). A CCSS is e x te n d e d X -re p re s e n ta b le if it is r-extended X-representable for ! some r. In particular, the CCSS T in the above example is 2-extended context- autonomous representable. Clearly, each X-representable CCSS is extended X-representable. I In the rem ainder of this chapter, we shall present conditions under which a 63 CCSS is r-extended (extended) ^"-representable, with T being CLk, CA, CLkUCA, CL U CA, and CL. Our first m ajor result, Theorem 4.1, concerns r-extended CLk (CLk U CA, CA) representability. To derive this, we need some auxiliary concepts plus three lemmas. The first lemma is a variation of Lemma 2.2 of [GT2] and states that for each _A_ CCSS T and each integer r > p(T), a CCSS T of rank r can be found such that VSEQ(T)==VSEQ(jT). Before specifying the CCSS f , we need: N o ta tio n . For each CCSS T=(C, E, I , S, f) and each integer r > p(T), let Xr T={u in VSEQ(T)| | u |< r}. Thus, Xj. contains all com putation-tuple sequences in VSEQ(T) of length at most r. It follows from the definition that VSEQ(2J+1) C VSEQ(Z^). A We are now ready to define the CCSS T. N o ta tio n . For each CCSS T={C, E, X, S, f) over <U> = <I><E> and each integer r > p(T), let T = ( ( < /> , <E>,£), E, Xj, S, f) be as follows: £={£c | C in j E}, where ec is the (partial) function from D om (< f/> )’ ' x Dom(<I7 | C>) into Dom(C) defined by i e c (w i,...,« r_ p c , U i,...,Upc,Upc+1[<U I C>}) = ec {ux, ... ,uPc,u Pc+l[<U I C>}). ! I for each u[ , ..., u, r_pc,u1, ..., uPc+i in D om (<£/>). ! Thus T is essentially T, with the evaluation functions “padded” to include 64 A the previous r computation tuples. Clearly, T depends on the specific r chosen. A Note th at every evaluation function in S has rank r. L e m m a 4.1. For each CCSS T = (C, E, X, S, f) and each integer r > p(T), V SE Q (f)= V SE Q (T ). □ The proof is essentially the same as that of Lemma 2.2 in [GT2] and so is om itted. Since the CCSS in Lemma 4.1 have the same constraints, it immediately follows th at if a CCSS is r-extended X"-representable, then it is /-extended T- representable for each I > r. We now recall the notion of a “skeleton computation scheme of rank r ” (ab breviated “skeleton of rank r ”), an idea first introduced in [GTi]. D e fin itio n . Let T =((<J51 ... B m>, <C\ .. .Cq>, {ec* | 1 < * < <?}), E, X, S, f) be a CCSS. For each integer r > p(T), the sk e leto n c o m p u ta tio n schem e o f ra n k r fo r T (abbreviated sk e leto n o f ra n k r for T ) is the CS Cj = (< B i . . . B m>, < C i . . . Cq>, {eQ. | 1 < i < 9}) where e^., 1 < * < q, is the partial function from D om (</7>)r x Dom(</7|C';>) into Dom((7,) defined for each u i,..., ur in Dom(<Z7>) and (6j , ..., bm, c1?..., c*_i) in Dom (</7 | C{>) as follows: (a) If there exist c*,..., cq in Dom(C,), ..., Dom(C'g) such that the sequence Mi... ur(biy..., bm, ci,..., cq) is in Interval(VSEQ(X)), then ^Ci(^1 ? * * * ? ' U ' t5 b\,..., bm, ct ,..., 1) Ci. 65 (b) Otherwise, er c .{u\,..., uT, 61,..., bm, Ci,..., c;_ 1) is undefined. Since r > p(T), it follows that for each 1 < * < q, the c ,- in Dom(C'j) for which ui ... uT{b% ,..., 6m,ci,..., cg) is in Interval(VSEQ(T’ )) is uniquely defined. [Otherwise, some evaluation functions in {ec* | 1 < i < < ? } of T would not be well-defined.] Therefore, each evaluation function er c ., 1 < i < q, is well-defined and of rank r. Hence, the skeleton of rank r for T is well-defined. By definition, VSEQ(Cy)={u in SEQ (<£/>) | | u |< r} U {u | each interval of u of length r + 1 is in Interval(VSEQ(T))}. Using the notion of “skeleton”, we now introduce a CCSS which plays a central role in the sequel. N o tation . For each CCSS T=(C, E, X , S, f) and each integer r > p{T), let Tr denote the CCSS (CJ., E, 2 J, S, f). Our second lemma is a variation of Lemma 3.2 in [GTi] and states that VSEQ (T)=VSEQ(Tr) for each CCSS T and integer r > p(T). ' L em m a 4.2. For each CCSS T=(C, E, X, S, f) and each integer r > p(T), VSEQ(T)=VSEQ(Xr). The proof of this result is essentially the same as that of Lemma 3.2 in [GTi] and so is omitted. Using Lemma 4.2, we now present our third lemma. This result charac terizes the r-extended X’ -representability problem of a CCSS T in terms of the i Xr-representability problem of Tr. 66 L em m a 4.3. Let T be an arbitrary family of constraints, T=(C, E, X, S, f) a CCSS, and r an integer such that r > p(T). Then T is r-extended ^"-representable iff Tr is X"-representable. Proof. By Lemma 4.2, the “if” is obvious. Consider the “only if” . Thus sup pose T=(C, E, X, S, f) is r-extended ^"-representable, i.e., V SEQ (T)=V SEQ (T/) for some JF-CCSS T'={C , S', X', S, f) of rank r. It suffices to show that VSEQ(Tr)=VSEQ(Cy, E', Tt , S, f). Since VSEQ(Xr) C VSEQ(Cf) n VSEQ(X£) and VSEQ(Xr) =V SEQ (T), by Lemma 4.2 = VSEQ(T')> by assumption C VSEQ(E'), by definition, we have VSEQ(Tr ) C VSEQ(CJ) n VSEQ(E/) n VSEQ(X£) = VSEQ(Cy, E', X£, S, f). Therefore VSEQ(Xr) C VSEQ(C£, S ', X£, S, f). Consider the reverse containment. By Lemma 4.1, we may assume th at each i evaluation function in C' is of rank r. This and the fact that V SEQ (T')=V SEQ (T) imply X' = Xy. Thus, (1) V SEQ (T)=V SEQ (£', S ', X£, S, f). By the definition of CJ and the fact that p(C') = r, I (2) VSEQ(Cf) C VSEQ(C'). i Thus, 67 VSEQ(C£, S ', Z f, S, f) C VSEQ(C') n VSEQ(E') fl VSEQ(Z£), by (2) = VSEQ(Z), by (1) = VSEQ(Zr), by Lemma 4.2 That is, VSEQ(Cy, E', ZJ, S, f) C VSEQ(Zr ), whence the equality. □ We are now ready for our characterization theorem on r-extended CCk (CCk U CA,CA) representability. This result states th at a CCSS T is r-extended CCk (CCk U CA, CA) representable iff a certain CCk (CCk U CA, CA) -CCSS derived from Tr defines the same set of valid sequences as th at defined by T. T h eorem 4.1. Let T=(C, E, Z, S, f) be a CCSS and r an integer such that r > p(T). Then (a) T is r-extended C £f c -representable for some k > 1 iff VSEQ(T)=VSEQ(Cy, {cr}, Z^, S, f), where < j is defined by V SEQ (cr)=V m i^f c (Intervcil(VSEQ(T))); (b) T is r-extended C./4-representable iff VSEQ(T)=VSEQ(Cy, {cr}, Zy, S, f), where a is defined by VSEQ(cr)=5'^°(Zon/(Interval(VSEQ(T)))); (c) T is r-extended {CCk U CA)- representable for some k > 1 iff VSEQ(Z) = VSEQ(Cy, {crcck(VSEQ(T)), c r^ V S E Q (T ))} ,Z f, S, f). Proof. Consider (a). By Lemma 4.3, T is r-extended CCk - representable iff Tr is CCk-represent able. By Theorem 3.1 (a), Tr is C £f c -representable iff VSEQ(Tr) = VSEQ(C£, {c 1 l r T, S, f), where VSEQ((7')= ^ * ^ * (In te rv al(V S E Q (T r))). From this and Lemma 4.2, it follows that T is r-extended C £f c -representable iff VSEQ(T) = VSEQ(Cy, {a}, X r T, S, f), where V SE Q (o-)= V m ^f c (Interval(V SEQ (r))); 68 The result in (b) can be proved by an argument analogous to (a) and is thus omitted. Finally, consider (c). By Lemma 4.3, T is r-extended (CZ^U C^-representable iff Tr is {C£k UCyl)-representable. By Theorem 3.2, Tr is {CCk UC*4.)-representable iff VSEQ(Tr ) = VSEQ(Cj., {a-C£*(VSEQ(Tr)), ^ ( V S E Q ^ ) ) } , 2£, S, f). From this and Lemma 4.2, it follows th at T is r-extended (CCk U CA)-represent able iff VSEQ(T) = VSEQ(C£, {crc^ (V S E Q (r)), < j ca(VSEQ(T))}, Xr T, S, f). □ Using Theorem 4.1 (b), we now show that the checking-account CCSS intro duced in Chapter 1 is not extended context-autonomous representable (and thus not context-autonomous representable). Example 1.1 (continued). Suppose the CCSS T is extended context-autonomous I . . . ■ representable. By definition, T is r-extended context-autonomous representable for some r. By the discussion following Lemma 4.1, we may assume r = 2k for some k > p(T ). Let u0=(D EPO SIT, 3000, 0.00017, 03/27/90, 0, 0, 3000), «i= (IN T , 0, 0.00017, 03/27/90, 0, 0, 3000), u2=(CH ECK , 100, 0.00020, 03/28/90, 2900, 0, 2900), u3=(CH ECK , 300, 0.00020, 03/28/90, 2600, 0, 2600), m 4=(CH ECK , 900, 0.00020, 03/28/90, 1500, 0, 1500), «s=(IN T , 0, 0.00020, 03/28/90, 1500, 0.30, 1500.30) and u6=(IN T, 0, 0.00020, 03/29/90, 1500.30, 0.30, 1500.60). 69 Also, let ^ = (D E P O S IT , 1500, 0.00018, 03/27/90, 0, 0, 1500), «i= (IN T , 0, 0.00018, 03/27/90, 0, 0, 1500), u'2=(IN T , 0, 0.00020, 03/28/90, 1500, 0.30, 1500.30) and t&=(CHECK, 500, 0.00017, 03/30/90, 1000.60, 0, 1000.60). Finally, let «=(D EPO SIT , 100, 0.00020, 03/29/90, 1500.30, 0, 1600.30) and w'=(W ITHDRAW , 100, 0.00020, 03/29/90, 1500.30, 0, 1500.30). By definition of T, it follows th at the sequences Wi=u0 • • • u 5(uu')ku& and u 2=u/ 0 u/ 1u, 2 (uu,)kueu , 3 are in VSEQ(T). This implies that the sequence uiu 3 is in both I (1) S f (Xo7 v(Interval(V SEQ (T)))) and (2) VSEQ(Cy) n VSEQ(Jy). I By (1) and (2), U\U 3 is in VSEQ(Cy, {cr}, Z f, Dom(DATE), f), where cr is defined by VSEQ(«r)=S'^°(i/OU/(Interval(VSEQ(T)))). However, uiu '3 is not in VSEQ(T) since it is not in VSEQ(<j3). Thus, the condition in Theorem 4.1 (b) does not hold, a contradiction. Therefore, T is not extended context-autonomous representable. □ We now turn to our second m ajor result, Theorem 4.2 below. This character- j izes when a CCSS is extended ^-representable, with T being CCk, C*4, CCk UCA, j C£ U CA, and CC. We start by providing a necessary and sufficient condition for 70 a CCSS to be extended ^-representable. iL em m a 4.4. Let T be a family of constraints over <U> containing c r< u> and T —{C, E, X , S, f) a CCSS over <U > . Then T is extended ^"-representable iff it ■ is (T U £<i7>)-representable. Proof. To see the “if” part, assume that T is {T U £<[/>)-represent able, i.e., V SEQ (T)=V SEQ (T/) for some ( f U £ <t/>)-CCSS T'=(C, E', T, S, f). Since both T and £<t/> contain cr< u >, there exist non-empty finite sets S i C / and E 2 C C<u> such that E'U{cr< C 7 >} = ExUE2. Clearly, VSEQ(T)=VSEQ(TO=VSEQ(C, l Ei U E 2, X, S, f). Since S 2 is a finite set of local constraints, we may assume each constraint in S 2 is k-local for some k > p{C). Let C = (< /> ,< E > , {ec | C in E}) be the CS where, for each C in E, ec is defined for each Uj,..., u'r_pc, ..., u P c + 1 in D om (<{/>) as follows: ec(tfi,..., u k - p c ‘ > U i '> • • • * u p c i llp c + | C>]) = ec {ui,... ,uPc,uPc+1[<U | C>]) if u, 1...u'k_pcu 1...uPc is in VSEQ(C) fl VSEQ(E2) undefined otherwise. Clearly T =(C , E i, Z£, S, f) is an X"-CCSS of rank k over <U>. It is easily seen ! (proof om itted) that VSEQ(T)=VSEQ(C, E x U S 2, X, S, f)=V SEQ (T). Thus, T is £-ext ended X’ -represent able, whence extended X-representable. For the “only if”, assume T is extended jF-representable. By definition, T is I 1 r-extended T -representable for some r. By the discussion following Lemma 4.1, we I 71 may assume r > p(T). By Lemma 4.3, Tr is ^"-representable. Thus, there exists an T -CCSS 2i=(CJ., S i, X£, S, f) such that V SEQ (Ti)=V SEQ(Tr). Combining this with the fact that VSEQ(T)=VSEQ(Tr), it follows that VSEQ(T1)=V SEQ (T). Let T=(C , S i U {<Ji,..., 0>+i}, X, S, f), where d-j, 1 < i < r + 1, is defined by VSEQ(<t,)={u in SEQ(<U>) | | u |< * - 1} U {« | each interval of u of length i is in Interval(VSEQ(T))}. Clearly, each &i, 1 < i < r + 1, is *-local. Furthermore, (1) VSEQ(<rr+1)=V SEQ(Cf) and (2) VSEQ(T) C VSEQ(o-i) for all 1 < i < r + 1. Since S i is a finite subset of X ", it follows that T is a (X"U£<;u>)-CCSS. It remains to show VSEQ(X)=VSEQ(T1). To see that VSEQ(T) C VSEQ(Xi), let u be a sequence in VSEQ(X'). Two cases arise. Case 1. | u |< r. By the definition of T , u is in Interval(VSEQ(X)) and VSEQ(X). Thus, u is in VSEQ(T)=VSEQ(Xi). Case 2. | u |> r. Then u = U 1U 2 for some Ui, u 2 with | ui |= r. Since VSEQ(T) -is prefix closed, ui is in VSEQ(T). By Case 1, ui is in VSEQ(T) and thus is in Xy. Hence, (3) u is in VSEQ(Xj-). Since u is in VSEQ(X), (4) u is in VSEQ(<rr+i) and 72 (5) u is in VSEQ(Ei). By (4) and (1), it follows that (6) u is in VSEQ(Cy). Combining (3), (5) and (6), it follows that u is in VSEQ(Ti). In both cases, u is in VSEQ(7\) as desired. Hence the containment. Now consider the reverse containment, i.e., VSEQ(Ti) C VSEQ(T). By def inition, VSEQ(Ti) C VSEQ(Ei). Since V SEQ (7\)=V SEQ (T), it follows that VSEQ(Ti) C VSEQ(C) n V SEQ (J). By (2), VSEQ(Ti) = VSEQ(T) CfiKKr+1 VSEQ(<jt -) = VSEQ({di,..., ^ + 1}). Therefore, VSEQ(Ti) C VSEQ(C) n VSEQCEi) n VSEQ({^X , . . . , *r+a}) n VSEQ(X) = V S E Q (f). ! Thus, VSEQ(Ti) C VSEQ(T), whence the equality. □ 1 It immediately follows from Lemma 4.4 that if a family of constraints T j contains the family of local constraints, then a CCSS is extended .F-represent able iff it is ^-representable. We are now ready for the characterization theorem. This result asserts that each of our extended representability problem is equivalent to a “related” rep- resentability problem. In particular, a CCSS is extended context-local repre- 73 sentable ((CCUC^4)-representable) iff it is context-local representable ((CCUCA)- representable). T h e o re m 4.2. Let T=(C, £ , X, S, f) be a CCSS over <U>. Then I (a) T is extended (CC U C.A)-representable (C£-representable) iff it is (CC U C*4)-representable (££-representable). (b) T is extended context-autonomous representable iff it is (C*4 U £<t/>)~ representable. (c) T is extended (CCk U CA)-representable (C£f c -representable) for some k > 1 iff it is (CCk U CA J £<[/>)-representable ((CC L J -£<cc/>) representable^. Proof. Consider (a). By definition, the “if” part is obvious. For the “only if”, assume T is extended (C£UC.4)-representable. Since < r<u> is in C£uC^4, it follows from Lemma 4.4 that T is (CC U CA U £<f/>)-representable. By Proposition 2.1, I £<[/> C CC. This implies that T is (C£UC^4)-representable. Hence, T is extended I (CC U C>l)-representable iff it is (CC U C.4)-representable. j » Similarly, we can show that T is extended C£-representable iff it is CC- representable. ; The results in (b) and (c) follow simply from Lemma 4.4, and their proofs are therefore omitted. □ I I I Finally, recall the research-funding-history CCSS T introduced in Chapter | 2. As was shown in Chapter 3, T is not context-local representable. By (a) of Theorem 4.2, T is therefore not extended context-local representable. 74 5 T h e C o n te x t S ch em e So far, we have focussed our study on conditions under which a CCSS can be replaced by another CCSS having the same context scheme and only context- related constraints. In the present chapter, we turn our attention to the design of context schemes in CCSS. Specifically, we shall examine how a CCSS of interest can be defined from a given CSS by selecting an appropriate context scheme. The m ajor questions addressed are (i) conditions under which a CCSS of interest can be defined from a given CSS, and (ii) strategies for creating desirable context schemes from existing context schemes. To m otivate our study, we return to the limited check-writing plan introduced in Example 1.1. Example 1.1 (continued). As was shown in previous chapters, the CCSS T=(C, E, X, Dom(DATE), / ) for the limited check-writing plan is context-local rep resentable but not (extended) context-autonomous representable. The question arises as to whether there is a CCSS (C, E, X, S', / ') which is both context-local representable and context-autonomous representable. We now show that such a CCSS does exist. Consider the CCSS T=(C, E, X, S, / ) , where S is the set of all pairs (month, iyear) and / is the total function from Dom(<{7>) onto S defined for each u in Dom(<?7>) by / ( u )= (month of u(DATE), year of u(DATE)). 75 Clearly, T is a CCSS over <U> and V SE Q (T )= V SE Q (f). We now prove that f is both context-local representable and context-autonomous representable. To see that T is context-local representable, let T2=(C, {<ri, < 7 5 , Os'}, X, Dom(DATE), / ) be the C £31-CCSS introduced in the example at the beginning of Chapter 3. Let T'=(C, {<ti, 0% ^ 3}, S, / ) . Clearly, T' is a CCSS over <U> and VSEQ(T/)=VSEQ(T2)=V SE Q (r)=V SE Q (T 1 ). It suffices to show that each constraint in T' is context local with respect to (< [/> , S : / ) . Since < j\ is 1-local and Wi is 2-local, it follows from Proposition 2.1 that both < 7 ! and o > T are context A A local with respect to (<U>, S, /) . Also, it is easily seen that ai is 2-context local I t A A _ A _ ! with respect to (<U>, S , / ) . Thus, each constraint in T' is context local with ' respect to (<U>, S , / ) . Hence, T is context-local representable. To see that T is context-autonomous representable, it suffices to show that each constraint in E is context autonomous with respect to (<U>, S, / ) . Clearly, A A I < j3 is context autonomous with respect to (< £/> , S, / ) . Consider cr2. Since every two transactions on the same day axe obviously in the same month, < r2 can be stated as “every two transactions on the same day in each m onth must have the same RATE-value”. This implies that < r2 is context autonomous with respect to (<U>, 5, / ) . Similarly, < 7 i is also context autonomous with respect to (<U> , S , / ) . Hence, each constraint in E is context autonomous with respect to (< £/> , S, / ) . Therefore, T is also context-autonomous representable. □ The above example illustrates that a CCSS with a desirable property, e.g., 76 context-autonomous representable, can sometimes be defined from a given CSS by choosing an appropriate context scheme. In the remainder of this chapter, we shall consider (i) conditions under which such appropriate context schemes exist, and (ii) strategies for creating desirable context schemes from existing context schemes. « Our first m ajor result, Theorem 5.1 below, characterizes a condition under which a context-local (context-autonomous) representable CCSS can be defined . from a given CSS. To derive this, we need the following concept plus two lemmas. D efin ition . Let (<U>, Si, fi) and (< £/> , S2, / 2) be two context schemes. Then (<U > , Si, f \ ) subsum es (<U>, S2, f 2) (denoted (<U>, Si, f i )— ►(<£/>, S2, / 2)) if, for all tuples u and u' in D om (<{/>), fi(u) = /i(w ') implies that M u ) = M u l - Intuitively, (<U > , Si, fi) subsumes (<U> , S2, / 2) if each context defined by (<U>, Si, f i ) is contained in a context defined by (<U>, S2, / 2). In this sense, (<U>, Si, fi) is a “refinement” of (<U>, S2, / 2). In the example at the beginning of this chapter, (< £/> , Dom(DATE), f ) — *(<U>, S, / ) since all tuples with the same date value are in the same m onth and year. It is easily seen th at the above relationship between two context schemes is reflexive and transitive. Furthermore, it is also “antisym m etric” in the sense that (<U>, Si, fi)~*(<U>, S2, / 2) and (<U> , S2, f 2)~*(<U>, Si, fi) implies there i I exists a one-to-one mapping g from Si onto S 2 such th at M u ) = 9( M U)) f°r each 77 u in Dom(<U>). Clearly, (<U>, Si, fi) — *(<U>, S2, f 2) implies that ||w||/2 < Hwll/, for each u in SEQ(<17>). This leads to the first lemma. L e m m a 5.1. Let (<U> , Si, fi), i = 1, 2 , be context schemes such th at (< {/> , / 1) — ► (<U>, S2, f 2). Let It be a sequence in SEQ(< £/> ) and k a positive integer. Then (a) Int{l(u) = I n t ^ I n t ^ f u ) ) if ||u ||/2 > k — 1 and (b) Lon/j (u) = Lon/, (Lonf 2 (it)). 3roof. Consider (a). Since Int{ 2 (u)CInterval(F), it follows that In ti 1 (Inti 2 (u)) C 7ni{l (Interval(lt)) = Int^ifu). Thus, Intp(Int£(u)) C Int^(u). \ For the reverse containment, let u' be an arbitrary element in Inti 1 (u). Since WWh — k — 1 and (<U>, Si, fi) — >(<f/>, S2, f 2), it follows th at ||u/||/2 < k — 1. from this and the fact that ||n ||/2 > A r — 1, there exists w in Int^iu ) such that vf is an interval of w. Thus, v! is in Int^(w ) C In t^ (Int^(u)) as desired. | Turning to (b), we first show that Lon^iu) C Lonft {Lonf 2 {u)). To this end, ! ! et vf be an arbitrary element in L o n (H). Since (< £/> , Si, fi) — *(<U>, S2, f2), it follows th at \\u'\\f2 = 0. Thus, there exists w in Lonf 2 (u) such th at vf j is a subsequence of uJ. From this and the assumption that vf is in Lonj 1 (w), it follows th at u' is in Lon^iw). This implies that vf is in Lonfx(Lon/2(u)). Hence, Lon^iu) C Lon/,(X on/2(w)). I For the reverse containment, let u' — . . . U i k , k > 1, be an arbitrary element in Lonfx(Lon/2(u)). Thus, there exists w in Lon/ 2(u) such th at u' is in Lonf 1 (w). Since (<U>, Si, fi)-*(<U>, S 2 , h ) and w is in Lon^(u), each tuple u in u such that fi(u) = /i( u 4l) is in w. From this and the fact that u' is in Lonfo(w), it follows th at u' is in Lon^iu). Thus, Lonj,(Lonf 2 (it)) C L o n (u), whence (b) holds. □ We now turn to the second lemma. This result asserts th at if a constraint cr is ^-context local (context autonomous) with respect to a context scheme (<U>, Si, fi), then a is fc-context local (context autonomous) with respect to all context schemes (<U>, S 2, fz) such that (<U>, S\, fi) — > (<U>, S 2 , /?)• L e m m a 5.2. Let (<U>, Si, fi) and (<U>, S 2, / 2) be context schemes such that (<U>, Si, f i ) -> (<U>, S2, f 2). Then (a) each k-context local constraint with respect to (<U>, Si, fi) is also k-context local with respect to (<U>, S 2, ^2); and (b) each context-autonomous constraint with respect to (<U>, Si, f i ) is also context autonomous with respect to (<U>, S2, / 2). m Proof. Consider (a). Let a be a k-context local constraint with respect to (<U>, Si, fi). To see th at a is k-context local with respect to (<U>, S2, f 2), let u be an arbitrary sequence in SEQ(<U>) such that 0 7^ Int^{u) C VSEQ(cr). It suffices to show that u is also in VSEQ(cr). Since a is uniform, Interval(Int^(u)) C VSEQ(cr). From this and the fact that Int^{Int^(u)) C Interval(/nt{2(u)), it follows that In t ^ 1 (Inti 2(u)) — VSEQ(cr). Combining this with Lemma 5.1 (a) 79 and the fact that IntJ?(u) 0, it follows that 0 ^ I n t ^ u ) C VSEQ(cr). Since cr is k-context local, u is in VSEQ(cr) as desired. Turning to (b), let cr be a context-autonomous constraint with respect to (<U>, Si, ft). To see th at a is context autonomous with respect to (<U>, S2, ff)-) let u be an arbitrary sequence in SEQ (<£/>). It suffices to show that u is in VSEQ(cr) iff Lonh (u) C VSEQ(<r). i Assume th at u is in VSEQ(ct). Since cr is context autonomous with respect to (<U>, Si, / 1), it follows that Lonmin) C VSEQ (cr). Consider each vf in Lonf2(u). Clearly, Longin') C Lonfx(Lonf2(u)) \ — Lon/,(« ), by Lemma 5.1 (b) C VSEQ(cr). | This and the fact that cr is context autonomous with respect to (<U>, Si, ft) imply th at uf is in VSEQ(cr). Thus, Lonj2(u) C VSEQ(cr). Now assume that Lonf2(u) C VSEQ(cr). Since cr is context autonomous with respect to (<U> , Si, ft), Lonfx(Lonf2(u)) Q VSEQ(cr). From this and Lemma i j 5.1 (b), jLon/j(u) C VSEQ(cr). This implies that u is in VSEQ(cr). Hence, (b) holds. □ It immediately follows from Lemma 5.2 that for two CCSS Tt=(C, E, X, 51, ft) and T 2=(C, E, X, S2, f 2) over <U> such th at (<U>, St, ft)->(<U>, 5 2 , / 2), x2 is CCk (CA, CC, CCk U CA, CC U CA)-GCSS if Tx is CCk (CA, CC, 8 0 CCk UCA, C£UCA, resp.)-CCSS. This implies that T2 is k-context local (CA, CC, CCk U CA, CC U CA) representable if is k-context local (CA, CC, CCk U CA, CC U CA, resp.) representable. Similarly, T 2 is extended k-context local (CA, CC, CCk U CA, CC U CA) representable if T\ is extended k-context local (CA, CC, CCk U CA, CC U CA, resp.) representable. We are now ready for our first m ajor result. This result implies that when i deciding whether a k-context local (CA, CC, CCk U CA, CC U CA) representable CCSS can be defined from a given CSS, attention should be focused on CCSS with a special class of context schemes. T h e o re m 5.1. Let (C, E, X) be a CSS over <U>. Then there exists a CCSS I T —(C, E, X, S, f) such that T is k-context local (CA, CC, CCk U CA, CC U CA) representable iff there exists a context scheme (<U>, {a, 6}, / ') such that the CCSS (C, E, X, {a, 6}, / ') is k-context local (CA, CC, CCk UCA, CC U CA, resp.) representable. Proof. Consider the case for ^-context local representable. By definition, the “if” part is obvious. To see the “only if” part, assume th at there exists a CCSS T=(C, E, X, S, f) which is fc-context local representable. Since 5 is a set of at least two elements, there exist two nonempty sets Si and S 2 such th at SiD S 2 $ and Si U S 2 = S. Let / ' be the total function from D om (< f/> ) onto {a, 6} defined i for each u in Dom(< £/> ) by f'(u)=a if f(u) is in « S i and f'(u)=b if f(u) is in S2. By definition, (<U>, {a,b}, / ') is a context scheme and (<U>, S, f) — * ■ (<U>, 81 {a, 6}, / ') . Combining this with the discussion after Lemma 5.2 and the fact that T is k-context local representable, it follows that the CCSS (C, E, X, {a, 6}, / ') is k-context local representable. By arguments analogous to the above, it can be shown th at the other state ments in the theorem are also true. □ Our second m ajor result, Theorem 5.2, concerns the derivation of a context- local (context-autonomous) representable CCSS from a CSS whose computation scheme is of rank 0. Specifically, this result asserts that a 1-context-local and context-autonomous representable CCSS T=(C, E, X, S, f ) (i.e., there exists a CCSS T'=(C, S ', X, S, f ) such that VSEQ(T)=VSEQ(X') and each constraint in E ' is both 1-context local and context autonomous) can be defined from each CSS (C, E, X) such that p(C)=0 and VSEQ(C)^0. T h e o re m 5.2. Let (C, E, X) be a CSS over <U> such that p(C)=0 and VSEQ(C)^0. Then there exists a context scheme (<U> , S , / ) such th at the CCSS (C, E, X, S, f ) is 1-context-local and context-autonomous representable. i Proof. Consider the sets W \—{u \ u in VSEQ(C)} and W2={u \ u not in VSEQ(C)}. Clearly, (1) lE1UW2=D om (<?7>) and W 1r\W2=$. Since p(C)=0 and the domain of each evaluation attribute has at least two ele ments, From this and the assumption that VSEQ(C)^0, we have j (2) Wx^ 0 and W2^$. 82 Let / be the mapping from Dom(<U>) into {a, 6} defined by f ( u ) = a if u is in Wi and f ( u ) = b if it is in W 2 . By (1) and (2), / is an onto function. Thus, (<U > , {a, 6}, / ) is a context scheme and T —(C, E, X, {a, & }, / ) is a CCSS over <U>. We now show th at T is 1-context-local and context-autonomous representable. To this end, let r be the constraint defined by V SE Q (r)= {u|u in VSEQ(E) and f(u) = a for each u in It}. Clearly, r is uniform and V SEQ (r)=V SEQ (C)nV SEQ (E). This 1 implies that VSEQ(T)=VSEQ(C, {r}, X, {«,&}, / ) . It suffices to show th at r is both 1-context local and context autonomous with respect to (<U > , {«,&}, /) . To see th at r is 1-context local, let u be a sequence in SEQ(<C/>) such ■ th at 0 7 ^ Int{(u) C V SEQ (t). Consider each u in u. Since |ju||/ = 0, u is in jp ^ 1 7nq(u)C V S E Q (r). From this and the definition of r , f ( u ) = a for each u in u. This implies that ||w||/ = 0. Hence, u is in Int{(u). Since Int{(u) C V SEQ (r), u is in V SEQ (t). Thus, r is 1-context local. To see that r is context autonomous, let u be a sequence in SEQ(< £/> ). It suffices to prove that u is in V SEQ (r) iff X on/(¥)C V SEQ (r). For the “if”, assume i that It is in V SEQ (r). From this and the definition of r , it follows that f{u ) = a I for each u in It. Thus, Lonf{u) — {it}. Since It is in V SEQ (r), Lon/(Tt)CVSEQ(r) , I as desired. For the “only if” part, assume that 7ort/(lt)C V SE Q (r). Suppose there exists u in It such that f{u ) a. Then there exist v in Lonj(u ) such that u is ] in v. Since Lon/(lt)CVSEQ(T), v is in VSEQ (r). This contradicts the definition of r. Thus, f ( u ) = a for each u in It. Hence, Lonj{u) = {«}• From this and the I I assumption that £on/(u)C V S E Q (r), it follows that u is in V SEQ (r). Hence, r is context autonomous. □ We now turn our attention to a special type of context scheme called “in ternal” . This type of context scheme is of interest because it arises frequently in real-life applications. Indeed, most of the CCSS occurring in the examples of this thesis have internal schemes. Since internal schemes are simple, easy to define, and natural in a certain sense, they are preferred over non-internal schemes in applications. Our m ajor result, Theorem 5.3 below, characterizes when a context- local (context-autonomous) representable CCSS with an internal scheme can be defined from a CSS. I We begin our discussion with the definition of internal schemes. D e fin itio n . A context scheme (<U>, S, f ) is in te rn a l if there exists a nonempty > subsequence < X > of <U> such that 5=D om (<A ">) and f(u) = u (< X > ) for each u in Dom(< £/> ). An internal context scheme is often denoted by (<U>, Dom(<X>), f< x >) when <X> is known. It is easily seen that (i) (<U>, D om (<I7>), f<u>) — > (<U > , S, f ) for \ I all (<U>, S, / ) , and (ii) (<U > , D om (< A i> ), /<x!>) — ► (<U>, D om (<X 2>), f<x2>) iff <AT2> is a subsequence of <X\>. [Indeed, the “if” part is obvious. 1 For the “only if”, assume that < X 2> is not a subsequence of <ATi>. Thus, there exists an attribute A such that A is in < X 2> but not in <Xi>. Since Dom(A) is a set of at least two elements, there exist u and v! in Dom(<U>) such 84 that u (< X l> ) = uf(< X i> ) but u(A ) ^ u'(A). This implies th at /<Xi>(^) = f<Xi>(u') but f<x2>(u ) 7 ^ f<x 2>(u0> contradicting the assumption that {<U>, D om (<X !>), /< *,> ) - » ■ (< u> , D om (<X 2> ), f<X2>)-] From Lemma 5.2 and (i) in the above, it follows that a constraint cr over <U> is context local (context autonomous) with respect to all the context schemes over <U> iff a is context local (context autonomous) with respect to (<U>, Dom(<{7>), /<£/>). We are now ready for our major result on internal context schemes, namely, a characterization of when a k-context local {CA, CC, CCk U CA, CC U CA, resp.) \ I I representable CCSS with internal context scheme can be defined from a given CSS. T h e o re m 5.3. Let (C, £ , X) be a CSS over <U>. Then there exists a CCSS j T={C, £ , X, D om (< X > ), /< x> ) such that T is k-context local {CA, CC, CCk\JCA, j i CCiJCA) representable iff there exists an attribute A in <U> such that the CCSS ■ i (C, S, X, Dom(<./4>), f<A>) is k-context local {CA, CC, CCkUCA, CCUCA, resp.) representable. I Proof. Consider the case for k-context local representable. The “if” part is obvious. For the “only if”, assume that there exists a CCSS T —{C, S, X, D om (< X > ), | I f<x>) such that T is k-context local representable. Since <X> is nonempty, there exists an attribute A in <X>. Clearly, A is an attribute in <U>. Consider the CCSS T'—{C, £ , X, Dom(<^4>), f<A>)• Since <A> is a subsequence of <X>, ' 8 5 (<U>, D om (< X > ), f < x > ) — * (<U>, D om (<A >), f<A>) holds. Combining this with the discussion following Lemma 5.2 and the fact th at T is k-context local representable, it follows that T' is k-context local representable. The other statem ents in the theorem hold by analogous arguments. □ We conclude this chapter with a result on strategies for creating desirable context schemes from existing context schemes. To derive this, we need some notation plus two technical lemmas. N o ta tio n . Given context schemes (< [/> , Si, f i) and (<U>, S 2 , fi), let / i x / 2 be the function from D om (<£/>) into S 1 XS 2 defined for each u in Dom(<U>) by / i x / 2(u )= (/i(u ), / 2(«)). Clearly, (<U>, S 1 XS 2 , fi x / 2) is a context scheme, i.e., /iX / 2 is total and onto 5 ix 5 2. Intuitively, (<U>, S% x 5 2, f\ x / 2) is a “combination” of both (<U>, Si, f i ) and (<U>, 5 2, / 2)- As such, (<U>, 5 ix 5 2, /1 x / 2) is preferred over (<U>, Si, fi) and (< {/> , S 2, fi) in many real-life applications. It is easily seen th at (i) (<U>, Si, fi)— *(<U>, 5 2, / 2) implies that (< £/> , S ix S , fixf)-* (< U > , S2, f 2) for all (<U>, S, f), and (ii) (<U>, S, / ) — >(<«/>, ^l, ft) and (<U>, S, f ) — *(<U>, S2, fi) implies that (<U>, S, f ) — *(<U>, S 1 XS 2, f i x f i ) . Thus, (<U>, 5 ix 5 2, f i x f 2) -* (<U>, Si, f ) for i = 1 and 2. Furthermore, (<U>, S, f ) — *(<U>, S i x S 2, ft'xfi) for all (<U>, S, f ) such that (<U>, S, f ) — *(<U>, Su fi) and (<U>, S, f)-*(<U>, Si, fi). We now present our first lemma. This result states two relationships between 86 the context schemes (< £/> , Si, fi), (<U>, S 2, f 2) and (<U>, S 1 XS 2, / i x / 2). L em m a 5.3. Let (<U>, Si, f i ) and (< [/> , S2, fi) he context schemes and u a sequence in SEQ(<U>). Then (a) IM k + N U > ||u||/lX/a and (b) Lonh {Lonh {u))=Lonh x h {u) =Lonh {Lonh (u)). Proof. Consider (a). Since ||w ||/i=||m ||/2=||w ||/1x/2= 0 for all u such th at |u| = 1, (a) holds for all u such that |u| = 1. Continuing by induction, assume (a) holds for all u such that |u| = k for some k > 1. Suppose u = u 1 .. .u kuk+i is in SEQ (<£/>). By definition, I (!) INI/1 = IN ••■uk\\h + 1 if fi(u k)^fi(uk+i) = ||ui ... W feH /j otherwise, I (2) I N I / 2 = IIu i •••wfc ||/2 + 1 if f 2 (uk) ^ f 2{uk+i) = ||ui .. .uk\\j2 otherwise, and 1 I (3) N U x/2 = |K • • • uk\\hxf 2 + 1 if fi(u k)^ fi(u k+i) or fi(u k) ^ f 2 (uk+i) = ||« i ... Uk\\flXf2 otherwise. By the induction hypothesis, (4) ||w i. . . UfcH/j+||mi ... U fc||/2 > ||w i... u^ll/jx/2- By (1), (2), (3) and (4), 11^11/,+ ||u ||/2 > UuH/jx/j. Hence, the induction is extended and (a) holds. j 87 Turning to (b), we first show that Lonf 2 (Lonf 1 (u))=LonflXf 2 (u). To see that Lonf 2 (Lonj 1 (u))QLonflXf2 (u), let Uit ...Uik be in L o n ^ L o n f ^ ) ) . Thus, there exists ... ujt in L o n (u) such that ... Uik is in Lonf2(uj t .. .Ujt). This implies that / i x / 2(tti1) = / i x / 2(wit) for all 1 < t < k. Furthermore, there is no u' in u such that / i x / 2(u ')= /i x / 2(u8 1 ). Hence, «tl .. .U{k is in LonflXf 2 (u). For the reverse containment, consider each ...Uik in LonflXf 2 (u). Since / i x / 2(ui1) = / i x / 2(uit) for all 1 < t < k, fi(u h ) = fi(uit) for all 1 < t < k. Thus, there exists ... ujt in Lonf 1 (u) such th at tt4l. . . U {k is a subsequence of Ujx ... Ujr Since u^ ... uik is in LonflXf2 (u) and Ujt ... uj, is a subsequence of u, . there is no tuple u' in ujt ... ujt such that / 2(u') = / 2(uei) and u' is not in ... uik. Therefore, .. .Uik is in Lonf 2 (uj, ... ujt). Thus, LonflXf 2(u) C Xon/2(Xon/1 («)) and the equality holds. By an argument analogous to the above, it can be shown that LonflXf2 (u) =Lonh (Lonh (u)). □ Our second lemma asserts that a constraint a over <U> is context local (context autonomous) with respect to (<U > , S ix 5 2, / i X / 2) if cr is context local (context autonomous) with respect to both (<U>, S i , / i ) and (< £/> , S2, f 2)- Specifically, we have: L em m a 5.4. Let (<U>, Si, f i ) and (<U> , S2, / 2) be context schemes and cr a constraint over <U>. Then 1 1 (a) cr is (fc + /)-context local with respect to (< £/> , S i x S 2, fi x / 2) if cr is both j 88 Ai-context local with respect to (<U>, Si, fi) and /-context local with respect to (<U>, S2, / a). (b) a is context autonomous with respect to (< //> , 5 i x 5 2, / i x / 2) if cr is context autonomous with respect to both (<U>, Si, fi) and (<U>, S2, / 2). ! Proof. Consider (a). Assume th at a is fc-context local with respect to (<U>, Si, f i ) and is /-context local with respect to (<U>, S2, / 2). Let u be an arbitrary sequence in SEQ (</7>) such that 0 ^ I n t ) ^ h (u) C VSEQ(cr). It suffices to show 1 that u is in VSEQ(cr). j ! Since I n t ^ h (u) ^ 0, ||u||/aX /2 > k + I — 1 . From this and (a) of Lemma J 5.3, it follows th at either WuW/^k — 1 or ||u||/2> / — 1- Assume — 1. Then 7n<{1(u)^0. Consider each v in Int^{u). Suppose that ||v||/lX/2 < k + / — 1. Then there exist w in In tk ^ h (u) such that v is an interval of W. Since In tk f+xf2 (u)QVSEQ(cr), w is in VSEQ(<r). From this and the fact that a is uni- i form, it follows that v is in VSEQ(cr). Now suppose that ||u||/lX/2 > k -j- / — ! i 1. Since ||v|(/;l = k - 1 and \\v\\fl + ||u|j/2 > ||u]|/lX/2, ||*% 2 > l- Thus, In tl f 2(v) ^ 0. Consider each O' in In tl j 2 (v). Since v* is an interval of v and ' ||v||A= * - 1, ||F,||/1< ||u ||/1=fe - 1. Thus, \\v’\\h + \\v'\\h < k - l + l - K k + l - l . Therefore, there exists uf in In t k ^ ^ (u) such that v' is an interval of w'. Since 7n/y1 + xj2(u)CVSEQ(cr), w‘ is in VSEQ(cr). From this and the fact that a is uni- 1 form, it follows th at v' is in VSEQ(cr). Thus, 0 ^ In ty 2(u)CVSEQ(<r). Since cr is ! I _ . — • 1 /-context local with respect to (<U> , S2, / 2), F is in VSEQ(cr). Thus, each v in 8 9 Int^iu) is in VSEQ(<r). Therefore, Int{.1(u)( ZVS~EiQ(cr). Combining this with the fact that a is context local with respect to (< £/> , Si, fi), it follows that u is in VSEQ(cr). Similarly, it can be shown that u is in VSEQ(<r) if ||m||/2> / — 1. Hence, u is in VSEQ(cr) as desired. Turning to (b), assume that a is context autonomous with respect to both (<U>, Si, f i ) and (<U>, S 2 , / 2)- Let u be a sequence in SEQ (<(7>). It suffices to show that u is in VSEQ(cr) iff LoriflXf2 (u)CVSEQ(<r). To see the “if” part, assume that Lon/lX/2(w)CVSEQ(<x). By Lemma 5.3 (b), Lonf 2 (Lonf 1 (u))=LonflXf 2 (u). Thus, L o n ^ L o n ^ (u))CVSEQ(<t). This implies that Lonf 2 (u)CVSEQ(cr) for each v in Lon^^u). This and the fact th at < 7 is context autonomous with respect to (< {/> , 52, / 2) imply that each v in Lonfl (u) is in VSEQ(cr). Thus, Lonj, (tf)CVSEQ(cr). Combining this with the fact that a is context autonomous with respect to (< £/> , Si, / 1), it follows that u is in VSEQ(cr). For the “only if”, assume that u is in VSEQ(<r). Since a is context au tonomous with respect to (<U> , Si, fi), Lon^ (U)CVSEQ(a). Thus, each v in Lon^^U,) is VSEQ(cr). This and the fact that cr is context autonomous with respect to (<U > , S 2, fi) imply Lorc/2(F)CVSEQ(cr) for each v in Lon^iji), i.e., Lonf 2 {Lonjx (u))CVSEQ(er). From this and Lemma 5.3 (b), it follows that Lorc/lX/2(w)CVSEQ(er). Hence, (b) holds. □ We are now ready for our m ajor theorem. This result present conditions 90 under which a new context-local (context-autonomous) representable CCSS can be constructed from two given context-local (context-autonomous) representable CCSS 2\=(C , S, X, Su fi) and T 2={C, E, X, S2, / 2) over <U>. T h e o re m 5.4. Let Ti=(C, E, X, 5 i, /i) and T2=(C, E, J , 5 2, / 2) be CCSS over <£/> . Then the CCSS T=(C, E, X, S i x 5 2, / i x / 2) is (a) context-local representable if Ti and T2 are both context-local repre sentable; and (b) context-autonomous representable if T % and T 2 are context-autonomous j representable and Sf 1 {Lonh (Interval(VSEQ(T)))) = S£(X on/2(Interval(VSEQ(T)))). Proof. Consider (a). Since V SEQ (T)=V SE Q (r1)= V S E Q (r2), V S E Q ^ J = VSEQ (<t^q) = VSEQ(<T^a). From Theorem 3.3 and the assumption that T\ i and T2 are context-local representable, it follows that o-Jma is context local with respect to (<U > , Si, fi) and (<U>, S2, / 2)- By Lemma 5.4 (a), this implies that crjma is context local with respect to (<U> , Si x S 2, fi x f 2 ). From this and Theorem 3.3, it follows that T is context-local representable. ; Consider (b). Let a be defined by VSEQ(o-)=,S'^)(Lon/1(Interval(VSEQ(T)))). Since VSEQ(T)=VSEQ(T1), VSEQ(cr)=5^,(Lon/ l (Interval(VSEQ(Ti)))). Thus, V SEQ (T)= VSEQ(Ti) j = VSEQ(C, {<r}, J , Su fi), by Theorem 3.1 (b) = VSEQ(C, M , X, Si x S2, fi x / 2). 91 T hat is, VSEQ(T)=VSEQ(C, {cr}, I , Si x 5 2, fi x / 2). It suffices to show that a is context autonomous with respect to (< £/> , 5i x S 2, fi x /z)- Clearly, S%(Lonh (V SEQ(cr))) = S™ (Ton/j (5r ~ (T on/1 (Interval(VSEQ(T)))))) = Sj? (Lon/j (Lonft (Interval(VSEQ(T))))), by Lemma 2.2 (b) = Sj° (Lon/j (Interval(VSEQ(T)))), by definition = V SEQ (a), i.e., 5 ~ (I/o n /1(VSEQ(o')))=VSEQ(<7). This and the corollary of Proposition 2.5 imply that cr is context autonomous with respect to (<U> , Si, f i ). Also, S £ (L o n /2(VSEQ(<r))) = S f2 (Lon^S^Ton/^IntervalCVSEQCT)))))) = Sj? (Lon/2(5^(Lora/2(Interval(VSEQ(T)))))), since ^ ( T o n / l (Interval(VSEQ(T)))) = S£(X on/2(Interval(VSEQ(T)))) = Sfe {Lonf2 (Lorif2 (Interval(VSEQ(T))))), by Lemma 2.2 (b) = Sj% (Ton/2(Interval(V SEQ (r)))), by definition = Sff (Lon/, (Interval(VSEQ(T)))), since 5 ^ (L o n / l (Interval(VSEQ(T)))) = S£(Xora/2(Interval(VSEQ(T)))) = VSEQ(er), i.e., 5'^)(Lon/2(VSEQ(cr)))=VSEQ(cr). This plus the corollary of Proposition 2.5 imply that a is context autonomous with respect to (< £/> , S2, / 2)- Thus, a is 92 context autonomous with respect to both (<U > , S\, f \ ) and (<U>, S 2 , / 2). From this and Lemma 5.4 (b), it follows th at cr is context autonomous with respect to (<U>, Si x S 2 , fi x / 2). Hence, T is context autonomous representable. □ It is an open question whether the complicated equality in (b) of Theorem 5.4 can be eliminated. i 1 I ------------------------------------------- — ---- ~— ------------------------------ ! 93 i ! R eferen ces [CG] Cho, Y. and S. Ginsburg, “Decision Problems of Object Histories,” Infor- | mation and Computation, Vol. 83, No. 2, (November 1989), pp.245-263. I [DG] Dong, G. and S. Ginsburg, “Localizable Constraints for Object Histories,” Technical Report, Computer Science Departm ent, University of Southern California. j [GG] Ginsburg, S. and M. Gyssens, “Object Histories Which Avoid Certain Sub sequences”, Information and Computation, Vol. 73, No. 2 (1987), pp. 174- 206. j [GK] Ginsburg, S. and S. Kurtzm an, “Object-History and Spreadsheet P- Simulation,” Lecture Notes in Computer Science, 326 (1988), pp.383-395. ! [GSW] Ginsburg, S., D. Simovici and X. Wang, “Content-Related Interval Queries | on Object Histories,” Accepted for publication in Information and Com- j put at ion. i [GT1] Ginsburg, S. and K. Tanaka, “Computation-Tuple Sequences and Ob- j ject Histories”, ACM Transactions on Database Systems, Vol. 11 (1986), j pp.186-212. i i [GT2] Ginsburg, S. and K. Tanaka, “Interval Queries on Object Histories”, Pre sented at the 10th International Conference on Very Large Databases, Sin- : ! gapore (1984). i I 1 \ [GTal] Ginsburg, S. and C. Tang, “Projection of Object Histories”, Theoretical ^ Computer Science, 48 (1986), pp.297-328. 94 [GTa2] Ginsburg, S. and C. Tang, “Cohesion of Object Histories,” Theoretical Computer Science, 63 (1989), pp.63-90. [GTi] Ginsburg, S. and D. Tian, “Input-Dependent-Only Object Histories,” Jour nal of Computer and System Science, Vol. 40, No. 3, (June 1990), pp.346- 375. [HU] Hopcroft, J. and J. Ullman, “Introduction to Autom ata Theory, Lan guages, and Com putation,” Addison-Wesley, Reading, MA, 1979 Appendix 9 5 We now review two examples of object histories, presented elsewhere, that are referenced in the body of the thesis. As in [GK; GSW; GTi], the CSS in this thesis omits the state attributes and state functions included in the original definition of CSS in [GTI]. (The result is a simplified, albeit essentially equivalent, object-history model.) The examples now presented are in accordance with this change. We start with the apartm ent-rental example first introduced in [CG]. Example (Apartm ent Rental). Consider the sequences of apartm ent-rental records, each rental record consisting of the four attributes DATE, TENANT, AMOUNT and SEQ-NO. Each apartm ent-rental occurrence is represented as a 4-tuple u. Here, (a) u(DATE) is the year, month, and day on which the record is listed, (b) u(TENANT) is the name of the tenant, (c) u(AMOUNT) is the amount of the (monthly) rent received, and (d) u(SEQ-NO) is the sequential number of the record. Also, Dom(DATE) is the set of all date values in which the day of the m onth is either 1 or 15 8, Dom(TENANT) the set of people names plus the value VACANT, Dom(AMOUNT) the set of nonnegative numbers and j j Dom(SEQ-NO) the set of positive integers. DATE, TENANT, and AMOUNT are input attributes and SEQ-NO an evaluation attribute. Thus, <U> = < I> < E > , sThis domain is selected because later we insist that rent always be paid on either the 1st or 9 6 DATE TENANT AMOUNT SEQ-NO 01/15/87 VACANT 0 1 02/01/87 Jones 550 2 03/01/87 Jones 550 3 04/01/87 Jones 550 4 05/01/87 VACANT 0 5 05/15/87 Smith 575 6 06/15/87 Smith 575 7 07/15/87 Smith 575 8 08/15/87 Smith 575 9 09/15/87 Smith 575 10 10/15/87 Smith 575 11 11/15/87 Smith 575 12 12/15/87 Smith 575 13 01/15/88 Smith 575 14 02/15/88 Smith 575 15 03/15/88 Smith 575 16 04/15/88 Smith 575 17 05/15/88 Smith 603 18 06/15/88 Smith 603 19 07/15/88 Smith 603 20 Figure Al where < / > =DATE TENANT AMOUNT and <E>= SEQ-NO. The evaluation j function cseq- no is defined by esEQ-No(u,d,t,a ) =u(SEQ -N O )+l for all u in D om (<£/>), d in Dom(DATE), t in Dom(TENANT) and a in Dom(AMOUNT). I Each valid sequence of apartm ent rental records ui...um is assumed to satisfy the following five constraints. i ! (a) u cti iff for each *, 1 < i < m, u;(DATE) C Ui+i(DATE), where C de 97 notes calendarwise ordering. (The rental records follow each other in calendarwise order.) (b) u (= cr 2 iff for each i, 1 < i < m, Uj+1(TEN ANT)=Ui(TENANT) implies uJ+i(D A T E )= Uj(DATE) 0 1 month, 0 denoting calendarwise addition. (Tenant payments occur exactly one month apart.) (c) u (= 0 3 iff for each i, 1 < i < m , u;(TENANT)=VACANT implies Uj(AM OUNT)=0. (No rent money is collected when the apartm ent is unoccu pied.) (d) u a 4 iff there exist i and j, 1 < i < j < m, such that Uj(AMOUNT) ± « t-+1 (AM OUNT), Uj(AMOUNT) ^ ui+ 1(AM OUNT), u,-(TENANT) 1^+1 (TENANT) and j — i < 12. (No continuing tenant has the rent changed twice in any 12 month period.) (e) u < j5 iff there exist i and j, 1 < i < j < m, such that u,(TENANT) ± ui+i(TEN A N T), u,+i(T E N A N T )= ••• = ui+ 1(TENANT), ui+ 1 (AMOUNT) ^ «i+i(A M O UNT), and j — i < 12. (The rent stays fixed for at least 12 months after a tenant moves into the apartm ent.) The initialization for the rental record histories is J = { (d, VACANT, 0, 1) | d in Dom(DATE)}. A CSS for the apartm ent-rental histories is ( ( < /> , < E > , { e s^ -jv o } ), {^l, 02, 0- 3, 04, 0- 5}, X). One valid computation-tuple sequence for this CSS is given in Figure A l. 9 8 Let f be the total function defined for each u in Dom(<Z7>) by f(u)=u(TEN ANT). Clearly, (<U>, Dom(TENANT), f) is a context scheme. Thus, T = ( ( < /> , <E>, 1 {essQ-iVo}), Wi, cr 2 , 03, 0- 4, 0- 5}, J , Dom(TENANT), f) is a CCSS describing the apartm ent-rental histories. Obviously, the constraints o -2, 0 3 and 0-4 are 1-context local. Also, the con straint 03 is context autonomous. As indicated in [CG], each constraint in T is 12-local. By Proposition 2.1, each constraint in T is 12-context local. Thus, T is a C £12-CCSS and therefore 12-context local representable. It can be shown that T is not context-autonomous representable but 12-extended context-autonomous representable. We now present the seminar-schedule example first introduced in [GTI]. Example (Seminar Schedule). Consider sequences of seminar occurrences, each seminar occurrence consisting of the three attributes NAME, TITLE and DATE. Each seminar occurrence is represented as a 3-tuple u*. Here, (a) Uj(NAME) is the name of a student who presents a paper, (b) « ,• (TITLE) is the title of the paper presented, and (c) u,(DATE) is the year, month, and day when the seminar is held. We assume that the seminar meets exactly once each week, always on the ! same day (for example, every Monday) and that only one paper (or a portion thereof) is presented at each meeting. Also, DATE is an evaluation attribute 99 and NAME and TITLE are input attributes. Thus, <U >=<I><E> , where < /> = N A M E TITLE and <E >= D A T E . The evaluation function & date is defined for each u in D om (<£/>), n in Dom(NAME) and t in Dom(TITLE) by £date{u; n, t)=u(D A TE) ® 7, where ® denotes calendarwise addition. In addition, each valid computation-tuple sequence ui...um is assumed to satisfy the following three constraints. crx: If U{(TITLE)=Uj(TITLE), then tq-(NAME)=Uj(NAME) for all i and j, j 1 < < m - (Each paper is presented by only one student.) cr2: If Ut(TITLE)=Uj(TITLE) for some i and 1 < i < j < m, then «&(TITLE)=Ui(TITLE) for all k, i < k < j. (Each paper must be given in consecutive seminar meetings.) < 7 3: If Ui(NAME)=uJ+i(NAM E), then «i(TIT LE )=ut+i(TITLE) for all i, 1 < 1 i < m. (No student can speak consecutively on two different papers.) The initialization T is the set {U | |u| = 1}. A CSS for the seminar schedules is ((NAME TITLE, DATE, {cdate}), {01, 02, < 73}, X). A valid computation-tuple ! sequence for this CSS is given in Figure A2. Let f be the total function from Dom(<17>) onto Dom(TITLE) defined by f(u)=u(TITLE) for each u in D om (<{/>). Then (<U>, Dom(TITLE), f) is a ! j context scheme. Thus, T=((<I>,<E>, {coate}), {01, 02, 03}, T, Dom(TITLE), j f) is a CCSS describing the seminar-schedule histories. i j It is easily seen that G \ is context autonomous and < r 3 is 1-context local. 100 NAME TITLE DATE Jones Query Languages 01/11/83 Jones Query Languages 01/18/83 Smith Data Models 01/25/83 Smith Data Models 02/01/83 Smith Data Models 02/08/83 Jones Database Design 02/15/83 Figure A2 However, the constraint cr2 is neither context local nor context autonomous. We now show that T is (CC1 U C«4)-representable. To this end, consider the CCSS T '= ( ( < /> ,< £ > , {eDATE}), { < r i , (f2 , < r 3 } , J , Dom(TITLE), f), where VSEQ((72)={u |for each sequence U\...Uk in Lonj(u) and 1 < i < k — 1, ui+x (DATE)=ui(DATE) © 7}. I Obviously, cf2 is uniform and context autonomous. Thus, T' is a {CC1 UC^4)-CCSS. By definition of C, all tuples in each sequence u in VSEQ(C) are listed on every 7th day by calendar order. Hence, the replacement of cr2 in T by < r2 does not change the set of valid computation-tuple sequences of T, i.e., VSEQ (T)=V SEQ (T/). 1 Therefore, T is {CC1 U C.4)-representable. Finally, we note (proof om itted) that T is neither (extended) context-local representable nor (extended) context-autonomous representable.
Abstract (if available)
Linked assets
University of Southern California Dissertations and Theses
Conceptually similar
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
PDF
00001.tif
Asset Metadata
Core Title
00001.tif
Tag
OAI-PMH Harvest
Permanent Link (DOI)
https://doi.org/10.25549/usctheses-oUC11255800
Unique identifier
UC11255800
Legacy Identifier
DP22836