compute first and follow for the below language.
S->abs` | AC
S` ->CS"
S" ->S | epsilon
A -> bA`
A` -> aA` | epsilon
C -> cC | D
D -> dd
First(S) = { a, b }
First(S') = { c, d }
First(S") = { a, b, epsilon }
First(A) = { b}
First(A') = { a, epsilon }
First(C) = { c, d }
First(D) = { d }
---------------------------------------------
Follow(S) = { $ }
If you have any query then feel free to ask in Comment.
compute first and follow for the below language. S->abs` | AC S` ->CS" S" ->S |...
What language does the grammar below generate? S rightarrow abS | aA A rightarrow aA | a Select the correct answer. L = {(ab)^n aaa^m: n greaterthanorequalto 0, m greaterthanorequalto 0} L = {(ab)^n a^m: n greaterthanorequalto 0, m greaterthanorequalto 1} L = {a^n b^n a^m: n greaterthanorequalto 0, m greaterthanorequalto 2} L = {a^n b^n a^m: n greaterthanorequalto 0, m greaterthanorequalto 1}
If we follow 4 genes, where genes A, B, C, and D are on the same chromosome, then in a normal diploid organism we could represent the genetic information present as: AA BB CC DD What has happened if now the genetic information is A BBB CC DD? Select one: a. deletion b. translocation c. duplication
Which language is generated by the grammar below? S rightarrow aaAb A rightarrow bA | CC Select the correct answer. L = {aab^n cc: n greaterthanorequalto 1} L = {aab^n cc: n greaterthanorequalto 2} L = {aaccb^n b: n greaterthanorequalto 0} L = {aab^n ccb: n greaterthanorequalto 0}
Given the following grammar, FIRST and FOLLOW sets and LL Parser table, trace the parse of the string “fd xcor + ycor rt ycor” and draw the parse tree. FIRST(S) = FIRST(B) = FIRST(D) = { fd, rt } FIRST(A) = { fd, rt, ε } FIRST(E) = { xcor, ycor } FIRST(F) = { +, -, ε } FOLLOW(S) = { $ } S --> BA FOLLOW(A) = { $ } A --> BA | ε FOLLOW(B) = {...
for compiler design
Compster Science epene CS 347 Compiler Design Assiznment 2 Due Date: October 28, 2018 Exercise 1 Consider the following grammar: cassign expr l <id> a) Show that this grammar is ambiguous. b) Do the necessary changes to make it unambiguous (you should consider that has more priority than -). Exercise 2 Consider the following BNF Grammar: A [B, A] | B B: CI(A; C) D::= a | b | c For each of the strings listed below,...
The CS2 reaction --> CS + S is first order and its constant of speed is 2.8 x 10^-7 s^-1 A.) What is the half-life of the reaction? B.) If the initial Sample of CS2 is 3.00 grams, how much reaction time is required for 0.50 grams of CS2 to remain? C.) After 30 days of reaction, how much CS2 is left unreacted?||
What is the language L(G) generated by the context-free grammar G given below? S -> A | aB | bA | ε A -> aS | bAA B ->bS | aBB
You conduct a QTL experiment to find the loci controlling fruit
size and sugar content starting from two parental varieties, “Sam’s
Giant (SG)” and “Sweet Baby Red (SBR)”. Your cross “Sam’s Giant”
and “Sweet Baby Red” and generate F1’s and then interbreed F1’s to
generate a series of F2 individuals and measure size and sugar
content in all of them. You determine the genotype at many
individual SNP markers, 5 of which (each on a different chromosome)
are shown below....
The decomposition reaction of carbon disulfide, CS, to carbon monosulfide, CS, and sulfur is first order with k = 2.8 x 10-75-1 at 1000°C. CS, - → CS + S (a) What is the half-life of this reaction at 1000°C? (b) How many days would pass before a 2.00-gram sample of CS, had decomposed to the extent that 0.75 gram of T. CS, remained? (c) Refer to part (b). How many grams of CS would be present after this length...
#1 part A.) To test H0: μ=100 versus H1: μ≠100, a random sample of size n=20 is obtained from a population that is known to be normally distributed. Complete parts (a) through (d) below. (aa.) If x̅=104.4 and s=9.4, compute the test statistic. t0 = __________ (bb.) If the researcher decides to test this hypothesis at the α=0.01 level of significance, determine the critical value(s). Although technology or a t-distribution table can be used to find the critical value, in...