# Questions tagged [gate-cs]

Use this tag when your question is about questions that appear in the Graduate Aptitude Test in Engineering (GATE) for Computer Science and Information Technology (code "CS"). Check whether your question is on-topic. For example, questions about programming in some particular language should be posted to other sites such as stackoverflow.com.

7 questions
Filter by
Sorted by
Tagged with
655 views

### Remove left recursion from a grammar without necessarily removing epsilon production

Consider the grammar $$S →Aa∣b$$ $$A →Ac∣Sd∣ϵ$$ Construct an equivalent grammar with no left recursion and with minimum number of production rules. $\tag {GATE-CS-1998}$ While solving this question, ...
39 views

### how ambiguity of following grammar cant be decidable?

SO According to question grammar should be like this (A -> AA ). ->So i learn that if grammar is left and right recursive both then that grammar must be ambiguous but here the answer is deferent....
57 views

### What are the maximum possible values of X and Y?

30 buses are used to transport 2000 passengers. Each bus has 80 seats and each passenger will occupy exactly one seat. Consider the following statement: At least X buses will carry at least 67 ...
214 views

### Arguing that $L= \{a^n | n\geq 0\} \cup \{a^nb^n| n\geq 0\}$ is not $LL(k)$ for any $k$

Consider the language $L= \{a^n \mid n\geq 0\} \cup \{a^nb^n\mid n\geq 0\}$ and the following statements. $\quad\quad\text{I. }L$ is deterministic context-free. $\quad\quad\text{II. }L$ is context-...
621 views

### Compiler Design Question

$\text{Consider the following ANSI C code:}$ int main(){ Integer x; return 0; } $\text{What will be the type of error?}$ $\text{a) Lexical}$, $\text{b) Syntax}$, ...
Given below is a question from $\text{GATE } 2015 \text{ CS}$ paper, Consider the sequence of machine instruction given below: \begin{array}{ll} \text{MUL} & \text{R5, R0, R1} \\ \text{DIV} &...