hmwk2 - Problem 2 a L = w | each a in w is immediately...

Info icon This preview shows pages 1–11. Sign up to view the full content.

View Full Document Right Arrow Icon
Johny Nguyen October 5 th , 2010 CS 473 Homework 2 Downey
Image of page 1

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

View Full Document Right Arrow Icon
Problem 1 1. baa L(a*b*a*b*)? Yes. Say the first a* yields the empty string. The first b* yields one b, then we will have ‘b’. Let the second a* yield ‘aa’, and the last b* yield the empty string. We will have ‘ baa’. 2. b*a* a*b* = a* b*? Yes, because both a* and b* is contained in both b*a* and a*b*. Any concatenations that have both a and b will not be included in the intersection. So only a* and b* will be the only common items in the intersection. 3. a*b* c*d* = ? No, because each set has the empty string. So the intersection will have the empty string in it as well. 4. abcd L( ( a( cd ) * b) * )? No, because no matter what, the letter ‘b’ will never appear before ‘c’ or ‘d’ based on the ordering of the concatenation.
Image of page 2
Image of page 3

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

View Full Document Right Arrow Icon
Image of page 4
Image of page 5

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

View Full Document Right Arrow Icon
Image of page 6
Image of page 7

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

View Full Document Right Arrow Icon
Image of page 8
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Problem 2 a. L = { w | each a in w is immediately preceded and immediately followed by a b } b. L = { w | w has abab as a substring} c. L = { w | w has neither aa nor bb as a substring} d. L = { w | w has an odd number of a’s an even number of b’s} e. L = { w | w has both ab and ba as substrings} Problem 3 a. L = { xy | x and y are binary strings that each contain the same substring of length 3} b. L = {w | w is a binary string containing both the substring 010 and the substring 101 Problem 4 a. Original NFA Final DFA b. Original NFA Final DFA Problem 5 a. Original NFA Regular Expression: a*(ba*)* b. Original NFA Regular Expression: [(a ∪ b) a*(ba*)*] ∪ [(a ∪ b) a*(ba*)*a] Problem 6 a. a(abb)* ∪ b ε b. a + ∪ (ab) + c. (a ∪ b + )a + b +...
View Full Document

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