E ::= E + T | T
T ::= T * F | F
F ::= num | (E) Num ::= 0 | 1 | 2 | 3 | 4 | 5 | . . . . . .
.
Question: 1
a. Show the Left-most derivation for the expression: 5 * 7 + 6 * (1
+ 2).
b. Show the Right-most derivation for the expression: 5 * 7 + 6
* (1 + 2).
Problem 2 Find max, min, point of infliction for
a. f(t)=c (e^(-bt)-e^at ) for t≥0 where a>b>0, c>0
b. f(x)=2x^3+3x^2-12x-7 for -3≤x≤2
c. f(x)=(x+3)/(x^2+7) for -∞≤x≤+∞
Give the grammar following:
E --> E + T | T
T --> T* F | F
F --> (E) | id
Eliminating the left recursion rules and getting a non-left
recursive equivalent grammar.