Question

1. Find a grammar for L(G) = {All bit strings with twice as many 1s as...

1. Find a grammar for L(G) = {All bit strings with twice as many 1s as 0s}.

2. Find a grammar for L(G) = {w | | w | is odd, ∑ = (0,1)}.

3. Find a grammar for the odd palindromes over {a, b, c}.

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
1. Find a grammar for L(G) = {All bit strings with twice as many 1s as...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider all bit strings of length 12 How many have 8 0s and 4 1s that have exactly 3 consecutive...

    consider all bit strings of length 12 How many have 8 0s and 4 1s that have exactly 3 consecutive 1s (allow 4 consecutive 1s)? A 90 В 72 С 45 D 36 E 9 consider all bit strings of length 12 How many have 8 0s and 4 1s that have exactly 3 consecutive 1s (allow 4 consecutive 1s)? A 90 В 72 С 45 D 36 E 9

  • Let A be the set of all bit strings of length 10. 1. How many bit...

    Let A be the set of all bit strings of length 10. 1. How many bit strings of length 10 are there? How many bit strings of length 10 begin with 1101? How many bit strings of length 10 have exactly six 0's? How many bit strings of length 10 have equal numbers of O's and 1's? How many bit strings of length 10 have more O's than 1's? a. b. c. d. e.

  • 1. Use a Regular Expression to define the set of all bit strings of one or...

    1. Use a Regular Expression to define the set of all bit strings of one or more 0's followed by only a 1. 2. Use a Regular Expression to define the set of all bit string of two or more symbols followed by three or more 0's. 3. Are these two grammars the same? a. S-> aSb|ab|λ b. S-> aAb|ab A->aAb|λ 4. Use the process of elimination to find the language of the following FA: (see picture for diagram) 5....

  • 1. Give a context-free grammar for the set BAL of balanced strings of delimiters of three...

    1. Give a context-free grammar for the set BAL of balanced strings of delimiters of three types (), and . For example, (OOis in BAL but [) is not. Give a nondeterministic pushdown automata that recognizes the set of strings in BAL as defined in problem 1 above. Acceptance should be by accept state. 2. Give a context free grammar for the language L where L-(a"b'am I n>-o and there exists k>-o such that m-2*ktn) 3. Give a nondeterministic pushdown...

  • 1. Let £ = {0,1} and consider the language L of all binary strings of odd...

    1. Let £ = {0,1} and consider the language L of all binary strings of odd length with a 0 in the middle. Give a Turing machine that decide L.

  • CFG questions 1. True or false? Given G: S → aSbSÍ bSaS | λ, L(G) =...

    CFG questions 1. True or false? Given G: S → aSbSÍ bSaS | λ, L(G) = EQUAL. 2. Provide a grammar for all words that are not palindromes. 3. Provide a grammar for L = { a,b' : is js 2 4. Provide a grammar for L = { aibak: i + j = k }. 5. Provide a grammar for L = { aba: i + k = j).

  • 1. Who are language descriptions intended for? Consider the following grammar: ab b | b a...

    1. Who are language descriptions intended for? Consider the following grammar: ab b | b a | a Which of the following sentences are in the language generated by this grammar? (DONE) a) baab ==> YES b) bbbab ==> NO c) bbaaaaaS ==> NO d) bbaab ==> YES 2. Write a BNF grammar for the language consisting of binary strings (any combination of 0s and 1s) of at least 2 digits.

  • Problem 3 (Counting binary strings) 20 marks/ Consider all bit strings of length 15. 1. How many ...

    Problem 3 (Counting binary strings) 20 marks/ Consider all bit strings of length 15. 1. How many begin with 00? 2. How many begin with 00 and end with 11? 3. How many begin with 00 or end with 10? 4. How many have exactly ten 1's? 5. How many have exactly ten 1's such as none of these 1's are adjacent to each other? Provide detailed justifications for your answers. Problem 3 (Counting binary strings) 20 marks/ Consider all...

  • (20) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's...

    (20) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by at least two c's. 5. There are exactly as many a's as b's. Construct a context-free grammar generating L. You do not need an inductive proof, but you should...

  • How to prove that the grammar G is not LL(1) The grammar is: L => LE...

    How to prove that the grammar G is not LL(1) The grammar is: L => LE | E E => (C) | (F) | V | T C => ifEE | ifEEE F => +L | -L | *L | printL V => a | b | c | d T => 0 | 1 | 2 | 3

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT