GATE 2015 (Session 1)
65 questions
MCQ 45 · NAT 201-mark 30 · 2-mark 35
Questions 11–15 of 65
If and , then is:
Answer: (A)
Check each part:
- Find g(h(x)):
- Find h(g(x)):
The ratio:
Also, h(x)/g(x): , which is the same.
Answer:
- Find g(h(x)):
- Find h(g(x)):
The ratio:
Also, h(x)/g(x): , which is the same.
Answer:
is
Answer: (C)
Rewrite the term: , and the exponent goes to zero: as .
So the limit becomes: .
Answer: 1
So the limit becomes: .
Answer: 1
Match the following:
Answer: (C)
Match each item one by one:
- Prim's MST uses the greedy method (ii)
- Floyd-Warshall uses dynamic programming (iii)
- Mergesort uses divide and conquer (iv)
- Hamiltonian circuit uses backtracking (i)
Answer: P-ii, Q-iii, R-iv, S-i
- Prim's MST uses the greedy method (ii)
- Floyd-Warshall uses dynamic programming (iii)
- Mergesort uses divide and conquer (iv)
- Hamiltonian circuit uses backtracking (i)
Answer: P-ii, Q-iii, R-iv, S-i
Which one of the following is the recurrence equation for the worst case time complexity of the Quicksort algorithm for sorting n ( 2) numbers? In the recurrence equations given in the options below, c is a constant.
Answer: (B)
In the worst case, the pivot is the smallest or the largest element every time. So the two parts have sizes n1 and 1. Partitioning also takes linear work.
The recurrence is:
T(n) = T(n 1) + T(1) + cn
Answer: T(n) = T(n-1) + T(1) + cn
The recurrence is:
T(n) = T(n 1) + T(1) + cn
Answer: T(n) = T(n-1) + T(1) + cn
The height of a tree is the length of the longest root-to-leaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
Answer: (A)
Let us check each case:
- Maximum: a full binary tree with levels 0 to 5 has nodes.
- Minimum: one single path of 5 edges has 6 nodes.
Answer: 63 and 6
- Maximum: a full binary tree with levels 0 to 5 has nodes.
- Minimum: one single path of 5 edges has 6 nodes.
Answer: 63 and 6