In the book titled 'Combinatorics- A Guided Tour' by David Majur', there is stated on pg. #20, the problem, as also stated below.
How many $8$ char. passwords are there if each character is either an uppercase letter $A-Z$, a lowercase letter $a-z$, or a digit $0-9$, & where at least one uppercase & at least one lowercase letter are used.
The shorter, easier & usual approach is to use the Inclusion - exclusion principle, & take help by taking complements, as below:
Take the complement of the case of : 'at least one upper-case letter' & 'at least one lower-case letter'.
This leads to: $B ∪ C$; with $B$ = 'no upper-case letter'; $C$ = 'no lower-case letter'.
So, need take difference from the set of all possible passwords, leading to : $|A| - |B∪C|$.
Now, taking by inclusion-exclusion principle, the fact:
$|B∪C|= |B|+|C|-|B∩C|$, leading to $|A| - |B|-|C|+|B∩C|$.
The values of $|A|, |B|, |C|, |B∩C|$ are:
$|A|= 62^8, |B|=36^8, |C|=36^8, |B∩C|=10^8$.
$|A| - |B|-|C|+|B∩C| = 62^8 - 36^8 - 36^8 + 10^8 = 212,697,985,769,984.$
I wanted alternate approach that computes the actual passwords by applying product rule for each case, & then applying sum rule for adding up the different cases as shown below; but am unable to get the correct answer as shown below:
The cases are :
(a) At least one digit is there, e.g. 1Uppercase-1Lowercase-6Digit, denoted by 1U1L6D. All the options are:
(i)
$1U1L6D = 26^2\cdot 10^6$, permutations :
$$1U2L5D, 2U1L5D = 26^3\cdot 10^5$$
$$1U3L4D, 3U1L4D = 26^4\cdot 10^4$$
$$1U4L3D, 4U1L3D = 26^5\cdot 10^3$$
$$1U5L2D, 5U1L2D = 26^6\cdot 10^2$$
$$1U6L1D, 6U1L1D = 26^7\cdot 10^1$$
=> $26^2\cdot 10^6+2\cdot (26^3\cdot 10^5 + 26^4\cdot 10^4 + 26^5\cdot 10^3 + 26^6\cdot 10^2 + 26^7\cdot 10^1)$
=> $259,512,830,720$
(b) No digit is there. All the options are:
$$1U7L, 7U1L = 26^8$$
$$2U6L, 6U2L = 26^8$$
$$3U5L, 5U3L = 26^8$$
$$4U4L = 26^8$$
$$5U3L, 3U5L = 26^8$$
$$6U2L, 2U6L = 26^8$$
$$7U1L, 1U7L = 26^8$$
=> $26^8\cdot 13 = 2,714,751,839,488$
The sum of the above two cases is: $259,512,830,720 + 2,714,751,839,488 = 2,974,264,670,208$.
Update : The responses have been incorporated in the below update:
(a) At least one digit is there, e.g. 1Uppercase-1Lowercase-6Digit, denoted by 1U1L6D. All the options are:
(i)
$1U1L6D :$ sel. positns.:$\binom{8}{1,1,6}$, ordering$ = 26^2\cdot 10^6$, permutations : $\binom{8}{1,1,6}26^2\cdot 10^6$,
$1U2L5D, 2U1L5D :$ sel. positns.:$\binom{8}{1,2,5}$, ordering$= 26^3\cdot 10^5$, permutations : $\binom{8}{1,2,5}26^3\cdot 10^5$,
$1U3L4D, 3U1L4D :$ sel. positns.:$\binom{8}{1,3,4}$, ordering$= 26^4\cdot 10^4$, permutations : $\binom{8}{1,3,4}26^4\cdot 10^4$,
$1U4L3D, 4U1L3D :$ sel. positns.:$\binom{8}{1,3,4}$, ordering$= 26^5\cdot 10^3$, permutations : $\binom{8}{1,3,4}26^5\cdot 10^3$,
$1U5L2D, 5U1L2D :$ sel. positns.:$\binom{8}{1,2,5}$, ordering$= 26^6\cdot 10^2$, permutations : $\binom{8}{1,2,5}26^6\cdot 10^2$,
$1U6L1D, 6U1L1D $ sel. positns.:$\binom{8}{1,1,6}$, ordering$= 26^7\cdot 10^1$, permutations : $\binom{8}{1,1,6}26^7\cdot 10^1$,
=> $\binom{8}{1,1,6}26^2\cdot 10^6 + 2\cdot (\binom{8}{1,2,5}26^3\cdot 10^5 + \binom{8}{1,3,4}26^4\cdot 10^4 + \binom{8}{1,3,4}26^5\cdot 10^3 + \binom{8}{1,2,5}26^6\cdot 10^2 + \binom{8}{1,1,6}26^7\cdot 10^1)$
==> $56\cdot 26^2\cdot 10^6$ + $2\cdot (168\cdot 26^3\cdot 10^5 + 0\cdot 26^4\cdot 10^4 + 280\cdot 26^5\cdot 10^3 + 168\cdot 26^6\cdot 10^ + 56\cdot 26^7\cdot 10^1)$
===> 37856000000+ $2\cdot (295276800000 + 1919299200000 + 3326785280000 + 5189785036800 + 4497813698560)$
====>$30,495,776,030,720$
$2U2L4D :$ sel. positns.:$\binom{8}{2,2,4}$, ordering$ = 26^4\cdot 10^4$, permutations : $\binom{8}{2,2,4}26^4\cdot 10^4$,
$2U3L3D, 3U2L3D :$ sel. positns.:$\binom{8}{3,2,3}$, ordering$= 26^5\cdot 10^3$, permutations : $\binom{8}{3,2,3}26^5\cdot 10^3$,
$2U4L2D, 4U2L2D :$ sel. positns.:$\binom{8}{2,2,4}$, ordering$= 26^6\cdot 10^2$, permutations : $\binom{8}{2,2,4}26^6\cdot 10^2$,
$2U5L1D, 5U2L1D :$ sel. positns.:$\binom{8}{1,2,5}$, ordering$= 26^7\cdot 10^1$, permutations : $\binom{8}{1,2,5}26^7\cdot 10^1$,
=> $\binom{8}{2,2,4}\cdot 26^4\cdot 10^4 + 2\cdot (\binom{8}{3,2,3}26^5\cdot 10^3 + \binom{8}{2,2,4}26^6\cdot 10^2 + \binom{8}{1,2,5}26^7\cdot 10^1)$
==> $420\cdot 26^4\cdot 10^4 +2\cdot ( 560\cdot 26^5\cdot 10^3 + 420\cdot 26^6\cdot 10^2 + 168\cdot 26^7\cdot 10^1)$
===> $1919299200000+ 2\cdot (6653570560000 + 12974462592000 + 22489068492800)$
====> $86153502489600$
$3U3L2D :$ sel. positns.:$\binom{8}{2,3,3}$, ordering$ = 26^6\cdot 10^2$, permutations : $\binom{8}{2,3,3}26^6\cdot 10^2$,
$3U4L1D, 4U3L1D :$ sel. positns.:$\binom{8}{3,4,1}$, ordering$= 26^7\cdot 10^1$, permutations : $\binom{8}{3,4,1}26^7\cdot 10^1$,
=> $560\cdot 26^6\cdot 10^2 + 2\cdot (280\cdot 26^7\cdot 10^1)$
==> $560\cdot (30891577600 + 80318101760)$
===> $560\cdot (111209679360) = 62277420441600$
Sum of all cases' counts in (a) : $178926698961920$
(b) No digit is there. All the options are:
$1U7L, 7U1L :$ sel. positns.:$\binom{8}{1,7}$, ordering$ = 26^8$, permutations : $\binom{8}{1,7}\cdot 26^8$,
$2U6L, 6U2L :$ sel. positns.:$\binom{8}{2,6}$, ordering$ = 26^8$, permutations : $\binom{8}{2,6}\cdot 26^8$,
$3U5L, 5U3L :$ sel. positns.:$\binom{8}{3,5}$, ordering$ = 26^8$, permutations : $\binom{8}{3,5}\cdot 26^8$,
$4U4L :$ sel. positns.:$\binom{8}{4,4}$, ordering$ = 26^8$, permutations : $\binom{8}{4,4}\cdot 26^8$,
$5U3L, 3U5L :$ sel. positns.:$\binom{8}{3,5}$, ordering$ = 26^8$, permutations : $\binom{8}{3,5}\cdot 26^8$,
$6U2L, 2U6L :$ sel. positns.:$\binom{8}{2,6}$, ordering$ = 26^8$, permutations : $\binom{8}{2,6}\cdot 26^8$,
$7U1L, 1U7L :$ sel. positns.:$\binom{8}{1,7}$, ordering$ = 26^8$, permutations : $\binom{8}{1,7}\cdot 26^8$,
=> $4\cdot(\binom{8}{1,7}\cdot 26^8 + \binom{8}{2,6}\cdot 26^8 + \binom{8}{3,5}\cdot 26^8) + (\binom{8}{4,4}\cdot 26^8)$
==> $4\cdot(8\cdot 26^8 + 28\cdot 26^8 + 56\cdot 26^8) + (70\cdot 26^8)$
===> $4\cdot(1670616516608 + 5847157808128+ 11694315616256) + (14617894520320)$
====> $4\cdot (19212089940992) + 14617894520320= 76848359763968 + 14617894520320 = 91466254284288$
Sum of all cases' counts in (a) & (b) : $270,392,953,246,208$
Still mismatch is there as the sum crosses the correct value by $57,694,967,476,224$.