GATE CS 2010 · Maxima & Minima

MCQ · 2 marks · Problem EM-MAXM-0038

The weight of a sequence \(a_{0},a_{1},\ldots,a_{n-1}\) of real numbers is defined as \(a_{0}+a_{1}/2+\cdots+a_{n-1}/2^{n-1}\). A subsequence of a sequence is obtained by deleting some elements from the sequence, keeping the order of the remaining elements the same. Let \(X\) denote the maximum possible weight of a subsequence of \(a_{0},a_{1},\ldots,a_{n-1}\) and \(Y\) the maximum possible weight of a subsequence of \(a_{1},a_{2},\ldots,a_{n-1}\). Then \(X\) is equal to
  1. A
    max(Y,\(a_{0}\)+Y)
  2. B
    max(Y,\(a_{0}\)+Y/2)
  3. C
    max(Y,\(a_{0}\)+2Y)
  4. D
    \(a_{0}\)+Y/2

Solve it on GATE DA practice →More Optimization problems

Show the worked solution\[\boxed{X=\max\Big(\underbrace{Y}_{a_0\ \text{dropped}},\ \underbrace{a_0+\tfrac{Y}{2}}_{a_0\ \text{kept}}\Big)}\]If the best subsequence leaves out \(a_0\), it is a subsequence of \(a_1,\ldots,a_{n-1}\), so its weight is at most \(Y\) (and \(Y\) is achievable).If it keeps \(a_0\), then \(a_0\) is in position 0 and the rest \(b_0,b_1,\ldots\) (a subsequence of \(a_1,\ldots,a_{n-1}\)) moves one place right, so each term is halved: \(a_0+\tfrac{b_0}{2}+\tfrac{b_1}{4}+\cdots=a_0+\tfrac12(\text{weight of } b)\le a_0+\tfrac Y2\).Answer: B

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com