New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations

Similar documents
A Solvable Class of Quadratic Diophantine Equations with Applications to Verification of Infinite-State Systems

Composability of Infinite-State Activity Automata

COMPLEXITY ANALYSIS OF THE PRESBURGER REACHABILITY PROBLEM FOR DISCRETE TIMED AUTOMATA CHENG LI

Liveness Verification of Reversal-bounded Multicounter Machines with a Free Counter

Pushdown timed automata:a binary reachability characterization and safety verication

Dense Counter Machines and Verification Problems

The Minimal Cost Reachability Problem in Priced Timed Pushdown Systems

Reversal-Bounded Counter Machines Revisited

arxiv:cs/ v2 [cs.lo] 29 Apr 2005

The Parikh image of languages and linear constraints

SBMC : Symmetric Bounded Model Checking

Reversal-Bounded Counter Machines

Timed Automata VINO 2011

ON STATELESS AUTOMATA AND P SYSTEMS

Bounded Model Checking with SAT/SMT. Edmund M. Clarke School of Computer Science Carnegie Mellon University 1/39

Model checking the basic modalities of CTL with Description Logic

Reachability in Succinct and Parametric One-Counter Automata

On Stateless Multicounter Machines

Folk Theorems on the Determinization and Minimization of Timed Automata

Linear Temporal Logic and Büchi Automata

Temporal logics and explicit-state model checking. Pierre Wolper Université de Liège

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Reducing CTL-live Model Checking to Semantic Entailment in First-Order Logic (Version 1)

Taming Past LTL and Flat Counter Systems

Bounded Synthesis. Sven Schewe and Bernd Finkbeiner. Universität des Saarlandes, Saarbrücken, Germany

Helsinki University of Technology Laboratory for Theoretical Computer Science Research Reports 66

Characterizations of Catalytic Membrane Computing Systems

State-Space Exploration. Stavros Tripakis University of California, Berkeley

Liveness in L/U-Parametric Timed Automata

Signaling P Systems and Verification Problems

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Timo Latvala. March 7, 2004

Analyzing Asynchronous Programs with Preemption

for System Modeling, Analysis, and Optimization

Subsumption of concepts in FL 0 for (cyclic) terminologies with respect to descriptive semantics is PSPACE-complete.

Counter Automata and Classical Logics for Data Words

Verifying qualitative and quantitative properties with LTL over concrete domains

Automata, Logic and Games: Theory and Application

Synthesis of Asynchronous Systems

Semantic Equivalences and the. Verification of Infinite-State Systems 1 c 2004 Richard Mayr

Serge Haddad Mathieu Sassolas. Verification on Interrupt Timed Automata. Research Report LSV-09-16

Unbounded, Fully Symbolic Model Checking of Timed Automata using Boolean Methods

CTL Model checking. 1. finite number of processes, each having a finite number of finite-valued variables. Model-Checking

A Note on Decidable Separability by Piecewise Testable Languages

Parameter Synthesis for Timed Kripke Structures

Alternating Time Temporal Logics*

An Alternative Construction in Symbolic Reachability Analysis of Second Order Pushdown Systems

Models for Efficient Timed Verification

Lecture 2: Symbolic Model Checking With SAT

Model Checking: An Introduction

Alan Bundy. Automated Reasoning LTL Model Checking

Controller Synthesis for MTL Specifications

CDS 270 (Fall 09) - Lecture Notes for Assignment 8.

From Liveness to Promptness

Characterizations of Catalytic Membrane Computing Systems?

Signaling P Systems and Verification Problems

LTL is Closed Under Topological Closure

Introduction to Temporal Logic. The purpose of temporal logics is to specify properties of dynamic systems. These can be either

The Verification of Real Time Systems using the TINA Tool

Automata and Processes on Multisets of Communicating Objects

On the Satisfiability of Two-Variable Logic over Data Words

Bounded LTL Model Checking with Stable Models

DISTINGUING NON-DETERMINISTIC TIMED FINITE STATE MACHINES

Matching Trace Patterns With Regular Policies

Generalized Parity Games

Impartial Anticipation in Runtime-Verification

Reasoning about Strategies: From module checking to strategy logic

Limiting Behavior of Markov Chains with Eager Attractors

Taming Past LTL and Flat Counter Systems

Automata with modulo counters and nondeterministic counter bounds

Information Rate of Some Classes of Non-regular Languages: An Automata-theoretic Approach

Augmenting the discrete timed automaton with other data structures

Introduction. Büchi Automata and Model Checking. Outline. Büchi Automata. The simplest computation model for infinite behaviors is the

What You Must Remember When Processing Data Words

First-order resolution for CTL

LTL with Arithmetic and its Applications in Reasoning about Hierarchical Systems

Verification of Succinct Hierarchical State Machines

Dense-Timed Pushdown Automata

Weak Alternating Timed Automata

On Stateless Automata and P Systems

The State Explosion Problem

On decision problems for timed automata

Automata-Theoretic LTL Model-Checking

SAT-Based Verification of Safe Petri Nets

Note on winning positions on pushdown games with omega-regular winning conditions

Alternating nonzero automata

Strategy Logic. 1 Introduction. Krishnendu Chatterjee 1, Thomas A. Henzinger 1,2, and Nir Piterman 2

The theory of regular cost functions.

A q-matrix Encoding Extending the Parikh Matrix Mapping

Multitape NFA: Weak Synchronization of the Input Heads

Revising Distributed UNITY Programs is NP-Complete

The Eager Approach to SMT. Eager Approach to SMT

Using Patterns and Composite Propositions to Automate the Generation of Complex LTL Specifications

Almost Linear Büchi Automata

Theoretical Foundations of the UML

NONBLOCKING CONTROL OF PETRI NETS USING UNFOLDING. Alessandro Giua Xiaolan Xie

Generating Deterministic ω-automata for most LTL Formulas by the Breakpoint Construction

PSPACE-completeness of LTL/CTL model checking

Temporal Logic. Stavros Tripakis University of California, Berkeley. We have designed a system. We want to check that it is correct.

Undecidability Results for Timed Automata with Silent Transitions

Transcription:

New Complexity Results for Some Linear Counting Problems Using Minimal Solutions to Linear Diophantine Equations (Extended Abstract) Gaoyan Xie, Cheng Li and Zhe Dang School of Electrical Engineering and Computer Science Washington State University Pullman, WA 9916, USA Abstract The linear reachability problem is to decide whether there is an execution path in a given finite state transition system such that the counts of labels on the path satisfy a given linear constraint Using results on minimal solutions (in nonnegative integers) for linear Diophantine systems, we obtain new complexity results for the problem, as well as for other linear counting problems of finite state transition systems and timed automata In contrast to previously known results, the complexity bounds obtained in this paper are polynomial in the size of the transition system in consideration, when the linear constraint is fixed 1 Introduction Model-checking [7, 22] is a technique that automatically verifies a finite state transition system against a temporal property usually specified in, eg, Computation Tree Logic (CTL) [7] or Linear Temporal Logic (LTL) [20], by exhaustively exploring the finite state space of the system The usefulness of model-checking has been demonstrated by several successful model-checkers (eg, SMV [17], SPIN [15], BMC [3]) which have been used to test/verify industrial-level hardware/software systems with significant sizes Although both CTL and LTL are expressive, many temporal properties are out of their scope For instance, event counting is a fundamental concept to specify some important fairness properties As a motivating example, we consider the design (depicted as a finite state transition system in Figure 1) of a process scheduler The scheduler schedules two kinds of processes: and according to some scheduling strategy A transition with label (resp ) is taken when the scheduler chooses a (resp ) process to run It is required that the design shall satisfy some fairness properties; eg, starting from state, whenever is reached, the number of processes scheduled is greater than or equal to the number of processes scheduled and less than or equal to twice the number of processes scheduled To ensure that the design meets the requirement, we need check whether for any path that starts from and ends with, the linear constraint,!"$# is satisfied, where %"& ' Corresponding author (zdang@eecswsuedu)

; ; (resp "! ) stands for the count of labels (resp ) on path Notice that this property is nonregular [6] and, since the counts could go unbounded, the property is not expressible in CTL or LTL In general, by considering its negation, the property can be formulated as a linear reachability problem as follows Given: A finite state transition system with labels # #, two designated states and, and a linear constraint # # Question: Is there a path of from to such that satisfies (ie, $# #" holds)? The reachability problem is decidable To see this, one can treat to be a finite automaton with initial state and final state! is the regular language over alphabet "## # $&% accepted by A naive decision procedure consists of the following three steps: (i) Compute a regular expression for!, (ii) Calculate the semilinear set of the regular expression defined by a Presburger formula ' [19], and (iii) Check the satisfiability of the Presburger formula ')( Unfortunately, the time complexity of this procedure is at least *,+ -+, where / 01/ is the number of states in, even when 2 is fixed This is because the size of the regular expression, in worst cases, is exponential in / 01/ [16] 356 3 3 7 398 3 : " 35 Fig 1 An example of a scheduler In this paper, we present a new algorithm solving the linear reachability problem This algorithm is completely different from the naive one In the algorithm, we estimate a bound < (called a bounding box) from and such that, the Question-part is true iff the truth is witnessed by some on which the count =?>$ for each label @ is bounded by < Interestingly, after a complex loop analysis, estimating a bounding box < is reduced to a number theory problem: finding nonnegative minimal solutions to linear Diophantine systems There has been much research on this latter problem for homogeneous/inhomogeneous systems with (nonnegative) integer solutions [, 5, 13, 21] Suppose that is in a disjunctive normal form over linear equations/inequalities Using the Borosh-Flahive-Treybig bound in [], we are able to show that, in worst cases, when / 01/ is A the size (which will be made clear later) of, the bounding box < is bounded by * / 0B/?CED#CEF, where! is the maximal number of conjunctions in a single disjunctive term of Using this bounding box, one can easily show that the linear

reachability problem is solvable in time CED CEF C * / 01/ $# (1) when / 01/ A 2 and the size of In particular, when 2 and are fixed, the complexity is polynomial in / 01/ This is in contrast to the complexity of the naive algorithms that is exponential in the state number / 01/ Our complexity result in (1) for the linear reachability problem can be further used to obtain complexity bounds (which were unknown) for some other linear counting problems involving linear constraints over counts For instance, in contrast to the reachability problem, we consider a linear liveness problem as follows For an -path of, we say that is -io (infinitely often) at state if there are infinitely many prefixes of such that ends at and satisfies The liveness problem is to decide, given two states and, whether has an -path that starts from and is -io at The application issues of the problem can be found in [11] In particular, among other results in the same paper, it is shown that the liveness problem is decidable However, the time complexity is unknown In this paper, we are able to use (1) to establish a complexity bound for the liveness problem, which is similar to the bound given in (1) We also consider the linear reachability problem when is ordered; ie, on any path from to, each label is after all the $@ s, whenever For this restricted model of, we obtain a smaller complexity bound, * / 0B/, than (1) for the reachability problem, using the Pottier bound [21] (the Borosh-Flahive-Treybig bound is not applicable here) for nonnegative minimal solutions to linear Diophantine systems Interestingly, this restricted model and the complexity bound can be used to establish a new complexity result for timed automata [1] We first consider discrete timed automata where clocks take integral values The linear reachability problem for discrete timed automata is defined as follows: Given: A discrete timed automaton, two designated states and, and two linear constraints and over 2 variables Question: are there clock values # # # # # such that # # # reaches # # # and both # # and # # hold? Though many temporal verification problems involving linear constraints over clocks are known to be undecidable [1, 2, 12], the linear reachability problem is decidable for timed automata (even when the clocks are dense) [8 10] However, an upper bound for the worst case complexity is unknown Using the result for the linear reachability problem when is ordered, we can establish that the linear reachability problem for discrete timed automata is solvable in time * / 01/ when / 01/ A 2, the sizes of and, and the maximal absolute value of all the constants appearing in the clock constraints of This result can be generalized to timed automata with dense clocks using the pattern technique in [9] 2 Preliminaries Let be the set of nonnegative integers and 2 be a positive integer A finite state transition system can be defined as! 0##" #$ # (2)

/ / @ where 0 is a finite set of states, " " # # $ % is a set of labels, $ 0 " " % 0 is a set of transitions When $ 0 " % 0, the system is called a finite state machine A path of is a finite sequence of transitions in the form of? @ @ @C? E (3) for some such that for each, @ @ @C $ Path is a simple cycle if # # E are distinct and Path is a simple path if!# # # are all distinct For any path of, let denote the 2 -ary vector $# #, where each?> stands for the number of label $@ s occurrences on, 2 Let # # the form of be nonnegative integer variables An atomic linear constraint is in where " # %, # # and are integers When is (resp ), the constraint is called an equation (resp inequality) The constraint is made homogeneous if one makes in the constraint A linear constraint is a Boolean combination of atomic linear constraints (using ( # #! #!" ) Without loss of generality, throughout this paper, we assume that the linear constraint is always written as a disjunction &% # $, for some ', of conjunctions of atomic linear constraints When ', is called a conjunctive linear constraint is made homogeneous if each atomic linear constraint in is made homogeneous; we use (*),+ to denote the result In particular, a conjunctive linear constraint is a linear Diophantine equation system if each atomic linear constraint in is an equation Suppose that is a conjunctive linear constraint, which contains - equations and */ - inequalities One may write into 01 32, where " # %, 0 ( by 2 ) and 2 ( by 1) are matrices of integers, and 1 is the column of variables # # As usual, 50 # 2 is called the augmented matrix of, and 0 is called the coefficient matrix of We use // 0 //!6 7 to denote 8:9<; @"<= / @ / % ( @ is the element of row and column in 0 ) and use // 2 // 7 to denote the maximum of the absolute values of all the elements in 2 Assume > is the rank of 50 # 2, and? (resp? ) is the maximum of the absolute values of all the >@ A> minors of 0 (resp B0 # 2 ) When is a linear Diophantine equation system (ie, - ), for any given tuples & # # " and # # in, we say # # # # if @ for all 2 We say # # " # # if & # # # # and @ @ for some 2 A tuple # # is a minimal solution to if # # is a solution to but any # # with 5 # # # # # # is not Clearly, there are only finitely many minimal solutions to It has been an active research area to estimate a bound for minimal solutions, and the following Borosh-Flahive-Treybig bound [] is needed in this paper Theorem 1 (Borosh-Flahive-Treybig bound) A linear Diophantine equation system has solutions in nonnegative integers iff it has a solution # # in nonnegative integers, such that > unknowns are bounded by? and 2 C8:9<;% 2 # > D? () > unknowns are bounded by The Borosh-Flahive-Treybig bound gives a bound for one of the minimal solutions in nonnegative integers to the inhomogeneous system In contrast, the following Pottier

/ / bound gives an upper bound for all of the minimal solutions to a conjunctive (which is not necessarily a linear equation system); this result can be simply obtained from Corollary 1 in [21] Theorem 2 (Pottier bound) For any conjunctive linear constraint that contains - equations and / (*),+ - inequalities, there are two finite sets 0 and 0 for some, of vectors in such that (*),+ each element in 0 (resp 0 ) is a solution to (resp (*),+ ), For any, is a solution to iff there are # #, for some 0, (*),+ each component of all the vectors in 0 0 is bounded by // 0 // 6 7 // 2 // 7 C C " # # %, Therefore, for a conjunctive linear constraint, every solution can be represented as the sum of a small solution and a nonnegative linear combination of small solutions to ()+ (clearly, the inverse is also true) Here, small means that the solutions are bounded by the Pottier bound When is a linear constraint (ie, ' ), the Pottier bound of is defined to be the maximal of all the bounds obtained from Theorem 2 for each conjunctive linear constraint in / An inequality can be translated into an equation by introducing a slack variable (eg, into where, a new variable on, is the slack variable) So if is a conjunctive linear constraint (in which there are - equations and / - inequalities) over # #,, we may write into an equation system # #, #?C #,C with equations, where?c #?C are the slack variables In the next section, we will derive a bounding box < for the linear reachability problem such that its Question-part is true iff the truth is witnessed by a satisfying > < for each 2 From this <, the time complexity for solving the linear reachability problem can be easily obtained 3 A Bounding Box for the Linear Reachability Problem Let be a finite state transition system specified in (2) A set of 2 -ary nonnegative integer vectors is a small linear set (wrt the given ) if is in the form of " each %# (5) where nonnegative integer > satisfies > / 01/ # (6) 2 -ary nonnegative integer vectors # # satisfy / 01/ # (7)

% and for each # # >, / 0B/ # (8) where stands for the identity vector is a small semilinear set if it is a union of finitely many small linear sets Recall that the linear reachability problem is to decide whether there exists a path in from to such that satisfies a given linear constraint # #, Let be all paths of from to We use to denote the set of 2 -ary nonnegative integer vectors " =% Using a complex loop analysis technique by reorganizing simple loops on a path, one can show that is a small semilinear set Lemma 1 is a small semilinear set That is, it can be represented as, for some, 1,@ where each @ is a small linear set in the form of (5) @ (9) Remark 1 One might have already noticed that, (9) and (5) appear nothing new, since they simply rephrase the known fact that defines a semilinear set [19] However, the bounds for the coefficients shown in (6,7,8) are new Now let s turn to the property formula Recall that of ' conjunctive linear constraints,@ is written as a disjunction @ (10) Fix any 3' Suppose that @ contains atomic linear constraints After adding (at most ) slack variables # #, @ can be written into the following form:?, where the s and s are integers (each is -1 or 0) Let 0 be the coefficient matrix for variables # # and 2 be the column of # # in (11) Define // 0 // 6 7 and // 2 // 7 We may assume B (otherwise let B ) In the sequel, we shall use the following notions: (the maximum of all the values among all @ s), (the maximum of all the values among all @ s), and! (the maximum of all the values among all @ s) Due to the disjunctive representations of (10) and (9), we can consider only one conjunction of in the form of (11) and only one linear set in the form of (5) That is, by substituting # # in (11) with the expression in (5): 1 Note that though may be large, it is irrelevant here (11)

! =, the equation system (11) is transformed into the following equation system with unknowns # # and # # : Hence, the linear reachability problem is reduced to finding a nonnegative integer solution to (12) Using (7) and (8), a simple calculation reveals that, in (12), all of the s are bounded by / 01/ and all of the # # are bounded by / 01/ We use? to denote the maximum of the absolute values of all the &, &, minors of the coefficient matrix for system (12) and? to denote that of the augmented matrix Using the above mentioned bounds for the coefficients and constants in (12), one can conclude that? / 0B/ / 01/ (13) 9? / 01/ A direct application of the Borosh-Flahive-Treybig bound in Theorem 1 shows that system (12) has solutions in nonnegative integers iff the system has a solution # # # # # in nonnegative integers, among which > unknowns are bounded by? and unknowns are bounded by C> D? (here, without loss of generality, we assume the worst case that the rank of coefficient matrix of (12) is ) Applying the bounds? and C>? to in (5) and using (7) and (8), the linear reachability problem is further reduced to the problem of finding a / 0B/ C> satisfying: / / 01/? and $# #$ Noticing that!, and > / 01/ apply the bounds of? and? Hence,?C < / 0B/! / 01/ / 0B/ (12) / 01/5>? (1) according to (6), we in (13) to (1) and define a bounding box / 0B/ D / 01/ Theorem 3 Given a finite state transition system, two states $# linear constraint # #, the following two items are equivalent: / 01/ (15) 0, and a There is a path of from to satisfying, The above item is true for some further satisfying <, where < is defined in (15) Notice that < in (15) is independent of ' in (10) Also, when the number of states / 01/ in is much larger than 2 and the metrics of ; ie, / 01/ A 2 # # #!, the bounding box is in the order of?ced C F < * / 01/ (16) In this case, one can easily show that the linear reachability problem is solvable in time * / 01/ CED CEF C? (17)

' @ @ @ The Linear Liveness Problem An -path of is an infinite sequence such that each prefix is a path of Let and be any two designated states of We say that is -io (infinitely often) at if there are infinitely many prefixes from to of such that satisfies (ie, # #$ holds) The linear liveness problem can be formulated as follows: Given: A finite state transition system in (2), two designated states and, and a linear constraint # #, Question: Is there an -path that starts from and is -io at? In [11], this problem is shown decidable However, the time complexity is unknown In this section, we reduce the liveness problem to a linear reachability problem Recall that is in the form of (10), %,@ @, and (*),+ is the result of making @ homogeneous One key observation is as follows The Question-part in the linear liveness problem is true iff, for some ', (a) there is a path of from to satisfying @, and, (b) there is a path of from to satisfying ()+ A proof of this observation can be followed from [11] using the pigeon-hole principle (noticing that each atomic linear constraint in @ is in the form of () where " # % ) Both items are equivalent to the linear reachability problem for concerning @ and (*),+ @, respectively By trying out all of the ' number of @ s and ()+ s, and using Theorem 3 and (17), we conclude that: Theorem The linear liveness problem is solvable in time shown in (17), when / 0B/ A #! # 2# # 5 Ordered Finite State Transition Systems Let be a finite state transition system in (2) Suppose that an order of labels # # $ is fixed, say ) is ordered if, on any path from to, each label @ appears before each label, whenever In this case, behaves as follows: reading s for 0 or more times, then reading s for 0 or more times, and so on For this restricted version of, we will derive a better complexity bound than (17) for the linear reachability problem Lemma 2 The linear reachability problem for ordered is solvable in time * 5' / 01/ # (18) where is the Pottier bound for (ie, the maximum of the Pottier bounds for all @ s) Furthermore, since is independent of / 01/, the linear reachability problem for ordered is solvable in time * / 0B/ # (19) when / 01/&A ' # 2# Interestingly, this model of and the complexity bound can be used to obtain a complexity bound for timed automata in the next section

@ 6 The Linear Reachability Problem for Timed Automata A timed automaton [1] is a finite state machine augmented with a number of clocks All the clocks progress synchronously with rate 1, except when a clock is reset to 0 at some transition We first consider discrete timed automata where clocks take integral values Formally, a discrete timed automaton is a tuple 0# " # # %# $ # where 0 is a finite set of (control) states, # #, are clocks taking values in, and $ is a finite set of edges or transitions Each edge # # # denotes a transition from state / to state with enabling condition in the form of clock regions (ie, # # where # are clocks, denotes #* # or, and is an integer) and a clock reset set " "# # 2,% Sometimes, we also write the edge as ", or simply " when is > - Without loss of generality, we assume that / / That is, each transition resets at most one clock (Resetting several clocks can be simulated by resetting one by one) When, the edge is called a progress transition Otherwise, it is a reset transition is static if the enabling condition on each edge is simply > - The semantics of is defined as follows A configuration is a tuple of a control state and clock values Let "# # # and # # # be two configurations #& # # " # # # denotes a one-step transition satisfying all of the following conditions: There is an edge # # # in, The enabling condition of the edge is satisfied; ie, # # is true, If (ie, a progress transition), then every clock progresses by one time unit; ie, @ @, 2, (iv) If for some, "# % (ie, a reset transition), then resets to 0 and all the other clocks do not change; ie, and @ for each 2 We say that #& # # reaches # # # if #& # # " # # # # where " is the transitive closure of " The linear reachability problem for discrete timed automata is defined as follows Given: A discrete timed automaton, two designated states and, and two linear constraints and over 2 variables Question: are there clock values # # # # # such that # # # reaches # # # and both # # and # # hold? The problem is decidable, even when clocks are dense Its decidability proofs and application examples can be found in [8, 10, 9] However, as we mentioned earlier, the time complexity for the problem is unknown Using (18), we will obtain a complexity bound in this section Without loss of generality, we assume that both and in the linear reachability problem for timed automata are a disjunction of ' conjunctive linear constraints

7 / 7 7 # Each conjunctive linear constraint contains at most! which there are at most $ atomic linear constraints among ) to equations Similar to Section 3, we use (resp represent the maximal value // 0 //!6 7 (resp // 2 // 7 ) of all the conjunctive linear constraints 01 2 in and The complexity of the linear reachability problem will be measured on, among others,!, $, ',, We first consider a simpler case when, / 01/, and 2 is static Before we proceed further, more definitions are needed A reset order is a sequence # #, for some 3 2, where each @ contains exactly one element in " "# # 2,%, and all of the @ s are pairwisely disjoint Let " "# # 2,% @ @ An execution path of is of reset order if every clock in does not reset on, and for rest of the clocks, their last resets are in this order: @ # #@, with " %!# # " % For the instance of the linear reachability problem of static, we consider the Question-part witnessed by an execution path that is of any fixed reset order (there are only finitely many reset orders) From this instance and the given, we will construct an ordered finite state transition system and a linear constraint Then, we reduce the linear reachability problem of to the linear reachability problem of The key idea behind the construction is as follows Suppose The execution path can then be partitioned into segments separated by the last resets given in We use # # # to denote the number of progress transitions made on each segment respectively Suppose that the path starts with clock values # # and ends with clock values # # Observe that each @ can be represented as a sum on (some of) # # and # # # The case when is similar Following this line, one can show: * 2 2 2 D C Lemma 3 The linear reachability problem for static discrete timed automata is solvable in time *' "?C &/ 01/ (20) Hence, when / 01/&A 2#,' # #, the linear reachability problem for static is solvable in time " 2 * / 0B/ (21) Now, we consider the case when is not necessarily static Let be one plus the maximal absolute value of all the constants appearing in enabling conditions in We use to denote the result of (20) after replacing / 01/ with D C #/ 0B/,! with! 2, $ with $ 2, with 8:9<; #, with 8 9$; From [12, 10], one can construct a static with two designated states and and with at most D C / 01/ number of states to simulate faithfully From this result, one can show, using Lemma 3, Theorem 5 The linear reachability problem for discrete timed automata is solvable in time * 2 (22)!D Again, when / 01/ and are A the size of and, the time complexity of linear reachability problem for discrete timed automata is * / 0B/?C C # C?C D C (23)

7 7 Remark 2 Using the techniques in Section, one can obtain a complexity bound similar to (23) for the linear liveness problem [12] for discrete timed automata Also the complexity in (23) is more sensitive to than to / 01/ We turn now to the case when is a timed automaton with 2 dense clocks One can similarly formulate the semantics and the linear reachability problem for (eg, see [9]) With the pattern technique presented in [9], it is easy to show the following From and #, one can construct a discrete timed automaton with 2 discrete clocks and two linear constraints # such that the linear reachability problem of timed automaton concerning # is equivalent to the linear reachability problem of discrete timed automaton concerning # In addition, the number of states in is *?C?C / 01/, where 0 is the state set in (There are at most patterns [9]) Furthermore, and only depend on # and 2 (independent of ) Hence, we have the following conclusion: Theorem 6 The linear reachability problem for timed automata with dense clocks can still be solvable in time shown in (23), when / 01/# A 2 and the size of 7 Conclusions We obtained a number of new complexity results for various linear counting problems (reachability and liveness) for (ordered) finite state transition systems and timed automata At the heart of the proofs, we used some known results in estimating the upper bound for minimal solutions (in nonnegative integers) for linear Diophantine systems In particular, when all the parameters (such as the number of labels/clocks, the largest constant in a timed automaton, the size of the linear constraint to be verified, etc) except the number of states / 01/ of the underlying transition system are considered constants, all of the complexity bounds obtained in this paper is polynomial in / 01/ This is, as we mentioned in Section 1, in contrast to the exponential bounds that were previously known In practice, a requirement specification (eg, the in a linear counting problem) is usually small and simple [1] In this sense, our results are meaningful, since the large size of / 01/ is usually the dominant factor in efficiently solving these verification problems The counts of labels in a finite state transition system can be regarded as monotonic counters Therefore, our result also provides a technique to verify safety properties for a special class of counter machines with monotonic counters: starting from a state, whether it is always true that the counter values in satisfy a given linear constraint whenever reaches In the future, we will study whether the techniques in this paper can be generalized to handle the case when is further augmented with an unrestricted counter (ie, can be incremented, decremented, and tested against 0) or even a pushdown stack Additionally, it is also desirable to study whether our techniques can be further generalized to the reachability problem of some classes of Petri nets [18] The authors would like to thank P San Pietro and the anonymous referees for many valuable suggestions

References 1 R Alur and D L Dill A theory of timed automata Theoretical Computer Science, 126(2):183 235, April 199 2 R Alur and T A Henzinger A really temporal logic Journal of the ACM, 1(1):181 20, January 199 3 A Biere, A Cimatti, E Clarke, and Y Zhu Symbolic model checking without BDDs In TACAS 99, volume 1579 of LNCS, pages 193 207 Springer-Verlag, 1999 I Borosh, M Flahive, and B Treybig Small solutions of linear diophantine equations Discrete Mathematics, 58:215 220, 1986 5 I Borosh and B Treybig Bounds on positive integral solutions of linear diophantine equations Proceedings of the American Mathematical Society, 55:299 30, 1976 6 A Bouajjani, R Echahed, and P Habermehl On the verification problem of nonregular properties for nonregular processes In LICS 95, pages 123 133 IEEE CS Press, 1995 7 E M Clarke, E A Emerson, and A P Sistla Automatic verification of finite-state concurrent systems using temporal logic specifications TOPLAS, 8(2):2 263, 1986 8 H Comon and Y Jurski Timed automata and the theory of real numbers In CONCUR 99, volume 166 of LNCS, pages 22 257 Springer, 1999 9 Zhe Dang Binary reachability analysis of pushdown timed automata with dense clocks In CAV 01, volume 2102 of LNCS, pages 506 517 Springer, 2001 10 Zhe Dang, O H Ibarra, T Bultan, R A Kemmerer, and J Su Binary reachability analysis of discrete pushdown timed automata In CAV 00, volume 1855 of LNCS, pages 69 8 Springer, 2000 11 Zhe Dang, O H Ibarra, and P San Pietro Liveness Verification of Reversal-bounded Multicounter Machines with a Free Counter In FSTTCS 01, volume 225 of LNCS, pages 132 13 Springer, 2001 12 Zhe Dang, P San Pietro, and R A Kemmerer On Presburger Liveness of Discrete Timed Automata In STACS 01, volume 2010 of LNCS, pages 132 13 Springer, 2001 13 E Domenjoud Solving systems of linear diophantine equations: an algebraic approach In MFCS 91, volume 520 of LNCS, pages 11 150 Springer-Verlag, 1991 1 Matthew B Dwyer, George S Avrunin, and James C Corbett Patterns in property specifications for finite-state verification In ICSE 99, pages 11 21 ACM Press, 1999 15 G J Holzmann The model checker SPIN TSE, 23(5):279 295, May 1997 16 J Hopcroft and J Ullman Introduction to Automata theory, Languages, and Computation Addison-Wesley Publishing Company, 1979 17 KL McMillan Symbolic Model Checking Kluwer Academic Publishers, Norwell Massachusetts, 1993 18 Tadao Murata Petri nets: Properties, analysis and applications Proceedings of the IEEE, 77():51 580, 1989 19 R Parikh On context-free languages JACM, 13:570 581, 1966 20 A Pnueli The temporal logic of programs In FOCS 77, pages 6 57 IEEE CS Press, 1977 21 L Pottier Minimal solutions of linear diophantine equations: Bounds and algorithms In Rewriting Techniques and Applications, volume 88 of LNCS, pages 162 173 Springer- Verlag, 1991 22 M Y Vardi and P Wolper An automata-theoretic approach to automatic program verification (preliminary report) In LICS 86, pages 332 3 IEEE CS Press, 1986