How many hexadecimal chains of numbers of length 6 are there with an "A" in the first position or with "F" in the 3rd and 4th position or a "0" in the last position? Only chains of numbers with at least one hex value less than 9 should be counted. The or link is not exclusive.
My guess:
First I use "Inclusion-exclusion principle" for the ""A" in the first position or with "F" in the 3rd and 4th position or a "0" in the last position" $\rightarrow(A \cup B \cup C ) = |A| +|B|+|C|-|A \cap B| -|A \cap C|-|B \cap C| + |A \cap B \cap C|$
|A| = $16^{5}$
|B| = $16^{4}$
|C| = $16^{5}$
solution (formula): = $2089216$
Now I don't know how I can get the result for the "hex value less than 9".
I wrote a short program that gave me the solution of $2070352$, but as I said I don't know how I can get the right solution.
#sendhelp