Question

Find a regular grammar for each of the following : a. 1 + 01 b. 1*01*...

Find a regular grammar for each of the following :

a. 1 + 01

b. 1*01* + 01

c. {00, 10, 01}

d. {Λ, 0, 1, 00, 11, … 0n, 1n, (01)n, …}

e. All strings which have an odd number of 1’s

0 0
Add a comment Improve this question Transcribed image text
Answer #1

If this answer helpful to you. Please Hit thumps up.

me in . Here we analyze what all strings will be th the language. - According to that - all those strings ug to that grammarRegular grammar for Lis ssislsilo A © foo, 10,13 L Language has only 3 strings. 1. So, regular grammar will be :S tA | OB A s

Add a comment
Know the answer?
Add Answer to:
Find a regular grammar for each of the following : a. 1 + 01 b. 1*01*...
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
  • 1. For the following grammar: a) Give an example of a string accepted by the grammar. b) Give an ...

    Theory of Computation need ASAP 2-3 hours 1. For the following grammar: a) Give an example of a string accepted by the grammar. b) Give an example of a string not accepted by the grammar. c) Describe the language produced by the grammar. 2. Using the following grammar find a derivation for the string: 0001112 A0A1le C 0C2 | D Create a grammar for the language described by the following RE: Create a grammar for the following language: For the...

  • 1.   Write DFA, NFA (small), regular expression and right linear grammar for strings over {a,b} a.  ...

    1.   Write DFA, NFA (small), regular expression and right linear grammar for strings over {a,b} a.   End in either aa or bb b. ( an | bna)   n >= 0 c. {w : w such that w contains the substring “bb” or w contains an odd number of a’s (or both). d.   {w : w does not contain exactly two a’s} e.   { w : w starts with substring abb and contains substring bba}

  • (4 points.) Consider the regular expression (11 + 00)'1(e + 01). . Give two strings of O's and 1's, each 6 to 12 characters long, that are both represented by this regular expression...

    (4 points.) Consider the regular expression (11 + 00)'1(e + 01). . Give two strings of O's and 1's, each 6 to 12 characters long, that are both represented by this regular expression . Construct a nondeterministic finite automaton equivalent to the regular expression. (4 points.) Consider the regular expression (11 + 00)'1(e + 01). . Give two strings of O's and 1's, each 6 to 12 characters long, that are both represented by this regular expression . Construct a...

  • Design a regular grammar to generate the set of all even integers. Design a regular grammar...

    Design a regular grammar to generate the set of all even integers. Design a regular grammar to generate the set of all odd integers. Design a regular grammar to generate the set of all integers beginning with the digit 8 such that the digits are consecutive and even. If a digit is 8, its following digit (if present) will be 0. The set of valid strings is {8, 80, 802,8024, 80246, 802468,...) Design a regular grammar to generate the set...

  • For each of the following, construct context-free grammars that generate the given set of strings. If...

    For each of the following, construct context-free grammars that generate the given set of strings. If your grammar has more than one variable, we will ask you to write a sentence describing what sets of strings you expect each variable in your grammar to generate. For example, if your grammar were: S → EO E → EE CC 0+ EC C+01 We would expect you to say “E generates (non-empty) even length binary strings; O generates odd length binary strings;...

  • Consider the following regular grammar with start symbol S and terminals {x, y}. S → xS...

    Consider the following regular grammar with start symbol S and terminals {x, y}. S → xS S → yX S → yY X → xX X → yS Y → xY Y → λ List four strings, each of length less than 4, accepted by this grammar. (Include ε if it is accepted.) List four strings, each of length less than 4, not accepted by this grammar. (Include ε if it is not accepted.) In English, describe the language represented...

  • Regular expressions, DFA, NFA, grammars, languages Regular Languages 4 4 1. Write English descriptions for the...

    Regular expressions, DFA, NFA, grammars, languages Regular Languages 4 4 1. Write English descriptions for the languages generated by the following regular expressions: (a) (01... 9|A|B|C|D|E|F)+(2X) (b) (ab)*(a|ble) 2. Write regular expressions for each of the following. (a) All strings of lowercase letters that begin and end in a. (b) All strings of digits that contain no leading zeros. (c) All strings of digits that represent even numbers. (d) Strings over the alphabet {a,b,c} with an even number of a's....

  • Automata Theory - Finding a regular expression for each of the following languages over {a,b} or...

    Automata Theory - Finding a regular expression for each of the following languages over {a,b} or {0,1}: I've written the solution . Please show steps on how to approach the problems that I mentioned in parentheses. The ones where I put my own regular expression check and see if it's still right. Thanks Strings with .... odd # of a's ---> (b*ab*ab*)b*ab* even # of 1's ---> 0*(10*10*)* ---> my answer was 0*10*10* (is this still right?) start & end...

  • number 2 only please, could not take a smaller picture. 2 Find a regular grammar that...

    number 2 only please, could not take a smaller picture. 2 Find a regular grammar that generates the language • {w | We{0,1}* , [w] >= 4; w starts with 1 and ends with 10 or 01). 3 Find a regular expression that denotes the language accepted by the below finite automaton. 0 E B 0,1 1 D 0 с F

  • 6. Find all strings of length S or less generated by this Regular Grammar A→Aalbb 7....

    6. Find all strings of length S or less generated by this Regular Grammar A→Aalbb 7. Construct an NFA for the language defined by this Regular Grammar

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