Give a phrase-structure grammar that generates the set {0xn1yn | n = 0, 1, 2, . . . }, where x is the number of consonants and y is the number of vowels in your first name.
e.g. Let’s say your name is “Buket”. Then x will be 3 and y will be 2 and you should find the grammar that generates 03n12n where n is a nonnegative integer.
Please do like thank you
Give a phrase-structure grammar that generates the set {0xn1yn | n = 0, 1, 2, ....
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...
Give a context free grammar for the language L where L = {a"bam I n>:O and there exists k>-o such that m=2"k+n) 3. Give a nondeterministic pushdown automata that recognizes the set of strings in L from question 3 above. Acceptance should be by accept state. 4. 5 Give a context-free grammar for the set (abc il j or j -k) ie, the set of strings of a's followed by b's followed by c's, such that there are either a...
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...
Find a Context-free grammar G that generates the language L= 1n 0m | n ≥ 2m+1, m ≥ 0 U 1n 0m | 0≤n≤3m+2
Q2. Find a production of the form "A → , such that S → 0A, A → "produces (00) Q3. Let G be the phrase-structure grammar with vocabulary V (A,B, a, b, S], terminal element set T-(a, b), start symbol S, and production set P-(S → ABa, S → Ba, A → aB, AB → b, B → ab). Which of these are derivable from ABa? (1) ba, (2) abb, (3) aba, (4) b, (5) aababa Q2. Find a production...
Prove using mathematical induction that for every positive integer n, = 1/i(i+1) = n/n+1. 2) Suppose r is a real number other than 1. Prove using mathematical induction that for every nonnegative integer n, = 1-r^n+1/1-r. 3) Prove using mathematical induction that for every nonnegative integer n, 1 + i+i! = (n+1)!. 4) Prove using mathematical induction that for every integer n>4, n!>2^n. 5) Prove using mathematical induction that for every positive integer n, 7 + 5 + 3 +.......
et l(a) be the language generated by g(a) - (n, 2, s, p) where 2 - [a, b), n= {s,x) and s->axb ... Question: Let L(a) be the language generated by G(a) - (N, 2, S, P) where 2 - [a, b), N= {S,X) and S->aX... Let L(a) be the language generated by G(a) - (N, 2, S, P) where 2 - [a, b), N= {S,X) and S->aXb X->aX|bX|epsilon (i) (3 marks) Describe the language L(a). (First generate a few...
2. In the lecture the general solution to the Legendre equation (1-z?)y', _ 2 ry, + n(n + 1)У-0.TIER. х є R series u(x) and ():(r) don(r) + of convergence of y1 (a), y2(z) considering: (i) the paraneter n is nonnegative înteger, n є N; (ii) the parameter n is not an integer, n ¢ Z. [Do not derive these series, refer to the relevant results obtained in lecture] 2. In the lecture the general solution to the Legendre equation...
ALGORITHM RecS(n) // Input: A nonnegative integer n ifn=0 return 0 else return RecS(n+ n n n Determine what this algorithm computes. You must justify your answer. made by this algorithm and solve it. You must justify your answer. same thing using for/while loop(s) developed in (3). You must justify your answer. 1) 2) Set up the initial condition and recurrence relation for the number of multiplications 3) Write the pseudocode for the non-recursive version of this algorithm, i.e., compute...
discrete math Search il 17:16 [Problem] 1 (a) Give an external definition of the set S {sls EZA+ and gcd(x, 12) 1) (B) Write all the proper subsets of the set {1, 2 3}, and (c) define the function for real number a and positive integer n ,f: RxZ^+ R as f (a,n) a^n , Give a recursive definition of the function (d) Calculate gcd (60, 22) using Euclidean algorithm (e) Give 3 positive integer x that satisfies 4x 6...