Models of Sequential Systems

Size: px
Start display at page:

Download "Models of Sequential Systems"

Transcription

1 Models of Sequential Systems Sungho Kang Yonsei University

2 Outline Introduction to Finite State Machines Synthesis of Finite State Machines FSMs : Definition, Notation, and Examples FSM Minimization of Completely Specified Machines Graph Algorithms for FSM Traversal Models of Sequential Systems FSTs: Strings, Runs, Reachability and Products FSM Equivalence Checking Reachability Analysis Symbolic FSM State Traversal 2

3 A Verbal FSM Specification The circuit receives a stream of bits, one per clock cycle, on input x and at every clock cycle it indicates, on the three outputs Z 2 Z Z 0 the difference between the number of ones and the number of zeroes in the last three bits received. The difference is positive if the number of ones exceeded the number of zeroes and it is negative otherwise. The difference is represented as a 2's complement number, with Z 2 the sign bit and Z 0 the least significant bit. At reset, the circuit is assumed to have received an arbitrarily long string of zeroes, so that the output is -3. 3

4 2 s Complement Assume -2 n < i 2 n. Then the 2 s complement representation of an integer i is the binary code for the integer j = 2 n - i, augmented by an extra bit denoting the sign of i. Examples: Sign Bit n = 3 i= 5 3 j = BINARY( 2 i ) = BINARY( 3) = 00 i= 5 3 j = BINARY( 2 i ) = BINARY( 3) = 0 4

5 A Sequential Counter Circuit and Its STG Circuit rst ck x y0 y0' Latches 0,,2, use n=2 z2 STG (State Transition Graph) y y2 z= S00 S0 z=00 0 z=00 0 S000 S00 S0 0 S 0 0 z=0 0 z= z=0 0 z= S00 S0 z=00 0 z z0 Truth Table yyy zzz

6 Systematic FSM Design Paradigm 6

7 Synthesis of Practical FSMs We have learned basic methods for minimizing, encoding, checking equivalence, and synthesizing circuits for realizing completely specified FSMs Now we must learn to deal with the more practical case of incomplete specification Our goal is thus to find a least cost circuit that satisfies a partial specification 7

8 FSM Synthesis--State Encoding ss ss K-map of f(s) S S S 2 3 S S S S S S S={S,S 2, S 9 } State set 4 = log 2 9 Code Length s=(s,s 2,s 3,s 4 ) Encoding Vector f () s = DECODE() s S Criteria: avoid s, promote adjacency Characteristic function of set S 8

9 Encoding the Transition Functions Given: FSM specified as Cube Table Find code length and encoding Replace symbolic states with binary codes For each row with a in the δ i column, add the input cube to the formula for δ i (s). 9

10 FSM Synthesis--State Encoding Encoding: S : s s, S : s s, S : s s I PS NS O 0 S S 0 S S 2 0 S S 0 2 S S S S S S 3 x s s 2 δ δ 2 λ Simplification: δ = x s s + xs s, δ = xs s = s λ, λ = xs (or 0) literals 0

11 Exploiting Unreachable State Don t Cares When there are unreachable states, the encodings of these states are don t cares These don t cares can be used to minimize the logic of the next state and output functions s in the output columns of the cube table are primary reason for fat logic--don t cares minimize this effect

12 FSM Synthesis--State Encoding Encoding(2 s) S :s s 2, S 2 :s s 2, S 3 :s s 2 ( S 4 ) δ =s s 2 x +s s 2 x, δ 2 =s s 2 x, λ=s 2 x DC =s s 2 (9 literals) δ =s s 2 x +s 2 x, δ 2 =s s 2 x, λ=s 2 x Encoding(4 s) S :s s 2, S 2 :s s 2, S 3 :s s 2 Conclusion: Avoid codes with s δ =s s 2 x+s s 2 x+s s 2 x δ 2 =s +s s 2 x, λ=s s 2 x DC =s s 2 ( literals) δ =s s 2 x +s x+s 2 x, δ 2 =s +x, λ=s s 2 x 2

13 FSM State Sequences M = < I, S, δ, S 0, O, λ> I : Input Alphabet O : Output Alphabet S : State Set S 0 : Initial State Set δ : Next State Transition Function λ : Output Function t=δ(s,x):sxi S o=λ(s,x):sxi O State Sequences Output Sequences 3

14 Formal FSM Specification STG ( S 4 ) Flow Table x = 0 x = S S, 0 S2, S2 S, 0 S3, 0 S S, 0 S, 3 3 Cube Table I PS NS O 0 S S 0 S S 2 0 S S 0 2 S S S S S S 3 M = < I, S, δ, S 0, O, λ> I={0,}, S={S 0, S, S 2 }, S 0 ={S }, O={0,} 4

15 State Minimization Two FSMs are equivalent if their initial states are equivalent. Two states are equivalent if there is no sequence of inputs, which, applied to both machines, produces an output difference The task of replacing two or more equivalent states with a single representative state is called State Minimization 5

16 Strings and Runs A string x=(x 0,x,,x k- ) is a finite sequence of inputs to an FSM M = < I, S, δ, S 0, O, λ> where x i I Examples: x produces the s 0 -run s=(s 0,s,,s k ), s i+ = δ(s i,x i ), that is, the sequence of states generated by x when M starts in state s 0 x= ( 00,,,, ), s = S, s= ( S, S, S, S, S, S ) x= ( 00,,,, ), s = S, s= ( S, S, S, S, S, S ) Are S,S 2 equivalent? 6

17 Output Sequences Given an input sequence x=(x 0,x,,x k- ), the run s=(s 0,s, s k ) leads to the corresponding output sequence z=(z 0,z,,z k- ) Input = (0,0,,) Run = (S,S,S,S 2,S 3 ) Output Sequence=(0,0,,0) Run = (S 3,S 3,S 3,S,S 2 ) Output Sequence=(0,0,,) 7

18 Distinguishing Sequences Two states s and t are distinguished by an input string x=(x 0,x,,x k- ), if and only if the corresponding runs lead to output sequences z S =(z S,z 2S,,z k-s ) and z t =(z t,z 2t,,z k-t ), z k-t z k- s which differ in the last output symbol. Distinguishes s=s and t=s 3 Input Sequence=(0,,) Run from S 0 =(S,S,S 2,S 3 ) Outputs from S 0 =(0,,0) Run from S 3 =(S 3,S 3,S,S 2 ) Outputs from S 0 =(0,,) 8

19 Indistinguishable States Two states S and S 2 are indistinguishable if and only if any input sequence x=(x 0,x, ) gives the same output sequence z=(z 0,z, ), irrespective of whether the FSM starts in state S or S 2 (no distinguishing sequence exists). Input Sequence : (0,0,,,) Outputs from S 0 =S : (0,0,,0,) Outputs from S 0 =S 2 : (0,0,,0,) 9

20 Merge Indistinguishable States Merge Input Sequence : (0,0,,,),(,,,0,0),. Outputs from S 0 =S : (0,0,,0,),(,0,,0,0),. Outputs from S 0 =S 2 : (0,0,,0,),(,0,,0,0),. 20

21 Indistinguishable States Two states are indistinguishable if (but not only if) they have the same next state and the same output for all inputs 0/ 0 0/ 0 S 2 S / 0 / 0 S 3 0, / 0 States S and S 2 are indistinguishable Hence, S S 2 State S 3 goes to State S 3 for both inputs 2

22 Length-k Distinguishing Sequences Two states s and t are k-distinguished by an input string x=(x 0,x,,x k- ), if and only if the corresponding runs lead to output sequences z S =(z S,z 2S,,z k-s ) and z t =(z t,z 2t,,z k-t ), z k-t z k- s which differ in the last output symbol. String (0,,) 3-Distinguishes s=s and t=s 3 Input Sequence=(0,,) Run from S 0 =(S,S,S 2,S 3 ) Outputs from S 0 =(0,,0) Run from S 3 =(S 3,S 3,S,S 2 ) Outputs from S 0 =(0,,) 22

23 k-equivalent States If S and S 2 are not k-distinguishable (no k-distinguishing sequence exists), they are k-equivalent (S k S 2 ). In an n-state FSM ( S =n), S and S 2 are equivalent S S 2 if and only if they are n-equivalent (S n S 2 ). 23

24 Equivalent States A C B D Because all runs from these states either go back and forth from B to D, outputting a 0, or converge at F Because all runs from these states either go to equivalent states B and D, outputting a, or converge at E 24

25 Equivalent FSMs For any string x, the output strings for runs starting from A and A,C will be identical x=(0,,0,), z xa =(0,,0,0), z x A,C =(0,,0,0) 25

26 Theorem s k+ t if and only if s k t and s x k t x, x X, where s x and t x are the x-successors of s and t s t 0 0 u v w Proof : Take x k+ as (x,x k ), where both x X and x k are arbitrary 26

27 Equivalence Classes The binary relation k ={(s,t) s k t} SxS is an equivalence relation (reflexive, symmetric, and transitive). We denote the m k equivalence classes of k by B ik, i=,,m k 27

28 Equivalence Classes λ λ ABCDEF,,,,, A, B, C, D, E, F ( 0) = ,,,,, () =, 0, 0,,, 0 ξ = {{ ACE,, },{ BDF,, }} δ δ ABCDEF,,,,, A, B, C, D, E, F ( 0) = E, D, E, B, C, B ( ) = DFBFFC,,,,, ξ 2 = {{ ACE,, },{ BD, },{ F}} 28

29 Equivalent Classes Two states of a given FSM with n states are equivalent if and only if they are (n-) equivalent 29

30 Refinement (Meet) of Partitions Let p 0 and p denote the partition into equivalence classes induced by inputs x=0 and x= P 0 P ={B i0 }{B j } = U ij {B i 0 B j } ={B i0 B j, B i0 B j,.., B i0 B j, B i0 B j,... } P 0 = {{,2},{2,3}}, P ={{,3},{2,3}} P 0 P ={{,2} {,3},{,2} {2,3},{2,3} {,3},{2,3} {2,3}} = {{},{2},{3}} Note the Cartesian Product element {2,3} is dropped (by the absorption) 30

31 Refinement (Meet) of Two Partitions REFINE(P, P 0 ) = P P 0 The Meet of two partitions is just the Cartesian Product (next slide) Example: P 0 = {A,B,C,D,E,F} P = {{A,C,E},{B,D,F}} P P 0 = {A,B,C,D,E,F} X {{A,C,E},{B,D,F}} = {{A,C,E},{B,D,F}} 3

32 Finding Equivalent States Procedure STATE_EQUIVALENCE ( X, S, δ, λ ) { P 0 = { B }; B S; P P 0 0 = = 0 for( x X){ 2 for( s S) x j o = λ ( s, x ) j j 3 P x = PARTITION( o x, s) 4 P = REFINE( P, P x) } if( P = 0 P ) return( 0 P, 0) 5 for( k = 2, K, S ){ P k = {} 6 for( B P k i ){ P k = { B } i i 7 8 for( x X){ for( s B ) x j i t = δ ( s, x ) j j 9 b x = BLOCK_INDEX( t x, P k ) 0 Pb x = PARTITION( x i b, s) P x = REFINE( k i P, Pbi x ) i } 2 P k = P k P k i 3 } if( k k k P = P ) return( P, k ) } } Find equivalence class partition of -equivalent states Extend to equivalence class partition of (k+)-equivalent states Return partition and length of longest distinguishing sequence 32

33 Equivalence Classes We will use the following example Flow Table STG x= 0 x= A E, 0 D, B D, 0 F, 0 C E, 0 B, D B, 0 F, 0 E C, 0 F, F B, 0 C, 0 33

34 Finding Equivalent States Procedure P0 = { B }; B SP ; P 0 0 = = 0 for( x X){ 2 for( s S) x j o = λ( s, x) j j 3 P x = PARTITION( ox, s) 4 P = REFINE( P, P x) } if( P = 0 P ) return( 0 P, 0) 0 0 Start with maximum partition: all states in a single block STATE_EQUIVALENCE (X, S, δ, λ){ Flow Table x= 0 x= A E, 0 D, B D, 0 F, 0 C E, 0 B, D B, 0 F, 0 E C, 0 F, F B, 0 C, 0 o = ( ,,,,, ), P = { A, B, C, D, E, F} o = (, 000,,,, ), P = {{ A, C, E},{ B, D, F}} 34

35 -Equivalence Classes ( ) λ (A,B,C,D,E,F) (0)=(0,0,0,0,0,0) λ (A,B,C,D,E,F) ()=(,0,,0,,0) P 0 ={A,B,C,D,E,F}={B 0 } P ={{A,C,E},{B,D,F}}={B,B 2 } P =P 0 P ={B 0 } {B,B 2 } ={B 0 B, B0 B 2 } P ={{A,C,E},{B,D,F}}={B,B 2 } x= 0 x= A E, 0 D, B D, 0 F, 0 C E, 0 B, D B, 0 F, 0 E C, 0 F, F B, 0 C, 0 The equivalence classes of ( ) are {A,C,E},{B,D,E} 35

36 Finding Equivalent States P ={{A,C,E},{B,D,F}}={B,B 2} 5 for( k = 2, K, S ){ P k = {} 6 for( B k i P ){ P k = { B } i i 7 8 for( x X){ for( s B ) (, ) j i t x = δ s x j j 9 b x = BLOCK_INDEX( t x, P k ) 0 Pb x = PARTITION( x i b, s) P x = REFINE( k i P, Pbi x ) i } 2 P k = P k P k i 3 } if( k k P = P ) return( k P, k ) Extend to equivalence class partition of (k+)-equivalent states x= 0 x= A E, 0 D, B D, 0 F, 0 C E, 0 B, D B, 0 F, 0 E C, 0 F, F B, 0 C, 0 P 2 ={A,C,E}, t 0 =(E,E,C) b 0 =(,,), Pb 0 =(A,C,E) 36

37 Finding Equivalent States Mealy machine PS NS NS P ={{A,D,F,G},{B,C},{E}, } ={{A,D,F,G},{B,C},{E}} A B x=0 E/0 C/0 x= C/0 A/ P 2 ={{A},{B,C},{D,G},{E},{F}} C B/0 G/ P 3 ={{A},{B},{C},{D},{E},{F},{G},{H}} D E G/0 F/ A/0 B/0 F E/0 D/0 G D/0 G/0 37

38 Graph Algorithms Subgraph Connected subgraph Fanin cone (logic cone) Maximal completely connected subgraph If G is undirected, Clique Maximal if it is not a proper subgraph of another subgraph Strongly connected subgraph maximal subgraph for which every pair of included vertices lies on a cycle 38

39 Graph Algorithms An (S,T) cutset C of a directed graph G=(V,E) is a set of nodes (edges) of G such that any path from s S to t T passes through one of the nodes (edges) in C If the graph is a DAG, it is often understood that S and T are the sets of source nodes and sink nodes, respectively 39

40 BFS For FSMs Preorder Each node is visited before any of its successors Postorder Each node is visited after all of its successors BFS effectively levelizes the graph with respect to a specified start set V 0 and then visits all the nodes at level k before visiting any nodes at level k+ 40

41 BFS For FSMs BFS is modified for use in FSM analysis: Trace-Back Method to identify shortest paths BDD data structures for representing large state sets Length of the longest shortest path from an initial state to any of the reachable states is called the sequential depth of the machine The sequential depth corresponding to the particular subset V 0 leading to the largest sequential depth is called diameter of the graph 4

42 Breadth First Search Procedure BFS( V, E, V ){ 0 0 Reached = From = New 0 = V ; k = 0 0 do { k= k+ To = Img( E, From) 2 New k = To Reached; From New k Reached Reached New k = = } while( New k 3 ) 4 return( k, New j, j= 0, K, k ) } New New 2 New 3 States in New i+ reached in one step from New i New 0 Note New 4 = 42

43 Depth-First Search Unlike BFS, DFS prioritizes depth of penetration, rather than exhausting the current locale before proceeding. DFS proceeds recursively, visiting all transitive successors of a vertex, before completing the DFS of the current active vertex. DFS is most useful in detecting cycles of a directed graph. 43

44 Depth First Search When started (preorder) When completed (postorder) Earliest in cycle (lowlink) 44

45 Depth First Search Active Vertex Scan successors Procedure DFS(u) { kpre=kpre+; preorder[u]=kpre foreach ( a u ) { 2 if(preorder [a]=0 DFS(a). } 3 kpost=kpost+; postorder[u]=kpost } Recur if unsearched When Started When Completed 45

46 Strongly Connected Components An SCC (Strongly Connected Component) of a directed graph is a subgraph which is maximal with respect to the following property: There is a path from every vertex to every other vertex, and back. That is, every pair of vertices lies on a cycle. 46

47 Finding SCC Procedure SCC_POP(u) { Procedure DFS_SCC(u) { while(scc()) { kpre = kpre+; v=pop(scc) lowlink[u]=preorder[u]=kpre 2 if(lowlink[v]lowlink[u]) print v push (SCC, u) else { foreach (a E(u,v) u ) { 3 push(scc,v) if (preorder[a]=0) { break DFS_SCC(a) } 2 lowlink[u]=min(lowlink[u],lowlink[a]) } } } elseif (preorder[a]<preorder[u]) { if (a SCC) { 3 lowlink[u]=min(lowlink[u],preorder[a]) } } } 4 if (preorder[u]=lowlink[u]) SCC_POP(u) } 47

48 Strongly Connected Components When started When completed Earliest (preorder index) in cycle D 5 D 4 D 2 D 3 D 48

49 Shortest Paths Procedure SHORTEST_PATH(V,E,L,v0) { for(v V) λ v = ; Reached = φ 2 S = {v 0 }; λ v0 =0 3 while (S φ) { 4 λ* = min s S {λ v } V* = {v V λ v = λ*} 5 v = SELECT(V*) 6 S=S-{v} Reached = Reached {v} 7 for (a ADJ(V,E,v)) { 8 if (a Reached ) { 9 S = S {a} 0 λ a = min(λ a, λ v + L v,a ) } } } return (λ) } 49

50 Models of Sequential Systems FST (Finite State Transition Structures) In a given state, FSTs receive an input symbol, and make a transition to a new state FAs (Finite Automata) are FSTs which also take notice when a favorable state (called accepting) is entered FSMs (Finite State Machine) are FSTs which emit a specified output symbol when they make a transition from one state to another Regular Languages Languages are just sets of sequences of input or output symbols (called strings) Regular languages are just the kind of sets of strings that can be accepted by FAs or generated by FSMs DFA (Deterministic Finite Automata) NFA (Nondeterministic Finite Automata) 50

51 Finite State Transition Structures An FST is defined as a 4-tuple Γ = <X,S,δ,S 0 > X is the input alphabet S is the state set or state alphabet δ : S X 2 S is the next state transition function S 0 S is a set of initial states Definition FST Γ = <X,S,δ,S 0 > is a deterministic if the image of all pairs (x,s) is a singleton next state In this case, the specified δ does not map any given state into a set of two or more states If in addition the initial state set S 0 of Γ is a singleton set, Γ is said to be strongly deterministic If the mapping δ is specified for all pairs of states and input symbols, Γ is said to be complete 5

52 Finite State Transition Structures NFAs and ε-moves ε-moves, which represent the further conceptual ability of an NFA to be in more than one state at a time The concept of ε-moves is important in the procedure for deciding whether a specified string is accepted by a given FA and for constructing a DFA which accepts the same language as a given NFA FSTs as labeled diagraphs Sometimes an FST Γ = <X,S,δ,S 0 > is specified by giving its STG : G=(S,E,L) The vertices s S correspond to the states of Γ The edge (s,t) E are directed from s to t and signify a possible state transition (s,t) E t = δ(s,x) For each edge s,t E of G L (s,t) ={x X t δ(s,x)} = {x X t = δ(s,x)} 52

53 Finite State Transition Structures Strings, Tapes and Runs A run of an FST is a sequence of states which starts in an initial state S 0 occurs in response to some possible input sequence A sequence of inputs is called a string if it is finite and a tape if it is infinite 53

54 Traversing the Product STG A state t is reachable from state s if there exists a string x which produces a run s, ending in state t A state t is simply reachable if it is reachable from any state in S 0 54

55 Traversing the Product STG Equivalence checking requires testing output pairs at every reachable state A state t is reachable from state s if there exists a string x which produces a run s, ending in state t The act of identifying the set of reachable states of an FSM is called FSM Traversal In Traversal, we systematically search the STG from the initial state. Any method can be used but the most efficient is based on BFS (Breadth First Search) 55

56 Building the Product Machine Check this condition for all reachable product states M M 2 λ λ 2 λ λ,,k 2, 2 2,K s s 2 x Common input M 2 Comparator FST (δ xδ 2 ) PRODUCT 56

57 Building the Product (STG View) Note output of product machine is for all inputs at all reachable states 57

58 Building the Product (STG View) Start by finding states (s,s 4 ) and (s 2,s 5 ) reachable from initial state (s,s 4 ) of product M 2 58

59 Building the Product (STG View) Continue by finding state (s 3,s 6 ) reachable from previous new state (s 2,s 5 ) of product M 2 59

60 Equivalence Checking Product Machine Same as BFS Specific to FSMs Same as BFS Procedure BFS _ FSM( SX,, δλ,, S ){ 0 0 Reached = From = New 0 = S ; k = 0 0 do { k = k+ To = Img(, From) New k δ 2 = To Reached for( s New k ){ forif ( x X) { 3 ( λ( sx, ) = 0){ j ( s, x) = ERROR_ TRACE( sxkx,,,, δ,{ New}) 4 return( FALSE, s, x) } } } From = New k Reached = Reached New k 5 } while( New k ) 6 return( TRUE, ε, ε ) } 60

61 Finding a Shortest Error Trace j Procedure ERROR_ TRACE( s, x, k, X, δ,{ New }){ E E E /* Error State: λ( sx, ) = 0 0 s= ( s ) ; x = ( x ) E E for( k = k ; k ; k++ ){ E 2 for( s New k ){ 3 forif ( x X) { ( s = δ( sx, )){ E 4 s = s; x = x E E 5 s = ( se,s); x = ( x, x) E } } } } 6 return( s, x) } Returned: run s, which starts at initial state and ends at error state. 6

62 BFS for Error Trace New 0 New 3 New New 2 Suppose all outputs were except on edge from s2 to s. Then a shortest error trace would be s=(s5,s4,s,s2), x=(0,,0,0) 62

63 Isomorphism Two graphs G a = (V a, E a ) and G b = (V b, E b ) are said to be isomorphic if V a = V b if the nodes of V a can be relabeled so that the two graphs are identical A relabeling function is a function ρ : V a V b such that for each node v b V b there is exactly one node v a V a such that v b = ρ(v a ) Such a function is said to be to and onto and is called an isomorphism 63

64 BDD Representation of Reached Sets FSM Traversal requires storage of various reachable states sets ( {New j }, Reached, etc.) For a circuit with 64 latches, there could be as many as (0 9 ) reachable states It is clearly infeasible to store an int to identify each individual state Thus BDDs must be used to represent sets of states 64

65 BDD Representation of State Sets S={[0,3],[8,5],[6-23]} Encoding: , 0000,, 23 0 (codes packed around origin) 0= 0* 2 + 0* 2 + 0* 2 + 0* 2 + 0* = 0* 2 + 0* 2 + 0* 2 + * 2 + * = * 2 + 0* 2 + * 2 + * 2 + *

66 BDD Representation of State Sets S(x)=x x 2 +x x 2 +x x 2 x 3 Minterm count = path count (3 paths for all n) n=3: 2+2+=5 n=5: 8+8+4=20 n=7: 6+6+8=80 Missing variables amplify minterm count x x 2 x 3 x 4 x 5 66

67 BDD Representation of State Sets n= 36; m = States m = 20( 23) = 40( 09) 40Billion n = 5: x x 2 x x2 x3 x4 x5 S( x) States Count [ 0 3] 4 x 3 0 [ 8 6] 8 x 0 [ 6 23] 8 4 n = 7: x 5 x x2 x3 x4 x5 x6 x7 S( x) States Count [ 0 5] 6 0 [ 32 63] 32 0 [ 64 95] 32 67

68 Symbolic FSM State Traversal Image The set of co-domain points Preimage Transition relations Given a deterministic transition function (s,x), T(s,x,t) = i=n i= (t i δ i (s,x)) T(s,x,t)= denotes a set of encoded triples s,x,t of state s, input x and x-successor t of s, each representing a transition in the FST if the given FSM Existential abstraction Given an m-variable Boolean function f(x,,,, xm), xi f = f xi + f xi where f xi (f xi ) is positive(negative) cofactor I(t) = Img(T,C) = x s C(s) T(s,x,t) 68

Sequential Equivalence Checking - I

Sequential Equivalence Checking - I Sequential Equivalence Checking - I Virendra Singh Associate Professor Computer Architecture and Dependable Systems Lab. Dept. of Electrical Engineering Indian Institute of Technology Bombay viren@ee.iitb.ac.in

More information

Advanced topic: Space complexity

Advanced topic: Space complexity Advanced topic: Space complexity CSCI 3130 Formal Languages and Automata Theory Siu On CHAN Chinese University of Hong Kong Fall 2016 1/28 Review: time complexity We have looked at how long it takes to

More information

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits

CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits CSE 200 Lecture Notes Turing machine vs. RAM machine vs. circuits Chris Calabro January 13, 2016 1 RAM model There are many possible, roughly equivalent RAM models. Below we will define one in the fashion

More information

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given

STGs may contain redundant states, i.e. states whose. State minimization is the transformation of a given Completely Specied Machines STGs may contain redundant states, i.e. states whose function can be accomplished by other states. State minimization is the transformation of a given machine into an equivalent

More information

Equivalence Checking of Sequential Circuits

Equivalence Checking of Sequential Circuits Equivalence Checking of Sequential Circuits Sanjit Seshia EECS UC Berkeley With thanks to K. Keutzer, R. Rutenbar 1 Today s Lecture What we know: How to check two combinational circuits for equivalence

More information

Introduction: Computer Science is a cluster of related scientific and engineering disciplines concerned with the study and application of computations. These disciplines range from the pure and basic scientific

More information

Automata, Logic and Games: Theory and Application

Automata, Logic and Games: Theory and Application Automata, Logic and Games: Theory and Application 1. Büchi Automata and S1S Luke Ong University of Oxford TACL Summer School University of Salerno, 14-19 June 2015 Luke Ong Büchi Automata & S1S 14-19 June

More information

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Discrete Systems Lecture: Automata, State machines, Circuits Stavros Tripakis University of California, Berkeley Stavros

More information

Different encodings generate different circuits

Different encodings generate different circuits FSM State Encoding Different encodings generate different circuits no easy way to find best encoding with fewest logic gates or shortest propagation delay. Binary encoding: K states need log 2 K bits i.e.,

More information

Chapter 2: Finite Automata

Chapter 2: Finite Automata Chapter 2: Finite Automata 2.1 States, State Diagrams, and Transitions Finite automaton is the simplest acceptor or recognizer for language specification. It is also the simplest model of a computer. A

More information

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION

FORMAL LANGUAGES, AUTOMATA AND COMPUTATION FORMAL LANGUAGES, AUTOMATA AND COMPUTATION DECIDABILITY ( LECTURE 15) SLIDES FOR 15-453 SPRING 2011 1 / 34 TURING MACHINES-SYNOPSIS The most general model of computation Computations of a TM are described

More information

Boolean Algebra. Sungho Kang. Yonsei University

Boolean Algebra. Sungho Kang. Yonsei University Boolean Algebra Sungho Kang Yonsei University Outline Set, Relations, and Functions Partial Orders Boolean Functions Don t Care Conditions Incomplete Specifications 2 Set Notation $09,3/#0,9 438 v V Element

More information

CS6901: review of Theory of Computation and Algorithms

CS6901: review of Theory of Computation and Algorithms CS6901: review of Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational

More information

Final Exam Version A December 16, 2014 Name: NetID: Section: # Total Score

Final Exam Version A December 16, 2014 Name: NetID: Section: # Total Score CS 374 : Algorithms and Models of Computation, Fall 2014 Final Exam Version A December 16, 2014 Name: NetID: Section: 1 2 3 # 1 2 3 4 5 6 Total Score Max 20 10 10 10 10 10 70 Grader Don t panic! Please

More information

Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3

Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3 CS 374 : Algorithms and Models of Computation, Fall 2014 Final Exam (Version B) December 16, 2014 Name: NetID: Section: 1 2 3 # 1 2 3 4 5 6 Total Score Max 20 10 10 10 10 10 70 Grader Don t panic! Please

More information

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages

COMP/MATH 300 Topics for Spring 2017 June 5, Review and Regular Languages COMP/MATH 300 Topics for Spring 2017 June 5, 2017 Review and Regular Languages Exam I I. Introductory and review information from Chapter 0 II. Problems and Languages A. Computable problems can be expressed

More information

6.5.3 An NP-complete domino game

6.5.3 An NP-complete domino game 26 Chapter 6. Complexity Theory 3SAT NP. We know from Theorem 6.5.7 that this is true. A P 3SAT, for every language A NP. Hence, we have to show this for languages A such as kcolor, HC, SOS, NPrim, KS,

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Fall 27 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, September 5, 27 Sariel Har-Peled (UIUC) CS374 Fall 27 / 36 Part I DFA Introduction Sariel

More information

Automata Theory CS Complexity Theory I: Polynomial Time

Automata Theory CS Complexity Theory I: Polynomial Time Automata Theory CS411-2015-17 Complexity Theory I: Polynomial Time David Galles Department of Computer Science University of San Francisco 17-0: Tractable vs. Intractable If a problem is recursive, then

More information

Hardware Equivalence & Property Verification

Hardware Equivalence & Property Verification Hardware Equivalence & Property Verification Introduction Jie-Hong Roland Jiang National Taiwan University Flolac 29 Flolac 29 3 Outline Motivations Introduction Motivations Systems to be verified Hardware

More information

NP-completeness. Chapter 34. Sergey Bereg

NP-completeness. Chapter 34. Sergey Bereg NP-completeness Chapter 34 Sergey Bereg Oct 2017 Examples Some problems admit polynomial time algorithms, i.e. O(n k ) running time where n is the input size. We will study a class of NP-complete problems

More information

Automata Theory for Presburger Arithmetic Logic

Automata Theory for Presburger Arithmetic Logic Automata Theory for Presburger Arithmetic Logic References from Introduction to Automata Theory, Languages & Computation and Constraints in Computational Logic Theory & Application Presented by Masood

More information

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007 EECS 150 - Components and Design Techniques for Digital Systems FSMs 9/11/2007 Sarah Bird Electrical Engineering and Computer Sciences University of California, Berkeley Slides borrowed from David Culler

More information

SOLUTION: SOLUTION: SOLUTION:

SOLUTION: SOLUTION: SOLUTION: Convert R and S into nondeterministic finite automata N1 and N2. Given a string s, if we know the states N1 and N2 may reach when s[1...i] has been read, we are able to derive the states N1 and N2 may

More information

MACHINE COMPUTING. the limitations

MACHINE COMPUTING. the limitations MACHINE COMPUTING the limitations human computing stealing brain cycles of the masses word recognition: to digitize all printed writing language education: to translate web content games with a purpose

More information

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS 1) Given the two binary numbers X = 1010100 and Y = 1000011, perform the subtraction (a) X -Y and (b) Y - X using 2's complements. a) X = 1010100

More information

Sri vidya college of engineering and technology

Sri vidya college of engineering and technology Unit I FINITE AUTOMATA 1. Define hypothesis. The formal proof can be using deductive proof and inductive proof. The deductive proof consists of sequence of statements given with logical reasoning in order

More information

CPSC 421: Tutorial #1

CPSC 421: Tutorial #1 CPSC 421: Tutorial #1 October 14, 2016 Set Theory. 1. Let A be an arbitrary set, and let B = {x A : x / x}. That is, B contains all sets in A that do not contain themselves: For all y, ( ) y B if and only

More information

Java II Finite Automata I

Java II Finite Automata I Java II Finite Automata I Bernd Kiefer Bernd.Kiefer@dfki.de Deutsches Forschungszentrum für künstliche Intelligenz November, 23 Processing Regular Expressions We already learned about Java s regular expression

More information

Minimization Techniques for Symbolic Automata

Minimization Techniques for Symbolic Automata University of Connecticut OpenCommons@UConn Honors Scholar Theses Honors Scholar Program Spring 5-1-2018 Minimization Techniques for Symbolic Automata Jonathan Homburg jonhom1996@gmail.com Follow this

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) CS/ECE 374: Algorithms & Models of Computation, Fall 28 Deterministic Finite Automata (DFAs) Lecture 3 September 4, 28 Chandra Chekuri (UIUC) CS/ECE 374 Fall 28 / 33 Part I DFA Introduction Chandra Chekuri

More information

Part I: Definitions and Properties

Part I: Definitions and Properties Turing Machines Part I: Definitions and Properties Finite State Automata Deterministic Automata (DFSA) M = {Q, Σ, δ, q 0, F} -- Σ = Symbols -- Q = States -- q 0 = Initial State -- F = Accepting States

More information

Introduction to Kleene Algebras

Introduction to Kleene Algebras Introduction to Kleene Algebras Riccardo Pucella Basic Notions Seminar December 1, 2005 Introduction to Kleene Algebras p.1 Idempotent Semirings An idempotent semiring is a structure S = (S, +,, 1, 0)

More information

Uses of finite automata

Uses of finite automata Chapter 2 :Finite Automata 2.1 Finite Automata Automata are computational devices to solve language recognition problems. Language recognition problem is to determine whether a word belongs to a language.

More information

Before we show how languages can be proven not regular, first, how would we show a language is regular?

Before we show how languages can be proven not regular, first, how would we show a language is regular? CS35 Proving Languages not to be Regular Before we show how languages can be proven not regular, first, how would we show a language is regular? Although regular languages and automata are quite powerful

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Nachum Dershowitz & Yishay Mansour. Tel Aviv University. May 17 22, 2017 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

NP-Completeness. Algorithmique Fall semester 2011/12

NP-Completeness. Algorithmique Fall semester 2011/12 NP-Completeness Algorithmique Fall semester 2011/12 1 What is an Algorithm? We haven t really answered this question in this course. Informally, an algorithm is a step-by-step procedure for computing a

More information

Deterministic Finite Automata (DFAs)

Deterministic Finite Automata (DFAs) Algorithms & Models of Computation CS/ECE 374, Spring 29 Deterministic Finite Automata (DFAs) Lecture 3 Tuesday, January 22, 29 L A TEXed: December 27, 28 8:25 Chan, Har-Peled, Hassanieh (UIUC) CS374 Spring

More information

CSC236 Week 11. Larry Zhang

CSC236 Week 11. Larry Zhang CSC236 Week 11 Larry Zhang 1 Announcements Next week s lecture: Final exam review This week s tutorial: Exercises with DFAs PS9 will be out later this week s. 2 Recap Last week we learned about Deterministic

More information

CS3719 Theory of Computation and Algorithms

CS3719 Theory of Computation and Algorithms CS3719 Theory of Computation and Algorithms Any mechanically (automatically) discretely computation of problem solving contains at least three components: - problem description - computational tool - analysis

More information

Most General computer?

Most General computer? Turing Machines Most General computer? DFAs are simple model of computation. Accept only the regular languages. Is there a kind of computer that can accept any language, or compute any function? Recall

More information

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) ELEC 2200-002 Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) Vishwani D. Agrawal James J. Danaher Professor Department of Electrical and Computer Engineering

More information

Finite Universes. L is a fixed-length language if it has length n for some

Finite Universes. L is a fixed-length language if it has length n for some Finite Universes Finite Universes When the universe is finite (e.g., the interval 0, 2 1 ), all objects can be encoded by words of the same length. A language L has length n 0 if L =, or every word of

More information

1 More finite deterministic automata

1 More finite deterministic automata CS 125 Section #6 Finite automata October 18, 2016 1 More finite deterministic automata Exercise. Consider the following game with two players: Repeatedly flip a coin. On heads, player 1 gets a point.

More information

3130CIT Theory of Computation

3130CIT Theory of Computation GRIFFITH UNIVERSITY School of Computing and Information Technology 3130CIT Theory of Computation Final Examination, Semester 2, 2006 Details Total marks: 120 (40% of the total marks for this subject) Perusal:

More information

Fooling Sets and. Lecture 5

Fooling Sets and. Lecture 5 Fooling Sets and Introduction to Nondeterministic Finite Automata Lecture 5 Proving that a language is not regular Given a language, we saw how to prove it is regular (union, intersection, concatenation,

More information

Chapter 2 Combinational Logic Circuits

Chapter 2 Combinational Logic Circuits Logic and Computer Design Fundamentals Chapter 2 Combinational Logic Circuits Part 1 Gate Circuits and Boolean Equations Charles Kime & Thomas Kaminski 2008 Pearson Education, Inc. Overview Part 1 Gate

More information

Theory of Computation

Theory of Computation Thomas Zeugmann Hokkaido University Laboratory for Algorithmics http://www-alg.ist.hokudai.ac.jp/ thomas/toc/ Lecture 3: Finite State Automata Motivation In the previous lecture we learned how to formalize

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. April 18/ May 2, 2016 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar

Q = Set of states, IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar IE661: Scheduling Theory (Fall 2003) Primer to Complexity Theory Satyaki Ghosh Dastidar Turing Machine A Turing machine is an abstract representation of a computing device. It consists of a read/write

More information

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA)

Deterministic Finite Automata. Non deterministic finite automata. Non-Deterministic Finite Automata (NFA) Non-Deterministic Finite Automata (NFA) Deterministic Finite Automata Non deterministic finite automata Automata we ve been dealing with have been deterministic For every state and every alphabet symbol there is exactly one move that the machine

More information

Further discussion of Turing machines

Further discussion of Turing machines Further discussion of Turing machines In this lecture we will discuss various aspects of decidable and Turing-recognizable languages that were not mentioned in previous lectures. In particular, we will

More information

Languages, regular languages, finite automata

Languages, regular languages, finite automata Notes on Computer Theory Last updated: January, 2018 Languages, regular languages, finite automata Content largely taken from Richards [1] and Sipser [2] 1 Languages An alphabet is a finite set of characters,

More information

Automata-Theoretic LTL Model-Checking

Automata-Theoretic LTL Model-Checking Automata-Theoretic LTL Model-Checking Arie Gurfinkel arie@cmu.edu SEI/CMU Automata-Theoretic LTL Model-Checking p.1 LTL - Linear Time Logic (Pn 77) Determines Patterns on Infinite Traces Atomic Propositions

More information

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism

Closure Properties of Regular Languages. Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties of Regular Languages Union, Intersection, Difference, Concatenation, Kleene Closure, Reversal, Homomorphism, Inverse Homomorphism Closure Properties Recall a closure property is a statement

More information

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler

Complexity Theory VU , SS The Polynomial Hierarchy. Reinhard Pichler Complexity Theory Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität Wien 15 May, 2018 Reinhard

More information

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181.

Outline. Complexity Theory EXACT TSP. The Class DP. Definition. Problem EXACT TSP. Complexity of EXACT TSP. Proposition VU 181. Complexity Theory Complexity Theory Outline Complexity Theory VU 181.142, SS 2018 6. The Polynomial Hierarchy Reinhard Pichler Institut für Informationssysteme Arbeitsbereich DBAI Technische Universität

More information

CSCI 1590 Intro to Computational Complexity

CSCI 1590 Intro to Computational Complexity CSCI 59 Intro to Computational Complexity Overview of the Course John E. Savage Brown University January 2, 29 John E. Savage (Brown University) CSCI 59 Intro to Computational Complexity January 2, 29

More information

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is,

T (s, xa) = T (T (s, x), a). The language recognized by M, denoted L(M), is the set of strings accepted by M. That is, Recall A deterministic finite automaton is a five-tuple where S is a finite set of states, M = (S, Σ, T, s 0, F ) Σ is an alphabet the input alphabet, T : S Σ S is the transition function, s 0 S is the

More information

Min/Max-Poly Weighting Schemes and the NL vs UL Problem

Min/Max-Poly Weighting Schemes and the NL vs UL Problem Min/Max-Poly Weighting Schemes and the NL vs UL Problem Anant Dhayal Jayalal Sarma Saurabh Sawlani May 3, 2016 Abstract For a graph G(V, E) ( V = n) and a vertex s V, a weighting scheme (w : E N) is called

More information

CPE100: Digital Logic Design I

CPE100: Digital Logic Design I Professor Brendan Morris, SEB 3216, brendan.morris@unlv.edu CPE100: Digital Logic Design I Final Review http://www.ee.unlv.edu/~b1morris/cpe100/ 2 Logistics Tuesday Dec 12 th 13:00-15:00 (1-3pm) 2 hour

More information

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

More information

Mathematical Preliminaries. Sipser pages 1-28

Mathematical Preliminaries. Sipser pages 1-28 Mathematical Preliminaries Sipser pages 1-28 Mathematical Preliminaries This course is about the fundamental capabilities and limitations of computers. It has 3 parts 1. Automata Models of computation

More information

1 Showing Recognizability

1 Showing Recognizability CSCC63 Worksheet Recognizability and Decidability 1 1 Showing Recognizability 1.1 An Example - take 1 Let Σ be an alphabet. L = { M M is a T M and L(M) }, i.e., that M accepts some string from Σ. Prove

More information

Theory of Computation Time Complexity

Theory of Computation Time Complexity Theory of Computation Time Complexity Bow-Yaw Wang Academia Sinica Spring 2012 Bow-Yaw Wang (Academia Sinica) Time Complexity Spring 2012 1 / 59 Time for Deciding a Language Let us consider A = {0 n 1

More information

Computational Models Lecture 8 1

Computational Models Lecture 8 1 Computational Models Lecture 8 1 Handout Mode Ronitt Rubinfeld and Iftach Haitner. Tel Aviv University. May 11/13, 2015 1 Based on frames by Benny Chor, Tel Aviv University, modifying frames by Maurice

More information

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata.

Let us first give some intuitive idea about a state of a system and state transitions before describing finite automata. Finite Automata Automata (singular: automation) are a particularly simple, but useful, model of computation. They were initially proposed as a simple model for the behavior of neurons. The concept of a

More information

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group

COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II , Max 80, Time 2 hr. Name Entry No. Group COL 352 Introduction to Automata and Theory of Computation Major Exam, Sem II 2015-16, Max 80, Time 2 hr Name Entry No. Group Note (i) Write your answers neatly and precisely in the space provided with

More information

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS

CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS CSCI 2200 Foundations of Computer Science Spring 2018 Quiz 3 (May 2, 2018) SOLUTIONS 1. [6 POINTS] For language L 1 = {0 n 1 m n, m 1, m n}, which string is in L 1? ANSWER: 0001111 is in L 1 (with n =

More information

Lecture 4. Finite Automata and Safe State Machines (SSM) Daniel Kästner AbsInt GmbH 2012

Lecture 4. Finite Automata and Safe State Machines (SSM) Daniel Kästner AbsInt GmbH 2012 Lecture 4 Finite Automata and Safe State Machines (SSM) Daniel Kästner AbsInt GmbH 2012 Initialization Analysis 2 Is this node well initialized? node init1() returns (out: int) let out = 1 + pre( 1 ->

More information

The Design Procedure. Output Equation Determination - Derive output equations from the state table

The Design Procedure. Output Equation Determination - Derive output equations from the state table The Design Procedure Specification Formulation - Obtain a state diagram or state table State Assignment - Assign binary codes to the states Flip-Flop Input Equation Determination - Select flipflop types

More information

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT.

Recap DFA,NFA, DTM. Slides by Prof. Debasis Mitra, FIT. Recap DFA,NFA, DTM Slides by Prof. Debasis Mitra, FIT. 1 Formal Language Finite set of alphabets Σ: e.g., {0, 1}, {a, b, c}, { {, } } Language L is a subset of strings on Σ, e.g., {00, 110, 01} a finite

More information

arxiv: v3 [cs.fl] 2 Jul 2018

arxiv: v3 [cs.fl] 2 Jul 2018 COMPLEXITY OF PREIMAGE PROBLEMS FOR DETERMINISTIC FINITE AUTOMATA MIKHAIL V. BERLINKOV arxiv:1704.08233v3 [cs.fl] 2 Jul 2018 Institute of Natural Sciences and Mathematics, Ural Federal University, Ekaterinburg,

More information

Formal Language and Automata Theory (CS21004)

Formal Language and Automata Theory (CS21004) Theory (CS21004) Announcements The slide is just a short summary Follow the discussion and the boardwork Solve problems (apart from those we dish out in class) Table of Contents 1 2 3 Languages that are

More information

CS 5114: Theory of Algorithms

CS 5114: Theory of Algorithms CS 5114: Theory of Algorithms Clifford A. Shaffer Department of Computer Science Virginia Tech Blacksburg, Virginia Spring 2014 Copyright c 2014 by Clifford A. Shaffer CS 5114: Theory of Algorithms Spring

More information

Lexical Analysis. DFA Minimization & Equivalence to Regular Expressions

Lexical Analysis. DFA Minimization & Equivalence to Regular Expressions Lexical Analysis DFA Minimization & Equivalence to Regular Expressions Copyright 26, Pedro C. Diniz, all rights reserved. Students enrolled in the Compilers class at the University of Southern California

More information

CSE 105 THEORY OF COMPUTATION

CSE 105 THEORY OF COMPUTATION CSE 105 THEORY OF COMPUTATION Spring 2016 http://cseweb.ucsd.edu/classes/sp16/cse105-ab/ Today's learning goals Sipser Ch 3.3, 4.1 State and use the Church-Turing thesis. Give examples of decidable problems.

More information

Inf2A: Converting from NFAs to DFAs and Closure Properties

Inf2A: Converting from NFAs to DFAs and Closure Properties 1/43 Inf2A: Converting from NFAs to DFAs and Stuart Anderson School of Informatics University of Edinburgh October 13, 2009 Starter Questions 2/43 1 Can you devise a way of testing for any FSM M whether

More information

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET

THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET THEORY OF COMPUTATION (AUBER) EXAM CRIB SHEET Regular Languages and FA A language is a set of strings over a finite alphabet Σ. All languages are finite or countably infinite. The set of all languages

More information

Theory of Computation

Theory of Computation Theory of Computation (Feodor F. Dragan) Department of Computer Science Kent State University Spring, 2018 Theory of Computation, Feodor F. Dragan, Kent State University 1 Before we go into details, what

More information

Automata Theory CS S-18 Complexity Theory II: Class NP

Automata Theory CS S-18 Complexity Theory II: Class NP Automata Theory CS411-2015S-18 Complexity Theory II: Class NP David Galles Department of Computer Science University of San Francisco 18-0: Language Class P A language L is polynomially decidable if there

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata Not A DFA Does not have exactly one transition from every state on every symbol: Two transitions from q 0 on a No transition from q 1 (on either a or b) Though not a DFA,

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministic Finite Automata COMP2600 Formal Methods for Software Engineering Katya Lebedeva Australian National University Semester 2, 206 Slides by Katya Lebedeva. COMP 2600 Nondeterministic Finite

More information

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine.

The Class NP. NP is the problems that can be solved in polynomial time by a nondeterministic machine. The Class NP NP is the problems that can be solved in polynomial time by a nondeterministic machine. NP The time taken by nondeterministic TM is the length of the longest branch. The collection of all

More information

Introduction to Turing Machines. Reading: Chapters 8 & 9

Introduction to Turing Machines. Reading: Chapters 8 & 9 Introduction to Turing Machines Reading: Chapters 8 & 9 1 Turing Machines (TM) Generalize the class of CFLs: Recursively Enumerable Languages Recursive Languages Context-Free Languages Regular Languages

More information

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1

CS 320, Fall Dr. Geri Georg, Instructor 320 NP 1 NP CS 320, Fall 2017 Dr. Geri Georg, Instructor georg@colostate.edu 320 NP 1 NP Complete A class of problems where: No polynomial time algorithm has been discovered No proof that one doesn t exist 320

More information

Chapter 5. Finite Automata

Chapter 5. Finite Automata Chapter 5 Finite Automata 5.1 Finite State Automata Capable of recognizing numerous symbol patterns, the class of regular languages Suitable for pattern-recognition type applications, such as the lexical

More information

CpSc 421 Final Exam December 6, 2008

CpSc 421 Final Exam December 6, 2008 CpSc 421 Final Exam December 6, 2008 Do any five of problems 1-10. If you attempt more than five of problems 1-10, please indicate which ones you want graded otherwise, I ll make an arbitrary choice. Graded

More information

1.1 P, NP, and NP-complete

1.1 P, NP, and NP-complete CSC5160: Combinatorial Optimization and Approximation Algorithms Topic: Introduction to NP-complete Problems Date: 11/01/2008 Lecturer: Lap Chi Lau Scribe: Jerry Jilin Le This lecture gives a general introduction

More information

Deterministic Finite Automaton (DFA)

Deterministic Finite Automaton (DFA) 1 Lecture Overview Deterministic Finite Automata (DFA) o accepting a string o defining a language Nondeterministic Finite Automata (NFA) o converting to DFA (subset construction) o constructed from a regular

More information

CS154, Lecture 13: P vs NP

CS154, Lecture 13: P vs NP CS154, Lecture 13: P vs NP The EXTENDED Church-Turing Thesis Everyone s Intuitive Notion of Efficient Algorithms Polynomial-Time Turing Machines More generally: TM can simulate every reasonable model of

More information

Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc.

Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc. Finite State Machines Introduction Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc. Such devices form

More information

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska

cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska cse303 ELEMENTS OF THE THEORY OF COMPUTATION Professor Anita Wasilewska LECTURE 5 CHAPTER 2 FINITE AUTOMATA 1. Deterministic Finite Automata DFA 2. Nondeterministic Finite Automata NDFA 3. Finite Automata

More information

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example

Boolean cubes EECS150. Mapping truth tables onto cubes. Simplification. The Uniting Theorem. Three variable example EES5 Section 5 Simplification and State Minimization Fall 2 -cube X oolean cubes Visual technique for indentifying when the uniting theorem can be applied n input variables = n-dimensional "cube" Y 2-cube

More information

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering TIMING ANALYSIS Overview Circuits do not respond instantaneously to input changes

More information

CS 208: Automata Theory and Logic

CS 208: Automata Theory and Logic CS 28: Automata Theory and Logic b a a start A x(la(x) y(x < y) L b (y)) B b Department of Computer Science and Engineering, Indian Institute of Technology Bombay of 32 Nondeterminism Alternation 2 of

More information

Models for representing sequential circuits

Models for representing sequential circuits Sequential Circuits Models for representing sequential circuits Finite-state machines (Moore and Mealy) Representation of memory (states) Changes in state (transitions) Design procedure State diagrams

More information

Sequential Logic Optimization. Optimization in Context. Algorithmic Approach to State Minimization. Finite State Machine Optimization

Sequential Logic Optimization. Optimization in Context. Algorithmic Approach to State Minimization. Finite State Machine Optimization Sequential Logic Optimization! State Minimization " Algorithms for State Minimization! State, Input, and Output Encodings " Minimize the Next State and Output logic Optimization in Context! Understand

More information

Theory of computation: initial remarks (Chapter 11)

Theory of computation: initial remarks (Chapter 11) Theory of computation: initial remarks (Chapter 11) For many purposes, computation is elegantly modeled with simple mathematical objects: Turing machines, finite automata, pushdown automata, and such.

More information