Mathematics Asked by math14 on December 10, 2021
I need to compute the following (this is not a homework or etc. just a personal curiosity). How many $7$-digit numbers can be generated with numbers in $S={1,2,3,4}$ such that all of the numbers in $S$ are used at least once?
How many $7$-digit numbers can be generated with numbers in $S={1,2,3,4}$ such that all of the numbers in $S$ are used at least once?
By the Inclusion–exclusion principle: $$underbrace{4^7}_{text{All numbers that can be formed by }1,2,3,4}-underbrace{left[{4choose 1}3^7-{4choose 2}2^7+{4choose 3}1^7right]}_{text{Numbers not having at least one of }1,2,3,4}=8400$$
Answered by Sameer Baheti on December 10, 2021
By a brute-force counting algorithm, I obtained a total of $8400$ 7-digit numbers that can be generated with the digits in $S={1,2,3,4}$ such that all of the digits are used at least once.
A possible combinatory solution for this problem is as follows. Once the four digits from $1$ to $4$ have been placed in some positions within our number, there remain three other places $A_1,A_2,A_3$ that can be filled with any digits. We have to consider different cases for this triple.
$$4binom 743!=840$$
$$4binom 42 binom 73 binom 42=5040$$
$$4 binom 72 binom 52 binom 32=2520$$
Collecting all the results we get that, as expected on the basis of the brute-force counting, the searched total number is
$$840+5040+2520=8400$$
corresponding to $approx 51.3%$ of all $4^7=16384$ possible $7$-digit numbers obtainable with the digits from $1$ to $4$.
Answered by Anatoly on December 10, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP