# Tag Archives: GATE-GATE-CS-2005

Consider three decision problems P1, P2 and P3. It is known that P1 is decidable and P2 is undecidable. Which one of the following is… Read More
What is the minimum number of ordered pairs of non-negative numbers that should be chosen to ensure that there are two pairs (a, b) and… Read More
Let f: B → C and g: A → B be two functions and let h = f o g. Given that h is an… Read More
Let R and S be any two equivalence relations on a non-empty set A. Which one of the following statements is TRUE? (A) R ∪… Read More
What is the first order predicate calculus statement equivalent to the following? Every teacher is liked by some student (A) ∀(x) [teacher (x) → ∃… Read More
Let P, Q and R be three atomic prepositional assertions. Let X denote (P v Q) → R and Y denote (P → R) v… Read More
Suppose there are ⌈ log n ⌉ sorted lists of ⌊ n/log n ⌋ elements each. The time complexity of producing a sorted list of… Read More
Let G(V, E) an undirected graph with positive edge weights. Dijkstra’s single-source shortest path algorithm can be implemented using the binary heap data structure with… Read More
Suppose T(n) = 2T (n/2) + n, T(0) = T(1) = 1 Which one of the following is FALSE? (A) T(n) = O(n2) (B) T(n)… Read More
In a complete k-ary tree, every internal node has exactly k children. The number of leaves in such a tree with n internal nodes is… Read More
How many distinct binary search trees can be created out of 4 distinct keys? (A) 5 (B) 14 (C) 24 (D) 42 Answer: (B) Explanation:… Read More
A Priority-Queue is implemented as a Max-Heap. Initially, it has 5 elements. The level-order traversal of the heap is given below: 10, 8, 5, 3,… Read More
Postorder traversal of a given binary search tree T produces the following sequence of keys 10, 9, 23, 22, 27, 25, 15, 50, 95, 60,… Read More
Consider the following C-program: double foo (double); /* Line 1 */    int main() {        double da, db;        // input da        db… Read More
Consider the following C-program: void foo(int n, int sum) {   int k = 0, j = 0;   if (n == 0) return;     k = n… Read More