# Recent activity by Ravijha

1
The minimum number of temporary variables created in 3 address code of the following expression are _____ a+b*c+d-e-a+b*c Assume order of precedence from highest to lowest as: *,+ and - .Consider associativity for + and * are not important but - is left associative.
2
Hi, Could someone please tell the difference between computability and decidability? Thanks
3
which one of the following string can definitely said to be a token without looking at the next input: +(++,+=) return(return a) *(*=) =(==) ++ , ( ) ‘ ; option e is: plusplus, comma, bracket open, bracket close, single quote ;
4
Give reasons why one might conjecture that the following language is not deterministic. $L =$ { $a^nb^mc^k : n = m$ or $m = k$}.
5
6
Which of the following is a requirement for LL(1) grammar? Unambiguity No left recursion If $A \to \alpha \mid \beta$ are two productions, then $FIRST(\alpha)$ and $FIRST(\beta)$ are disjoint (i) and (ii) (iii) (i), (ii) and (iii) (ii) and (iii)
7
Which of the following statements is FALSE? In a SLR(1) parser, it is allowable for both shift and reduce items to be in the same state In a SLR(1) parser, it is allowable for multiple reduce items to be in the same state All SLR(1) grammars are LR(0) All LR(0) grammars are SLR(1)
8
Which of the following are decidable? Whether the intersection of two regular languages is infinite Whether a given context-free language is regular Whether two push-down automata accept the same language Whether a given grammar is context-free I and II I and IV II and III II and IV
9
Find an npda with two states for the language $L =$ {$a^nb^{n+1} : n ≥ 0$}.
10
Find an npda with two states that accepts $L =$ {$a^nb^{2n} : n ≥1$}.
11
Convert the following DFA to a regular expression using the state elimination techniques.
12
When do we count ++(post increment or pre increment) as 1 or 2 token ?
13
#include<stdio.h> int main() { int x, y = 7; x = ++y + ++y + y--; printf("%d\n", x); return 0; } What is the output of this code snippet ? A. 27 B. 26 C. 25 D. Compilation error
14
1. L ={ a^n b^m c^x d^y | n=m or x=y} 2. L ={ a^n b^x c^m d^y | n=m or x=y} Classify above in CFL/DCFL?
15
What are different set of characters which are taken as single token in lexical analysis in compiler design? For eg. Charaters under double quotes are taken as single token, post-increment and pre-increment is taken as single token etc.
16
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with a valid delimiter, which includes blank symbol, arithmetic, logical operator, left parenthesis, right parenthesis, +, ... ends with a delimiter and + is a valid delimiter and the error in declaration will not be detected at this stage...
17
18
What it the number of tokens in the following line? printf("%d numbers.", &x);
19
I am getting 30 Answer given is 29
20
21
Can I write a* + b* = (a + b)* ????
22
23
If NFA has 'n' states then how DFA can have 2^n states. Please help me in understanding how this is true. As per my understanding every DFA is NFA then how no of states can be more in DFA than nfa Please suggest Thanks
24
S→ A/a A→ a LL1 or not?
25
If language L is countable infinite set then, L is Recursive as we can define enumeration method for the countable set. or It can Regular ??