swerve wrote:How many positive five-digit integers contain the digit grouping "57" (in that order) at least once? For instance, 30,457 and 20,574 are two such integers to include, but 30,475 and 20,754 do not meet the restrictions.
A. 279
B. 3,000
C. 3,500
D. 3,700
E. 4,000
Source: Manhattan Prep
The solution posted above is related to another problem (as mentioned).
Let´s solve the one originally proposed, in which there are double-counting´s to be dealt with!
$$?\,\,:\,\,5{\rm{ - digit}}\,\,{\rm{positive}}\,\,{\rm{integers}}\,\,{\rm{with}}\,\,57{\rm{ - block}}\left( {\rm{s}} \right)$$
$$\eqalign{
& \left( {\rm{1}} \right)\,\,\,\underline 5 \,\,\, \underline 7 \,\,\, \underline {} \,\,\, \underline {} \,\,\, \underline {} \,\,\,\,\, \to \,\,\,\,{10^3}\,\,{\rm{ways}} \,\, \cr
& \left( {\rm{2}} \right)\,\,\,\underline {{\rm{not}}\,0} \,\,\, \underline 5 \,\,\, \underline 7 \,\,\, \underline {} \,\,\, \underline {} \,\,\,\,\, \to \,\,\,\,9 \cdot {10^2}\,\,{\rm{ways}} \,\, \cr
& \left. \matrix{
\left( {\rm{3}} \right)\,\,\,\underline {{\rm{not}}\,0} \,\,\, \underline {} \,\,\, \underline 5 \,\,\, \underline 7 \,\,\, \underline {} \,\,\,\,\, \to \,\,\,\,9 \cdot {10^2}\,\,{\rm{ways}} \hfill \cr
\left( - \right)\,\,\,\underline {\rm{5}} \,\,\, \underline 7 \,\,\, \underline 5 \,\,\, \underline 7 \,\,\, \underline {} \,\,\,\,\, \to \,\,\,\,10\,\,{\rm{ways}} \hfill \cr} \right\}\,\,\,\, \to \,\,\,\,\,890\,\,{\rm{ways}} \,\, \cr
& \left. \matrix{
\left( {\rm{4}} \right)\,\,\,\underline {{\rm{not}}\,0} \,\,\, \underline {} \,\,\, \underline {} \,\,\, \underline 5 \,\,\, \underline 7 \,\,\,\,\, \to \,\,\,\,9 \cdot {10^2}\,\,{\rm{ways}} \hfill \cr
\left( - \right)\,\,\,\underline {{\rm{not}}\,0} \,\,\, \underline 5 \,\,\, \underline 7 \,\,\, \underline 5 \,\,\, \underline 7 \,\,\,\,\, \to \,\,\,\,9\,\,{\rm{ways}} \hfill \cr
\left( - \right)\,\,\,\underline 5 \,\,\, \underline 7 \,\,\, \underline {} \,\,\, \underline 5 \,\,\, \underline 7 \,\,\,\,\, \to \,\,\,\,10\,\,{\rm{ways}} \hfill \cr} \right\}\,\,\,\, \to \,\,\,\,\,881\,\,{\rm{ways}} \cr} $$
$$? = 1000 + 900 + 890 + 881 = 3671$$
The alternative choices are therefore all wrong.
This solution follows the notations and rationale taught in the GMATH method.
Regards,
Fabio.