381hw4solns - Solution for Problem 1 on Assignment 4 0 R11...

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

View Full Document Right Arrow Icon
Solution for Problem 1 on Assignment 4 0 11 0 12 0 13 0 21 0 22 0 23 0 31 0 32 0 33 0 1 1 0 0 1 R R R R R R R R R ε ε ε = = = = = + = = = ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) * 1 11 * 1 12 * 1 13 * 1 21 * 1 22 * 1 23 * 1 31 * 1 32 * 1 33 0 0 0 1 1 1 1 1 1 0 1 0 0 10 1 1 11 0 0 0 1 0 0 1 00 0 1 01 R R R R R R R R R ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε = + = = + = = + = = + = = + + = + + =Φ+ = = + = = + = + = + = + ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )( ) ( ) ( )( ) ( ) ( ) ( )( ) ( ) ( )( ) * * 2 11 * * 2 12 * * 2 13 * * 2 21 * * 2 22 * * 2 23 * 2 31 0 0 10 1 0 0 10 1 0 0 0 10 0 10 0 0 0 10 1 0 0 10 11 1 0 0 10 11 1 0 10 0 10 1 1 0 10 1 0 10 0 10 0 10 0 10 0 10 11 0 10 0 10 11 0 10 11 0 1 00 0 10 R R R R R R R ε ε ε ε ε ε ε ε ε ε ε ε ε ε ε = + + + = + + = + + + + + = + + = + + + = + + = + + + + + = + + = + + + + + + + + + = + = + + + + + = + = + + + + ( )( ) ( )( ) ( ) ( )( ) ( )( ) ( )( ) * * * 2 32 * * 2 33 1 0 1 00 0 10 1 1 00 1 00 0 10 0 10 1 00 0 10 01 1 00 0 10 11 01 1 00 0 10 11 R R ε ε ε ε ε = + + + = + + + + + + + = + + = + + + + + = + + + + The regular expression describing the strings accepted is ( ) ( ) ( )( ) ( )( ) ( ) * * * * * 3 13 1 0 0 10 11 1 0 0 10 11 01 1 00 0 10 11 01 1 00 0 10 11 R ε ε = + + + + + + + + + + + + +
Image of page 1

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

View Full Document Right Arrow Icon
CS381, Homework #4 Solutions Question 2 Let L 1 = { 0 n 10 n +1 | n 1 } and let L 2 = { 0 n 10 2 n 1 | n 1 } . Express the set L consisting of strings of the form 0100100001000001... where the number of zeros in successive blocks increases as 1,2,4,5,10,11,22,23,... i.e., alternate adding one and multiplying by two. The number of blocks of zeros can be even or odd. A correct solution is: ( L 1 ) * (0 * 1 * ) 01( L 2 ) * (0 * 1 * ) Both sides need to be followed by (0 * 1 * ) in order to allow strings to have an even or odd number of zeros.
Image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the 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