GATE 2003
107 questions
MCQ 1071-mark 107
Questions 16–20 of 107
Let = {a, b, c, d, e} be an alphabet. We define an encoding scheme as follows : g(a) = 3, g(b) = 5, g(c) = 7, g(d) = 9, g(e) = 11.
Let denote the i-th prime number ().
For a non-empty string , where each , define .
For a non-empty sequence of strings from ,
define
Which of the following numbers is the encoding, h, of a non-empty sequence of strings?
Let denote the i-th prime number ().
For a non-empty string , where each , define .
For a non-empty sequence of strings from ,
define
Which of the following numbers is the encoding, h, of a non-empty sequence of strings?
Answer: (B)
Every is odd and at least 3. So for a string s, has the factor with , so f(s) is always a multiple of 8.
In , each exponent is some f value, so each exponent must be a multiple of 8, and the primes used must be consecutive from 2 (2, 3, 5, ...) with no prime skipped, since every exponent is at least 8.
(A) exponent 7 is not a multiple of 8, so no. (C) exponent 9 is not a multiple of 8, so no. (D) uses primes 2, 5, 7 and skips 3, and 10 is not a multiple of 8, so no.
(B) exponent 8 works: for the string "a", . So is h of the sequence ("a", "a", "a").
Answer: (B)
In , each exponent is some f value, so each exponent must be a multiple of 8, and the primes used must be consecutive from 2 (2, 3, 5, ...) with no prime skipped, since every exponent is at least 8.
(A) exponent 7 is not a multiple of 8, so no. (C) exponent 9 is not a multiple of 8, so no. (D) uses primes 2, 5, 7 and skips 3, and 10 is not a multiple of 8, so no.
(B) exponent 8 works: for the string "a", . So is h of the sequence ("a", "a", "a").
Answer: (B)
m identical balls are to be placed in n distinct bags. You are given that m kn, where k is a natural number 1. In how many ways can the balls be placed in the bags if each bag must contain at least k balls?
Answer: (B)
Each bag needs at least balls. So first put balls in every bag. This uses balls.
Now the number of balls left is .
Next, use the balls sticks method
There are bags, so variables. Their sum must be . There is no limit on the balls in each bag
Solving this, we get
Correct Answer:
Now the number of balls left is .
Next, use the balls sticks method
There are bags, so variables. Their sum must be . There is no limit on the balls in each bag
Solving this, we get
Correct Answer:
n couples are invited to a party with the condition that every husband should be accompanied by his wife. However, a wife need not be accompanied by her husband. The number of different gatherings possible at the party is
Answer: (B)
For one couple, there are these cases:
- only the wife comes
- the husband and wife both come
- neither of them comes
So each couple has choices. For all n couples, we get
Correct Answer:
Let A be a sequence of 8 distinct integers sorted in ascending order. How many distinct pairs of sequences, B and C are there such that
(i) each is sorted in ascending order,
(ii) B has 5 and C has 3 elements, and
(iii) the result of merging B and C gives A?
(i) each is sorted in ascending order,
(ii) B has 5 and C has 3 elements, and
(iii) the result of merging B and C gives A?
Answer: (C)
Every valid pair (B, C) comes from choosing which 3 elements of A go into C. The other 5 elements go into B. Each of B and C must be sorted, and A is already sorted with distinct elements, so each one is in a fixed order: choosing the 3 elements fixes both sequences, and different choices give different pairs. Merging B and C then gives back A.
The number of ways to choose 3 of 8 elements is
.
(Choosing the 5 elements for B first gives , the same.)
Answer: (C)
The number of ways to choose 3 of 8 elements is
.
(Choosing the 5 elements for B first gives , the same.)
Answer: (C)
A program consists of two modules executed sequentially. Let f1(t) and f2(t) respectively denote the probability density functions of time taken to execute the two modules. The probability density function of the overall time taken to execute the program is given by
Answer: (C)
Let and be the execution times of the two modules, with pdfs and . They run one after the other, so the total time is . Assume the two times are independent.
If the first module takes , the second must take . Execution times are not negative, so runs from 0 to . Adding over all gives the convolution of the two pdfs:
Option (A) adds the pdfs, which gives total area 2. Option (B) multiplies at the same point, and (D) takes a maximum of two density values. Neither describes a sum of two times.
Answer: (C)
If the first module takes , the second must take . Execution times are not negative, so runs from 0 to . Adding over all gives the convolution of the two pdfs:
Option (A) adds the pdfs, which gives total area 2. Option (B) multiplies at the same point, and (D) takes a maximum of two density values. Neither describes a sum of two times.
Answer: (C)