The entry ticket to an exhibition can cost anywhere from 1p to 31p. You need…

2025

The entry ticket to an exhibition can cost anywhere from 1p to 31p. You need to be able to give exact change at the counter, and you have a single coin worth 31p. Into how many parts should you divide this 31p coin so that you can provide the exact change required for any amount from 1p to 31p, while carrying as few pieces as possible?

  1. A.

    4

  2. B.

    5

  3. C.

    6

  4. D.

    7

Attempted by 1 students.

Show answer & explanation

Correct answer: B

Concept: To form every whole value from 1 to N using the fewest possible parts, where each part can either be included or excluded from a payment, split N following the binary (base-2) progression — parts of value 2⁰, 2¹, 2², …, 2ᵏ⁻¹. With k such parts, every integer from 0 to (2ᵏ − 1) can be formed as the sum of a unique subset of them, since each part independently contributes or does not.

Application:

  1. Here N = 31, the value to be fully covered.

  2. Use the powers of 2 up to 16: 2⁰ = 1, 2¹ = 2, 2² = 4, 2³ = 8, 2⁴ = 16.

  3. Their sum is 1 + 2 + 4 + 8 + 16 = 31, using exactly 5 parts.

  4. Every subset of {1, 2, 4, 8, 16} sums to a distinct value, so every amount from 1p to 31p can be given as exact change using some combination of these 5 pieces.

Cross-check: Could fewer than 5 parts work? With n parts, each either present or absent in a payment, there are only 2ⁿ possible subset-sums (including the empty one), so at most (2ⁿ − 1) distinct positive values can be represented. For n = 4, that ceiling is 2⁴ − 1 = 15, which is not enough to reach every value up to 31. Only n = 5 gives 2⁵ − 1 = 31, exactly matching the required range, confirming that 5 is the true minimum.

Result: Hence 5 parts are required.

Explore the full course: Wipro Preparation