GATE / CS ARCHIVE

GATE CSE 2003 / QUESTION 39

Nested prime-power encoding

Discrete Mathematics · Proof Techniques & Number Theory · Full GATE CSE 2003 paper

GATE 2003, Q39 2 marks · MCQ
Report issue

Proof Techniques & Number Theory

Question 39, GATE 2003: Let Σ={a,b,c,d,e}, with g(a)=3,g(b)=5,g(c)=7,g(d)=9,g(e)=11, and let pᵢ be the ith prime (p₁=2). Encode a nonempty string s=a₁...aₙ by f(s)=product pᵢ^g(aᵢ), and a nonempty sequence of nonempty strings (s₁,...,sₘ) by h=product pᵢ^f(sᵢ). Which can be such an h? A. 2⁷3⁷5⁷; B. 2⁸3⁸5⁸; C. 2⁹3⁹5⁹; D. 2¹⁰5¹⁰7¹⁰.
Question 39, GATE 2003: Let Σ={a,b,c,d,e}, with g(a)=3,g(b)=5,g(c)=7,g(d)=9,g(e)=11, and let pᵢ be the ith prime (p₁=2). Encode a nonempty string s=a₁...aₙ by f(s)=product pᵢ^g(aᵢ), and a nonempty sequence of nonempty strings (s₁,...,sₘ) by h=product pᵢ^f(sᵢ). Which can be such an h? A. 2⁷3⁷5⁷; B. 2⁸3⁸5⁸; C. 2⁹3⁹5⁹; D. 2¹⁰5¹⁰7¹⁰.
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

1. Prime factorization makes the outer positions and exponents uniquely recoverable. Every inner nonempty string encoding begins with at least 2³, so it is divisible by 8. Thus exponents 7,9,10 cannot encode any inner string. Conversely exponent 8 is exactly f(a), and B uses consecutive outer primes with three such exponents.

2. A string encoding f(s) uses consecutive primes starting with 2, with exponents from{3,5,7,9,11}. In particular f(a)=2³=8. Therefore 28·38·58 is the sequence encoding of(a,a,a), so B. Exponents 7 and 9 are not valid nonempty string encodings because such encodings are divisible by 8. D skips prime 3 in the outer encoding and also uses exponent 10, which is invalid.

Original paper, page 5