The number of 5-digit numbers of the form abcde where a,b,c,d,e belong to ${0,1,2,...9}$ and $b = a + c$, $d = c + e $ are?

I tried to reason out that out of the 5 digits we need to choose only $3$, that is $a,c$, and $e$, while $b$ and $d$ will become fixed on the basis of those. Now, we also need to satisfy $a + c ≤ 9$ and $c + e ≤ 9$. Solving the former equation gives us some pairs of $a$ and $c$. But, this fixes c, I cannot do the same thing with the latter equation. It just seems like a intertwined puzzle I can't get hold of from any end.

I may also add the solution given to this problem: Solution

I don't understand what they are trying to do here exactly.

  • $\begingroup$ It's $a+c\leq 9$ and $c + e \leq 9$, I think. $\endgroup$
    – Arthur
    Apr 29 '19 at 12:43
  • $\begingroup$ Why not choose $c$ first and then $b, d \ge c$ $\endgroup$ Apr 29 '19 at 12:44
  • $\begingroup$ @MarkBennet You suggest drawing a tree? $\endgroup$
    – Iceberry
    Apr 29 '19 at 12:45
  • 1
    $\begingroup$ Keep in mind that $a\neq 0$ or you wouldn't technically have $5$ digits. $\endgroup$ Apr 29 '19 at 12:47
  • $\begingroup$ Given a value of $c$, we can choose $b$ in $9-c$ ways ($a\gt 0$ so $c$ itself is not allowed) and $d$ in $10-c$ ways which replicates the solution given. $\endgroup$ Apr 29 '19 at 14:35

For each choice of $c$, there are $10-c$ choices for $d$ (any of $c,\dots,9$), and $9-c$ for $a$ ($b$ and $e$ are determined). So $(10-c)(9-c)$ choices. Hence the sum.

  • $\begingroup$ But $a$ can't be zero , so wouldn't those $(9-c)$ cases contain cases in which $a=0$ ?? $\endgroup$
    – Advil Sell
    Apr 29 '19 at 13:19
  • 2
    $\begingroup$ That case has been accounted for. That's why it's $(10-c)(9-c)$ instead of $(10-c)(10-c)$. $\endgroup$
    – user403337
    Apr 29 '19 at 14:29
  • $\begingroup$ Perhaps view it as $\sum_{c=0}^9 c(c+1)$: $c+1$ choices for $d$, and $c$ choices for $a$. Actually, I think I had written $(10-c)$ choices for $a$. It should be $(9-c)$. I have edited. $\endgroup$
    – user403337
    Apr 29 '19 at 14:42
  • $\begingroup$ I see , thanks ^_^ $\endgroup$
    – Advil Sell
    Apr 29 '19 at 15:11

If $c=0$, then depending of $b \neq 9$(because $a$ cannot be $0$), $a$ could be from $1$ to $9$. And depending on $d$, $e$ could be from $0$ to $9$. So that is $9*10$ possibilities. For $c=1$, $a$ could go from $1$ to $8$ and $e$ could go from $0$ to $8$ for $8*9$ possibilities by similar argument. We do this for $c=0$ to $c=9$ to get the above formula.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.