Recent questions tagged goclasses-cs-dpp-day-387

0 0 votes
1 1 answer
45
45 views
The following grammar is in Greibach Normal Form and generates balanced brackets:$S\rightarrow [B$$B\rightarrow ]\mid ~]S\mid [BB$.Consider a derivation of $[[][]][]$.Whi...
0 0 votes
1 1 answer
32
32 views
Consider the following statements about grammars and languages.A grammar in Chomsky Normal Form can be ambiguous. An ambiguous grammar can generate a language that also h...
0 0 votes
1 1 answer
35
35 views
Which one of the following grammars is in Chomsky Normal Form?Terminals are lowercase and nonterminals are uppercase.$X\rightarrow YZ$$Y\rightarrow a$$Z\rightarrow bc$ $X...
0 0 votes
1 1 answer
30
30 views
Suppose two different variables in a context-free grammar $G$ can each derive $\epsilon$.Which statement must necessarily follow?$G$ is ambiguous. $\epsilon\in L(G)$. Con...
0 0 votes
1 1 answer
33
33 views
Consider the CFG $$\begin{aligned}S &\rightarrow X \mid 00 \mid \epsilon \\X &\rightarrow 0 \mid \epsilon\end{aligned}$$After removing the unit production, which grammar ...
0 0 votes
1 1 answer
59
59 views
The database contains relations $\mathrm{animals}$ and $\mathrm{visits}$, with $\mathrm{aid}$ identifying an animal.Which SQL query returns the names of animals that visi...
0 0 votes
1 1 answer
45
45 views
Conceptually, in which order does SQL process the following three operations?$\mathrm{WHERE}\rightarrow\mathrm{HAVING}\rightarrow\mathrm{GROUP\ BY}$ $\mathrm{WHERE}\right...
0 0 votes
1 1 answer
52
52 views
The $\mathrm{Employee}$ relation contains:$$\begin{array}{|c|c|c|c|} \hline \mathrm{EmployeeNo} & \mathrm{Name} & \mathrm{DateOfBirth} & \mathrm{Department} \\ \hline 000...
0 0 votes
1 1 answer
47
47 views
The relation is:$\mathrm{Midterm}(\mathrm{ClassName},\mathrm{SubjectName},\mathrm{StudentNo},\mathrm{Name},\mathrm{Score})$.The objective is to calculate the average scor...
0 0 votes
1 1 answer
63
63 views
The relation $\mathrm{ExamResult}$ stores examination records for the previous three years:$\mathrm{ExamResult}(\mathrm{StudentNo},\mathrm{ExamDate},\mathrm{Score},\mathr...
To see more, click for the full list of questions or popular tags.