{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Home7CFGs

# Home7CFGs - CS 341 Automata Theory Elaine Rich Homework 7...

This preview shows pages 1–2. Sign up to view the full content.

CS 341 Automata Theory Elaine Rich Homework 7 Due Thursday, Oct. 19 1) Let Σ = { a , b }. For the languages that are defined by each of the following grammars, do each of the following: i . List five strings that are in L . ii . List five strings that are not in L (or as many as there are, whichever is greater). iii . Describe L concisely. You can use regular expressions, expressions using variables (e.g., a n b n , or set theoretic expressions (e.g., { x : …}) iv . Indicate whether or not L is regular. Prove your answer. a) S a S | S b | ε b) S a S a | b S b | a | b c) S a S | b S | ε d) S a S | a S b S | ε 2) Consider the following grammar G : S 0 S 1 | SS | 10 Show a parse tree produced by G for each of the following strings: a) 010110 b) 00101101 3) For each of the following languages L , construct a context-free grammar that generates it: a) L = { a n b m : m n , m - n is even} b) L = { x c n : x { a , b }*, # a ( x ) = n or # b ( x ) = n } c) L = { a i b j : 2 i = 3 j + 1} d) L = { b i # b i +1 R : b i is the binary representation of some integer i , i 0, without leading zeros} e) L = { x R # y : x , y {0, 1}* and x

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• 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.

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

• 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.

Dana University of Pennsylvania ‘17, Course Hero Intern

• 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.

Jill Tulane University ‘16, Course Hero Intern