×
DON'T BE SATISFIED WITH B when you can get A+

# Note for Theory Of Computation - TC by Dr. D. Jagadeesan

• Theory Of Computation - TC
• Note
• Sreenivasa Institute of Technology and Management Studies -
• Computer Science Engineering
• B.Tech
• 5 Topics
• 30077 Views
0 User(s)

#### Text from page-1

SITAMS – B.Tech – III Year - II Sem CSE 13CSE 321 – Theory of Computation Dr. D. Jagadeesan, B.E., M.Tech., Ph.D., Professor in CSE, Unit – I Syllabus : Unit – I : FINITE AUTOMATA Introduction- Strings - Alphabets and languages - Finite state automata – Basic Definitions Deterministic finite automata – Non deterministic finite automata - Equivalence of DFA’s and NFA’s - Finite automata with output – More machines and mealy machines - Minimization of FA Equivalence between two FA’s - NFA with ε –moves - Equivalence of NFA’s with and without ε – Moves. Introduction  Definition of TOC TOC describes the basic ideas and models underlying computing. TOC suggests various abstract models of computation, represented mathematically.  History of Theory of Computation  1936 Alan Turing invented the Turing machine, and proved that there exists an unsolvable problem.  1940’s Stored-program computers were built.  1943 McCulloch and Pitts invented finite automata.  1956 Kleene invented regular expressions and proved the equivalence of regular expression and finite automata  1956 Chomsky defined Chomsky hierarchy, which organized languages recognized by different automata into hierarchical classes.  1959 Rabin and Scott introduced nondeterministic finite automata and proved its equivalence to (deterministic) finite automata.  1950’s-1960’s More works on languages, grammars, and compilers  1965 Hartmantis and Stearns defined time complexity, and Lewis, Hartmantis and Stearns defined space complexity.  1971 Cook showed the first NP-complete problem, the satisfiability problem.  1972 Karp Showed many other NP-complete problems.  1976 Diffie and Helllman defined Modern Cryptography based on NPcomplete problems.  1978 Rivest, Shamir and Adelman proposed a public-key encryption scheme, RSA. Finite State systems A finite automaton can also be thought of as the device shown below consisting of a tape and a control circuit which satisfy the following conditions:  The tape has the left end and extends to the right without an end.  The tape is dividing into squares in each of which a symbol can be written prior to the start of the operation of the automaton.  The tape has a read only head.  The head is always at the leftmost square at the beginning of the operation.  The head moves to the right one square every time it reads a symbol. It never moves to the left. When it sees no symbol, it stops and the automaton terminates its operation. 1 / 28

#### Text from page-2

SITAMS – B.Tech – III Year - II Sem CSE 13CSE 321 – Theory of Computation Dr. D. Jagadeesan, B.E., M.Tech., Ph.D., Professor in CSE, Unit – I  There is a finite control which determines the state of the automaton and also controls the movement of the head. Basic Definitions  Symbol : Symbol is a character. Example : a,b,c,… , 0,1,2,3,….9 and special characters.  Alphabet : An alphabet is a finite, nonempty set of symbol. It is denoted by ∑. Example : a) ∑ = {0,1}, the set of binary alphabet. b) ∑ = {a,b……..z}, the set of all lowercase letters. c) ∑ = {+, &,…..}, the set of all special characters.  String or Word : A string is a finite set sequence of symbols chosen from some alphabets. Example : a) 0111010 is a string from the binary alphabet ∑ = {0,1} b) aabbaacab is a string from the alphabet ∑ = {a,b,c}  Empty String : The empty string is the string with zero occurrences of symbols (no symbols). It is denoted by є.  Length of String : The length of a string is number of symbols in the string. It denoted by |w|. Example : w = 010110101 from binary alphabet ∑ = {0,1} Length of a string |w| = 9 2 / 28

#### Text from page-3

SITAMS – B.Tech – III Year - II Sem CSE 13CSE 321 – Theory of Computation Dr. D. Jagadeesan, B.E., M.Tech., Ph.D., Professor in CSE, Unit – I  Power of an Alphabet:  If ∑ is an alphabet, we can express the set of all strings of certain length from that alphabet by using an exponential notation. It is denoted by ∑k is the set of strings of length k, each of whose symbols is in ∑. Example : ∑ = {0,1} has 2 symbols i) ∑1 = {0,1} ( 21 = 2) ii) ∑2 = {00, 01, 10, 11} ( 22 = 4) iii) ∑3 = {000,001,010,011,100,101,110,111} ( 23 = 8)  The set of strings over an alphabet ∑ is usually denoted by ∑*. For instance, ∑* = {0,1}* = {є,0,1,00,01,10,11} (∑*=∑0∑1∑2……) - with є symbol.  The set of strings over an alphabet ∑ excluding є is usually denoted by ∑+. For instance, ∑+ = {0,1}+ = {0,1,00,01,10,11} (∑+=∑*- {є} or ∑1∑2∑3…..…) - without є symbol.  Concatenation of String Join the two or more strings. Let x and y be two strings. Concatenation of strings x and y is appending symbols of y to right end of x. x = a1a2a3……………an and y = b1b2b3……………bn Concatenation of String xy = a1a2a3……an b1b2b3….…bn Example : s = ababa and t = cdcddc Concatenation st = ababacdcddc  Languages: If Σ is an alphabet, and L  Σ* then L is a language. Examples: o The set of legal English words o The set of legal C programs o The set of strings consisting of n 0's followed by n 1's { ϵ, 01,0011,000111, …}  Operations on Languages  Complementation Let L be a language over an alphabet Σ. The complementation of L, denoted byL, is Σ*–L.  Union Let L1 and L2 be languages over an alphabet Σ. The union of L1 and L2, denoted by L1L2, is {x | x is in L1 or L2}.  Intersection Let L1 and L2 be languages over an alphabet Σ. The intersection of L1 and L2, denoted by L1L2, is { x | x is in L1 and L2}. 3 / 28

#### Text from page-4

SITAMS – B.Tech – III Year - II Sem CSE 13CSE 321 – Theory of Computation Dr. D. Jagadeesan, B.E., M.Tech., Ph.D., Professor in CSE, Unit – I  Concatenation Let L1 and L2 be languages over an alphabet Σ. The concatenation of L1 and L2, denoted by L1L2, is {w1w2| w1 is in L1 and w2 is in L2}.  Reversal Let L be a language over an alphabet Σ. The reversal of L, denoted by Lr, is {wr| w is in L}.  Kleene’s closure Let L be a language over an alphabet Σ. The Kleene’s closure of L, denoted by L*, is {x | for an integer n  0 x = x1 x2 … xn and x1, x2 , …, xn are in L}. ∞ * L = U Li (e.g. a* ={,a,aa,aaa,……}) i=0  Positive Closure Let L be a language over an alphabet Σ. The closure of L, denoted by L+, is { x |for an integer n  1, x = x1x2…xn and x1, x2 , …, xn are in L} ∞ + L = U Li (e.g. a* ={a,aa,aaa,……}) i=1 Finite Automaton Automaton is an abstract computing device. It is a mathematical model of a system, with discrete inputs, outputs, states and set of transitions from state to state that occurs on input symbols from alphabet Σ.  It representations: o Graphical (Transition Diagram or Transition Table) o Tabular (Transition Table) o Mathematical (Transition Function or Mapping Function)  Formal Definition of Finite Automata A finite automaton is a 5-tuples; they are M=(Q, Σ, δ, q0, F) where Q is a finite set called the states Σ is a finite set called the alphabet δ : Q ×Σ → Q is the transition function q0 ∈ Q is the start state also called initial state F ⊆ Q is the set of accept states, also called the final states  Transition Diagram (Transition graph) It is a directed graph associated with the vertices of the graph corresponds to the states of the finite automata. (or) It is a 5-tuple graph used state and edges represent the transitions from one state to other state. 1 Example: 0 1 1 q0 Start or Initial State 0 q1 qq22 Final or Accepting State 4 / 28