States input 0 1 q0 q1 q0 q1 q2 q2 q q 1 q 2 0 1 1 0

Info icon This preview shows pages 7–10. Sign up to view the full content.

States Input 0 1 {q0} {q1} {q0} {q1} - {q2} {q2} - - q 0 q 1 q 2 0 1 1 0 1 q 2
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

III Year V Semester CSE CS2303 Theory of Computation Adhiparasakthi College of Engg., G.B. Nagar, Kalavai Page 8 of 20 Unit - II 1. State regular expression. Let Σ be an alphabet. The regular expressions over Σ and the sets that they denote are defined recursively as follows a. Ø is a regular expression and denotes the empty set. b. is a regular expression and denotes the set { } c. For each a Σ, ‘a’ is a regular expression and denotes the set {a}. d. If ‘r’ and ‘s’ are regu lar expressions denoting the languages L 1 and L 2 respectively then r + s is equivalent to L 1 U L 2 i.e. union rs is equivalent to L 1 L 2 i.e. concatenation r * is equivalent to L 1 * i.e. closure 2. How the kleen ’s closure or closure of L can be denoted? n L * = U L i (e.g. a * ={ ,a,aa,aaa,……}) i=0 3. How do you represent positive closure of L? n L + = U L i (e.g. a + ={a,aa,aaa,……}) i=1 4. Write the regular expression for the language accepting all combin ations of a’s over the set = {a}. L = { a,aa,aaa,………………….} R= a * (i.e. kleen closure) 5. Write regular expression for the language accepting the strings which are starting with 1 and ending with 0, over the set = {0,1}. L = { 10,1100,1010,100010………………….} R= 1(0+1) * 0 6. Show that (0*1*)* = (0+1)*. LHS : (0*1*)* = { , 0,1,00,11,0011,011,0011110……………….} RHS : (0+1)* = { , 0,1,00,11,0011,011,0011110……………….} Hence LHS = RHS is proved 7. Show that (r+s)* r* + s*. LHS : (r+s)* = { , r,s,rs,rr,ss,rrrsssr,……………….} RHS : r* + s* = { , r,rr,rrr………….}U { , s,ss,sss,………….} = { , r,rr,rrr,s,ss,ssss……………..} Hence LHS ≠ RHS is proved
Image of page 8
III Year V Semester CSE CS2303 Theory of Computation Adhiparasakthi College of Engg., G.B. Nagar, Kalavai Page 9 of 20 8. What do you mean by homomorphism? A string homomorphism is a function on strings that works by substring a particular sting for each symbol. Eg. h(0) = ab h(1) = is a homomorphism, where replace all 0’s by ab and replace all 1’s by . Let w = 0011 h(w) = abab 9. Explain the application of the pumping lemma. Pumping Lemma is used to prove the language is not regular. 10. Describe the following by regular expression a. L1 = the set of all strings of 0’s and 1’s ending in 00. b. L2 = the set of all strings of 0’s and 1’s beginning with 0 and ending with 1. r1 = (0+1)*00 r2 = 0(0+1)*1 11. Show that (r*)* = r* for a regular expression r. LHS = r* = { ε, r,rr,rrr, …………….) (r*)* = { ε, r,rr,rrr, …………….)* (r*)* = { ε, r,rr,rrr, …………….) = r* LHS = RHS 12. Write down the closure properties of regular language. The regular languages are closed under 1. Union 2. Intersection 3. Complement 4. Difference 5. Reversal 6. Closure 7. Concatenation 8. Homomorphism 9. Inverse Homomorphism 13. Write down the relationship between FA and regular expression.
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 10
This is the end of the preview. Sign up to access the rest of the document.
  • Spring '18
  • isha mam

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern