Complementing Büchi Automata with a Subset-tuple Construction

Similar documents
1 Nondeterministic Finite Automata

Convert the NFA into DFA

Lecture 09: Myhill-Nerode Theorem

Formal Languages and Automata

Lecture 9: LTL and Büchi Automata

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

p-adic Egyptian Fractions

Coalgebra, Lecture 15: Equations for Deterministic Automata

Designing finite automata II

Parse trees, ambiguity, and Chomsky normal form

Bases for Vector Spaces

5. (±±) Λ = fw j w is string of even lengthg [ 00 = f11,00g 7. (11 [ 00)± Λ = fw j w egins with either 11 or 00g 8. (0 [ ffl)1 Λ = 01 Λ [ 1 Λ 9.

CMSC 330: Organization of Programming Languages

Lecture 08: Feb. 08, 2019

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2

Minimal DFA. minimal DFA for L starting from any other

Nondeterminism and Nodeterministic Automata

3 Regular expressions

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb.

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Finite Automata-cont d

Chapter 2 Finite Automata

More on automata. Michael George. March 24 April 7, 2014

Homework 3 Solutions

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

Theory of Computation Regular Languages

Formal languages, automata, and theory of computation

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science

Regular expressions, Finite Automata, transition graphs are all the same!!

Lecture 3: Equivalence Relations

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Talen en Automaten Test 1, Mon 7 th Dec, h45 17h30

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University

Farey Fractions. Rickard Fernström. U.U.D.M. Project Report 2017:24. Department of Mathematics Uppsala University

Homework Solution - Set 5 Due: Friday 10/03/08

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages

Closure Properties of Regular Languages

Model Reduction of Finite State Machines by Contraction

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

CS 275 Automata and Formal Language Theory

State Minimization for DFAs

CS 311 Homework 3 due 16:30, Thursday, 14 th October 2010

Finite Automata. Informatics 2A: Lecture 3. John Longley. 22 September School of Informatics University of Edinburgh

NFAs continued, Closure Properties of Regular Languages

Harvard University Computer Science 121 Midterm October 23, 2012

The size of subsequence automaton

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

CHAPTER 1 Regular Languages. Contents

Name Ima Sample ASU ID

First Midterm Examination

1 From NFA to regular expression

Homework 4. 0 ε 0. (00) ε 0 ε 0 (00) (11) CS 341: Foundations of Computer Science II Prof. Marvin Nakayama

Worked out examples Finite Automata

PART 2. REGULAR LANGUAGES, GRAMMARS AND AUTOMATA

Some Theory of Computation Exercises Week 1

NFAs continued, Closure Properties of Regular Languages

DFA minimisation using the Myhill-Nerode theorem

Infinite Geometric Series

2.4 Linear Inequalities and Interval Notation

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS

Designing Information Devices and Systems I Spring 2018 Homework 7

How Deterministic are Good-For-Games Automata?

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-*

Finite Automata. Informatics 2A: Lecture 3. Mary Cryan. 21 September School of Informatics University of Edinburgh

CS 330 Formal Methods and Models

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!)

CSE396 Prelim I Answer Key Spring 2017

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Quadratic Forms. Quadratic Forms

GNFA GNFA GNFA GNFA GNFA

FABER Formal Languages, Automata and Models of Computation

Deterministic Finite Automata

Review of Gaussian Quadrature method

Lecture 2 : Propositions DRAFT

The Regulated and Riemann Integrals

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck.

Tutorial Automata and formal Languages

Section 4: Integration ECO4112F 2011

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems

Torsion in Groups of Integral Triangles

1.4 Nonregular Languages

1.3 Regular Expressions

Finite-State Automata: Recap

set is not closed under matrix [ multiplication, ] and does not form a group.

Formal Methods in Software Engineering

Non-Deterministic Finite Automata. Fall 2018 Costas Busch - RPI 1

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014

Non-deterministic Finite Automata

Discrete Mathematics and Probability Theory Spring 2013 Anant Sahai Lecture 17

Transcription:

DEPARTEMENT D INFORMATIQUE DEPARTEMENT FÜR INFORMATIK Bd de Pérolles 90 CH-1700 Friourg www.unifr.ch/informtics WORKING PAPER Complementing Büchi Automt with Suset-tuple Construction J. Allred & U. Ultes-Nitsche Internl working pper no 15-01 Mrch 2015

Complementing Büchi Automt with Suset-tuple Construction Joel Allred Deprtment of Informtics University of Friourg, Switzerlnd E-Mil: joel.llred@unifr.ch Ulrich Ultes-Nitsche Deprtment of Informtics University of Friourg, Switzerlnd E-Mil: uun@unifr.ch Astrct Complementtion of Büchi utomt is well known for eing difficult. In the worst cse, stte-spce growth of (0.76n) n is unvoidle. Recent studies suggest tht simpler lgorithms perform etter thn more involved ones on prcticl cses. In this pper, we present simple direct lgorithm for complementing Büchi utomt. It involves structured suset construction (using tuples of susets of sttes) tht produces deterministic utomton. This construction leds to complementtion procedure tht resemles the strightforwrd complementtion lgorithm for deterministic Büchi utomt, the ltter lgorithm ctully eing specil cse of our construction. I. INTRODUCTION Checking ω-lnguge continment is importnt in liner-time temporl verifiction. For ω-lnguges B nd P, testing B P is done lgorithmiclly y testing B P =, where P is the complement of P. If P is regulr nd represented y Büchi-utomton, Büchi-utomton representing P cn e constructed effectively. In the worst cse, the utomton for P hs (0.76n) n mny sttes [1], where n is the numer of sttes of the utomton for P. Complementtion of Büchi utomt is difficult ecuse in generl, Büchi utomt cnnot e mde deterministic. Complementtion of deterministic Büchi utomton A is, however, quite simple: construct copy of A, remove ll ccepting sttes in the copy, mke the remining sttes in the copy ccepting sttes, mke ll sttes in A non-ccepting, nd finlly llow nondeterministiclly moving from A to corresponding sttes in its copy. So the complement utomton to deterministic Büchi utomton consists of two deterministic utomt (let s cll them n upper nd lower utomton, if we ssume tht one is drwn elow the other) with trnsitions from upper to the lower utomton ut no trnsitions ck from the lower to the upper one. We dpt this construction to nondeterministic utomt y constructing deterministic version of given utomton tht then Büchi-ccepts different ω-lnguge ut cn still e used in construction similr to the one for deterministic Büchi-utomt to produce complement utomton. It results gin in n utomton consisting siclly of two deterministic utomt tht re then comined y llowing to move nondeterministiclly from the upper to the lower one ut not vice vers. The run nlysis tht we developed independently s some similrities with the nlysis y Fogrty, Kupfermn, Vrdi, nd Wilke [2] who elegntly trnslte the slice-sed pproch in [3] to rnk-sed pproch. Insted of unifiying interim constructions, we directly construct complement utomton using the sole nlysis of the runs of the originl utomton, in similr wy deterministic Büchi utomt re complemented. When developing our construction, the key notion will e tht of greedy ccepting run tht we use in this pper. In short, greedy run is run tht lwys ims t reching n ccepting stte s quickly s possile. Our construction will consider only greedy runs. By doing so, visits of sets of ccepting sttes in runs of the constructed utomton llow fithfully to identify whether or not they cn lso occur in (greedy) run of the given utomton. To consider only greedy runs in deterministic version of given Büchi-utomton, we siclly conduct suset construction to which we dd sufficient structure to identify greedy runs: the sttes in the construction re tuples of sets of sttes of the given utomton, sets of non-ccepting sttes nd sets of ccepting sttes re never mixed (to void losing too much informtion [4]). From the so constructed deterministic utomton, y identifying prticulr property of stte sets occurring in the stteset tuples (they re either continued or discontinued), we cn construct nondeterministic one ccepting the complement ω-lnguge of the given Büchi utomton in similr wy s for deterministic Büchi utomt. The usul complementtion procedure for deterministic Büchi utomt (Section 3 in [5]) will e specil cse of our construction. II. PRELIMINARIES Let Σ e n lphet (set of finite crdinlity). The set of ll ω-words (infinitely long words) over Σ is designted y Σ ω. Susets of Σ ω re clled ω-lnguges over Σ. Büchi utomton A = (Q, Σ, δ, q in, F ) consists of finite set Q of sttes, input lphet Σ, trnsition function δ : Q Σ 2 Q, initil stte q in Q, nd set F Q of ccepting sttes.

δ is extended in the usul wy to finite words (insted of only single symols) nd sets of stte (insted of only single sttes). Let x = x(0)x(1)x(2) Σ ω. A run r of A on x is sequence r(0)r(1)r(2) of sttes such tht r(0) = q in nd r(i + 1) δ(r(i), x(i)), for ll i 0. Runs on finite words re defined similrly. Let ω(r) e the set of ll sttes tht recur infinitely often in r. Run r is ccepting if nd only if ω(r) F. Automton A Büchi-ccepts x if nd only if there exists n ccepting run of A on x [6], [7]. The set of ll ω-words ccepted y A is the ω-lnguge tht A ccepts. If, for ll q Q nd Σ, δ(q, ) is singleton set or the empty set, then A is clled deterministic. Otherwise it is clled nondeterministic. For ω-lnguges, the lnguge clsses ccepted y deterministic nd nondeterministic utomt differ: There exist ω-lnguges tht cn only e represented y nondeterministic finite utomt [6], [7]. We cll (finite) run r = r(0)r(1)r(2) r(n) on some finite word greedy if it lwys tries to rech, on its wy to r(n), ccepting sttes s quickly s possile. To define greediness formlly, let α : Q {0, 1} e function tht ssigns 1 to stte if nd only if it is ccepting. α cn e extended in the usul wy to function α : Q {0, 1} on sequences of sttes y its stepwise ppliction. We interpret words over {0, 1} s inry numers with the most significnt it to the left. We define tht r = r(0)r(1)r(2) r(n) on finite word w is greedy if nd only if there does not exist finite run r = r(0)r (1)r (2) r (n 1)r(n) on w (note tht r nd r coincide in their first nd lst stte) such tht α(r) < α(r ). The definition of greediness cn e extended to infinite runs r y defining tht infinite run r is greedy if nd only if ll of its finite prefixes re greedy. It is to e noted tht the notion of greediness similr to lexicogrphiclly mximl runs, s presented in [2]. A. Definitions III. THE SUBSET-TUPLE CONSTRUCTION Let A = (Q, Σ, δ, q in, F ) e Büchi utomton. We construct n interim deterministic Büchi-utomton A = (Q, Σ, δ, ({q in }), ) from which we will lter derive the complement utomton of A. The stte set of A contins non-empty disjoint sets of A-sttes: 1 1 By A-sttes we refer to the sttes of utomton A. Q = Q m=1 { (S1,..., S m ) (2 Q \ { }) m ( 1 j < k m : S j S k = ) }. A does not hve ccepting sttes s A s cceptnce condition will not influence the construction of the complement utomton. We will use some other oservtion out runs of A to define the cceptnce condition when finlly constructing the complement utomton. We define trnsition function δ : Q Σ Q susequently. Let p Q nd let m = p. Let p (j) e the jth component of p (note tht p (j) is set of A-sttes). For Σ, we define the -successor of the jth component of p to e m σ(p, j, ) = δ(p (j), ) \ δ(p (k), ). k=j+1 σ(p, j, ) contins ll A-sttes tht re -successors of A- sttes in p (j) nd not lredy contined in σ(p, k, ), for k > j. From this definition, we get immeditely tht sets σ(p, j, ) nd σ(p, k, ) re disjoint. The definition of σ(p, j, ) gurntees tht if n A-stte could occur in multiple components of tuple, we will keep it only in the rightmost component. Note tht even though δ(p (j), ) my not e empty, σ(p, j, ) still cn e empty. We prtition ech set σ(p, j, ) into non-ccepting A-sttes nd ccepting A-sttes: σ n (p, j, ) = σ(p, j, ) (Q \ F ), σ (p, j, ) = σ(p, j, ) F. As we just prtitioned the sets σ(p, j, ), the resulting sets re still pirwise disjoint. We put σ (p, j, ) to the right of σ n (p, j, ) nd remove ll empty sets. We define the trnsition function of A : δ (p, ) = q, where q is otined y removing ll empty sets in ( σn (p, 1, ), σ (p, 1, ),..., σ n (p, m, ), σ (p, m, ) ) ut otherwise keeping the order of the non-empty components. Lemm 1. For ll rechle sttes p Q in A nd ll 1 j < k p, p (j) nd p (k) re nonempty nd disjoint. B. Exmple We tke the utomton in Figure 1 s n exmple. Automton A in Figure 1 Büchi-ccepts ll ω-words over {} tht contin finitely mny occurrences of symol.

q in q 1 q 2 ({q in }) ({q in }, {q 1 }) ({q in }, {q 1 }, {q 2 }) Fig. 1. Büchi utomton A ccepting {} {} ω. Fig. 4. Initil frgment of A. From A, we construct A stepwise. The initil stte of A is the 1-tuple tht contins A-stte set {q in } (see Figure 2). ({q in }) Fig. 2. Initil frgment of A. With respect to A s trnsition reltion, we get σ(({q in }), 1, ) = δ({q in }, ) = {q in, q 1 }, σ(({q in }), 1, ) = δ({q in }, ) = {q in, q 1 }. Becuse {q in, q 1 } contins non-ccepting A-stte q in s well s ccepting A-stte q 1, {q in, q 1 } is prtitioned into two sets: σ n (({q in }), 1, ) = σ n (({q in }), 1, ) = {q in }, σ (({q in }), 1, ) = σ (({q in }), 1, ) = {q 1 }, nd we get ({q in }, {q 1 }) s the successor of ({q in }) when A reds or (see Figure 3). ({q in }) ({q in }, {q 1 }) Fig. 3. Initil frgment of A. In the next step, we clculte for symol : nd σ(({q in }, {q 1 }), 2, ) = δ({q 1 }, ) = {q 2 } σ(({q in }, {q 1 }), 1, ) = δ({q in }, ) \ δ({q 1 }, ) = {q in, q 1 } \ {q 2 } = {q in, q 1 }. As in the previous step, {q in, q 1 } is prtitioned into the two sets {q in } nd {q 1 }, nd we get ({q in }, {q 1 }, {q 2 }) s the -successor of ({q in }, {q 1 }). Similrly, for symol, we clculte nd σ(({q in }, {q 1 }), 2, ) = δ({q 1 }, ) = {q 1 } σ(({q in }, {q 1 }), 1, ) = δ({q in }, ) \ δ({q 1 }, ) = {q in, q 1 } \ {q 1 } = {q in }. No sets need to e prtitioned nd we get ({q in }, {q 1 }) s the -successor of ({q in }, {q 1 }). (see Figure 4). Now we clculte for symol : nd σ(({q in }, {q 1 }, {q 2 }), 3, ) = δ({q 2 }, ) = {q 2 }, σ(({q in }, {q 1 }, {q 2 }), 2, ) = δ({q 1 }, ) \ δ({q 2 }, ) σ(({q in }, {q 1 }, {q 2 }), 1, ) = {q 2 } \ {q 2 } =, = δ({q in }, ) \ (δ({q 1 }, ) δ({q 2 }, )) = {q in, q 1 } \ {q 2 } = {q in, q 1 }. As previously, {q in, q 1 } is prtitioned into the two sets {q in } nd {q 1 }, the empty set is removed, nd we get ({q in }, {q 1 }, {q 2 }) s the -successor of ({q in }, {q 1 }, {q 2 }). Similrly, for symol, we clculte nd σ(({q in }, {q 1 }, {q 2 }), 3, ) = δ({q 2 }, ) = {q 2 }, σ(({q in }, {q 1 }, {q 2 }), 2, ) = δ({q 1 }, ) \ δ({q 2 }, ) σ(({q in }, {q 1 }, {q 2 }), 1, ) = {q 1 } \ {q 2 } = {q 1 }. = δ({q in }, ) \ (δ({q 1 }, ) δ({q 2 }, )) = {q in, q 1 } \ {q 1, q 2 } = {q in }. No sets need to e prtitioned nd we get ({q in }, {q 1 }, {q 2 }) s the -successor of ({q in }, {q 1 }, {q 2 }), completing the construction (see Figure 5). ({q in }) ({q in }, {q 1 }) ({q in }, {q 1 }, {q 2 }) Fig. 5. Interim utomton A to Büchi utomton A of Figure 1. C. Additionl Nottion As pointed out in the previous section, it is importnt to identify for trnsitions in A which component in successor

stte results from which component in the predecessor stte. In ddition, it will e importnt to identify which component will eventully hve no successor component ny more (the component disppers eventully, it is discontinued). Let e symol in Σ. Let p nd q e two A -sttes such tht δ (p, ) = q. Let 1 j p nd 1 k q. If q (k) σ(p, j, ), then we write p (j) q (k), indicting tht p s -successor q contins component k ecuse p contins component j. We extend this definition to finite words w = 0 1... l Σ in the usul wy: q 0(j 0 ) w q l+1(j l+1 ) if nd only if there exist sttes q 1, q 2,..., q l nd indices j 1, j 2,..., j l such tht for ll i, 0 i l, we hve q i (j i) i q i+1 (j i+1). If we tke the exmple from Figure 5, we hve, for instnce, ({q in }, {q 1 }, {q 2 })(1) ({q in }, {q 1 }, {q 2 })(2), ecuse when reding in stte ({q in }, {q 1 }, {q 2 }), the successor stte tht is lso ({q in }, {q 1 }, {q 2 }) contins {q 1 } ecuse {q 1 } σ(({q in }, {q 1 }, {q 2 }), 1, ). If we chnge however the symol, then ({q in }, {q 1 }, {q 2 })(2) ({q in }, {q 1 }, {q 2 })(2), ecuse when reding in stte ({q in }, {q 1 }, {q 2 }), the successor stte tht is lso ({q in }, {q 1 }, {q 2 }) contins {q 1 } ecuse {q 1 } σ(({q in }, {q 1 }, {q 2 }), 2, ). For the reminder of this pper, we lwys ssume tht A is complete. This cn e chieved, for instnce, y mking A complete efore constructing A. It gurntees tht for ech ω-word x, unique (A is deterministic) run of A on x does lwys exist. Let x = x(0)x(1)x(2)... Σ ω. Let r = r (0)r (1)r (2)... e the run of A on x. Let i 0 nd let 1 j r (i). We write r (i)(j) to indicte tht either there does not exist k such tht r (i)(j) x(i) r (i + 1)(k), or for ech k such tht r (i)(j) x(i) r (i + 1)(k) we hve r (i + 1)(k). The nottion r (i)(j) is used to indicte tht in the run r of A on x, component j of stte r (i) will dispper. Either it disppers immeditely (it does not hve n x(i)-successor) or it disppers eventully (ll its x(i)-successors will dispper). We will sy tht the component is discontinued in A s run on x. Conversely, we write r (i)(j) if nd only if r (i)(j) does not hold (we then sy tht r (i)(j) is continued in A s run on x). In ddition, we write r (i)(j) F if nd only if r (i)(j) nd q (i)(j) F, nd r (i) F if nd only if there exists j such tht r (i)(j) F. If r (i)(j), then r (i)(j) hs n x(i)-successor r (i + 1)(k) such tht r (i + 1)(k), ecuse otherwise r (i)(j) would hold. Therefore, nd ecuse of the pirwise disjointness of components in A -sttes (Lemm 1), the numer of continued components cnnot decrese from one stte to the next in A s run on x: Lemm 2. Let k e the numer of different components r (i)(j) of stte r (i) such tht r (i)(j), nd let l e the numer of different components r (i + 1)(j) of stte r (i + 1) such tht r (i + 1)(j). Then k l. As n exmple, let y =.... The run r of the utomton in Figure 5 on ω-word y is then: ({q in })({q in }, {q 1 })({q in }, {q 1 }, {q 2 })({q in }, {q 1 }, {q 2 })... In this run, we now lel ll components of A -sttes either with or, depending on whether they re continued or not: ({q in } )({q in }, {q 1 } )({q in }, {q 1 }, {q 2 } ) ({q in }, {q 1 }, {q 2 } )({q in }, {q 1 }, {q 2 } )... As we could see in the construction of the utomton in Figure 5, ({q in }, {q 1 }, {q 2 })(2) does not hve successor (i.e. the successor set is the empty set) when reding symol, ecuse σ(({q in }, {q 1 }, {q 2 }), 2, ) = δ({q 1 }, ) \ δ({q 2 }, ) = {q 2 } \ {q 2 } =. Therefore ({q in }, {q 1 }, {q 2 })(2) is lelled with in the run, s the run is on n ω-word tht contins infinitely mny times symol, nd ({q in }, {q 1 }, {q 2 })(2) never persists. The sitution chnges entirely, when we consider ω-word z =... (two s followed y exclusively s). Run r of A on z is gin: ({q in })({q in }, {q 1 })({q in }, {q 1 }, {q 2 })({q in }, {q 1 }, {q 2 })... However, lelling ll components of A -sttes either with or, depending on whether they re continued or not, leds now to: ({q in } )({q in }, {q 1 } )({q in }, {q 1 }, {q 2 } ) ({q in }, {q 1 }, {q 2 } )({q in }, {q 1 }, {q 2 } )...

Now ({q in }, {q 1 }, {q 2 })(2) is lwys lelled with ecuse the sence of symol in z results in ({q in }, {q 1 }, {q 2 })(2) lwys hving successor: σ(({q in }, {q 1 }, {q 2 }), 2, ) = δ({q 1 }, ) \ δ({q 2 }, ) = {q 1 } \ {q 2 } = {q 1 }. Becuse q 1 is n ccepting A-stte, the run cn even e lelled s: ({q in } )({q in }, {q 1 } F )({q in }, {q 1 } F, {q 2 } ) ({q in }, {q 1 } F, {q 2 } )({q in }, {q 1 } F, {q 2 } )... With our new nottion, we will show in the next section tht run r of A on ω-word x will contin infinitely mny sttes with component lels F if nd only if the originl utomton A Büchi-ccepts x. D. Some Properties of the Construction Let q Q. We will write q to designte q i=1 q (i), i.e. the set of ll A-sttes tht occur in q. From the definition of the trnsition function δ we get immeditely: Lemm 3. δ( q, ) = δ (q, ). For the reminder of this section, let Σ, let w Σ, let x Σ ω, nd let r e the run of A on x. Lemm 4. δ({q in }, w) = δ (q in, w). Proof. We prove the lemm y n induction on the length w of w. If w = 0, then A reches {q in } = q in y reding w. If w > 0, then w = v with v Σ nd Σ. Assuming δ({q in }, v) = δ (q in, v) we get: δ({q in }, w) = δ(δ({q in }, v), ) = δ( δ (q in, v), ) = δ (δ (q in, v), ) = δ (q in, w), where the second equlity holds y induction, nd the third pplies Lemm 3. Lemm 5. If there re infinitely mny j such tht r (j) contins continued set of ccepting sttes (written: r (j) F ), then A ccepts x. Proof. From Lemm 2 we know tht the numer of continued components cnnot decrese when moving forwrd in run. Becuse ech stte in A cn hve t most m components, where m is the numer of sttes in A, the numer of continued components must remin constnt fter some position k in run r. Let this numer e l where 1 l m. So fter position k in r, ech stte will contin l continued components, nd therefore ech continued component will hve exctly one continued component s its successor when reding the respective symol. So fter position k, we cn identify l sequences of consecutive continued components in r. Becuse there re infinitely mny continued components in r tht re sets of ccepting A-sttes, t lest one of these l sequences of consecutive continued components must contin infinitely mny continued components tht re sets of ccepting A-sttes (ecuse l is finite). Therefore there must e sequences i 1, i 2, i 3... of run positions nd j 1, j 2, j 3... of component indices such tht, for ll n 1 nd w n = x(i n )... x(i n+1 1): nd r (i n )(j n ) F r (i n )(j n ) wn r (i n+1 )(j n+1 ). Then there exists to ech A-stte q n+1 r (i n+1 )(j n+1 ) n A-stte q n r (i n )(j n ) such tht q n+1 δ(q n, w n ). Applying Koenig s Lemm [8], there exists sequence p 1, p 2, p 3,... of A-sttes such tht p n+1 δ(p n, w n ) nd p 1 δ ( q in, x(0)... x(i 1 1) ). Therefore there exists run r of A on x tht contins the sttes p n. Becuse ll p n re ccepting A-sttes, r is n ccepting run nd A ccepts x. Lemm 6. If A ccepts x, then there re infinitely mny i such tht r (i) contins continued set of ccepting sttes (written: r (i) F ). Proof. Let r e greedy ccepting run of A on x nd let r e the run of A on x. We cn then prove (see elow) tht there exists sequence j 0, j 1, j 2... of component indices, 1 j 0, j 1, j 2... m, such tht for ll i 0: nd r(i) r (i)(j i ) r (i)(j i ) x(i) r (i + 1)(j i+1 ). Therefore ll r (i)(j i ) re continued. In ddition, ecuse r is ccepting, infinitely mny r(i) re ccepting nd so re infinitely mny r (i)(j i ), ecuse they contin r(i) nd re therefore sets of ccepting A-sttes. Then infinitely mny r (i)(j i ) re continued nd ccepting, proving the lemm. Wht we still need to prove to complete the proof of the lemm is tht r(i) r (i)(j i ) nd r (i)(j i ) x(i) r (i + 1)(j i+1 ). We prove this fct y contrdiction: we ssume it is not true nd prove tht then r cnnot e greedy. Becuse of Lemm 4, there is lwys component r (i)(j i ) in A -stte r (i) tht contins r(i). If the sttement is not true, then the sequence j 0, j 1, j 2,... of component indices such tht r(i) r (i)(j i ) must contin position k 0 such tht r (k)(j k ) x(k) r (k + 1)(j k+1 ).

Let k e the smllest such position. According to the definition of A s trnsition function δ, there must e j k > j k such tht r (k)(j k) x(k) r (k + 1)(j k+1 ). Then there is sequence j 0, j 1, j 2,..., j k of component positions such tht, for ll 1 n k 1 such tht r (n)(j n) x(n) r (n + 1)(j n+1). j 0, j 1, j 2,..., j k nd j 0, j 1, j 2,..., j k will coincide in few first indices. 2 Let l e the first position t which j 0, j 1, j 2,..., j k nd j 0, j 1, j 2,..., j k strt to differ. Becuse j k > j k, lso j l > j l. So we hve nd r (l 1)(j l 1 ) x(l 1) r (l)(j l ), r (l 1)(j l 1 ) x(l 1) j l > j l. r (l)(j l), From the definition of A s trnsition function δ we get tht r (l)(j l ) contins non-ccepting A-sttes, ut r (l)(j l ) contins ccepting A-sttes. Let r(0) r(1)... r(k + 1) e the run of A on x(0)x(1)... x(k) such tht for ll 1 n k + 1 nd r(n) r (n)(j n) r(k + 1) = r(k + 1). Then r(0) r(1)... r(k + 1) nd r(0)r(1)... r(k + 1) re runs of A on x(0)x(1)... x(k), nd r(0) r(1)... r(k + 1) visits n ccepting stte erlier thn r(0)r(1)... r(k + 1) does. So r(0)r(1)... r(k + 1) cnnot e greedy, nd consequently r cnnot e greedy s r(0)r(1)... r(k + 1) is prefix of r, contrdicting the choice of r nd completing the proof of the lemm. Putting Lemms 5 nd 6 together, we otin: Corollry 1. A ccepts x if nd only if r contins infinitely mny A -sttes tht contin continued sets of ccepting A- sttes. To complete this section, let us riefly look t the size of the construction: we clculte the numer of sttes in A. These sttes re n-tuples of disjoint sets of A-sttes, where n rnges from 1 to m nd m is the numer of sttes of A. 2 They coincide t lest in j 0 = j 0 = 1, ecuse r (0) is the initil stte of A tht contins single component (contining the initil stte of A). The numer of wys of prtitioning set of n lelled ojects into k non-empty unlelled susets cn e written s Stirling numer of the second kind [9] : { } n = 1 k k! k ( ) k ( 1) k j j n. j j=0 The numer of wys to prtition set of n lelled ojects into non-empty unlelled susets of ny size is the Bell numer [10] n { } n B n =. k k=0 Since we consider here tuples nd not just prtitions, we must multiply ech term y the numer of possile orderings, giving us the ordered Bell numer [11]: n { } n (n) = k!. k k=0 Now, the ordered Bell numer represents the numer of tuples of non-empty components one cn crete using ll n elements. In the construction presented ove, ll elements my not e used. We hve to sum up the ordered ell numers for ech suset of Q. The numer of tuples (wek-orderings) over m elements, which we write # tuples (m), is thus the sum of the ordered Bell numers (n) with n rnging from 1 to m, multiplied y the numer of wys of choosing n elements over m: ( ) m # tuples (m) = (n). n n=1 The following recurrence reltion [12]: m 1 n=0 ( ) m (m n) = 2(m) 1 n leds to much simpler expression of the size of A : ( ) m # tuples (m) = (n) n n=1 ( ) ( ) m m = (n) (0) n 0 n=0 }{{} =1 ( ) m = (n) 1 m n n=0 ( ) m = (m n) 1 n n=0 m 1 ( ) ( ) m m = (m n) + (m m) 1 n m n=0 }{{} =0 = 2(m) 1

The ordered Bell numers cn e pproximted y [13]: (m) m! 2(ln 2) m+1 nd thus the size of the upper prt is symptoticlly [14]: # tuples (m) (m) (0.53m) m. IV. THE COMPLEMENTATION CONSTRUCTION A. Additionl Indices With the use of colouring of the tuple components, we cn now extend the utomton A descried in Section III, to uild n utomton A c complement to A. In the process, we crete n upper (non-ccepting) utomton  nd lower (ccepting) utomton Ǎ nd put them together into utomton A c. This colouring tkes the form of n index tht cn tke integer vlues in [ 1, 2]. The mening of the colours will e presented further down. Wheres stte q of A is written (S 1, S 2,..., S m ), stte q of Â, Ǎ or A c is written s q = ( (S 1, c 1 ), (S 2, c 2 ),..., (S m, c m ) ), where S j 2 Q \ { } nd c j [ 1, 2], 1 j m. B. Upper (Non-ccepting) Prt The upper prt  represents the initil prt of A c nd contins no ccepting sttes. The denomintion upper comes from the fct tht the uthors generlly picture the ccepting prt of the complement under the non-ccepting one. The structure is inspired y the complementtion construction for deterministic Büchi utomt, where the non-ccepting prt is simply non-ccepting copy of the originl utomton representing everything tht cn hppen in finite prefix of n ω-word. Accepting runs of A c then jump to the lower (ccepting) prt. In the upper utomton  = ( ˆQ, Σ, ˆδ, ˆq in, ˆF ) we simply ppend colour 1 to ll components of ech Â-stte. Sttes (written (S 1, S 2,..., S m )) of the interim utomton A re thus rewritten ( (S 1, 1), (S 2, 1),... (S m, 1) ) in Â. The trnsition function should e rewritten ccordingly s follows. Let Σ, p := (S 1,..., S m ) Q, q := (S 1,..., S m ) Q. If δ (p, ) = q where δ is s in Section III, then for ˆδ is defined y: ˆp := ( (S 1, 1),..., (S m, 1) ) ˆQ nd ˆq := ( (S 1, 1),..., (S m, 1)) ˆQ, As for the other elements: ˆδ(ˆp, ) := ˆq. ˆq in := ( ({q in }, 1) ) F := Only Â-sttes will hve components with colour 1. C. Lower (Accepting) Prt The lower utomton Ǎ := ( ˇQ, Σ, ˇδ, ˇq in, ˇF ) cn e defined in similr fshion, ut with vlues 0, 1, 2 for the colouring indices nd non-empty ccepting set ˇF. The set of ccepting sttes F c is then defined ccording to the colouring of the components of the sttes. In nutshell, for n ω-word x Σ ω we wnt the run r c of A c on x to e ccepting if nd only if ech greedy run r of the originl utomton A on x either: eventully stops visiting sttes of F, or is discontinued (i.e. is finite or ecomes non-greedy). Trnslted to Ǎ (where ny finite ehviour hs lredy een tken cre of in Â, these constrints ecome: the run does not visit sttes of F, or it is discontinued (i.e. is finite or ecomes non-greedy). We now give some insight into the mening of the colours. Let i e the point where run r c jumps to the lower prt, i.e. i i r c (i) Ǎ. The colours of the components of the sttes of Ǎ hold some informtion on wht hppens in the greedy runs of A, fter i. Colour c = 0: If tuple component (S j, c j ) is 0-coloured in r c (i), i.e. (S j, 0) r c (i), for n i i, then for ech stte q in S j, the greedy run r of A s.t. r(i) = q hs not yet visited n ccepting A-stte since i. An Ǎ-stte contining only 0-coloured components cn e set ccepting, ecuse ll greedy runs of A tht my hve visited n ccepting A- stte etween i nd i hve disppered. Colour c = 2: If tuple component (S j, c j ) is 2-coloured in r c (i), i.e. (S j, 2) r c (i), for n i i, then for ech stte q in S j, the greedy run r of A s.t. r(i) = q hs visited n ccepting A-stte since i. A c -sttes contining 2- coloured components re kept non-ccepting, ecuse tht greedy run r hs visited ccepting A-sttes nd hs not yet disppered. If it never disppers, then r c only visits non-ccepting sttes nd it is correct to reject r c in A c. Colour c = 1: If tuple component (S j, c j ) is 1-coloured in r c (i), i.e. (S j, 1) r c (i), for n i i, then for ech stte q in S j, the greedy run r of A s.t. r(i) = q hs visited n ccepting A-stte since i, ut there lso exist 2-coloured components tht hve not yet disppered. We sy tht

1-coloured components re on hold, mening tht for the moment, we wit until the 2-coloured components hve disppered. When this hppens, 1-coloured components ecome 2-coloured in the following stte. A c -sttes tht contin only 0-coloured or 1-coloured components re set ccepting, ecuse ll greedy runs of A tht hve visited n ccepting A-stte etween i nd i hve disppered. If this hppens infinitely often, then no greedy run of A cn visit infinitely mny ccepting A-sttes, nd it is correct to ccept r c in A c. We define Ǎ formlly. First, let us write the set of possile sttes: ˇQ := Q m=1 {( (S1, c 1 ),..., (S m, c m ) ) (2 Q \ { } [0, 2]) m 1 j < k m, S j S k = }. The trnsition function ˇδ is defined s follows: ˇδ : ˇQ Σ ˇQ As erlier, we extend the trnsition function δ of Section III to define ˇδ. Let ˇp := ( (S 1, c 1 ),..., (S m, c m ) ) ˇQ e stte of Ǎ. Let p := (S 1,..., S m ) e the corresponding stte of A otined y removing the c j s. Let Σ nd let q = (S 1,..., S m ) e the unique stte of A s.t. δ (p, ) = q. We now define the vlues of the indices c j of the -successor of ˇp: 1 j m, let 1 j pred m e (unique) s.t. ˇp(j pred ) ˇq(j ), c j := 0 if c j pred = 0 if 1 j m : c j 2 then S j F c j := 2 otherwise c j := 0 if c j pred = 0 S j if 1 j m : c j = 2 then F c j := 2 if c j pred = 2 c j := 1 otherwise For ˇq := ( (S 1, c 1)..., (S m, c m )) we define: ˇδ(ˇp, ) := ˇq. The initil stte cn e defined s : ˇq in := ( ({q in }, 0) ). The set ˇF of ccepting sttes holds ll sttes tht do not contin 2-coloured component : ˇF := {( S1, c 1 ),..., (S m, c m ) ) ˇQ 1 j m, c j < 2}. D. The Complement Automton Applying the construction elow, we cn join utomt  nd Ǎ to uild new utomton A c representing lnguge which is complement to the lnguge of the originl utomton A. The set of sttes Q c is the union of the sets of sttes of oth utomt nd the nondeterministic trnsition function δ c is the union of the functions of the two utomt plus some extr trnsitions which unidirectionlly link the upper utomton to the lower one. As mentioned erlier, the ccepting sttes re only locted in the lower deterministic prt of A c. We crete the utomton A c = (Q c, Σ, δ c, q c, F c ) complement to A y joining utomt  nd Ǎ in the following wy: Q c = ˆQ ˇQ Let p = ( (S 1, c 1 ),..., (S m, c m ) ) Q c nd Σ. The nondeterministic trnsition function δ c : Q c Σ 2 Qc is defined s follows 3 : δ c (p, ) := ˆδ(p, ) ˇδ ( ((S1, 0),..., (S m, 0) ), ) if p Â, δ c (p, ) := ˇδ(p, ) otherwise q c := ˆq in F c := ˇF In order to prove the lnguge equivlence etween L(A) nd the complement of L(A c ), we first show the left-to-right direction, i.e. if n ω-word x is ccepted y A then it will not e ccepted y A c, i.e. ll runs of A c on x will e rejected. Lemm 7. Let x = x(0)x(1)x(2)... L(A). Then: run r c of A c on x, r c is non-ccepting. Proof. Let r e the unique run of A on x. Let r c e run of A c on x. We show tht r c cnnot e ccepting. Consider two cses: 1) r c Â, i.e. the run remins in the upper prt. Then r c never visits n ccepting stte nd is thus non-ccepting. 2) r c Ǎ, i.e. l : r(l) ˇQ. Since x L(A) Lemm 6 gives us: i l : r(i ) F, so j : 1 j r (i ) s.t. r (i )(j ) F. Thus, the definition of the trnsition function δ c (stemming from ˇδ) ensures tht r c (i )(j ) is 1 or 2-coloured. We consider those two cses: ) r c (i )(j ) is 2-coloured: The trnsition function δ c gives us tht there exists sequence of components (S i, c i )(S i +1, c i +1) (2 Q [ 1, 2]) ω s.t. (S i, c i ) = r c (i )(j ) i i, (S i, c i ) r c (i) i i, (S i, c i ) x(i) (S i+1, c i+1 ) 3 Trnsitions from the upper to the lower prt re s if originting from entirely 0-coloured sttes.

i i, c i = 2 (the colour cnnot decrese). Since ech stte in r c (i) for i i contins 2- coloured component, none of these sttes cn e ccepting nd r c is thus non-ccepting run. ) r c (i )(j ) is 1-coloured: Agin we consider the sequence of components strting t r c (i )(j ): (S i, c i )(S i +1, c i +1) (2 Q [ 1, 2]) ω s.t. (S i, c i ) = r c (i )(j ) i i, (S i, c i ) r c (i) i i, (S i, c i ) x(i) (S i+1, c i+1 ) Additionlly, the definition of δ c ensures tht the colour c cnnot decrese, so i i, c i 1. There re now two possiilities, either the colour eventully turns to 2, either it remins 1 forever: i) k > i : c k = 2: Since r(i ) is continued, nd the colour cnnot decrese, we hve i k, (S i, 2) r(i) nd thus r(i) / F c. It follows tht r c is non-ccepting run. ii) k i : c k = 1: Here, the colour of the sequence remins 1 forever. By definition of the trnsition function δ c, if 1-coloured component exists t level k in the run, it implies tht there exists 2-coloured component t level k 1. Since c k = 1 is true k i, then k i 1, there exists 2-coloured component in r c (k), mking ll the sttes of r c non-ccepting for k i 1. So there exists no ccepting run of x on A c. x is therefore in L(A c ). We now show the opposite direction of the equivlence sttement, y proving tht n ω-word not ccepted y A cn produce n ccepting run of A c. Lemm 8. Let x = x(0)x(1)x(2)... Σ ω \ L(A). Then run r c of A c on x s.t. r c is ccepting. Proof. Let r e the unique run of A on x (such run exists under the ssumption tht A is complete). By Lemm 5, there exist only finitely mny i s.t. r (i) F. This mens tht i 0 s.t. i i,!r (i) F. We now construct n ccepting run r c of A c on x which jumps to the lower prt Ǎ exctly t tht point i where r will hve cesed holding sets tht re continued nd ccepting. Let r c = r c (0)r c (1)r c (2) Q ω c e run of A c on x s.t. r c (i) ˇQ iff i i. We show, y contrdiction, tht r c is ccepting. Suppose it is not. Then i i s.t. i i, r c (i) / F c, i.e. r c eventully visits only non-ccepting sttes. By definition of the cceptnce condition F c of A c, t lest one of components of r c (i ) is 2-coloured. Formlly: 1 j r c (i ) s.t. r c (i )(j ) is 2-coloured. We now define the unique greedy run of A contining r c (i )(j ): Let (S 0, c 0 )(S 1, c 1 )(S 2, c 2 ) (2 Q [ 1, 2]) ω e sequence s.t.: k 0, (S k, c k ) x(k) (S k+1, c k+1 ) (S i, c i ) = r c (i )(j ) for unique j : 1 j r c (i ) (S i, c i ) = r c (i )(j ). Since r c (i )(j ) is 2-coloured, the definition of δ c implies tht there must exist n i : i i i nd j : 1 j r c (i ) s.t. r c (i )(j ) F 4, which contrdicts the fct tht i i,!r (i) F. Therefore our ssumption tht r c is not n ccepting run is contrdicted nd x L(A c ). As consequence of lemms 7 nd 8, we hve the following: Corollry 2. For x Σ ω, x L(A) x L(A c ). This proves the correctness of the construction. In terms of size of the construction, dding the colouring to A, does not introduce more thn 3 k fctor for ech A -stte with k components. The numer of sttes of the lower prt # lower (m) is thus ounded y: # lower (m) n=1 ( ) m n k! n k=0 { n k } 3 k A looser (ut simpler) upper ound cn further e defined (using Stirling s pproximtion of the fctoril [15]): ( ) m n { } n # lower (m) 3 m k! n k n=1 k=0 3 m 2(m) 3 m 1 2 n! 2(ln 2) n+1 3 m 1 (ln 2) m+1 2πm ( m e ( ) m 2πm 3m = ln 2 e ln 2 2πn (1.59m) m = ( m 2π m 1.59m ) m ) m 4 In words, this mens tht if we find 2-coloured component, then t some point in the pst of this sequence, n ccepting stte of A ws visited.

Since m m m 1, # lower (m) O((1.59m) m ) So the size of the entire construction Q c is not more thn ( ) m n { } n 2(m) 1 + k! 3 k. 5 n k nd thus: n=1 k=0 Q c O((1.59m) m ) This upper ound is very loose nd its refinement is the suject of ongoing reserch. We resume our previous exmple nd construct the complement of the utomton of Figure 1. To void cumersome nottion in the following exmple, component (S j, c j ) will e denoted s: Ŝ j if c j = 1 S j if c j = 0 S j if c j = 1 S j if c j = 2 The upper prt  of the complement utomton is just the utomton A where we ppend colour 1 to ll components (Figure 6). ( {q in }) ( {q in }, {q 1 }) ( {q in }, {q 1 }, {q 2 }) Fig. 6. Upper prt  of Büchi utomton A c complement to A of Figure 1. The lower prt Ǎ is constructed in similr wy, ut with the ddition of colours 0, 1 nd 2. Let s first look t the -successor in Ǎ of ( {q in }). The two successor sets re {q in } nd {q 1 }. By definition of the trnsition function ˇδ, since {q in } F =, the colour (initilly 0) remins 0. For the set {q 1 }, since {q 1 } F, the new colour is 2. So the -successor of ( {q in }) in Ǎ is ({q in}, {q 1 }). The sme holds for symol nd we cn drw the trnsition (Figure 7): Let s now look t the -successor of this newly creted stte. The -successor of {q 1 } is {q 2 } nd colour 2 remins. The - successors of {q in } re {q in } (left successor) nd {q 1 } (rightsuccessor). Since {q in } F =, the colour of {q in } remins 0. The colour of {q 1 } is set to 1 ecuse {q 1 } F nd colour 2 lredy exists in the predecessor stte. So the -successor of ({q in }, {q 1 }) is finlly ({q in }, {q 1 }, {q 2 }) nd we cn drw the trnsition in our utomton (Figure 8). 5 Size of the upper prt (which is equl to the size of A ) plus the size of the lower prt. ( {q in }) ( {q in }, {q 1 }) ( {q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }) Fig. 7. Interim lower prt Ǎ of Büchi utomton A c. ( {q in }) ( {q in }, {q 1 }) ( {q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }) ({q in }, {q 1 }, {q 2 }) Fig. 8. Interim lower prt Ǎ of Büchi utomton A c. By pplying this simple method for ll rechle A c -sttes, we get the utomton of Figure 9, where the ccepting sttes re the sttes of the lower prt which do not contin 2-coloured component. Here it is only the cse for stte ({q in }, {q 1 }, {q 2 }). ( {q in }) ( {q in }, {q 1 }) ( {q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }) ({q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }, {q 2 }) Fig. 9. Automton A c complement to A.

E. An improved lgorithm The presented construction llows some optimistions to e pplied. First, it is possile to join ll neighouring 1-coloured components, s well s ll neighouring 2-coloured components, without chnging the lnguge of the constructed utomton, ut gretly reducing its size (nd thus its worstcse ound). We define the join : Q c Q c function s the function tht tkes n ritrry stte of Q c nd outputs nother stte of Q c where ll neighouring 1-coloured components hve een joined together, nd ll neighouring 2-coloured components hve een joined together. We extend the join function to sets in the usul wy: join : 2 Qc Σ 2 Qc join(q, ) := join(q) q Q Let A c = (Q c, Σ, δ c, q 0, F c ) e Büchi utomton s constructed y the lgorithm ove. Defining new trnsition function δ join : Q c Σ Q c δ join (q, ) := join(δ c (q, )). llows us to consider the utomton A join := (Q c, Σ, δ join, q 0, F ). We here prove the lnguge equivlence etween A nd A join. Lemm 9. Let r e run of A on n ω-word x. Let r e sequence of sttes such tht join(r(i)) = r (i), i 0. Then r is run of A join on x. Proof. We show this y induction on the length of prefixes of x. First, it is cler tht r(0) = r (0) ecuse pplying join to stte of the upper prt hs no effect. So r (0) is run of A on ɛ. For the induction step, y hypothesis we hve tht r (0) r (i) is run of x(0) x(i 1). Then we get: r (i + 1) = join(r(i + 1)) join(δ(r(i), x(i))) = δ join (r(i), x(i)) = δ join (join(r(i)), x(i)) = δ join (r (i), x(i)) So r (0) r (i + 1) is indeed run of A on x. The following corollry holds trivilly: Corollry 3. For ny i 0, r(i) contins the sme 1-coloured sttes s r (i). Also, r(i) contins the sme 2-coloured sttes s r (i). The equivlence of r nd r in terms of cceptnce, cn therefore e stted: Lemm 10. A ccepts r if nd only if A ccepts r. Proof. We first prove tht r is ccepting implies tht r ccepting. Let x Σ ω. Let r e n ccepting run of A on x. Then it visits infinitely mny ccepting sttes of A, which contin no 2-coloured component. By Corollry 3, r lso visits infinitely mny sttes tht contin no 2-coloured component. r is thus ccepting. The sme rgument holds in the other direction. In order to reduce the stte spce of the lower prt, one cn pply further optimistion. Tht is, 2-coloured component immeditely followed y 1-coloured component cn e joined into single 2-coloured component. Intuitively, this cn e done ecuse switching 1-coloured component to colour 2 only delys the ppernce of the next ccepting stte (of Q c ). Since, y the structure of δ join such n opertion cn only e done finitely mny times, we only introduce finitely mny delys, nd thus do not turn n ccepting run of A join into non-ccepting run. This is proven formlly elow: We define function join 2 1 : Q c Q c which pplies the sustitution descried ove recursively until there is no 1-coloured component following 2-coloured component. join 2 1 : 2 Qc 2 Qc is extended to sets in the usul wy. A new trnsition function cn e defined: δ 2 1 : Q c Σ Q c δ 2 1 (q, ) := join 2 1 (δ join (q, )). The corresponding utomton A 2 1 := (Q = ˆQ ˇQ {s}, Σ, δ 2 1, q 0, F ) contins sttes tht hve no two neighouring 1-coloured components, no two neighouring 2-coloured components, nd no 1-coloured component immeditely following 2-coloured component. To show lnguge equivlence, we first need to prove some generl properties of the colourings in run on the constructed utomton. Let x Σ ω e n ω-word nd r = r(0)r(1)r(2) Q ω e run of A on x such tht k > 0 such tht r(i) ˇQ i k. Tht is, l is the point where r reches the lower prt ˇQ. This lemm sttes tht, in the lower prt ˇQ, the numer of 0- coloured elements cnnot increse from one stte to the next. Lemm 11. Let m i e the numer of 0-coloured elements in stte r(i). Then for i l, m i m i+1. Proof. By definition of ˇδ in the construction lgorithm, 0- coloured component cn hve t most one 0-coloured succes-

sor. Therefore the numer of 0-coloured components cnnot increse from stte of the run r to the next. By oundedness of the numer of components, it follows immeditely tht there re only finitely steps where the numer of 0-coloured components cn decrese. Corollry 4. In r, there re finitely mny i where m i > m i+1. The following lemm shows lnguge equivlence. Lemm 12. L(A) = L(A 2 1 ). Proof. We first prove tht L(A join ) L(A 2 1 ). Let x L(A join ) nd let r e the run of A join on x. Consider the run r of x such tht r (i) := join 2 1 (r(i)), i 0. One cn see, y looking t the trnsition function δ, tht the sitution where 1-coloured component immeditely follows 2-coloured component cn only rise fter 0-coloured component disppers (ecuse 2-coloured components re inherently older thn 1-coloured components, nd tht newly creted components (emerging from 0-coloured component) re plced to the left of older components). In r, these two components re merged. And the next occurrence of 2-coloured component followed y 1-coloured component is necessrily the result of nother 0-coloured component disppering. By Corollry 4, this cn only hppen finitely mny times. Since r is ccepting, ll sttes tht re in 1- or 2-coloured components eventully dispper. In r, this disppering cn e delyed y the union of 1-coloured elements into 2-coloured elements, ut only y finite mount of steps. Therefore, ll sttes present in 1- or 2-coloured component eventully dispper lso, nd t this point n ccepting stte is mrked. So r contins infinitely mny ccepting sttes. In the other direction of proof, suppose r is ccepting, then ll sttes contined in 2-coloured components eventully dispper (ech time n ccepting stte of A 2 1 is visited). The set of these sttes is superset of the set of sttes in 2-coloured components tht dispper in r. So i such tht r (i) F, then r(i) F. r is n ccepting run of A 2 1 immeditely implies tht r is n ccepting run of A join. Since L(A) = L(A join ), we hve L(A) = L(A 2 1 ). The following lemm sttes tht it is sufficient to consider tuples of which the first component is either 0-coloured, or 2-coloured. In other words, if the first component of stte is of colour 1, tht component cn e coloured 2 nd joined with the following 2-coloured component, if such next component exists. We must define new function f (for first component) f : Q c Q c tht performs this opertion on stte p := ((S 0, c 0 ), (S 1, c 1 ),..., (S m, c m )): If c 0 = 1 nd c 1 = 0, then f(p) := ((S 0, 2), (S 1, c 1 ),..., (S m, c m )) If c 0 = 1 nd c 1 = 2, then f(p) := ((S 0 S 1, 2), (S 2, c 2 ),..., (S m, c m )) otherwise (nd if p < 2): f(p) = p. f : 2 Qc 2 Qc is extended to sets in the usul wy. We define the trnsition function: nd the utomton: δ f : Q c Σ Q c δ f (q, ) := f(δ 2 1 (q, )). A f := (Q = ˆQ ˇQ {s}, Σ, δ f, q 0, F ). It is esy to see (using n rgument s in 9 if necessry), tht for run r = r(0) r(1) r(2) of A on n ω-word x Σ ω, the run r := f(r(0)) f(r(1)) is run of A f on x. Lemm 13. L(A) = L(A f ). Proof. We first show tht L(A 2 1 ) L(A f ). Let x L(A 2 1 ) nd r e n ccepting run of A 2 1 on x. Let r = f(r(0)) f(r(1)) e run of A f on x. We use the sme rgument s in the proof of Lemm 12. A 1-coloured component on the leftmost position cn only e the result of 0-coloured component tht hs previously disppered. Therefore, the switching of this 1-coloured component to colour 2 (nd possile merging with the next 2-coloured component if it exists), cn only hppen finitely mny times, nd s such does not lter the cceptnce of the run. So r is ccepting if nd only if r is ccepting. For the other direction L(A 2 1 ) L(A f ), let x L(A f ). Let r e n ccepting run of A 21 on x nd r = f(r(0)) f(r(1)) e run of A f on x. i 0, if r (i) contins no 2-coloured component, then r(i) either. So if r is ccepting (nd contins infinitely mny sttes tht hve no 2-coloured component), then r is lso ccepting. As consequence, L(A) = L(A 1 2 ) = L(A f ). These optimistions reduce the set of possile sttes in the lower prt. We first must count the numer col(k) of different wys of colouring tuple of size k (which we henceforth cll k-tuple). Let col 0 (k), col 1 (k) nd col 2 (k) e the numer of colourings of k-tuple which leftmost component is coloured 0, 1 or 2, respectively. The ove optimistions (nmely join, 2 1 nd f ) yield the following recurrence reltions, vlid for k 1: col 0 (k + 1) = col 0 (k) + col 1 (k) + col 2 (k) = col(k) col 1 (k + 2) = col 0 (k + 1) + col(k) col 2 (k + 1) = col 0 (k)

The numer of colourings cn then e recursively evluted, k 1: col(k + 3) = col 0 (k + 3) + col 1 (k + 3) + col 2 (k + 3) (1) = col(k + 2) + col 0 (k + 2) + col 2 (k + 2) + col 0 (k + 2) (2) = col(k + 2) + 2col(k + 1) + col 2 (k + 2) (3) = col(k + 2) + 2col(k + 1) + col 0 (k + 1) (4) = col(k + 2) + 2col(k + 1) + col(k) (5) From this, we cn deduce tht, k 1: col(k + 2) col(k + 1) + col(k) Reintroduced in eqution 5, this gives us: col(k + 3) = col(k + 2) + 2col(k + 1) + col(k) = col(k + 2) + col(k + 1) + col(k + 1) + col(k) }{{} col(k+2) col(k + 2) + col(k + 1) + col(k + 2) = 2col(k + 2) + col(k + 1) 2col(k + 2) This result cn e used in eqution 5 gin to ound the increse of col: col(k + 3) = col(k + 2) + 2col(k + 1) + }{{} col(k) }{{} col(k+2) 1/2col(k+1) col(k + 2) + col(k + 2) + 1/2col(k + 1) }{{} 1/4col(k+2) 2.25 col(k + 2) We re left to find the initil vlues of col in order to hve vlid ound. There re 2 colourings of tuples of size 1: 1) ((S 1, 0)) 2) ((S 1, 2)) There re 4 colourings of tuples of size 2: 1) ((S 1, 0), (S 2, 0)) 2) ((S 1, 0), (S 2, 1)) 3) ((S 1, 0), (S 2, 2)) 4) ((S 1, 2), (S 2, 0)) And there re 9 colourings of tuples of size 3: 1) ((S 1, 0), (S 2, 0)), (S 3, 0)) 2) ((S 1, 0), (S 2, 0)), (S 3, 1)) 3) ((S 1, 0), (S 2, 0)), (S 3, 2)) 4) ((S 1, 0), (S 2, 1)), (S 3, 0)) 5) ((S 1, 0), (S 2, 1)), (S 3, 2)) 6) ((S 1, 0), (S 2, 2)), (S 3, 0)) 7) ((S 1, 2), (S 2, 0)), (S 3, 0)) 8) ((S 1, 2), (S 2, 0)), (S 3, 1)) 9) ((S 1, 2), (S 2, 0)), (S 3, 2)) We sum up: col(1) = 2 col(2) = 4 col(3) = 9 So from these initil vlues, nd the recurrence reltion clculted ove, we get: col(k) 2.25 k k 0. The numer of sttes in the lower prt of the optimised utomton is then: ( ) m n { } n # lower (m) k! 2.25 k n k n=1 k=0 nd we my reclculte the pproximtion: # lower (m) O(( 2.25 3 1.59m)m ) = O((1.195m) m ) F. Further possiilities for Optimiztion Without further proof here, it is esy to see tht there is some room for other lnguge-preserving opertions. For instnce in the cse where utomton A is complete, we oserve tht A c -sttes of which the rightmost component hs colour 2 cn e ignored, s well s ll their successors. This is ecuse the completeness enforces tht rnches of the execution tree cn only die if t some point, the deletion process descried in section III removes the component. Since the deletion process is done right-to-left, this is only possile if there exists nother component on the right, which is not the cse here. Therefore rightmost rnch is persistent nd if its colour is 2, this colour never disppers nd future sttes cn never ecome ccepting. Tking our previous exmple, since A is complete, optimiztion directly leds to the utomton of Figure 10 (pplied t construction time nd not s reduction from Figure 9). G. Benchmrk results In this section, we give the output of our performnce test ginst other complementtion constructions. For these experiments, we hve implemented the lgorithm presented in Section III, with the 2 1 optimistion of Section IV-E. The lgorithm ws implemented in Jv nd then trnsformed into plugin for the GOAL 6 softwre. It ws checked ginst usul complementtion methods: slice, rnk nd Sfr-Pitermn, 6 http://gol.im.ntu.edu.tw/

( {q in }) ( {q in }, {q 1 }) ( {q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }, {q 2 }) ({q in }, {q 1 }, {q 2 }) Fig. 10. Reduced utomton A c complement to A. which re ll lredy implemented in GOAL. No specific optimistion (reduction of ded sttes, mximising of the cceptnce condition,... ) ws used for either of the lgorithm. It is cler tht pplying such optimistions will often reduce the output size, s well on our construction thn on the lgorithms it is tested ginst. These preliminry enchmrks only tke into ccount the numer of sttes of the constructed utomton. In order to compre the presented lgorithm (tht we nme here Tuple ) with ech other, we wrote GOAL script tht genertes rndom Büchi utomt with following properties: Numer of sttes: 6 Numer of trnsitions: 24 Size of (propositionl) lphet: 2 Density of ccepting sttes: 0.3 The script pplies the tuple construction on one side, nd the other lgorithm on the other side, nd outputs the numer of sttes nd trnsitions for ech construction. You will note tht the complementtion time is not considered here. The reson is tht computtion time depends too much on the GOAL frmework nd on the wy the vrious lgorithms re implemented. As it is suggested in [16], the Sfr-Pitermn [17] lgorithm produces the lest sttes thn ny other construction to dte. Here re the results for 1000 generted utomt (we print the verge numer of sttes nd trnsitions): Sfr-Pitermn Tuple v. # sttes 180 199 v. # trnsitions 721 850 # wins 555 445 The wins line shows how mny times the lgorithm hs eten its counterprt. Interestingly, the tuple construction ets Sfr-Pitermn nerly hlf of the time. This shows tht our preliminry construction shows good potentil on rndom utomt nd motivtes further reserch on efficiency. We lso deliver some test results ginst other lgorithms implemented if GOAL. Becuse these other lgorithms tke lot more time, the test is only done on 100 utomt: Slice (with turn-wise cut-point optimistion) [2] : Slice Tuple v. # sttes 3453 227 v. # trnsitions 18571 957 # wins 0 100 Rnk (with tight-rnk nd turn-wise cut-point optimistions) [18]: Rnk Tuple v. # sttes 1762 192 v. # trnsitions 33233 829 # wins 0 100 Our construction is clerly more efficient one prcticl cses thn those two pproches. H. An Alterntive Construction The worst-cse ounds discussed ove cn e improved, s it ws shown in [1] tht the O(0.76m) m ound is tight. Therefore, there exist complementtion methods tht do not exceed tht ound. We cn improve the ound of our construction y modifying the trnsition function. It is possile to consider only one 2-coloured component t time. The stte-spce of the lower prt is then loosely ounded y: # lower (m) n=1 ( m n ) n { n k! k k=0 } 1.62 k A very loose upper ound for this expression is O(0.86m) m, nd there is strong evidence (y computtion of ctul vlues of the expression) tht it cn e ounded y O(0.76m) m. Demonstrtions of these sttements will e the suject of future pper. We my nevertheless lredy mention tht experimentl results led to oserve tht this lterntive construction does not ehve s well s the primry (optimised) construction. V. CONCLUSION We hve presented here direct complementtion construction for Büchi utomt. The gol ws not to find n efficient lgorithm, such serch would hve een vin ecuse of the theoreticl limits of complementtion. We however strongly elieve tht some prcticl construction cn stem from etter