Using the CYK algorithm, determine whether the word “abbaa” can be generated by the following grammar:
S ⟶ XY
X ⟶ SY
Y ⟶ SS
X ⟶ a | bb
Y ⟶ aa
What are all the producing nonterminals for the substring "bb"?
What are all the producing nonterminals for the substring "baa"?
What are all the producing nonterminals for the substring "abb"?
What are all the producing nonterminals for the substring "bbaa"?
First of all the given grammar is not in CNF normal form. Since for CYK algorithm the CNF form of the grammar is required.
Here I have implement the CYK algorithm in Table filling Form. Here
Xi j contain all the non terminals which generate string ai ai+1 ai+2 .... aj.
means if X1n contains start symbol of the grammar then the string a1 a2 a3 .......an .
The full solution is attached
as image form. there is three images numbered as 1, 2, 3.


Using the CYK algorithm, determine whether the word “abbaa” can be generated by the following grammar:...
theory of computation
(10) Use the CYK algorithm to determine whether the strings abb, bbb, aabba, and abbbb are in the language generated by the grammar S - AB ABB a BAB 6
Solve the following questions. All questions are mandatory. Q1: What’s wrong in the following grammar? S → ABC A → aA|aa B → bB|B C → cC|cccc Q2: Describe the strings generated by the following grammar S → aSa S → bSb S → aa S → bb Q3: Consider the following grammar: S → ABC A → aA|a B → bB|b C → cC|c Change the above grammar such that it generates L1={anbmck; n>=3,m>=3,k>=4} Q4: Use the following grammar...
2. The following context-free grammar (CFG) has A-productions. S + XY | XYZ X + YXYZ | a | A Y + XZ | ZY | 6 | A Z YZ | XY | X | C Using the algorithm in Chapter 13, find another CFG that generates the same language except for the empty word, and that does not have any A-productions.
5. Construct the CYK-table for the string aabb using the following grammar: S X Y Z A B + AY | 8 + AY + XZ|XB| b + XB | b → a + b
4. Consider the following context-free grammar S SSSS a (a) Show how the string aa+a* can be generated by this grammar (b) What language does this grammar generate? Explain
(10] Eliminate left recursion from the grammar A Ba |Aa c B Bb | Ab 1 d A Ad IB A BA ASJAE Consider the following grammar G: S'S S (S)S|e fa) (10] Construct the collection of the sets of LR(0) items (b) [5] When constructing the action table of SLR parser of G what are the rules to determine the parsing actions? That is, what is the rule for a shift action at state /? What is the rule...
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...
Using truth tables, determine whether the following expressions are the same or not. Do not simplify equations. a'b + a'c + ac b(a'c' + c) + b'c c + a'b' Simplify the following expressions using algebraic rules: (a+b+c)(a’+b+c)(a+b’+c’)(a’+b’+c’) (2 terms, 4 literals – POS form) The rest will be SOP form: ab'c + bd + bcd'+ ab'c' + abc'd (3 terms, 6 literals) xyz’ + x’yz’ + x’yz + xyz (1 terms, 1 literal) a’b’c’ + a’bc’ + a’bc +...
(b) Using the Davis-Putnam-Logemann-Loveland (DPLL) algorithm, determine whether the following formula is satisfiable. Show each step. [3 marks] (c) Give an example of a conjunctive normal form (CNF) formula where the pure literal rule can be applied, but the unit propagation rule cannot. The formula must have at least 3 clauses. [3 marks
(b) Using the Davis-Putnam-Logemann-Loveland (DPLL) algorithm, determine whether the following formula is satisfiable. Show each step. [3 marks] (c) Give an example of a conjunctive normal form...
Directions. Determine whether the following three arguments are valid using the truth table method. Use the Indirect Truth Table method as found in the link on Canvas. Indicate whether each is valid or not. Note that ‘//’ is used as the conclusion indicator and ‘/’ is used to separate the premises. [Note: Use only the following logical symbols: ‘&’ for conjunctions, ‘v’ for disjunctions, ‘->’ for conditionals, ‘<->’ for biconditionals, ‘~’ for negations.] Show your truth tables. 1. (S <->...