• S
    SwaseekhGATE Preparation
General
  • Dashboard
  • Syllabus
  • Questions
  • Aptitude
  • Mock Tests
  • TCS NQT 2026
Account
  • Pricing
  • Contact
  1. GATE CS
  2. PYQs
  3. Discrete Mathematics

Let Sigma = {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 p_i denote the i-th prime number (p_1 = 2). For a non-empty string s = a_1 ... a_n, where each a_i in Sigma, define f(s) = prod_{i=1}^{n} p_i^{g(a_i)}. For a non-empty sequence (s_1, ..., s_n) of strings from Sigma^+, define h((s_1, ..., s_n)) = prod_{i=1}^{n} p_i^{f(s_i)}. Which of the following numbers is the encoding, h, of a non-empty sequence of strings? A. 2^7 * 3^7 * 5^7 B. 2^8 * 3^8 * 5^8 C. 2^9 * 3^9 * 5^9 D. 2^10 * 3^10 * 5^10

GATE 2003 · Discrete Mathematics · Functions · medium

Answer: Only 2^8 * 3^8 * 5^8 has exponents equal to a valid f-value (8 = f('a')), so the answer is Option B.

  1. Find the smallest legal f-value: The single-letter string 'a' has f('a') = 2^{g(a)} = 2^3 = 8. Any string has at least one letter, so its f-value is at least 2^3 = 8, and every f-value is a product of primes raised to ODD exponents (the g-values 3,5,7,9,11). Thus 8 is the minimum f-value and is achievable.
  2. Test each option's exponents against valid f-values: Each option is 2^k * 3^k * 5^k, so we just need k to be a valid f(s). A: k = 7 is below 8 and is not of the form 2^(odd) * ..., so 7 is not an f-value -> invalid. B: k = 8 = 2^3 = f('a'), a genuine f-value -> the sequence (a, a, a) encodes to 2^8 * 3^8 * 5^8 -> VALID. C: k = 9 is not an f-value (f-values that are pure powers of 2 are 2^3=8, 2^5=32, ...; 9 is not among them) -> invalid. D: k = 10 is even, but an f-value that is a pure power of 2 must be 2^(odd); 10 is not, and 10 is not any other f-value -> invalid.