Question

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 acce

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

Fyon -the quat example tring accer he arammar O o SOS dence proved eample stig not geept11 THe (aguaeadesand and ts in clulSAE SO OAEC .AOA) S)0001118C AE) 89000 111 28 C B_) 28) string derived Suece

Add a comment
Know the answer?
Add Answer to:
1. For the following grammar: a) Give an example of a string accepted by the grammar. b) Give an ...
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
  • For both of the following languages, provide a grammar that generates it, an intuitive explanatio...

    Please actually answer it For both of the following languages, provide a grammar that generates it, an intuitive explanation why this grammar generates this language, and a graphical representation of a push-down automaton that recognizes this language. (a) The language of properly nested sets of parentheses over the alphabet G)). Note that the string (COO))) belongs to this language, while the string (O) () does not because the third closing parenthesis does not have a matching opening parenthesis. Provide a...

  • 1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the...

    1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...

  • Given the following ambiguous context free grammar (3x20) 1. (a) Explain why the grammar is ambiguous...

    Given the following ambiguous context free grammar (3x20) 1. (a) Explain why the grammar is ambiguous (b) Find an equivalent unambiguous context-free grammar. (c) Give the unique leftmost derivation and derivation tree for the string s generated from the unambiguous grammar above. 2. Construct non-deterministic pushdown automata to accept the following language (20) 3. Convert the following CFG into an cquivalent CFG in Chomsky Normal Form (CNF) (20)-

  • [Easy] Theoretical Computer Science Consider the grammar: Give a derivation for the string "aaaabbbbbb" and describe...

    [Easy] Theoretical Computer Science Consider the grammar: Give a derivation for the string "aaaabbbbbb" and describe the language, i.e. general form of the strings generated by the grammar.

  • C++ preffered please, thank you. Write a code in a high-level language (C++, C# or Java...

    C++ preffered please, thank you. Write a code in a high-level language (C++, C# or Java or ??) for a Deterministic Pushdown automaton which will accept the string a^nb^n where sigma = a, b. Create an input file with the following strings aaabbb, ababab, aababb, abbaab and give your output showing what is accepted and what is not accepted.

  • 4. Show that the pda constructed in Example 7.6 accepts the strings aabb and aaabbbb, and that bo...

    4. Show that the pda constructed in Example 7.6 accepts the strings aabb and aaabbbb, and that both strings are in the language generated by the given grammar. EXAMPLE 7.6 Construct a pda that accepts the language generated by a grammar with productions We first transform the grammar into Greibach normal form, changing the productions to A bB, The corresponding automaton will have three states (go, 91,92), with initial state go and final state q2. First, the start symbol S...

  • 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. Consider the following grammar A - aB B-Sb (a) Show a derivation tree for the...

    1. Consider the following grammar A - aB B-Sb (a) Show a derivation tree for the string aabbbb using the grammar. (b) Give an English description of the language generated by the grammar 2. Let G be the grammar below: S-ASB ab | SS (a) Show that G is ambiguous. (b) Construct an unambiguous grammar equivalent to G. 3. Find a context free grammar for the language L3- fa"b"c+m :n,m21) 4. Find a context free grammar for the language L4...

  • 3 points) Question Three Consider the context-free grammar S >SS+1 SS 1a and the string aa...

    3 points) Question Three Consider the context-free grammar S >SS+1 SS 1a and the string aa Give a leftmost derivation for the string. 3 points) (4 poiots) (5 points) (3 points) sECTION IWOLAttcmpt.any 3.(or 2) questions from this.scction Suppose we have two tokens: (1) the keyword if, and (2) id-entifiers, which are strings of letters other than if. Show the DFA for these tokens. Give a nightmost derivation for the string. Give a parse tree for the string i) Is...

  • Symbol denoting an alphabet A. abb An abstract model of a digital computer B. grammar A...

    Symbol denoting an alphabet A. abb An abstract model of a digital computer B. grammar A string in a language C. powerset Symbol for an empty string D. edge Mechanism using productions to describe a language E. automaton The set of all subsets of a set F. union A string in (ab)" but not in ab G. sentence Set operator to find the elements present in both sets used as operands HA Symbol denoting a derivation in a 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
ADVERTISEMENT