A Bounded Incremental Test Generation Algorithm for Finite State Machines

Size: px
Start display at page:

Download "A Bounded Incremental Test Generation Algorithm for Finite State Machines"

Transcription

1 A Bounded Incrementl Test Genertion Algorithm for Finite Stte Mchines Zoltán Pp 1, Mhdevn Surmnim 2, Gáor Kovács 3, Gáor Árpád Németh3 1 Ericsson Telecomm. Hungry, H-1117 Budpest, Irinyi J. u. 4-20, Hungry zoltn.pp@ericsson.com 2 Computer Science Deprtment, University of Nersk t Omh Omh, NE 68182, USA msurmnim@mil.unomh.edu 3 Deprtment of Telecommunictions nd Medi Informtics ETIK, Budpest University of Technology nd Economics, Mgyr tudósok körútj 2, H-1117, Budpest, HUNGARY kovcsg@tmit.me.hu, rurik@gmil.com Astrct. We propose ounded incrementl lgorithm to generte test cses for deterministic finite stte mchine models. Our pproch, in contrst to the trditionl view, is sed on the oservtion tht system specifictions re in most cses modified incrementlly in prctice s requirements evolve. We utilize n existing test set ville for previous version of the system to efficiently generte tests for the current modified system. We use widely ccepted frmework to evlute the complexity of the proposed incrementl lgorithm, nd show tht it is function of the size of the chnge in the specifiction rther thn the size of the specifiction itself. Thus, the method is very efficient in the cse of smll chnges, nd never performs worse thn the relevnt trditionl lgorithm the HIS-method. We lso demonstrte our lgorithm through n exmple. Keywords: conformnce testing, finite stte mchine, test genertion lgorithms, incrementl lgorithms 1 Introduction Lrge, complex systems continuously evolve to incorporte new fetures nd new requirements. In ech evolution step in ddition to chnging the specifiction of the system nd producing corresponding implementtion it my lso e necessry to modify the testing infrstructure. Mnul modifiction is n d hoc nd error prone process tht should e voided, nd utomtic specifictionsed test genertion methods should e pplied. Although testing theory is especilly well developed for finite stte mchine (FSM)-sed system specifictions, existing lgorithms hndle chnging specifictions quite inefficiently. Most reserch hs een focusing on the nlysis of rigid, unchnging descriptions. Virtully ll proposed methods rely solely on

2 given specifiction mchine to generte tests. These pproches re therefore incple of utilizing ny uxiliry informtion, such s existing tests creted for the previous version of the given system. All test sequences hve to e creted from scrtch in ech evolution step, no mtter how smll the chnge hs een. In this pper we develop novel, ounded incrementl lgorithm to utomticlly re-generte tests in response to chnges to system specifiction. In its essence the lgorithm mintins two sets incrementlly; prefix-closed stte cover set responsile for reching ll sttes of the finite stte mchine, nd seprting fmily of sequences pplied to verify the next stte of trnsitions. The complexity of the lgorithm is evluted sed on the ounded incrementl model of computtion of Rmlingm nd Reps [1]. It is shown tht the time complexity of the proposed lgorithm depends on the size of the chnge to the specifiction rther thn the size of the specifiction itself. Furthermore, it is never worse thn the complexity of the most trditionl lgorithm the HIS-method [2] [3] [4]. This reserch uilds on our erlier work in [5] where we hve developed frmework to nlyze the effects of chnges on tests sed on the notion of consistency etween tests nd protocol descriptions. In the current pper, we hve extended our focus to the test genertion prolem, which is mjor step oth in terms of complexity nd prcticl importnce. The rest of the pper is orgnized s follows. A rief overview of our ssumptions nd nottions is given in Section 2. In Section 3, we descrie some relevnt FSM test genertion lgorithms nd the HIS-Method in prticulr. Section 4 descries the model of incrementl computtion. In Section 5 we introduce the incrementl lgorithm for mintining checking sequence cross chnges, provide thorough nlysis of its complexity nd demonstrte it through n exmple. Sections 6 nd 7 descrie relted work nd conclusions, respectively. 2 Finite Stte Mchines Finite stte mchines hve een widely used for decdes to model systems in vrious res. These include sequentil circuits [6], some types of progrms [7] (in lexicl nlysis, pttern mtching etc.), nd communiction protocols [8]. Severl specifiction lnguges, such s SDL [9] nd ESTELLE [10], re extensions of the FSM formlism. A finite stte mchine M is qudruple M = (I,O,S,T) where I is the finite set of input symols, O is the finite set of output symols, S is the finite set of sttes, nd T S I O S is the finite set of (stte) trnsitions. Ech trnsition t T is 4-tuple t = (s j,i,o,s k ) consisting of strt stte s j S, input symol i I, output symol o O nd next stte s k S. An FSM cn e represented y stte trnsition grph, directed edgeleled grph whose vertices re leled s the sttes of the mchine nd whose edges correspond to the stte trnsitions. Ech edge is leled with the input nd output ssocited with the trnsition.

3 FSM M is sid to e deterministic if for ech strt stte input pir (s,i) there is t most one trnsition in T. In the cse of deterministic FSMs oth the output nd the next stte of trnsition my e given s function of the strt stte nd the input of the trnsition. These functions re referred to s the next stte function δ: S I S nd the output function λ: S I O. Thus trnsition of deterministic mchine my e given s t = (s j,i,λ(s j,i),δ(s j,i)). For given set of symols A, A is used to denote the set of ll finite sequences (words) over A. Let K A e set of sequences over A. The prefix closure of K, written Pref(K), includes ll the prefixes of ll sequences in K. The set K is prefix-closed if Pref(K) = K. We extend the next stte function δ nd output function λ from input symols to finite input sequences I s follows: For stte s 1, n input sequence x = i 1,...,i k tkes the mchine successively to sttes s j+1 = δ(s j,i j ),j = 1,...,k with the finl stte δ(s 1,x) = s k+1, nd produces n output sequence λ(s 1,x) = o 1,...,o k, where o j = λ(s j,i j ),j = 1,...,k. The input/output sequence i 1 o 1 i 2 o 2...i k o k is then clled trce of M. FSM M is sid to e strongly connected if, for ech pir of sttes (s j,s l ), there exists n input sequence which tkes M from s j to s l. If there is t lest one trnsition t T for ll strt stte input pirs, the FSM is sid to e completely specified (or completely defined); otherwise, M is sid to e prtilly specified or simply prtil FSM. We sy tht mchine M hs reset cpility if there is n initil stte s 0 S nd n input symol r I tht tkes the mchine from ny stte ck to s 0. Tht is, r I : s j S : δ(s j,r) = s 0. The reset is relile if it is gurnteed to work properly in ny implementtion mchine M I, i.e., δ I (s I j,r) = si 0 for ll sttes s I j SI, nd s I 0 is the initil stte of M I ; otherwise it is unrelile. Finite stte mchines my contin redundnt sttes. Stte minimiztion is trnsformtion into n equivlent stte mchine to remove redundnt sttes. Two sttes re equivlent written s j = sl iff for ll input sequences x I, λ(s j,x) = λ(s l,x). Two sttes, s j nd s l re distinguishle (inequivlent), iff x I, λ(s j,x) λ(s l,x). Such n input sequence x is clled seprting sequence of the two inequivlent sttes. A FSM M is reduced (minimized), if no two sttes re equivlent, tht is, ech pir of sttes (s j, s l ) re distinguishle. For the rest of the pper, we focus on strongly connected, completely specified nd reduced deterministic mchines with relile reset cpility. We will denote the numer of sttes nd inputs y n = S nd p = I, respectively Representing Chnges to FSMs Although the FSM modeling technique hs een used extensively in vrious fields, impct of chnges on FSM models nd their effects on test sets hve only een studied recently following the oservtion tht system specifictions re in most cses modified incrementlly in prctice s requirements evolve. (See some of our erlier ppers [11] [12] [5]). 4 Therefore, T = p n.

4 A consistent pproch for representing chnges to FSM systems hs een proposed in [12]. Atomic chnges to finite stte mchine M re represented y the mens of edit opertors ω M : T T. 5 An edit opertor turns FSM M = (I,O,S,T) into FSM M = (I,O,S,T ) with the sme input nd output sets. We use the term sme sttes written s j = s j for sttes tht re leled like in different mchines. Oviously, these sttes re not necessrily equivlent, written s j = s j. For deterministic finite stte mchines two types of edit opertors hve een proposed sed on widely ccepted fult models. A next stte chnge opertor is ω n (s j,i,o x,s k ) = (s j,i,o x,s l ), where δ(s j,i) = s k s l = δ (s j,i). An output chnge opertor is ω o (s j,i,o x,s k ) = (s j,i,o y,s k ), where λ(s j,i) = o x o y = λ (s j,i). It hs een shown in [12], tht with some ssumptions the set of deterministic finite stte mchines with given numer of sttes is closed under the edit opertions defined ove. Furthermore, for ny two deterministic FSMs M 1 nd M 2 there is lwys sequence of edit opertions chnging M 1 to M 2, i.e., to mchine isomorphic to M 2. 3 FSM Test Genertion nd the HIS-Method Given completely specified deterministic FSM M with n sttes, n input sequence x tht distinguishes M from ll other mchines with n sttes is clled checking sequence of M. Any implementtion mchine Impl with t most n sttes not equivlent to M produces n output different from M on checking sequence x. Severl lgorithms hve een proposed to generte checking sequences for mchines with relile reset cpility [13] [14], including the W-method [15], the Wp-method [16] nd the HIS-method [2] [3] [4]. They ll shre the sme fundmentl structure consisting of two stges: Tests derived for the first stte identifiction stge check tht ech stte presented in the specifiction lso exists in the implementtion. Tests for the second trnsition testing stge check ll remining trnsitions of the implementtion for correct output nd ending stte s defined y the specifiction. The methods, however, use different pproches to identify stte during the first stge, nd to check the ending stte of the trnsitions in the second stge. In the following we concentrte on the HIS-method s it is the most generl pproch of the three. The HIS-method derives fmily of hrmonized identifiers [4], lso referred to s seprting fmily of sequences [3]. A seprting fmily of sequences of FSM M is collection of n sets Z i,i = 1,...,n of sequences (one set for ech stte) stisfying the following two conditions: For every pir of sttes s i,s j : (I) there is n input sequence x tht seprtes them, i.e., x I, λ(s i,x) λ(s j,x); (II) x is prefix of some sequence in Z i nd some sequence in Z j. Z i is clled the seprting set of stte s i. The HIS-method uses pproprite memers of the seprting fmily in oth stges of the lgorithm to check sttes of the implementtion. 5 ω(t) is used insted of ω M (t) if M cn e omitted without cusing confusion.

5 3.1 The HIS-Method Consider FSM M with S = n sttes, nd implementtion Impl with t most n sttes. Let Z = {Z 1,...,Z n } e seprting fmily of sequences of FSM M. Such fmily my e constructed for reduced FSM the following wy: For ny pir of sttes s i, s j we generte sequence z ij tht seprtes them using for exmple minimiztion method [17]. Then define the seprting sets s Z i = {z ij },j = 1...n. The stte identifiction stge of the HIS-method requires prefix-closed stte cover set Q = {q 1,...,q n } of FSM M, nd genertes test sequences r q i Z i, i = 1...n sed on it, where r is the relile reset symol nd is the string conctention opertor. A Q set my e creted y constructing spnning tree 6 of the stte trnsition grph of the specifiction mchine M from the initil stte s 0. Such spnning tree is presented on Figure 1() in Section 5.1. A prefixclosed stte cover set Q is the conctention of the input symols on ll prtil pths of the spnning tree, i.e., sequences of input symols on ll consecutive rnches from the root of the tree to stte. If Impl psses the first stge of the lgorithm for ll sttes, then we know tht Impl is similr to M, furthermore this portion of the test lso verifies ll the trnsitions of the spnning tree. The second, trnsition testing stge is used to check non-tree trnsitions. Tht is, for ech trnsition (s j,i,o,s k ) not in the spnning tree the following test sequences re generted: r q j i Z k. The resulting sequence is checking sequence, strting t the initil stte (first reset input is pplied) nd consisting of no more thn pn 2 test sequences of length less thn 2n interposed with reset [3]. Thus the totl complexity of the lgorithm is O(pn 3 ), where p = I nd n = S. 4 Incrementl Computtion Model A tch lgorithm for given prolem is n lgorithm cple of computing the solution of the prolem f(x ) the output on some input x. Virtully ll trditionl FSM-sed conformnce test genertion lgorithms [13] [14] re such tch lgorithms. Their input is the specifiction of system in form of n FSM model nd the output is checking sequence tht is (under some ssumptions) cple of determining if n implementtion conforms to the specifiction FSM. An incrementl lgorithm intends to solve given prolem y computing n output f(x ) just s tch lgorithm. Incrementl computtion, however, ssumes tht the sme prolem hs een solved previously on slightly different input x providing output f(x), nd tht the input hs undergone some chnges since, resulting in the current input x + dx = x. An incrementl lgorithm tkes the input x nd the output f(x) of the previous computtion, long with 6 A spnning tree of FSM M rooted from the initil stte is n cyclic sugrph ( prtil FSM) of its stte trnsition grph composed of ll the rechle vertices (sttes) nd some of the edges (trnsitions) of M such tht there is exctly one pth from the initil stte s 0 to ny other stte.

6 the chnge in the input dx. From tht it computes the new output f(x + dx), where x + dx denotes the modified input. A tch lgorithm cn e used s n incrementl lgorithm, furthermore, in cse of fundmentl chnge (tke x = null input for exmple) the tch lgorithm will e the most efficient incrementl lgorithm. 4.1 Evluting the Complexity of n Incrementl Algorithm The complexity of n lgorithm is commonly evluted using symptotic worstcse nlysis; y expressing the mximum cost of the computtion s function of the size of the input. While this pproch is dequte for most tch lgorithms, worst-cse nlysis is often not very informtive for incrementl lgorithms. Thus, lterntive wys hve een proposed in the literture to express the complexity of incrementl lgorithms. The most widely ccepted pproch hs een proposed in [1]. Insted of nlyzing the complexity of incrementl lgorithms in terms of the size of the entire current input, the uthors suggest the use of n dptive prmeter cpturing the extent of the chnges in the input nd output. The prmeter or CHANGED represents the size of the MODIFIED prt of the input nd the size of the AFFECTED prt of the previous output. Thus represents the miniml mount of work necessry to clculte the new output. The complexity of incrementl lgorithm is nlyzed in terms of, which is not known priori, ut clculted during the updte process. This pproch will e used in this pper to evlute the complexity of the presented lgorithm nd to compre it to existing tch nd incrementl methods. 5 Incrementl Test Genertion Method This section presents novel incrementl test genertion lgorithm. The lgorithm in contrst to trditionl (tch) test genertion methods is cple of mintining checking sequence cross chnges in the specifiction, thus voiding the need of regenerting checking sequence from scrtch t ech stge of n incrementl development. We focus on the following prolem: Consider system specifiction given s reduced, completely specified nd deterministic FSM M. There exists complete checking sequence for M cple of detecting ny fult in n implementtion Impl, which hs the sme input I nd output O lphet s M nd hs no more sttes thn M. The specifiction is modified to M y unit chnge, i.e., y pplying single output or next stte chnge opertor. The prolem is to crete complete checking sequence for the new specifiction M if such exists. We concentrte on systems with relile reset cpility, nd we ssume the HIS-Method s reference point in creting n incrementl lgorithm nd evluting its performnce. The HIS-method is essentilly the superposition of two completely independent lgorithms. One is used to uild set of input

7 sequences responsile for reching ll sttes of the finite stte mchine ( prefixclosed stte cover set). The other is pplied to crete set of input sequences to verify the next stte of the trnsition ( seprting fmily of sequences). Our incrementl test genertion method likewise involves two completely utonomous incrementl lgorithms. Note tht these lgorithms my lso e pplied independently for vrious purposes. They could e used to detect undesirle effects of plnned modifiction during development, such s susets of sttes ecoming equivlent or unrechle. It hs to e emphsized tht given chnge to the specifiction FSM my ffect the two lgorithms differently. Therefore two seprte prmeters (see Section 4.1) hve to e used to cpture the extent in which the chnges ffect the two lgorithms. 5.1 Incrementl Algorithm for Mintining Prefix-closed Stte Cover Set Given specifiction FSM M, prefix-closed stte cover set Q of M nd chnge ω(s m,i,o,s j ) to FSM M turning it to M our purpose is to crete new vlid prefix-closed stte cover set Q for M. The prolem cn e reduced to mintining spnning tree of the stte trnsition grph of the specifiction mchine rooted from the initil stte s 0 (see Section 3.1). Assuming the spnning tree ST of FSM M representing the Q set i.e., input sequences on ll prtil pths of ST re in Q we intend to produce new vlid spnning tree ST of FSM M. Let us cll trnsition n ST-trnsition iff it is in ST. A sutree of ST rooted from stte s i s 0 is proper sutree of the spnning tree ST nd will e referred to s ST si. Given the chnge ω(s m,i,o,s j ) we will refer to stte s m of FSM M s modified stte, since trnsition originting from stte s m of FSM M is modified y the chnge. In this pper we focus on unit chnges; t ech incrementl step there is single modified stte, i.e., the crdinlity of the set of modified sttes MODIFIED revited s MOD is one: MOD = 1. A stte s i of FSM M is ffected y the chnge with respect to the Q set iff for input sequence q i Q corresponding to stte s i : δ(s 0,q i ) δ (s 0,q i ). Such stte is sid to e q-ffected stte. 7 The lgorithm identifies the set of q-ffected sttes AFFECTED Q revited s AFF Q, where 0 AFF Q n. If AFF Q is not n empty set AFF Q > 0 then ST must e dpted to M. We define the set CHANGED Q S to e MOD AFF Q nd denote CHANGED Q s Q. The set CHANGED Q will e used s mesure of the 7 Other definitions of q-ffected stte could e used depending on the ssumed testing lgorithm. A more relxed definition could e for exmple the following: A stte s i of FSM M is ffected y the chnge with respect to the Q set iff there exists no pth from s 0 to s i in ST fter the chnge. This definition should e ssumed in cse the sme set (for exmple distinguishing sequence or W-set) is used to check ech ending stte.

8 size of the chnge to the specifiction, nd the complexity of the incrementl lgorithm will e expressed s function of prmeter Q, where 1 Q n. The input of the lgorithm is the originl mchine M, the chnge opertor nd the spnning tree ST of M. It provides M, the new spnning tree ST of M nd the set of unrechle sttes s output. The lgorithm consists of two phses nd hndles output nd next stte chnges seprtely in the first phse. The first phse mrks ll q-ffected sttes of FSM M then collects them in the set AFF Q. If AFF Q = 0 then ST is vlid spnning tree of M nd the lgorithm termintes, otherwise the second phse completes the spnning tree for ll q-ffected sttes. Phse 1 Output Chnge Tke output chnge ω o (s m,i,o x,s j ) = (s m,i,o y,s j ),o x o y. Crete FSM M y pplying the chnge opertor. Initilize AFF Q s n empty set, nd the spnning tree ST of M s ST := ST. As n output chnge opertor is pplied to FSM M, it only chnges n edge lel of the stte trnsition grph of FSM M, ut does not ffect its structure. Tht is, δ(s m,i) = δ (s m,i), nd the chnge does not ffect ny sttes with respect to the Q set. AFF Q is not extended. Phse 1 Next Stte Chnge Tke next stte chnge ω n (s m,i,o x,s j ) = (s m,i,o x,s k ),s j s k. Crete FSM M y pplying the chnge opertor. Initilize AFF Q s n empty set, nd the spnning tree ST of M s ST := ST. (s m,i,o,s j ) ST: If the trnsition upon input i t stte s m is not n STtrnsition then ny chnge to it cn not ffect the spnning tree of FSM M. AFF Q is not extended. (s m,i,o,s j ) ST: If the trnsition upon input i t stte s m is n STtrnsition then the chnge ffects the spnning tree. The q-ffected sttes re identified wlking the ST s sutree. All sttes of ST j s (including s j ) j re mrked s q-ffected sttes. The AFF Q set cn e determined using simple redth-first serch of the ST s sutree with worst cse complexity j of AFF Q. Phse 2: Determining spnning tree of M Phse 2 of the lgorithm tkes the set AFF Q from Phse 1 nd completes the spnning tree for ech memer of AFF Q to crete spnning tree ST of M. If AFF Q = 0 (there re no q-ffected sttes) then ST is spnning tree of M. Return ST nd the lgorithm termintes. If AFF Q > 0 then we pply the following method: All trnsitions of ST leding to q-ffected sttes re removed from ST long with the modified trnsition (s m,i,o,s k ). Then we extend ST s follows. For ll s x in AFF Q we strt checking the trnsitions leding to s x in M until either trnsition originting from n unffected stte is found or there re no more inound trnsitions left. If trnsition (s i,i,o,s x) such tht s i AFF Q is found then: (I) ST := ST (s i,i,o,s x), (II) AFF Q := AFF Q \ {s x}, (III) if there is trnsition (s x,i,o,s y) where s y AFF Q then repet Steps I-III on s y. The lgorithm stops fter ll s x in AFF Q hs een checked, then return ST nd AFF Q ; the lgorithm termintes. At the end of the lst turn ST will e

9 spnning tree of M, nd ny s z remining in AFF Q is unrechle from s 0 in M. Q-set exmple. Tke FSM M on Figure 1() where old edges represent the spnning tree nd the doule circle denotes the initil stte. /x s2 /x /x /x /x /x /x s2 /x /x /x /x s0 /x s1 /y s3 s0 s1 /y s3 /x /x () FSM M with its spnning tree ST () Modified FSM M with the updted spnning tree ST Fig. 1. Exmple for mintining the premle Initilly let ST = ST nd AFF Q =. The modifiction ω n (s 0,,x,s 1 ) = (s 0,,x,s 0) is next stte chnge. As trnsition (s 0,,x,s 1 ) is in ST, we need to determine the set of q-ffected sttes y wlking the ST s sutree. 1 We get AFF Q = {s 1,s 3}. In Phse 2 trnsitions leding to q-ffected sttes (s 0,,x,s 1) nd (s 1,,y,s 3) re removed from ST. Then one of the sttes sy s 1 is selected from AFF Q. Trnsition (s 2,,x,s 1) is identified, which is link originting from not ffected stte s 2. We dd it to ST nd remove s 1 from AFF Q. We then check trnsitions originting from s 1 nd find (s 1,,y,s 3) tht leds to q-ffected stte. We dd (s 1,,y,s 3) to ST nd remove s 3 from AFF Q. Now, AFF Q =, so the lgorithm termintes nd returns ST, see Figure 1(). Theorem 1. The incrementl lgorithm for mintining spnning tree descried ove hs time complexity of O(p Q ), where 1 Q n. Proof. Phse 1 of the lgorithm hs worst cse complexity of O( AFF Q ). Phse 2 of the lgorithm first serches pth from the unffected sttes of M to the q-ffected sttes. There re exctly p AFF Q trnsitions originting from the q-ffected sttes. Therefore there cn e t most p AFF Q steps tht do not provide pth from unffected sttes of M to the q-ffected sttes summrized over ll ckwrd check turns of Phse 2. Thus there re no more thn (p + 1) AFF Q ckwrd check turns. If link is found from n unffected stte to n ffected stte s x then the lgorithm dds ll sttes of AFF Q rechle from s x vi ffected sttes. Agin, there cn e t most p AFF Q such steps summrized over ll forwrd check turns of Phse 2. As ny of the p AFF Q trnsitions re processed t most twice y the lgorithm, less thn 2 (p + 1) AFF Q O(p AFF Q ) steps re necessry

10 to complete Phse 2. The totl complexity of the lgorithm is O(p AFF Q ) O(p Q ) The new set Q of M contins AFF Q modified sequences: Input sequences of ST leding from s 0 to s i for ll s i in AFF Q. 5.2 Incrementl Algorithm for Mintining Seprting Fmily of Sequences We re gin given the specifiction FSM M, nd the chnge ω(s m,i,o,s j ) turning M to M. We lso hve seprting fmily of sequences of FSM M ( seprting set for ech stte): Z = {Z 1,...,Z n } Z i = {z ij },j = 1...n, where z ij is seprting sequence of sttes s i, s j of FSM M. Our ojective is to crete new seprting fmily of sequences Z for M. Note tht we consider somewht structured seprting fmily of sequences s discussed lter. This, however, does not restrict the generlity of the pproch s ech incrementl step genertes seprting fmily ccording the ssumed structure. Informlly speking, to mintin seprting fmily of sequences we hve to identify ll seprting sequences ffected y the chnge. Then for ll such stte pirs new seprting sequence hs to e generted. Notice tht this is prolem over stte pirs rther thn sttes. Therefore we introduce n uxiliry directed grph A M with n(n+1)/2 nodes, one for ech unordered pir (s j,s k ) of sttes of M including identicl stte pirs (s j,s j ). There is directed edge from (s j,s k ) to (s l,s m ) leled with input symol i iff δ(s j,i) = s l nd δ(s k,i) = s m in M. The uxiliry directed grph A M is used to represent nd mintin seprting sequences of FSM M. The grph is updted y our lgorithm t ech incrementl step. We define seprting stte pir s n unordered pir of sttes (s x,s y ) such tht λ(s x,i) λ(s y,i) for some i I. A mchine M is miniml iff there is pth from ech non-identicl stte pir (s j,s k ),j k to seprting stte pir in its uxiliry directed grph A M. The input lels long the route conctented y the input distinguishing the seprting stte pir form seprting sequence of sttes s j nd s k. We mke the following ssumptions on the seprting sequences of FSM M: (I) Ech seprting stte pir (s x,s y ) hs single seprting input i λ(s x,i) λ(s y,i) ssocited to it. If given pir hs multiple such inputs, then the input to e ssocited is chosen rndomly. (II)The set of seprting sequences of FSM M is prefix-closed. Then seprting sequences of FSM M form n cyclic sugrph of the uxiliry directed grph A M, such tht there is exctly one pth from ech stte pir (s x,s y ),x y to seprting stte pir. Tht is, seprting sequences form forest over the non-identicl stte pirs of A M, such tht ech tree hs seprting stte pir s root nd ll edges of the given tree re directed towrd the root see Figure 2() elow for exmple. Let us refer to this forest ( sugrph of A M ) s SF. We cll n edge of A M n SF-edge iff it is in SF. A sutree of SF hving stte pir (s i,s j ) s root is proper sutree of the forest SF nd

11 will e referred to s SF si,s j. Note tht y wlking such tree (or its sutree) we lwys ssume tht it is explored opposing edge directions from the root (or n inner node) towrd leves. Thus the prolem of deriving the seprting fmily of sequences for FSM M cn e reduced to mintining seprting stte pirs, their ssocited seprting input nd forest SF over non-identicl stte pirs of A M cross chnges. Given the chnge ω(s m,i,o,s j ) turning M to M ll stte pirs tht include stte s m re modified to construct the uxiliry directed grph A M of FSM M. Accordingly ll unordered stte pirs of A M involving s m re referred to s z-modified stte pirs. As result of the unit chnge ssumption the crdinlity of the set of z-modified stte pirs MODIFIED Z revited s MOD Z is n: MOD Z = n. 8 The lgorithm derives the set of stte pirs ffected y the chnge. Such stte pirs re sid to e z-ffected. The set of z-ffected stte pirs is referred to s AFFECTED Z revited s AFF Z, where 0 AFF Z n(n 1)/2. We define the set CHANGED Z S S s MOD Z AFF Z. The complexity of the incrementl lgorithm will e expressed s function of prmeter CHANGED Z referred to s Z, where n Z n(n 1)/2. The input of the lgorithm is the uxiliry directed grph A M of FSM M, the chnge opertor nd the forest SF of A M representing seprting sequences of M. The output is A M, the new forest SF of A M nd set contining pirs of equivlent sttes. The lgorithm consists of two phses nd hndles output nd next stte chnges seprtely in the first phse. Phse 1 Output Chnge Tke output chnge ω o (s m,i,o x,s k ) = (s m,i, o y,s k ),o x o y. Initilize AFF Z s n empty set, A M := A M nd SF := SF. For stte pirs s i S : (s m,s i ) pply the chnge to AM nd: If stte pir (s m,s i ) is new seprting stte pir then mrk it nd ssocite i s seprting input. If i hs een the seprting input of seprting stte pir (s m,s i ) in A M ut λ (s m,i) = λ (s i,i) = o y then ll stte pirs of the tree with (s m,s i ) root including (s m,s i ) re dded to AFF Z (mrked s z-ffected). These sttes cn e identified y wlking the given tree from the root. If there is nother input i 1 λ (s m,i 1 ) λ (s i,i 1) then (s m,s i ) remins seprting stte pir with i 1 ssocited s seprting input. Stte pir (s m,s i ) is removed from AFF Z. If i I : λ (s m,i) = λ (s i,i) then (s m,s i ) is no longer seprting stte pir, thus the seprting stte pir mrking is removed from (s m,s i ). Do nothing otherwise. 9 Phse 1 Next Stte Chnge Tke next stte chnge ω n (s m,i,o x,s k ) = (s m,i,o x,s l ),s k s l. Initilize AFF Z s n empty set, A M := A M nd SF := SF. For stte pirs s i S : (s m,s i ) pply the chnge to AM nd: 8 Pirs s i, s i of identicl sttes re lso modified here. 9 One could ssume different definitions for ffected stte pirs s design choice.

12 If the edge of A M mrked y input i t stte pir (s m,s i ) is n SF-edge then the modifiction ffects the given tree of the spnning forest. All stte pirs of the SF s sutree re z-ffected sttes (including (s m,s m,s i )). Thus i the SF s sutree is explored using simple redth-first serch, ll stte m,s i pirs re dded to AFF Z (mrked s z-ffected). Do nothing otherwise. Phse 2 Phse 2 of the lgorithm tkes the set AFF Z from Phse 1 nd updtes the forest SF for ech memer of AFF Z. If AFF Z = 0 then SF is vlid forest over A M representing seprting sequence for ech non-identicl stte pir of M. Return SF nd the lgorithm termintes. If AFF Z > 0 then the following method is pplied: All edges of SF originting from z-ffected stte pirs re removed from SF. Then we extend SF s follows. We exmine ll edges of A M originting from z-ffected stte pir nd construct sugrph of A M denoted s A M AFF the following wy: (I) For ech z-ffected stte pir there is corresponding node in A M AFF. (II) For ech edge etween z-ffected stte pirs there is n edge in A M AFF. (III) If there is n edge originting from z-ffected stte pir leding to not ffected stte pir then we mrk the given z-ffected stte pir t the hed of the edge. Next we explore A M AFF opposing edge directions from mrked stte pirs using redth-first serch to crete spnning forest over A M AFF with mrked stte s root nodes. All stte pirs covered y the spnning forest re removed from AFF Z. Finlly SF is expnded simply ppending the spnning forest of A M AFF. Ech tree of the forest of AM AFF is linked to SF y n edge leding to not ffected stte pir from its mrked root node. Return SF nd AFF Z ; the lgorithm termintes. At the end of the lgorithm AFF Z contins ny pirs of equivlent sttes for which no seprting sequence exists. Ech prtil pth of SF represents seprting sequence of M : Given pth from node (s i,s j ) to seprting stte pir (s x,s y) the input lels long the route conctented y the seprting input of s x,s y form seprting sequence z ij of sttes s i nd s j. The seprting fmily of sequences of FSM M is given s Z = {Z 1,...,Z n} Z i = {z ij },j = 1...n. Z set exmple. The uxiliry grph A M of M is presented on Figure 2(). Bold edges represent the forest SF of M, seprting stte pirs re shown in old ellipses, seprting inputs re represented y igger sized edge lels, while the dotted edges etween identicl stte pirs re mintined ut hve no importnce for the lgorithm. Initilly AFF Z = nd let SF = SF. Edges leled with input originting from stte pirs (s 0,s 0), (s 0,s 1), (s 0,s 2), (s 0,s 3) re modified to crete A M. (s 0,s 1) is seprting stte pir nd is therefore not ffected. The - leled edge originting from stte pir (s 0,s 2 ) is not in SF thus (s 0,s 2) is not ffected either. (s 0,s 0) is irrelevnt. Therefore only stte pir (s 0,s 3) is z- ffected: AFF Z = {(s 0,s 3)}. In Phse 2 the -leled edge originting from (s 0,s 3) is removed from SF. Then edges originting from (s 0,s 3) re checked

13 s1, s2 s0, s1 s0, s3 s0, s2 s1, s1 s2, s2 s1, s2 s0, s1 s0, s3 s0, s2 s1, s1 s2, s2 s2, s3 s1, s3 s3, s3 s0, s0 s2, s3 s1, s3 s3, s3 s0, s0 () The uxiliry grph A M of FSM M () The updted uxiliry grph A M FSM M of Fig. 2. Auxiliry grphs nd n edge (s 0,s 3),(s 0,s 2) leding to non-ffected stte pir is found. The given edge is dded to SF nd (s 0,s 3) is removed from AFF Z. Now, AFF Z =, thus the lgorithm termintes nd returns SF, see Figure 2(). All seprting sequences re unchnged except the one of sttes s 0 s 3, which is chnged from to. Theorem 2. The incrementl lgorithm for mintining seprting fmily of sequences descried ove hs time complexity of O(p Z ), where n Z n 2. Proof. Regrdless of chnge opertor type Phse 1 of the lgorithm involves MOD Z modifiction steps nd O( AFF Z ) steps to identify ffected stte pirs. Phse 2 of the lgorithm first cretes sugrph in p AFF Z steps nd then cretes spnning forest over it with O(p AFF Z ) complexity. Thus the totl complexity of the lgorithm is O(p Z ). 5.3 Totl Complexity of the Incrementl Testing Our lgorithm just s the originl HIS-method derives ctul test sequences in two stges y conctenting sequences from the sets Q nd Z i. Ech test sequence prt of the checking sequence is either sequence r q i z ij (stge 1) or sequence r q i i z xy (stge 2). A test sequence must e regenerted fter chnge if either the q-sequence, or the z-sequence of the given test sequence is modified y our incrementl lgorithms ove. Tht is, test sequence r q i... z ij of M is modified iff s i AFF Q or (s i,s j ) AFF Z. Such sequences re identified using links etween the sets Q, Z i,i = 1...n nd test sequences. The numer of modified test sequences is less or equl thn p n 2, i.e., in worst cse the numer of test cses to e generted is equivlent to those generted y tch lgorithm. The resulting test set is complete test set of M tht is no different

14 thn one generted using the tch HIS-method. It consists of the sme set of test sequences generted using vlid Q nd Z sets of M. Note tht the conctention opertion is from the complexity point of view quite expensive step. Conctention, however, only hs to e performed s prt of the testing procedure itself. If no ctul testing is needed fter chnge to the specifiction then we should only very efficiently mintin the sets Q nd Z ccording to ech modifiction nd do the conctention just s necessry. 6 Relted Work Nerly ll test genertion pproches in the FSM test genertion literture propose tch lgorithms, i.e., they focus on uilding test sets for system from scrtch without utilizing ny informtion from tests creted for previous versions of the given system. One of the few exceptions the most relevnt reserch hs een the work of El-Fkih t l. [18]. Similrly to our pproch, the uthors ssume specifiction in form of complete deterministic FSM M, which is modified to new specifiction M. The prolem in oth cses is to generte checking sequence to test if n implementtion Impl conforms to M. Our pproch, however, involves some fundmentl improvements on El-Fkih s method. The most importnt re: 1. El-Fkih s lgorithm does not intend to crete complete test set for the modified specifiction M, insted it my e used to generte tests tht would only test the prts of the new implementtion tht correspond to the modified prts of the specifiction [18]. This necessittes the following quite restrictive ssumption: the prts of the system implementtion tht correspond to the unmodified prts of the specifiction hve not een chnged [18]. Thus, it is presumed tht no ccidentl or intentionl (mlicious) chnges re introduced to supposedly unmodified prts of the implementtion. Such fults could remin undetected s the test set generted y the lgorithm is not complete. Note tht the ssumption ove is unvoidle s not even the union of the existing test set of M nd the incrementl test set generted y the lgorithm provide complete test set for M. Our lgorithm, on the other hnd, mintins complete test set cross the chnges to the specifiction. The lgorithm modifies the existing test set of M to crete complete test set for M if such exists cple of detecting ny fult in Impl. 2. El-Fkih s lgorithm is not ounded incrementl lgorithm in the sense tht it uses trditionl tch lgorithms to crete stte cover set nd seprting fmily of sequences for given FSM upon ech modifiction. Therefore its complexity is the function of the size of the input FSM, not the extent of the chnge. Our method in turn is ounded incrementl lgorithm, its complexity is dependent on the extent of the chnge. It identifies how the modifiction ffects the existing test set of the originl specifiction mchine M. New tests

15 re only generted for the ffected prt nd the clcultion is independent of the unffected prt. The complexity of our lgorithm is no worse thn the complexity of the corresponding tch lgorithm. 7 Conclusion We hve presented ounded incrementl lgorithm to generte test cses for deterministic finite stte mchine models. Our pproch ssumes chnging specifiction nd utilizes n existing test set of the previous version to efficiently mintin complete test set cross the chnges to the specifiction. For ech updte of the system complete test set is generted with the sme fult detection cpility s tht of trditionl tch lgorithm. The complexity of the lgorithm is evluted sed on the ounded incrementl model of computtion of Rmlingm nd Reps [1]. The time complexity of the proposed lgorithm is shown to e ounded; it is function of the size of the chnge to the specifiction rther thn the size of the specifiction itself. It is never worse thn the complexity of the relevnt trditionl lgorithm the HIS-method. Furthermore, the two utonomous incrementl lgorithms uilding up the incrementl test genertion method my lso e pplied independently for vrious purposes during development. In the future we pln to further experiment with the presented lgorithm to gin sufficient performnce dt for prcticl nlysis. Our current focus hs een on time complexity ut the pproch leves spce for fine-tuning nd optimiztions in severl spects tht will hve to e studied. The reserch reported here is regrded s first step in developing efficient incrementl testing lgorithms. We pln to investigte if this pproch cn e extended to different prolems nd models. References 1. Rmlingm, G., Reps, T.: On the computtionl complexity of dynmic grph prolems. Theoreticl Computer Science 158(1-2) (1996) Snni, K., Dhur, A.: A protocol test genertion procedure. Computer Networks nd ISDN Systems 15(4) (1988) Ynnkkis, M., Lee, D.: Testing finite stte mchines: fult detection. In: Selected ppers of the 23rd nnul ACM symposium on Theory of computing. (1995) Petrenko, A., Yevtushenko, N., Leedev, A., Ds, A.: Nondeterministic stte mchines in protocol conformnce testing. In: Proceedings of the IFIP TC6/WG6.1 Sixth Interntionl Workshop on Protocol Test systems VI. (1994) Surmnim, M., Pp, Z.: Anlyzing the impct of protocol chnges on tests. In: Proceedings of the IFIP Interntionl Conference on Testing Communicting Systems, TestCom. (2006) Friedmn, A.D., Menon, P.R.: Fult Detection in Digitl Circuits. Prentice-Hll (1971)

16 7. Aho, A.V., Sethi, R., Ullmn, J.D.: Compilers: Principles, Techniques, nd Tools. Addison-Wesley (1986) 8. Holzmnn, G.J.: Design nd Vlidtion of Protocols. Prentice-Hll (1990) 9. ITU-T: Recommendtion Z.100: Specifiction nd description lnguge (2000) 10. TC97/SC21, I.: Estelle forml description technique sed on n extended stte trnsition model. interntionl stndrd 9074 (1988) 11. Surmnim, M., Chundi, P.: An pproch to preserve protocol consistency nd executility cross updtes. In: Proceedings of Forml Methods nd Softwre Engineering, 6th Interntionl Conference on Forml Engineering Methods, ICFEM. (2004) Pp, Z., Csopki, G., Diuz, S.: On the theory of ptching. In: Proceedings of the 3rd IEEE Interntionl Conference on Softwre Engineering nd Forml Methods, SEFM. (2005) Lee, D., Yinnkkis, M.: Principles nd methods of testing finite stte mchines survey. Proceedings of the IEEE 84(8) (1996) Bochmnn, G.V., Petrenko, A.: Protocol testing: review of methods nd relevnce for softwre testing. In: ISSTA 94: Proceedings of the 1994 ACM SIGSOFT interntionl symposium on Softwre testing nd nlysis, New York, NY, USA, ACM Press (1994) Chow, T.: Testing softwre design modelled y finite-stte mchines. IEEE Trnsctions on Softwre Engineering 4(3) (1978) Fujiwr, S., v. Bochmnn, G., Khendec, F., Amlou, M., Ghedmsi, A.: Test selection sed on finite stte model. IEEE Trnsctions on Softwre Engenieering 17 (1991) Kohvi, Z.: Switching nd Finite Automt Theory. McGrw-Hill, New York (1978) 18. El-Fkih, K., Yevtushenko, N., von Bochmnn, G.: FSM-sed incrementl conformnce testing methods. IEEE Trnsctions on Softwre Engineering 30(7) (2004)

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information

Formal Languages and Automata

Formal Languages and Automata Moile Computing nd Softwre Engineering p. 1/5 Forml Lnguges nd Automt Chpter 2 Finite Automt Chun-Ming Liu cmliu@csie.ntut.edu.tw Deprtment of Computer Science nd Informtion Engineering Ntionl Tipei University

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

More information

Model Reduction of Finite State Machines by Contraction

Model Reduction of Finite State Machines by Contraction Model Reduction of Finite Stte Mchines y Contrction Alessndro Giu Dip. di Ingegneri Elettric ed Elettronic, Università di Cgliri, Pizz d Armi, 09123 Cgliri, Itly Phone: +39-070-675-5892 Fx: +39-070-675-5900

More information

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. NFA for (a b)*abb. CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

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

Types of Finite Automata. CMSC 330: Organization of Programming Languages. Comparing DFAs and NFAs. Comparing DFAs and NFAs (cont.) Finite Automata 2 CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 Types of Finite Automt Deterministic Finite Automt () Exctly one sequence of steps for ech string All exmples so fr Nondeterministic Finite Automt

More information

CMSC 330: Organization of Programming Languages

CMSC 330: Organization of Programming Languages CMSC 330: Orgniztion of Progrmming Lnguges Finite Automt 2 CMSC 330 1 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All exmples so fr Nondeterministic

More information

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

CSCI 340: Computational Models. Kleene s Theorem. Department of Computer Science CSCI 340: Computtionl Models Kleene s Theorem Chpter 7 Deprtment of Computer Science Unifiction In 1954, Kleene presented (nd proved) theorem which (in our version) sttes tht if lnguge cn e defined y ny

More information

Finite Automata-cont d

Finite Automata-cont d Automt Theory nd Forml Lnguges Professor Leslie Lnder Lecture # 6 Finite Automt-cont d The Pumping Lemm WEB SITE: http://ingwe.inghmton.edu/ ~lnder/cs573.html Septemer 18, 2000 Exmple 1 Consider L = {ww

More information

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton

AUTOMATA AND LANGUAGES. Definition 1.5: Finite Automaton 25. Finite Automt AUTOMATA AND LANGUAGES A system of computtion tht only hs finite numer of possile sttes cn e modeled using finite utomton A finite utomton is often illustrted s stte digrm d d d. d q

More information

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

CS415 Compilers. Lexical Analysis and. These slides are based on slides copyrighted by Keith Cooper, Ken Kennedy & Linda Torczon at Rice University CS415 Compilers Lexicl Anlysis nd These slides re sed on slides copyrighted y Keith Cooper, Ken Kennedy & Lind Torczon t Rice University First Progrmming Project Instruction Scheduling Project hs een posted

More information

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

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2016 CS125 Lecture 12 Fll 2016 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

Lecture 08: Feb. 08, 2019

Lecture 08: Feb. 08, 2019 4CS4-6:Theory of Computtion(Closure on Reg. Lngs., regex to NDFA, DFA to regex) Prof. K.R. Chowdhry Lecture 08: Fe. 08, 2019 : Professor of CS Disclimer: These notes hve not een sujected to the usul scrutiny

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

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

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

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

Compiler Design. Fall Lexical Analysis. Sample Exercises and Solutions. Prof. Pedro C. Diniz University of Southern Cliforni Computer Science Deprtment Compiler Design Fll Lexicl Anlysis Smple Exercises nd Solutions Prof. Pedro C. Diniz USC / Informtion Sciences Institute 4676 Admirlty Wy, Suite

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

The size of subsequence automaton

The size of subsequence automaton Theoreticl Computer Science 4 (005) 79 84 www.elsevier.com/locte/tcs Note The size of susequence utomton Zdeněk Troníček,, Ayumi Shinohr,c Deprtment of Computer Science nd Engineering, FEE CTU in Prgue,

More information

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms The Minimum Lel Spnning Tree Prolem: Illustrting the Utility of Genetic Algorithms Yupei Xiong, Univ. of Mrylnd Bruce Golden, Univ. of Mrylnd Edwrd Wsil, Americn Univ. Presented t BAE Systems Distinguished

More information

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

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

More information

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

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.) CS 373, Spring 29. Solutions to Mock midterm (sed on first midterm in CS 273, Fll 28.) Prolem : Short nswer (8 points) The nswers to these prolems should e short nd not complicted. () If n NF M ccepts

More information

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

Regular expressions, Finite Automata, transition graphs are all the same!! CSI 3104 /Winter 2011: Introduction to Forml Lnguges Chpter 7: Kleene s Theorem Chpter 7: Kleene s Theorem Regulr expressions, Finite Automt, trnsition grphs re ll the sme!! Dr. Neji Zgui CSI3104-W11 1

More information

CHAPTER 1 Regular Languages. Contents

CHAPTER 1 Regular Languages. Contents Finite Automt (FA or DFA) CHAPTE 1 egulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, euivlence of NFAs nd DFAs, closure under regulr

More information

Thoery of Automata CS402

Thoery of Automata CS402 Thoery of Automt C402 Theory of Automt Tle of contents: Lecture N0. 1... 4 ummry... 4 Wht does utomt men?... 4 Introduction to lnguges... 4 Alphets... 4 trings... 4 Defining Lnguges... 5 Lecture N0. 2...

More information

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings...

Table of contents: Lecture N Summary... 3 What does automata mean?... 3 Introduction to languages... 3 Alphabets... 3 Strings... Tle of contents: Lecture N0.... 3 ummry... 3 Wht does utomt men?... 3 Introduction to lnguges... 3 Alphets... 3 trings... 3 Defining Lnguges... 4 Lecture N0. 2... 7 ummry... 7 Kleene tr Closure... 7 Recursive

More information

Lecture 09: Myhill-Nerode Theorem

Lecture 09: Myhill-Nerode Theorem CS 373: Theory of Computtion Mdhusudn Prthsrthy Lecture 09: Myhill-Nerode Theorem 16 Ferury 2010 In this lecture, we will see tht every lnguge hs unique miniml DFA We will see this fct from two perspectives

More information

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata CS103B ndout 18 Winter 2007 Ferury 28, 2007 Finite Automt Initil text y Mggie Johnson. Introduction Severl childrens gmes fit the following description: Pieces re set up on plying ord; dice re thrown or

More information

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

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

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.

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. Regulr Expressions, Pumping Lemm, Right Liner Grmmrs Ling 106 Mrch 25, 2002 1 Regulr Expressions A regulr expression descries or genertes lnguge: it is kind of shorthnd for listing the memers of lnguge.

More information

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

More on automata. Michael George. March 24 April 7, 2014 More on utomt Michel George Mrch 24 April 7, 2014 1 Automt constructions Now tht we hve forml model of mchine, it is useful to mke some generl constructions. 1.1 DFA Union / Product construction Suppose

More information

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

More information

First Midterm Examination

First Midterm Examination Çnky University Deprtment of Computer Engineering 203-204 Fll Semester First Midterm Exmintion ) Design DFA for ll strings over the lphet Σ = {,, c} in which there is no, no nd no cc. 2) Wht lnguge does

More information

Formal languages, automata, and theory of computation

Formal languages, automata, and theory of computation Mälrdlen University TEN1 DVA337 2015 School of Innovtion, Design nd Engineering Forml lnguges, utomt, nd theory of computtion Thursdy, Novemer 5, 14:10-18:30 Techer: Dniel Hedin, phone 021-107052 The exm

More information

1.4 Nonregular Languages

1.4 Nonregular Languages 74 1.4 Nonregulr Lnguges The number of forml lnguges over ny lphbet (= decision/recognition problems) is uncountble On the other hnd, the number of regulr expressions (= strings) is countble Hence, ll

More information

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

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

More information

State Minimization for DFAs

State Minimization for DFAs Stte Minimiztion for DFAs Red K & S 2.7 Do Homework 10. Consider: Stte Minimiztion 4 5 Is this miniml mchine? Step (1): Get rid of unrechle sttes. Stte Minimiztion 6, Stte is unrechle. Step (2): Get rid

More information

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.

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. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

Lexical Analysis Finite Automate

Lexical Analysis Finite Automate Lexicl Anlysis Finite Automte CMPSC 470 Lecture 04 Topics: Deterministic Finite Automt (DFA) Nondeterministic Finite Automt (NFA) Regulr Expression NFA DFA A. Finite Automt (FA) FA re grph, like trnsition

More information

Fundamentals of Computer Science

Fundamentals of Computer Science Fundmentls of Computer Science Chpter 3: NFA nd DFA equivlence Regulr expressions Henrik Björklund Umeå University Jnury 23, 2014 NFA nd DFA equivlence As we shll see, it turns out tht NFA nd DFA re equivlent,

More information

Parse trees, ambiguity, and Chomsky normal form

Parse trees, ambiguity, and Chomsky normal form Prse trees, miguity, nd Chomsky norml form In this lecture we will discuss few importnt notions connected with contextfree grmmrs, including prse trees, miguity, nd specil form for context-free grmmrs

More information

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

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages Deprtment of Computer Science, Austrlin Ntionl University COMP2600 Forml Methods for Softwre Engineering Semester 2, 206 Assignment Automt, Lnguges, nd Computility Smple Solutions Finite Stte Automt nd

More information

Lecture 9: LTL and Büchi Automata

Lecture 9: LTL and Büchi Automata Lecture 9: LTL nd Büchi Automt 1 LTL Property Ptterns Quite often the requirements of system follow some simple ptterns. Sometimes we wnt to specify tht property should only hold in certin context, clled

More information

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

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont. NFA DFA Exmple 3 CMSC 330: Orgniztion of Progrmming Lnguges NFA {B,D,E {A,E {C,D {E Finite Automt, con't. R = { {A,E, {B,D,E, {C,D, {E 2 Equivlence of DFAs nd NFAs Any string from {A to either {D or {CD

More information

Coalgebra, Lecture 15: Equations for Deterministic Automata

Coalgebra, Lecture 15: Equations for Deterministic Automata Colger, Lecture 15: Equtions for Deterministic Automt Julin Slmnc (nd Jurrin Rot) Decemer 19, 2016 In this lecture, we will study the concept of equtions for deterministic utomt. The notes re self contined

More information

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun: CMPU 240 Lnguge Theory nd Computtion Spring 2019 NFAs nd Regulr Expressions Lst clss: Introduced nondeterministic finite utomt with -trnsitions Tody: Prove n NFA- is no more powerful thn n NFA Introduce

More information

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

Centrum voor Wiskunde en Informatica REPORTRAPPORT. Supervisory control for nondeterministic systems Centrum voor Wiskunde en Informtic REPORTRAPPORT Supervisory control for nondeterministic systems A. Overkmp Deprtment of Opertions Reserch, Sttistics, nd System Theory BS-R9411 1994 Supervisory Control

More information

FABER Formal Languages, Automata and Models of Computation

FABER Formal Languages, Automata and Models of Computation DVA337 FABER Forml Lnguges, Automt nd Models of Computtion Lecture 5 chool of Innovtion, Design nd Engineering Mälrdlen University 2015 1 Recp of lecture 4 y definition suset construction DFA NFA stte

More information

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

Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Regular Expressions (RE) Kleene-* Regulr Expressions (RE) Regulr Expressions (RE) Empty set F A RE denotes the empty set Opertion Nottion Lnguge UNIX Empty string A RE denotes the set {} Alterntion R +r L(r ) L(r ) r r Symol Alterntion

More information

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

CMSC 330: Organization of Programming Languages. DFAs, and NFAs, and Regexps (Oh my!) CMSC 330: Orgniztion of Progrmming Lnguges DFAs, nd NFAs, nd Regexps (Oh my!) CMSC330 Spring 2018 Types of Finite Automt Deterministic Finite Automt (DFA) Exctly one sequence of steps for ech string All

More information

CISC 4090 Theory of Computation

CISC 4090 Theory of Computation 9/6/28 Stereotypicl computer CISC 49 Theory of Computtion Finite stte mchines & Regulr lnguges Professor Dniel Leeds dleeds@fordhm.edu JMH 332 Centrl processing unit (CPU) performs ll the instructions

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Eugene Weinstein Google, NYU Cournt Institute eugenew@cs.nyu.edu Slide Credit: Mehryr Mohri Preliminries Finite lphet, empty string.

More information

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science

CSCI 340: Computational Models. Transition Graphs. Department of Computer Science CSCI 340: Computtionl Models Trnsition Grphs Chpter 6 Deprtment of Computer Science Relxing Restrints on Inputs We cn uild n FA tht ccepts only the word! 5 sttes ecuse n FA cn only process one letter t

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

3 Regular expressions

3 Regular expressions 3 Regulr expressions Given n lphet Σ lnguge is set of words L Σ. So fr we were le to descrie lnguges either y using set theory (i.e. enumertion or comprehension) or y n utomton. In this section we shll

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

Tutorial Automata and formal Languages

Tutorial Automata and formal Languages Tutoril Automt nd forml Lnguges Notes for to the tutoril in the summer term 2017 Sestin Küpper, Christine Mik 8. August 2017 1 Introduction: Nottions nd sic Definitions At the eginning of the tutoril we

More information

Converting Regular Expressions to Discrete Finite Automata: A Tutorial

Converting Regular Expressions to Discrete Finite Automata: A Tutorial Converting Regulr Expressions to Discrete Finite Automt: A Tutoril Dvid Christinsen 2013-01-03 This is tutoril on how to convert regulr expressions to nondeterministic finite utomt (NFA) nd how to convert

More information

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

The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER LANGUAGES AND COMPUTATION ANSWERS The University of Nottinghm SCHOOL OF COMPUTER SCIENCE LEVEL 2 MODULE, SPRING SEMESTER 2016 2017 LNGUGES ND COMPUTTION NSWERS Time llowed TWO hours Cndidtes my complete the front cover of their nswer ook

More information

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

Grammar. Languages. Content 5/10/16. Automata and Languages. Regular Languages. Regular Languages 5//6 Grmmr Automt nd Lnguges Regulr Grmmr Context-free Grmmr Context-sensitive Grmmr Prof. Mohmed Hmd Softwre Engineering L. The University of Aizu Jpn Regulr Lnguges Context Free Lnguges Context Sensitive

More information

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.

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. York University CSE 2 Unit 3. DFA Clsses Converting etween DFA, NFA, Regulr Expressions, nd Extended Regulr Expressions Instructor: Jeff Edmonds Don t chet y looking t these nswers premturely.. For ech

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages Algorithms & Models of Computtion CS/ECE 374, Fll 2017 NFAs continued, Closure Properties of Regulr Lnguges Lecture 5 Tuesdy, Septemer 12, 2017 Sriel Hr-Peled (UIUC) CS374 1 Fll 2017 1 / 31 Regulr Lnguges,

More information

CM10196 Topic 4: Functions and Relations

CM10196 Topic 4: Functions and Relations CM096 Topic 4: Functions nd Reltions Guy McCusker W. Functions nd reltions Perhps the most widely used notion in ll of mthemtics is tht of function. Informlly, function is n opertion which tkes n input

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

More information

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary

Genetic Programming. Outline. Evolutionary Strategies. Evolutionary strategies Genetic programming Summary Outline Genetic Progrmming Evolutionry strtegies Genetic progrmming Summry Bsed on the mteril provided y Professor Michel Negnevitsky Evolutionry Strtegies An pproch simulting nturl evolution ws proposed

More information

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research

Speech Recognition Lecture 2: Finite Automata and Finite-State Transducers. Mehryar Mohri Courant Institute and Google Research Speech Recognition Lecture 2: Finite Automt nd Finite-Stte Trnsducers Mehryr Mohri Cournt Institute nd Google Reserch mohri@cims.nyu.com Preliminries Finite lphet Σ, empty string. Set of ll strings over

More information

NFAs continued, Closure Properties of Regular Languages

NFAs continued, Closure Properties of Regular Languages lgorithms & Models of omputtion S/EE 374, Spring 209 NFs continued, losure Properties of Regulr Lnguges Lecture 5 Tuesdy, Jnury 29, 209 Regulr Lnguges, DFs, NFs Lnguges ccepted y DFs, NFs, nd regulr expressions

More information

1.3 Regular Expressions

1.3 Regular Expressions 56 1.3 Regulr xpressions These hve n importnt role in describing ptterns in serching for strings in mny pplictions (e.g. wk, grep, Perl,...) All regulr expressions of lphbet re 1.Ønd re regulr expressions,

More information

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

Automata Theory 101. Introduction. Outline. Introduction Finite Automata Regular Expressions ω-automata. Ralf Huuck. Outline Automt Theory 101 Rlf Huuck Introduction Finite Automt Regulr Expressions ω-automt Session 1 2006 Rlf Huuck 1 Session 1 2006 Rlf Huuck 2 Acknowledgement Some slides re sed on Wolfgng Thoms excellent

More information

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan

CS 267: Automated Verification. Lecture 8: Automata Theoretic Model Checking. Instructor: Tevfik Bultan CS 267: Automted Verifiction Lecture 8: Automt Theoretic Model Checking Instructor: Tevfik Bultn LTL Properties Büchi utomt [Vrdi nd Wolper LICS 86] Büchi utomt: Finite stte utomt tht ccept infinite strings

More information

DFA minimisation using the Myhill-Nerode theorem

DFA minimisation using the Myhill-Nerode theorem DFA minimistion using the Myhill-Nerode theorem Johnn Högerg Lrs Lrsson Astrct The Myhill-Nerode theorem is n importnt chrcteristion of regulr lnguges, nd it lso hs mny prcticl implictions. In this chpter,

More information

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

12.1 Nondeterminism Nondeterministic Finite Automata. a a b ε. CS125 Lecture 12 Fall 2014 CS125 Lecture 12 Fll 2014 12.1 Nondeterminism The ide of nondeterministic computtions is to llow our lgorithms to mke guesses, nd only require tht they ccept when the guesses re correct. For exmple, simple

More information

1 From NFA to regular expression

1 From NFA to regular expression Note 1: How to convert DFA/NFA to regulr expression Version: 1.0 S/EE 374, Fll 2017 Septemer 11, 2017 In this note, we show tht ny DFA cn e converted into regulr expression. Our construction would work

More information

Hamiltonian Cycle in Complete Multipartite Graphs

Hamiltonian Cycle in Complete Multipartite Graphs Annls of Pure nd Applied Mthemtics Vol 13, No 2, 2017, 223-228 ISSN: 2279-087X (P), 2279-0888(online) Pulished on 18 April 2017 wwwreserchmthsciorg DOI: http://dxdoiorg/1022457/pmv13n28 Annls of Hmiltonin

More information

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA) Finite Automt (FA or DFA) CHAPTER Regulr Lnguges Contents definitions, exmples, designing, regulr opertions Non-deterministic Finite Automt (NFA) definitions, equivlence of NFAs DFAs, closure under regulr

More information

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O 1 Section 5. The Definite Integrl Suppose tht function f is continuous nd positive over n intervl [, ]. y = f(x) x The re under the grph of f nd ove the x-xis etween nd is denoted y f(x) dx nd clled the

More information

CS 275 Automata and Formal Language Theory

CS 275 Automata and Formal Language Theory CS 275 utomt nd Forml Lnguge Theory Course Notes Prt II: The Recognition Prolem (II) Chpter II.5.: Properties of Context Free Grmmrs (14) nton Setzer (Bsed on ook drft y J. V. Tucker nd K. Stephenson)

More information

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

Theory of Computation Regular Languages. (NTU EE) Regular Languages Fall / 38 Theory of Computtion Regulr Lnguges (NTU EE) Regulr Lnguges Fll 2017 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of Finite Automt A finite utomton hs finite set of control

More information

Acceptance Sampling by Attributes

Acceptance Sampling by Attributes Introduction Acceptnce Smpling by Attributes Acceptnce smpling is concerned with inspection nd decision mking regrding products. Three spects of smpling re importnt: o Involves rndom smpling of n entire

More information

Java II Finite Automata I

Java II Finite Automata I Jv II Finite Automt I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz Finite Automt I p.1/13 Processing Regulr Expressions We lredy lerned out Jv s regulr expression

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

Closure Properties of Regular Languages

Closure Properties of Regular Languages Closure Properties of Regulr Lnguges Regulr lnguges re closed under mny set opertions. Let L 1 nd L 2 e regulr lnguges. (1) L 1 L 2 (the union) is regulr. (2) L 1 L 2 (the conctention) is regulr. (3) L

More information

SWEN 224 Formal Foundations of Programming WITH ANSWERS

SWEN 224 Formal Foundations of Programming WITH ANSWERS T E W H A R E W Ā N A N G A O T E Ū P O K O O T E I K A A M Ā U I VUW V I C T O R I A UNIVERSITY OF WELLINGTON Time Allowed: 3 Hours EXAMINATIONS 2011 END-OF-YEAR SWEN 224 Forml Foundtions of Progrmming

More information

Context-Free Grammars and Languages

Context-Free Grammars and Languages Context-Free Grmmrs nd Lnguges (Bsed on Hopcroft, Motwni nd Ullmn (2007) & Cohen (1997)) Introduction Consider n exmple sentence: A smll ct ets the fish English grmmr hs rules for constructing sentences;

More information

Formal Language and Automata Theory (CS21004)

Formal Language and Automata Theory (CS21004) Forml Lnguge nd Automt Forml Lnguge nd Automt Theory (CS21004) Khrgpur Khrgpur Khrgpur Forml Lnguge nd Automt Tle of Contents Forml Lnguge nd Automt Khrgpur 1 2 3 Khrgpur Forml Lnguge nd Automt Forml Lnguge

More information

3. Finite automata and regular languages: theory

3. Finite automata and regular languages: theory series-prllel-loop construction (3.5, 3.6) -free DFA RE -hull (3.3) power set (3.4) dynmic progrmming (3.6) 3. Finite utomt nd regulr lnguges: theory jn 4.4.6 Among the vrious forml lnguges tht rise nturlly

More information

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers

80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES. 2.6 Finite State Automata With Output: Transducers 80 CHAPTER 2. DFA S, NFA S, REGULAR LANGUAGES 2.6 Finite Stte Automt With Output: Trnsducers So fr, we hve only considered utomt tht recognize lnguges, i.e., utomt tht do not produce ny output on ny input

More information

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives Block #6: Properties of Integrls, Indefinite Integrls Gols: Definition of the Definite Integrl Integrl Clcultions using Antiderivtives Properties of Integrls The Indefinite Integrl 1 Riemnn Sums - 1 Riemnn

More information

Name Ima Sample ASU ID

Name Ima Sample ASU ID Nme Im Smple ASU ID 2468024680 CSE 355 Test 1, Fll 2016 30 Septemer 2016, 8:35-9:25.m., LSA 191 Regrding of Midterms If you elieve tht your grde hs not een dded up correctly, return the entire pper to

More information

Theory of Computation Regular Languages

Theory of Computation Regular Languages Theory of Computtion Regulr Lnguges Bow-Yw Wng Acdemi Sinic Spring 2012 Bow-Yw Wng (Acdemi Sinic) Regulr Lnguges Spring 2012 1 / 38 Schemtic of Finite Automt control 0 0 1 0 1 1 1 0 Figure: Schemtic of

More information

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018

Finite Automata Theory and Formal Languages TMV027/DIT321 LP4 2018 Finite Automt Theory nd Forml Lnguges TMV027/DIT321 LP4 2018 Lecture 10 An Bove April 23rd 2018 Recp: Regulr Lnguges We cn convert between FA nd RE; Hence both FA nd RE ccept/generte regulr lnguges; More

More information

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

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018 CS 301 Lecture 04 Regulr Expressions Stephen Checkowy Jnury 29, 2018 1 / 35 Review from lst time NFA N = (Q, Σ, δ, q 0, F ) where δ Q Σ P (Q) mps stte nd n lphet symol (or ) to set of sttes We run n NFA

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

Where did dynamic programming come from?

Where did dynamic programming come from? Where did dynmic progrmming come from? String lgorithms Dvid Kuchk cs302 Spring 2012 Richrd ellmn On the irth of Dynmic Progrmming Sturt Dreyfus http://www.eng.tu.c.il/~mi/cd/ or50/1526-5463-2002-50-01-0048.pdf

More information

Worked out examples Finite Automata

Worked out examples Finite Automata Worked out exmples Finite Automt Exmple Design Finite Stte Automton which reds inry string nd ccepts only those tht end with. Since we re in the topic of Non Deterministic Finite Automt (NFA), we will

More information

Myhill-Nerode Theorem

Myhill-Nerode Theorem Overview Myhill-Nerode Theorem Correspondence etween DA s nd MN reltions Cnonicl DA for L Computing cnonicl DFA Myhill-Nerode Theorem Deepk D Souz Deprtment of Computer Science nd Automtion Indin Institute

More information

This lecture covers Chapter 8 of HMU: Properties of CFLs

This lecture covers Chapter 8 of HMU: Properties of CFLs This lecture covers Chpter 8 of HMU: Properties of CFLs Turing Mchine Extensions of Turing Mchines Restrictions of Turing Mchines Additionl Reding: Chpter 8 of HMU. Turing Mchine: Informl Definition B

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams

Chapter 4 Contravariance, Covariance, and Spacetime Diagrams Chpter 4 Contrvrince, Covrince, nd Spcetime Digrms 4. The Components of Vector in Skewed Coordintes We hve seen in Chpter 3; figure 3.9, tht in order to show inertil motion tht is consistent with the Lorentz

More information