Skip to content

Tag Archives: GATE-GATE-CS-2004

Choose the best matching between the programming styles in Group 1 and their characteristics in Group 2.  Group-1  Group-2  P.  Functional  1.  Command-based, proce-dural  Q.… Read More
L1 is a recursively enumerable language over Σ. An algorithm A effectively enumerates its words as w1, w2, w3, … Define another language L2 over… Read More
Consider the following grammar G: S → bS | aA | b A → bA | aB B → bB | aS | a Let… Read More
The language {am bn Cm+n | m, n ≥ 1} is (A) regular (B) context-free but not regular (C) context sensitive but not context free… Read More
The following finite state machine accepts all those binary strings in which the number of 1’s and 0’s are respectively. (A) divisible by 3 and… Read More
A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function g(x) for each node… Read More
The recurrence equation T(1) = 1 T(n) = 2T(n - 1) + n, n ≥ 2 evaluates to (A) 2n + 1– n – 2… Read More
The time complexity of the following C function is (assume n > 0) int recursive (int n) {    if (n == 1)       return (1);    else… Read More
Let A[1, …, n] be an array storing a bit (1 or 0) at each location, and f(m) is a function whose time complexity is… Read More
Let G1 = (V, E1) and G2 = (V, E2) be connected graphs on the same vertex set V with more than two vertices. If… Read More
A point is randomly selected with uniform probability in the X-Y plane within the rectangle with corners at (0,0), (1,0), (1,2) and (0,2). If p… Read More
How many graphs on n labeled vertices exist which have at least (n2 – 3n)/2 edges ? (A) A (B) B (C) C (D) D… Read More
Two n bit binary strings, S1 and S2, are chosen randomly with uniform probability. The probability that the Hamming distance between these strings (the number… Read More
The minimum number of colours required to colour the following graph, such that no two adjacent vertices are assigned the same colour, is (A) 2… Read More
In an M’N matrix such that all non-zero entries are covered in a rows and b columns. Then the maximum number of non-zero entries, such… Read More