Recommended textbooks for you Algebra & Trigonometry with Analytic Geometry College Algebra (MindTap Course List) Author:R. David Gustafson, Jeff Hughes Publisher:Cengage Learning Algebra: Structure And Method, Book 1 Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole Publisher:McDougal Littell College Algebra College Algebra Publisher:Cengage Learning Algebra & Trigonometry with Analytic Geometry ISBN:9781133382119 Author:Swokowski Publisher:Cengage College Algebra (MindTap Course List) ISBN:9781305652231 Author:R. David Gustafson, Jeff Hughes Publisher:Cengage Learning Algebra: Structure And Method, Book 1 ISBN:9780395977224 Author:Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole Publisher:McDougal Littell College Algebra ISBN:9781938168383 Author:Jay Abramson Publisher:OpenStax College Algebra ISBN:9781337282291 Author:Ron Larson Publisher:Cengage Learning
We interpret "number" as meaning a string of digits, so the problem asks us to find the number of five-digit strings taken from $\{0,1,3,4,5,7,9\}$ which contain at least one $0$, at least one $4$, and at least one $5$. It's possible for such a string to start with $0$. (This is contrary to the usual terminology in combinatorics, where a "number" cannot start with $0$.) We will use the Principle of Inclusion and Exclusion. Without the restriction on the required digits, there are $N=7^5$ five-digit strings taken from the given set of digits. Let's say a five-digit string has "Property $i$" if it does not contain the digit $i$, for $i\in \{0,4,5\}$, and define $S_j$ as the number of strings with $j$ of the properties, for $j = 1,2,3$. To compute $S_j$, note that the $j$ omitted digits can be chosen in $\binom{3}{j}$ ways, and then there are $(7-j)^5$ ways to arrange the remaining $7-j$ digits in a string of length $5$, so $$S_j = \binom{3}{j}(7-j)^5$$ By inclusion / exclusion, the number of five-digit strings with none of the properties, i.e. the number of strings with at least one each of $0,4$ and $5$, is $$N-S_1+S_2-S_3 = \boxed{1830}$$ If we adopt the convention that the number cannot start with $0$ then a solution by inclusion / exclusion is still possible, but it's more complicated. |