Composability of Infinite-State Activity Automata* Zhe Dang 1, Oscar H. Ibarra 2, Jianwen Su 2 1 Washington State University, Pullman 2 University of California,

Slides:



Advertisements
Similar presentations
Theory of Computing Lecture 23 MAS 714 Hartmut Klauck.
Advertisements

CSE 311 Foundations of Computing I
Lecture 24 MAS 714 Hartmut Klauck
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Formal Language, chapter 9, slide 1Copyright © 2007 by Adam Webber Chapter Nine: Advanced Topics in Regular Languages.
CS21 Decidability and Tractability
Complexity 12-1 Complexity Andrei Bulatov Non-Deterministic Space.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Finite Automata Great Theoretical Ideas In Computer Science Anupam Gupta Danny Sleator CS Fall 2010 Lecture 20Oct 28, 2010Carnegie Mellon University.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata Prof. Amos Israeli.
1 Introduction to Computability Theory Lecture3: Regular Expressions Prof. Amos Israeli.
Introduction to Computability Theory
1 Introduction to Computability Theory Lecture7: PushDown Automata (Part 1) Prof. Amos Israeli.
Introduction to Computability Theory
Lecture 3UofH - COSC Dr. Verma 1 COSC 3340: Introduction to Theory of Computation University of Houston Dr. Verma Lecture 3.
CS5371 Theory of Computation
P, NP, PS, and NPS By Muhannad Harrim. Class P P is the complexity class containing decision problems which can be solved by a Deterministic Turing machine.
Courtesy Costas Busch - RPI1 Non Deterministic Automata.
1 Introduction to Computability Theory Lecture2: Non Deterministic Finite Automata (cont.) Prof. Amos Israeli.
61 Nondeterminism and Nodeterministic Automata. 62 The computational machine models that we learned in the class are deterministic in the sense that the.
Fall 2003Costas Busch - RPI1 Decidability. Fall 2003Costas Busch - RPI2 Recall: A language is decidable (recursive), if there is a Turing machine (decider)
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Reachability Analysis for Some Models of Infinite-State Transition Systems Oscar H. Ibarra, Tevfik Bultan, and Jianwen Su Department of Computer Science.
Validating Streaming XML Documents Luc Segoufin & Victor Vianu Presented by Harel Paz.
CSC 3130: Automata theory and formal languages Andrej Bogdanov The Chinese University of Hong Kong Nondeterminism.
Lecture 3 Goals: Formal definition of NFA, acceptance of a string by an NFA, computation tree associated with a string. Algorithm to convert an NFA to.
Automata & Formal Languages, Feodor F. Dragan, Kent State University 1 CHAPTER 5 Reducibility Contents Undecidable Problems from Language Theory.
Fall 2006Costas Busch - RPI1 Non-Deterministic Finite Automata.
1 Automated Composition of E-Services: Lookaheads Çağdaş E. Gerede *, Richard Hull , Oscar H. Ibarra *, Jianwen Su * University of California, Santa.
CS5371 Theory of Computation Lecture 4: Automata Theory II (DFA = NFA, Regular Language)
1 Non-Deterministic Automata Regular Expressions.
Introduction to Finite Automata Adapted from the slides of Stanford CS154.
Costas Busch - LSU1 Non-Deterministic Finite Automata.
Prof. Busch - LSU1 Reductions. Prof. Busch - LSU2 Problem is reduced to problem If we can solve problem then we can solve problem.
FORMAL LANGUAGES, AUTOMATA AND COMPUTABILITY
Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { ‘{‘, ‘}’ } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite language,
1Computer Sciences Department. Book: INTRODUCTION TO THE THEORY OF COMPUTATION, SECOND EDITION, by: MICHAEL SIPSER Reference 3Computer Sciences Department.
REGULAR LANGUAGES.
1 Unit 1: Automata Theory and Formal Languages Readings 1, 2.2, 2.3.
Theory of Languages and Automata
By: Er. Sukhwinder kaur.  What is Automata Theory? What is Automata Theory?  Alphabet and Strings Alphabet and Strings  Empty String Empty String 
Computational Complexity Theory Lecture 2: Reductions, NP-completeness, Cook-Levin theorem Indian Institute of Science.
Characterizations of Bounded Semilinear Languages by One-way and Two-way Deterministic Machines Oscar H. Ibarra 1 and Shinnosuke Seki 2 1. Department of.
Theory of Computing Lecture 21 MAS 714 Hartmut Klauck.
Prof. Busch - LSU1 NFAs accept the Regular Languages.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
1 Turing’s Thesis. 2 Turing’s thesis: Any computation carried out by mechanical means can be performed by a Turing Machine (1930)
 2005 SDU Lecture13 Reducibility — A methodology for proving un- decidability.
D E C I D A B I L I T Y 1. 2 Objectives To investigate the power of algorithms to solve problems. To explore the limits of algorithmic solvability. To.
CS 208: Computing Theory Assoc. Prof. Dr. Brahim Hnich Faculty of Computer Sciences Izmir University of Economics.
The decidability of Presburger Arithmetic By Guillermo Guillen 04/13/05 Dr. Smith COT 6421 FIU Spring 2005.
Donghyun (David) Kim Department of Mathematics and Computer Science North Carolina Central University 1 Chapter 4 Decidability Some slides are in courtesy.
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
Finite Automata Great Theoretical Ideas In Computer Science Victor Adamchik Danny Sleator CS Spring 2010 Lecture 20Mar 30, 2010Carnegie Mellon.
Complexity and Computability Theory I Lecture #5 Rina Zviel-Girshin Leah Epstein Winter
Modeling Arithmetic, Computation, and Languages Mathematical Structures for Computer Science Chapter 8 Copyright © 2006 W.H. Freeman & Co.MSCS SlidesTuring.
Topic 3: Automata Theory 1. OutlineOutline Finite state machine, Regular expressions, DFA, NDFA, and their equivalence, Grammars and Chomsky hierarchy.
Busch Complexity Lectures: Reductions
Linear Bounded Automata LBAs
Reductions Costas Busch - LSU.
LIMITS OF ALGORITHMIC COMPUTATION
Busch Complexity Lectures: Undecidable Problems (unsolvable problems)
Non-Deterministic Finite Automata
Non-Deterministic Finite Automata
Decidable Languages Costas Busch - LSU.
Non Deterministic Automata
Chapter 1 Regular Language
Decidability continued….
Presentation transcript:

Composability of Infinite-State Activity Automata* Zhe Dang 1, Oscar H. Ibarra 2, Jianwen Su 2 1 Washington State University, Pullman 2 University of California, Santa Barbara _____________________ Presented by Prof. Hsu-Chun Yen, NTU Presented by Prof. Hsu-Chun Yen, NTU (Thanks Hsu-Chun!) (Thanks Hsu-Chun!) *Supported in part by NSF Grants IIS and CCR

Outline  Motivation  Modeling by automata  Composability results  Online delegators  Delegators with lookahead  Constrained delegation  Timed composabilty  Summary and references

E-Services  E-services provide a general framework for discovery, flexible interoperation, and dynamic composition of distributed and heterogeneous processes on the Internet.  Some issues: modeling, analysis, composition.  Automated composition allows a new e-service A to be implemented by composing existing A to be implemented by composing existing e-services A 1, …, A r. e-services A 1, …, A r.

Example  Composability of e-services asks whether a new service can be created by using existing services. Existing E-Services Credit Card Company Warehouse Bank New E-Service Online Store

Automated Composition  Using existing e-services to construct a new desired e-service  Models -- Message-oriented modeling -- Message-oriented modeling -- Activity-based modeling  This paper -- Activity-based modeling  This paper

Modeling by Automata  Use of automata to model e-services: an activity is represented by a symbol in the input alphabet of an automaton.  A desired sequence of activities to be performed is a string in the language accepted by the automaton.  Mostly finite automata have been studied in the literature.

 Definition: Let M be a class of (possibly nondeterministic) language acceptors with a one-way input tape. A system (A; A 1, …, A r ) of automata in M, is composable if for every string w = a 1 …a n of symbols accepted by A, there is an assignment of each symbol in w to one of the A i ’s such that if w i is the subsequence assigned to A i, then w i is accepted by A i. Thus w 1,.., w n is a “shuffle” of w. (Input strings have right delimiters or end markers.) (Input strings have right delimiters or end markers.)  Formally, a composer C is an acceptor in M with outputs (i.e., a transducer). In general, C is nondeterministic, and at every step, C may have to “guess” the index 1 ≤ i ≤ r to output, i.e., the A i to assign the current input symbol.

Examples  Online club A offers customers to first register and then pay for their accesses with either cash or credit cards. A accepts (r | (aa*(s | c)))*.  (A; A 1, A 2 ) is composable.  (A; A 2, A 3 ) is also composable.  (A; A 1, A 3 ) is not composable. R: registration A: accesses C: credit card payment S: cash payment

Notation DFA (NFA): Deterministic (Nondeterministic) Finite Automaton DFA (NFA): Deterministic (Nondeterministic) Finite Automaton DCM (NCM): A DFA (NFA) augmented with 1-reversal counters. DCM (NCM): A DFA (NFA) augmented with 1-reversal counters. A counter is a nonnegative integer variable, initially zero, which at each step can be incremented / decremented by 1 (or unchanged) and can be tested against zero. A counter is 1-reversal if once it is decremented, it can no longer be incremented. A counter is 1-reversal if once it is decremented, it can no longer be incremented. More generally: A counter is reversal-bounded if it makes at most r reversals for some r, independent of the computation. Clearly, a counter that makes r reversals can be simulated by (r+1)/2 More generally: A counter is reversal-bounded if it makes at most r reversals for some r, independent of the computation. Clearly, a counter that makes r reversals can be simulated by (r+1)/2 1-reversal counters. 1-reversal counters.

Counters A counter x is a nonnegative integer variable associated with operations: A counter x is a nonnegative integer variable associated with operations: (Increment) x := x + 1 (Increment) x := x + 1 (Decrement) x := x - 1 (Decrement) x := x - 1 (Stay) x := x (Stay) x := x (Test) Is x = 0? (Test) Is x = 0?

Note: A counter making r reversals can be simulated by (r + 1) / 2 counters, each making only 1 reversal. reversal

Example: A DCM with two 1-reversal counters can check, given any binary string (of 0’s and 1’s), whether the number of 0’s is equal to the number of 1’s. Example: A DCM with two 1-reversal counters can check, given any binary string (of 0’s and 1’s), whether the number of 0’s is equal to the number of 1’s. Idea: the DCM reads the input and uses one counter to count the 0’s and the other counter to count the 1’s. At the end of the input, the counters are decremented simultaneously. The DCM accepts iff the counters reach zero at the same time. The counters make only 1 reversal. Idea: the DCM reads the input and uses one counter to count the 0’s and the other counter to count the 1’s. At the end of the input, the counters are decremented simultaneously. The DCM accepts iff the counters reach zero at the same time. The counters make only 1 reversal. Definition: A problem is decidable (undecidable) Definition: A problem is decidable (undecidable) if there exists (there does not exist) an algorithm if there exists (there does not exist) an algorithm to solve it. to solve it.

Known  (Language) containment & equivalence problems are: 1. decidable for DCMs [Ibarra], 1. decidable for DCMs [Ibarra], 2. undecidable for NCMs (even when there is only one 2. undecidable for NCMs (even when there is only one 1-reversal counter) [Book&Baker]. 1-reversal counter) [Book&Baker].  Membership, emptiness, and disjointness problems are decidable for NCMs [Book&Baker].  If the counters are unrestricted (not reversal-bounded), the machine is equivalent to a Turing machine (even when there are only two counters) [Minsky] – hence, all nontrivial problems are undecidable.

 Theorem: If A is an NCM and A 1, …, A r are NFAs, then composability of (A; A 1, …, A r ) is decidable. Thus, if the target service A has 1-reversal Thus, if the target service A has 1-reversal counters and the existing services A i ’s are NFAs, it is decidable to determine if every string accepted by A can be composed in terms of strings accepted by the A i ’s. counters and the existing services A i ’s are NFAs, it is decidable to determine if every string accepted by A can be composed in terms of strings accepted by the A i ’s.

 Theorem: It is undecidable to determine, given a system (A; A 1, A 2 ), where A and A 1 are DFAs and A 2 is a DCM with only one 1-reversal counter, whether it is composable. Proof (idea): Intricate reduction to the halting problem for two-counter machines (which is undecidable [Minsky]). Proof (idea): Intricate reduction to the halting problem for two-counter machines (which is undecidable [Minsky]).

 When the system (A; A 1, …, A r ) is composable, the composer is a nondeterministic machine, in general.  Thus, in general, assignment of symbols of a string w accepted by A to the A i ’s can only be done deterministically after the entire string has been processed (i.e., offline) and can not be done online.

Online Delegator  Definition: Given a system (A; A 1, …, A r ) of acceptors in M, an online delegator for the system is a deterministic acceptor D in M with outputs which, knowing: - the current states of A, A 1, …, A r and “local” information of each machine (e.g., whether a counter is zero or non-zero if each machine is a DCM) is zero or non-zero if each machine is a DCM) - current input symbol being processed D can uniquely determine the A i to assign the current symbol. Moreover, for every string w accepted by A, the subsequence of the string w delegated by D to each A i is accepted by A i.

Online Delegation Existing Services New Service Can we provide new service by using existing services?

19 Online assignment of activities Existing Services New Service

 Theorem: When the system consists of NCMs, existence of an online delegator can be decided in 2^(2^(c m n log n)) time for some constant c, where m is the total number of 1-reversal counters in the system and n is the size of the system. However, when the system consists of DFAs, the time reduces to 2^(c n log n) [BC+03] (can be shown to hold for NFAs also [CHIS04]). However, when the system consists of DFAs, the time reduces to 2^(c n log n) [BC+03] (can be shown to hold for NFAs also [CHIS04]).

What if online delegator does not exist?  Who processes “book_taxi” ? Existing ServicesNew Service However, if the next activity is “book_train”, then system gets stuck. – Assume “book_air_travel” processes.

Delegator with 1 Lookahead  Knowing 1 future activity is enough for composition  i.e., assignment of an activity is delayed one step

23 Hierarchy on Lookaheads There exists a hierarchy on lookaheads. (a)  1-lookahead, (b)  2-lookahead, (c)  unbounded

Systems With Lookahead  Definition: Given a system (A; A 1, …, A r ) of acceptors in M and a non-negative integer k, a k-lookahead delegator for the system is a deterministic acceptor D in M with outputs (with delay k) which, knowing: - the current states of A, A 1, …, A r and “local” information - the current states of A, A 1, …, A r and “local” information of each machine of each machine - current input symbol being processed - current input symbol being processed - the k lookahead symbols to the right of the current input - the k lookahead symbols to the right of the current input symbol symbol D can uniquely determine the A i to assign the current symbol. Moreover, for every string w accepted by A, the subsequence of the string w delegated by D to each A i is accepted by A i. Note: Online delegator corresponds to k = 0. Note: Online delegator corresponds to k = 0.

Lookahead Delegators  Online club A offers customers to first register and then pay for their accesses with either cash or credit cards. A accepts (r | (aa*(s | c)))*.  Clearly, (A; A 2, A 3 ) is not only composable but it has a 1-lookahead delegator.  (A; A 1, A 2 ) is composable but has no k- lookahead delegator for any k. no k- lookahead delegator for any k. R: registration A: accesses C: credit card payment S: cash payment

k-Delegator  The k-delegator D starts out by reading the first k input symbols and stores them in a buffer in its finite control. It then simulates A, A 1, …, A k and deterministically assigns the symbols processed by A to the A i ’s while also updating the buffer as it reads the remaining input symbols.  Thus D assigns the symbols processed by A to the A i ’s with delay k. For convenience, so that there is always a k lookahead string to the right of the current symbol, we assume that the input to the machines is suffixed by #’s.

 Theorem: When the system consists of NCMs, existence of a k-delegator for a given k can be decided in 2^(2^(c m n log n t k )) time for some constant c, where m is the total number of 1- reversal counters in the system, n is the size of the system, and t is size of the input alphabet. However, when the system consists of NFAs, the time reduces to 2^(c n log n t k ) [CHIS04]. However, when the system consists of NFAs, the time reduces to 2^(c n log n t k ) [CHIS04].

Constrained Delegation (Presburger constraints on delegation of symbols)  Load balancing or priority specification: -- Svc 1 processes as many activities as Svc 2 -- Svc 1 processes as many activities as Svc 2 -- Priority of Svc 1 is higher than Svc 2 -- Priority of Svc 1 is higher than Svc 2  Cost of delegation: -- Cost for Svc 1 < 3 x Cost for Svc 2 -- Cost for Svc 1 < 3 x Cost for Svc 2 -- Cheapest way to delegate activities -- Cheapest way to delegate activities -- Total time should be < 20 seconds -- Total time should be < 20 seconds  Algorithms for constrained delegation (e.g., for k-constrained delegation). for k-constrained delegation).

Open Question  A system may be composable but may not have a k-delegator for any k.  Open: Is it decidable if a system of DFAs has a k- delegator for some k?

Timed Composability  A timed automaton can be considered as a finite automaton augmented with a finite number of clocks. The clocks can reset to zero or progress at the same rate, and can be tested against clock constraints [Alur/Dill].  Timed automata are widely regarded as a standard model for real-time systems, because of their ability to express quantitative time requirements.  Theorem: Composability of discrete timed automata (A; A 1, …, A r ) is decidable.

Summary  Showed decidable and undecidable results for composability and k-delegation for various types of machines modeling e-services.  Looked at putting additional requirements such as Presburger constraints and timing in composition and k- delegation.  We want to study other models of e-services (e.g., automata with queues, etc.)  Open question: Does the system have a k-delegator for some k. Seems quite difficult, even for the case when all the e-services are DFAs.  Characterize the complexity of the decision procedures. E.g., it can be shown that composability of a system of NFAs is at least NP-hard.

References  [BCG+03] D. Berardi, D. Calvanese, G. De Giacomo, M. Lenzerini, and M. Mecella, Automatic Composition of E-Services That Export Their Behavior, Proc. Int. Conf. On Service Oriented Computing,  [GHIS04] C. E. Gerede, R. Hull, O.H. Ibarra, and J. Su, Automated Composition of E- Services : Lookaheads, Proc. Int. Conf. On Service Oriented Computing 2004.