5 give an nfa for each of the following languages a

Info icon This preview shows pages 4–5. Sign up to view the full content.

return 0 otherwise. 5. Give an NFA for each of the following languages: (a) The language A over Σ = { 0 , 1 } of strings ends with either ”100” or ”1”. (b) The language B over Σ = { 0 , 1 } that is the complement of A . (For any language A Σ * , the complement of A is Σ * \ A ) 6. For the 2 NFA from the previous question, give an -NFA for the lan- guage B * A * , by connecting the 2 NFA using -transitions. Describe the language accepted by this automaton. 7. For the following NFA, convert it into a DFA using subset construction. 0 start 1 2 3 a b a,b b b a a 4
Image of page 4

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

5 Context-Free Languages 1. Show that all regular languages are context-free. 2. Give a CFG for each of the language below. For each CFG, find a string that is in the language and show its leftmost derivation using the CFG. (a) The language over Σ = { a, b } of words which start with an a and end with a b. (b) The language over Σ = { 0 , 1 } of palindromes whose length is even. (c) The language over Σ = { ( , ) } of matched parentheses, where each opening parenthesis is followed by a unique closing parenthesis. (d) The language over Σ = { a, b } of words that have an equal number of a ’s and b ’s. 5
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '09
  • TroyVasiga
  • Binary numeral system, Regular expression, MIPS assembly language program

{[ 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