GATE 2025 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2025 (Session 2)

65 questions

MCQ 32 · MSQ 18 · NAT 151-mark 30 · 2-mark 35

Questions 51–55 of 65

Q51Context Free Grammar2 marksMSQ
Consider two grammars G1G1 and G2G2 with the production rules given below:

G1:S→ifE then S∣ifE then S else S∣aG1: S \to \text{if} E \text{ then } S \mid \text{if} E \text{ then } S \text{ else } S \mid a
E→bE \to b

G2:S→ifE then S∣MG2: S \to \text{if} E \text{ then } S \mid M
M→ifE then M else S∣cM \to \text{if} E \text{ then } M \text{ else } S \mid c
E→bE \to b

where if,then,else,a,b,cif,then,else,a,b,c are the terminals.

Which of the following option(s) is/are CORRECT?

One or more options are correct.

Q52Regular Language2 marksMSQ
Let Σ={a,b,c}\Sigma = \{a, b, c\}. For x∈Σ∗x \in \Sigma^*, and α∈Σ\alpha \in \Sigma, let #α(x)\# _\alpha (x) denote the number of occurrences of α\alpha in xx.

Which one or more of the following option(s) define(s) regular language(s)?

One or more options are correct.

Q53Transaction2 marksMSQ
Consider the database transactions T1T1 and T2T2, and data items XX and YY. Which of the schedule(s) is/are conflict serializable?

Transaction T1R1(X)W1(Y)R1(X)W1(X)COMMIT(T1)\begin{array}{|l|} \hline \textbf{Transaction T1} \\ \hline R1(X) \\ \hline W1(Y) \\ \hline R1(X) \\ \hline W1(X) \\ \hline \text{COMMIT(T1)} \\ \hline \end{array}

Transaction T2W2(X)W2(Y)COMMIT(T2)\begin{array}{|l|} \hline \textbf{Transaction T2} \\ \hline W2(X) \\ \hline W2(Y) \\ \hline \text{COMMIT(T2)} \\ \hline \end{array}

One or more options are correct.

Q54SQL2 marksMSQ
Consider the following relational schema:

Students(rollno: integer,‾ name: string, age: integer, cgpa: real)\text{Students} (\text{\underline{rollno: integer,} name: string, age: integer, cgpa: real})
Courses(courseno: integer,‾ cname: string, credits: integer)\text{Courses} (\text{\underline{courseno: integer,} cname: string, credits: integer})
Enrolled( rollno: integer,‾ courseno: integer,‾ grade: string)\text{Enrolled} (\text{ \underline{rollno: integer,} \underline{courseno: integer,} grade: string})

Which of the following options is/are correct SQL query/queries to retrieve the names of the students enrolled in course number (i.e. courseno) 1470?

One or more options are correct.

Q55Cache Memory2 marksNAT
Given a computing system with two levels of cache (L1 and L2) and a main memory. The first level (L1) cache access time is 1 nanosecond (ns) and the "hit rate" for L1 cache is 90% while the processor is accessing the data from L1 cache. Whereas, for the second level (L2) cache, the "hit rate" is 80% and the "miss penalty" for transferring data from L2 cache to L1 cache is 10 ns. The "miss penalty" for the data to be transferred from main memory to L2 cache is 100 ns.

Then the average memory access time in this system in nanoseconds is ___________ . (rounded off to one decimal place)