Skip to content
Get started

Codes with equal half-sums

HardCombinatorics8 min

A six-digit code d1d2d3d4d5d6d_1d_2d_3d_4d_5d_6 uses digits 00–99 (leading zeros allowed, so there are 10610^6 codes). Call it balanced if d1+d2+d3=d4+d5+d6d_1 + d_2 + d_3 = d_4 + d_5 + d_6. How many balanced codes are there?

Show hints (3)+
  1. Complement the last three digits (d→9−dd \to 9-d).
  2. Now count six digits with a single fixed sum.
  3. Stars and bars with inclusion-exclusion for digits above 9.

Answer

Reveal answer →

55252

Create a free account to see the full worked solution and track your progress.

Interview format: Numerical Reasoning Tests, Prop Trading

Related questions