[Math] Number of 6-digit passwords, starting with even or ending with odd digit

combinatoricsdiscrete mathematics

My problem is

A password consists of six digits, each in $\{0,\ldots,9\}$
How many passwords start with an even digit or end with an odd digit?

the answer is $750,000.$

I would like to know how exactly do you get $750,000$ as the answer?

Best Answer

Your set of passwords can be decomposed into three disjoint sets:

1) $2k,*, *, *, *, 2l$

2) $2k,*, *, *, *, 2l+1$

3) $2k+1,*, *, *, *, 2l+1$

In each one of these sets, there are $$ 5\cdot10^4\cdot5 $$ passwords.