Given the following grammar, which variables are “nullable”? Explain you answer.
S --> abC
S --> bbDE
S --> GEAA
A --> DCaaGb
A --> bba
A --> FFS
B --> bGHS
B --> C
B --> KAESE
C --> GG
C --> abbDKaa
C --> aabF
D --> SGaFFbbb
D --> GGCFF
D --> HAKFH
E --> bbSAAKG
E --> KCG
E --> H
F --> bbbbab
F --> SbbFE
F --> AKKB
G --> CDA
G --> (lambda)
G --> HBE
H --> abbaa
H --> SKCD
H --> D
K --> GC
K --> AFB
Given the following grammar, which variables are “nullable”? Explain you answer. S --> abC S -->...
these questions are about LISP please explain the reason In the following Fun language example, which expressions can we get by some series of reductions? Assume that we can reduce the built-in function + in the usual way that addition works. Definitions: f(x, y) = x+y g(x) = x+1 h(x) = 7 Example: f(g(h(4)), h(g(5))) 1.Select all that apply: a. g(h(4)) + h(g(5)) b. f(g(7), h(g(5))) c. f(8, 7) d. 15 e. f(g(h(4)) + h(g(5))) f. f(5, h(g(5))) g. f(h(g(4)),...
Q1: Given the below language and context free gramma:, a. Show that the grammar is ambiguous using the string ( abc) by using substitutions. b. Then design a push down automata that recognizes the language. C. Then show the tracing of (abc, abbccc) using the push down automata. d. Then Show which two simple languages create the greaterlanguage. Give set builder notation for each language. e. Then produce Chomsky normal form for the grammar. The following context-free language is inherently...
P2) Given grammar in BNF, answer the following questions (30 points) <stmt-list>→<stmt> | <stmt»; <stmt-list> (a) Rewrite the given grammar into a EBNF (b) Is the given grammar ambiguous? Support your answer to receive the full credit. (c) Given string A-B C-D: B-C-A-D, draw a parsing tree P2) Given grammar in BNF, answer the following questions (30 points) → |
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)-
explain please In which of the following pairs of acids is the first compound the stronger acid? a. HBr HC1 d. HBrO2 HC102 e. H Se HBE b. H,502 HNO3 Cl C- E-O- - c. H- H-C- OH "o=o - OH
Consider the following grammar (S, A, B, and C are nonterminal symbols; S is the start symbol; 0 and 1 are terminal symbols): S → AA A → BCB B → B0 | B1 | 0 | 1 C → 00 | 11 Which of the following sentences are in the language generated by the grammar? Show derivations for the sentences that can be generated. If a sentence cannot be generated by the grammar, explain why. a) 10010001 b) 01101101...
Consider the following grammar G, whose productions rules are the following (an upper case letters represents a nonterminal symbol, a lower case letter represents a terminal symbol). Untitled Note Eile Edit Format View Help S -asCB A b A -aA C B d A Which of the following sentences are in the language generated by the grammar G? |Untitled - Notepad X Eile Edit Format View Help А. асcbd B. abcd c. acccbcc D. acd Е. ассс F. CCC G....
4. Consider the following closed-loop system in which G(s) = and H(s) = 1. de)_ GC) ylt) Derive the transfer function刽 2, where E (s) = R(s) H(s)Y(s). What is the smallest value of K for which the steady-state error due to a unit step disturbance, d(t) -), s less than 0.05? Ea(s) D(s)
If you use a different value for the molar absorptivity (s), which of the following variables change or don't change? Explain your answer for each with complete sentences (no more than three). 1. a. Kc b. AH c. AS Write down your calculated value for AH 2. below. Is the reaction endothermic of exothermic? Explain with at least one complete sentence. 3. Write down the values for AHn (in kJ/mol) and AS (in J/K-mol) that you calculated in the lab....