Despite his initial hesitation, Rehman's _________ to contribute to the success of the project never wavered. Select the most appropriate option to complete the above sentence.
GATE CS 2025 Set-2
65 questions · 100 marks · MCQ / MSQ / NAT with official GATE marking
Bird : Nest :: Bee : _______ Select the correct option to complete the analogy.
If Pe^x = Qe^(-x) for all real values of x, which one of the following statements is true?
A sheet of paper made of six squares is folded to make a cube, each square becoming one face. The net is a cross: a vertical column of three squares marked, from top to bottom, with a black dot, an open (white) triangle and an open circle. The middle square also has one blank square on its left and one blank square on its right, and beyond the right blank square there is a fourth square in the row with a black triangle. Which one of the following options correctly represents the cube? Each option describes the three faces you can see: front, top and right side.
Let p1 and p2 denote two arbitrary prime numbers. Which one of the following statements is correct for all values of p1 and p2?
Based only on the conversation below, identify the logically correct inference: "Even if I had known that you were in the hospital, I would not have gone there to see you", Ramya told Josephine.
If IMAGE and FIELD are coded as FHBNJ and EMFJG respectively then, which one among the given options is the most appropriate code for BEACH?
Which one of the following options is correct for the given data in the table? Iteration (i): 0, 1, 2, 3 Input (I): 20, -4, 10, 15 Output (X): 20, 16, 26, 41 Output (Y): 20, -80, -800, -12000
PQRS is a square of side 2 cm, and PLMN is a rectangle. The corner L of the rectangle lies on the side QR of the square. The side MN of the rectangle passes through the corner S of the square. What is the area (in cm²) of the rectangle PLMN?
A river system has 7 segments, marked P, Q, R, S, T, U and V, which split the land into 5 zones, Z1 to Z5. Each segment separates exactly two zones: - P separates Z1 and Z2 - R separates Z2 and Z3 - Q separates Z1 and Z3 - S separates Z1 and Z5 - T separates Z3 and Z5 - V separates Z3 and Z4 - U separates Z4 and Z5 We need to connect these zones using the least number of bridges. Out of the following options, which one is correct?
If A = [[1, 2], [2, -1]], then which ONE of the following is A⁸?
The value of x such that x > 1, satisfying the equation ∫ from 1 to x of t ln t dt = 1/4, is
Consider a binary tree T in which every node has either zero or two children. Let n > 0 be the number of nodes in T. Which ONE of the following is the number of nodes in T that have exactly two children?
Let L, M, and N be non-singular matrices of order 3 satisfying the equations L² = L⁻¹, M = L⁸ and N = L². Which ONE of the following is the value of the determinant of (M - N)?
Let P(x) be an arbitrary predicate over the domain of natural numbers. Which ONE of the following statements is TRUE?
Consider the following statements: (i) Address Resolution Protocol (ARP) provides a mapping from an IP address to the corresponding hardware (link-layer) address. (ii) A single TCP segment from a sender S to a receiver R cannot carry both data from S to R and acknowledgement for a segment from R to S. Which ONE of the following is CORRECT?
Consider the routing protocols given in List I and the names given in List II: List I: (i) Distance vector routing; (ii) Link state routing List II: (a) Bellman-Ford; (b) Dijkstra For matching of items in List I with those in List II, which ONE of the following options is CORRECT?
A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the protocol number of a protocol X. Which ONE of the following is NOT a possible candidate for X?
Consider the following C program: #include <stdio.h> void stringcopy(char *, char *); int main(){ char a[30] = "@#Hello World!"; stringcopy(a, a + 2); printf("%s\n", a); return 0; } void stringcopy(char *s, char *t) { while(*t) *s++ = *t++; } Which ONE of the following will be the output of the program?
Consider an unordered list of N distinct integers. What is the minimum number of element comparisons required to find an integer in the list that is NOT the largest in the list?
Consider the following statements about the use of backpatching in a compiler for intermediate code generation: (I) Backpatching can be used to generate code for Boolean expression in one pass. (II) Backpatching can be used to generate code for flow-of-control statements in one pass. Which ONE of the following options is CORRECT?
Given the following syntax directed translation rules: Rule 1: R → AB { B.i = R.i - 1; A.i = B.i; R.i = A.i + 1; } Rule 2: P → CD { P.i = C.i + D.i; D.i = C.i + 2; } Rule 3: Q → EF { Q.i = E.i + F.i; } Which ONE is the CORRECT option among the following?
Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in its data field. A UDP segment is transmitted. The payload (data) in the UDP segment is 7488 bytes. Which ONE of the following choices has the CORRECT total number of fragments transmitted and the size of the last fragment including IPv4 header?
Which ONE of the following languages is accepted by a deterministic pushdown automaton?
Let G1, G2 be Context Free Grammars (CFGs) and R be a regular expression. For a grammar G, let L(G) denote the language generated by G. Which ONE among the following questions is decidable?
Processes P1, P2, P3, P4 arrive in that order at times 0, 1, 2, and 8 milliseconds respectively, and have execution times of 10, 13, 6, and 9 milliseconds respectively. Shortest Remaining Time First (SRTF) algorithm is used as the CPU scheduling policy. Ignore context switching times. Which ONE of the following correctly gives the average turnaround time of the four processes in milliseconds?
An audit of a banking transactions system has found that on an earlier occasion, two joint holders of account A attempted simultaneous transfers of Rs. 10000 each from account A to account B. Both transactions read the same value, Rs. 11000, as the initial balance in A and were allowed to go through. B was credited Rs. 10000 twice. A was debited only once and ended up with a balance of Rs. 1000. Which of the following properties is/are certain to have been violated by the system?
Which of the following is/are part of an Instruction Set Architecture of a processor?
Which of the following statements regarding Breadth First Search (BFS) and Depth First Search (DFS) on an undirected simple graph G is/are TRUE?
Consider the two lists List I and List II given below: List I: (i) Context free languages; (ii) Recursive languages; (iii) Regular languages List II: (a) Closed under union; (b) Not closed under complementation; (c) Closed under intersection For matching of items in List I with those in List II, which of the following option(s) is/are CORRECT?
Consider the following logic circuit. Inputs X and Y feed three gates whose outputs go into one OR gate that produces F: - Gate 1: a NAND gate with inputs Y and X. - Gate 2: a NOT gate with input X. - Gate 3: an AND gate with inputs X and Y' (Y passed through a NOT gate). Which is/are the CORRECT option(s) for the output function F?
The following two signed 2's complement numbers (multiplicand M and multiplier Q) are being multiplied using Booth's algorithm: M: 1100 1101 1110 1101 and Q: 1010 0100 1010 1010 The total number of addition and subtraction operations to be performed is ___________. (Answer in integer)
int x=126,y=105; do { if(x>y) x=x-y; else y=y-x; } while(x!=y); printf("%d",x); The output of the given C code segment is ________. (Answer in integer)
In a 4-bit ripple counter, if the period of the waveform at the last flip-flop is 64 microseconds, then the frequency of the ripple counter in kHz is ________. (Answer in integer)
Suppose the values 10, -4, 15, 30, 20, 5, 60, 19 are inserted in that order into an initially empty binary search tree. Let T be the resulting binary search tree. The number of edges in the path from the node containing 19 to the root node of T is ___________. (Answer in integer)
Suppose we are transmitting frames between two nodes using Stop-and-Wait protocol. The frame size is 3000 bits. The transmission rate of the channel is 2000 bps (bits/second) and the propagation delay between the two nodes is 100 milliseconds. Assume that the processing times at the source and destination are negligible. Also, assume that the size of the acknowledgement packet is negligible. Which ONE of the following most accurately gives the channel utilization for the above scenario in percentage?
Let G be an edge-weighted undirected graph with positive edge weights. Suppose a positive constant α is added to the weight of every edge. Which ONE of the following statements is TRUE about the minimum spanning trees (MSTs) and shortest paths (SPs) in G before and after the edge weight update?
A meld operation on two instances of a data structure combines them into one single instance of the same data structure. Consider the following data structures: P: Unsorted doubly linked list with pointers to the head node and tail node of the list. Q: Min-heap implemented using an array. R: Binary Search Tree. Which ONE of the following options gives the worst-case time complexities for meld operation on instances of size n of these data structures?
For a direct-mapped cache, 4 bits are used for the tag field and 12 bits are used to index into a cache block. The size of each cache block is one byte. Assume that there is no other information stored for each cache block. Which ONE of the following is the CORRECT option for the sizes of the main memory and the cache memory in this system (byte addressable), respectively?
Given a Context-Free Grammar G as follows: S → Aa | bAc | dc | bda A → d Which ONE of the following statements is TRUE?
An array A of length n with distinct elements is said to be bitonic if there is an index 1 ≤ i ≤ n such that A[1..i] is sorted in the non-decreasing order and A[i + 1..n] is sorted in the non-increasing order. Which ONE of the following represents the best possible asymptotic bound for the worst-case number of comparisons by an algorithm that searches for an element in a bitonic array A?
Let F be the set of all functions from {1, ..., n} to {0, 1}. Define the binary relation ≼ on F as follows: for all f, g in F, f ≼ g if and only if for all x in {1, ..., n}, f(x) ≤ g(x), where 0 ≤ 1. Which of the following statement(s) is/are TRUE?
Given the following Karnaugh map for a Boolean function F(w, x, y, z). Rows are wx = 00, 01, 11, 10 and columns are yz = 00, 01, 11, 10: wx = 00: 1 0 0 1 wx = 01: 0 1 1 0 wx = 11: 0 1 1 0 wx = 10: 1 0 0 1 Which one or more of the following Boolean expression(s) represent(s) F?
Consider a system of linear equations PX = Q where P is a 3 × 3 real matrix and Q is a 3 × 1 real vector. Suppose P has an LU decomposition, P = LU, where L = [[1, 0, 0], [l21, 1, 0], [l31, l32, 1]] and U = [[u11, u12, u13], [0, u22, u23], [0, 0, u33]]. Which of the following statement(s) is/are TRUE?
Consider a stack data structure into which we can PUSH and POP records. Assume that each record pushed in the stack has a positive integer key and that all keys are distinct. We wish to augment the stack data structure with an O(1) time MIN operation that returns a pointer to the record with smallest key present in the stack 1) without deleting the corresponding record, and 2) without increasing the complexities of the standard stack operations. Which one or more of the following approach(es) can achieve it?
Consider the following relational schema along with all the functional dependencies that hold on them. R1(A, B, C, D, E): { D → E, EA → B, EB → C } R2(A, B, C, D): { A → D, A → B, C → A } Which of the following statement(s) is/are TRUE?
Consider a demand paging system with three frames, and the following page reference string: 1 2 3 4 5 4 1 6 4 5 1 3 2. The contents of the frames are as follows initially and after each reference (from left to right): Reference: 1* 2* 3* 4* 5* 4 1 6* 4 5 1* 3* 2* Frame 1: 1 1 1 1 1 1 1 6 6 6 6 6 2 Frame 2: - 2 2 4 4 4 4 4 4 4 1 1 1 Frame 3: - - 3 3 5 5 5 5 5 5 5 3 3 All frames are empty at the start. The *-marked references cause page faults (the first three fill empty frames; the rest replace a page). Which one or more of the following could be the page replacement policy/policies in use?
P = {P1, P2, P3, P4} consists of all active processes in an operating system. R = {R1, R2, R3, R4} consists of single instances of distinct types of resources in the system. The resource allocation graph has the following assignment and claim edges. Assignment edges: R1 → P1, R2 → P2, R3 → P3, R4 → P4 (the assignment edge R1 → P1 means resource R1 is assigned to process P1, and so on for others) Claim edges: P1 → R2, P2 → R3, P3 → R1, P2 → R4, P4 → R2 (the claim edge P1 → R2 means process P1 is waiting for resource R2, and so on for others) Which of the following statement(s) is/are CORRECT?
Three floating point numbers X, Y, and Z are stored in three registers RX, RY, and RZ, respectively in IEEE 754 single precision format as given below in hexadecimal: RX = 0xC1100000, RY = 0x40C00000, and RZ = 0x41400000 Which of the following option(s) is/are CORRECT?
Which of the following Boolean algebraic equation(s) is/are CORRECT?
Consider two grammars G1 and G2 with the production rules given below: G1: S → if E then S | if E then S else S | a E → b G2: S → if E then S | M M → if E then M else S | c E → b where if, then, else, a, b, c are the terminals. Which of the following option(s) is/are CORRECT?
Let Σ = {a, b, c}. For x in Σ*, and α in Σ, let #α(x) denote the number of occurrences of α in x. Which one or more of the following option(s) define(s) regular language(s)?
Consider the database transactions T1 and T2, and data items X and Y. Transaction T1: R1(X), W1(Y), R1(X), W1(X), COMMIT(T1) Transaction T2: W2(X), W2(Y), COMMIT(T2) Which of the schedule(s) is/are conflict serializable?
Consider the following relational schema: Students (rollno: integer, name: string, age: integer, cgpa: real) Courses (courseno: integer, cname: string, credits: integer) Enrolled (rollno: integer, 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?
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)
A 5-stage instruction pipeline has stage delays of 180, 250, 150, 170, and 250, respectively, in nanoseconds. The delay of an inter-stage latch is 10 nanoseconds. Assume that there are no pipeline stalls due to branches and other hazards. The time taken to process 1000 instructions in microseconds is __________. (rounded off to two decimal places)
In a B+ tree where each node can hold at most four key values, a root to leaf path consists of the following nodes: A = (49, 77, 83, -), B = (7, 19, 33, 44), C = (20*, 22*, 25*, 26*) The *-marked keys signify that these are data entries in a leaf. Assume that a pointer between keys k1 and k2 points to a subtree containing keys in [k1, k2), and that when a leaf is created, the smallest key in it is copied up into its parent. A record with key value 23 is inserted into the B+ tree. The smallest key value in the parent of the leaf that contains 25* is __________. (Answer in integer)
A computer system supports a logical address space of 2³² bytes. It uses two-level hierarchical paging with a page size of 4096 bytes. A logical address is divided into a b-bit index to the outer page table, an offset within the page of the inner page table, and an offset within the desired page. Each entry of the inner page table uses eight bytes. All the pages in the system have the same size. The value of b is ___________. (Answer in integer)
Consider the following algorithm someAlgo that takes an undirected graph G as input. someAlgo(G) 1. Let v be any vertex in G. Run BFS on G starting at v. Let u be a vertex in G at maximum distance from v as given by the BFS. 2. Run BFS on G again with u as the starting vertex. Let z be the vertex at maximum distance from u as given by the BFS. 3. Output the distance between u and z in G. The output of someAlgo(T) for the tree T is ___________. (Answer in integer) Tree T has 14 vertices, named a to n here, and these 13 edges: a-c, c-d, c-e, b-e, e-h, h-l, e-i, i-m, i-n, i-g, g-f, g-j, j-k.
Let Σ = {1, 2, 3, 4}. For x in Σ*, let prod(x) be the product of symbols in x modulo 7. We take prod(ε) = 1, where ε is the null string. For example, prod(124) = (1 × 2 × 4) mod 7 = 1. Define L = {x ∈ Σ* | prod(x) = 2}. The number of states in a minimum state DFA for L is ___________. (Answer in integer)
An application executes 6.4 × 10⁸ number of instructions in 6.3 seconds. There are four types of instructions, the details of which are given in the table. The duration of a clock cycle in nanoseconds is _________. (rounded off to one decimal place) Instruction type | CPI | Number of instructions executed Branch | 2 | 2.25 × 10⁸ Load | 5 | 1.20 × 10⁸ Store | 4 | 1.65 × 10⁸ Arithmetic | 3 | 1.30 × 10⁸
Consider the following C program: #include <stdio.h> int main(){ int a; int arr[5] = {30,50,10}; int *ptr; ptr = &arr[0] + 1; a = *ptr; (*ptr)++; ptr++; printf("%d", a + (*ptr) + arr[1]); return 0; } The output of the above program is ___________. (Answer in integer)
Consider the following C program: #include <stdio.h> int g(int n) { return (n+10); } int f(int n) { return g(n*2); } int main() { int sum, n; sum=0; for (n=1; n<3; n++) sum += g(f(n)); printf ("%d", sum); return 0; } The output of the given C program is ________. (Answer in integer)
A quadratic polynomial (x - α)(x - β) over complex numbers is said to be square invariant if (x - α)(x - β) = (x - α²)(x - β²). Suppose from the set of all square invariant quadratic polynomials we choose one at random. The probability that the roots of the chosen polynomial are equal is __________. (rounded off to one decimal place)
The unit interval (0, 1) is divided at a point chosen uniformly distributed over (0, 1) in ℝ into two disjoint subintervals. The expected length of the subinterval that contains 0.4 is ___________. (rounded off to two decimal places)