Solveeit Logo

Question

Question: How many 6 digit number can be formed using digit 1,2, 3, 4 so that no 2 consecutive digits are same...

How many 6 digit number can be formed using digit 1,2, 3, 4 so that no 2 consecutive digits are same in the number and each digit (1, 2, 3, 4) should used at least once in the number.

Answer

600

Explanation

Solution

The problem asks for the number of 6-digit numbers formed using the digits {1, 2, 3, 4} such that no two consecutive digits are the same and each digit is used at least once.

The number has 6 digits and uses 4 distinct digits. Since each digit must be used at least once, the sum of the frequencies of the four digits must be 6, with each frequency being at least 1. Let the frequencies of the digits 1, 2, 3, 4 be n1,n2,n3,n4n_1, n_2, n_3, n_4. n1+n2+n3+n4=6n_1 + n_2 + n_3 + n_4 = 6, where ni1n_i \ge 1. Let mi=ni10m_i = n_i - 1 \ge 0. Then (m1+1)+(m2+1)+(m3+1)+(m4+1)=6(m_1+1) + (m_2+1) + (m_3+1) + (m_4+1) = 6, which simplifies to m1+m2+m3+m4=2m_1 + m_2 + m_3 + m_4 = 2. The possible non-negative integer solutions for (m1,m2,m3,m4)(m_1, m_2, m_3, m_4) up to permutation are (2, 0, 0, 0) and (1, 1, 0, 0). These correspond to the frequency distributions (3,1,1,1)(3, 1, 1, 1) and (2,2,1,1)(2, 2, 1, 1) for the digits.

Case 1: The digits used are of the form {a, a, a, b, c, d}, where a, b, c, d are distinct digits from {1, 2, 3, 4}. There are (41)=4\binom{4}{1} = 4 ways to choose the digit 'a' that appears 3 times. The other three digits {b, c, d} are then determined. For example, if a=1, the digits are {1, 1, 1, 2, 3, 4}. We need to arrange these 6 digits such that no two consecutive digits are the same. Since b, c, and d are distinct from each other and from a, the only possible consecutive identical digits would be 'aa'. So, the condition simplifies to arranging {a, a, a, b, c, d} such that no two 'a's are consecutive. Let the 6 positions be P1,P2,P3,P4,P5,P6P_1, P_2, P_3, P_4, P_5, P_6. We place the 3 non-'a' digits (b, c, d) first. There are 3!=63! = 6 ways to arrange b, c, d in 3 chosen positions. The remaining 3 positions must be filled by 'a'. For no two 'a's to be consecutive, they must be separated by at least one non-'a' digit. Let's place the 3 non-'a' digits. This creates 4 possible spaces where the 'a's can be placed: _X1_X2_X3_\_ X_1 \_ X_2 \_ X_3 \_. To ensure no two 'a's are consecutive, each 'a' must be placed in a different space. We need to choose 3 of these 4 spaces for the three 'a's. The number of ways to choose these 3 spaces is (43)=4\binom{4}{3} = 4. Once the spaces are chosen, the 'a's are placed in them. For example, if we choose the 1st, 2nd, and 3rd spaces, the arrangement looks like aX1aX2aX3a X_1 a X_2 a X_3. The 6th position is the 4th space, which is empty of 'a'. Let's consider the positions. We have 6 positions. We need to choose 3 positions for the non-'a' digits (b, c, d) and 3 positions for the 'a' digits. Let's choose the positions for 'a' first. Let the positions of 'a' be p1<p2<p3p_1 < p_2 < p_3. For no two 'a's to be consecutive, p2p12p_2 - p_1 \ge 2 and p3p22p_3 - p_2 \ge 2. Let q1=p1q_1 = p_1, q2=p21q_2 = p_2 - 1, q3=p32q_3 = p_3 - 2. Then 1q1<q21<q3262=41 \le q_1 < q_2 - 1 < q_3 - 2 \le 6 - 2 = 4. So 1q1<q21<q3241 \le q_1 < q_2 - 1 < q_3 - 2 \le 4. Let r1=q1r_1 = q_1, r2=q21r_2 = q_2 - 1, r3=q32r_3 = q_3 - 2. Then 1r1<r2<r341 \le r_1 < r_2 < r_3 \le 4. The number of ways to choose 3 distinct numbers from {1, 2, 3, 4} is (43)=4\binom{4}{3} = 4. The possible sets of positions {p1,p2,p3}\{p_1, p_2, p_3\} for 'a' are {1,3,5},{1,3,6},{1,4,6},{2,4,6}\{1, 3, 5\}, \{1, 3, 6\}, \{1, 4, 6\}, \{2, 4, 6\}. For each set of positions for 'a', the remaining 3 positions are for b, c, d. There are 3!=63! = 6 ways to arrange b, c, d in these 3 positions. For example, if positions for 'a' are {1, 3, 5}, the arrangement is a_a_a_a\_a\_a\_. The positions {2, 4, 6} are filled by b, c, d in 3!3! ways, e.g., abacad. In such an arrangement, consecutive digits are (a,b), (b,a), (a,c), (c,a), (a,d). Since a, b, c, d are distinct, no consecutive digits are the same. Thus, for a fixed set of digits {a, a, a, b, c, d}, the number of valid arrangements is (43)×3!=4×6=24\binom{4}{3} \times 3! = 4 \times 6 = 24. Since there are 4 choices for the digit 'a', the total number of valid arrangements in Case 1 is 4×24=964 \times 24 = 96.

Case 2: The digits used are of the form {a, a, b, b, c, d}, where a, b, c, d are distinct digits from {1, 2, 3, 4}. There are (42)=6\binom{4}{2} = 6 ways to choose the two digits {a, b} that appear twice. The remaining two digits {c, d} appear once. For example, if {a, b} = {1, 2}, the digits are {1, 1, 2, 2, 3, 4}. We need to arrange these 6 digits such that no two consecutive digits are the same. Let the digits be {a, a, b, b, c, d}. Total permutations are 6!2!2!1!1!=7204=180\frac{6!}{2!2!1!1!} = \frac{720}{4} = 180. Let SS be the set of all permutations. Let AaA_a be the set of permutations where 'aa' occurs. Treat 'aa' as a block. We permute {(aa), b, b, c, d}. Number of permutations is 5!2!1!1!1!=1202=60\frac{5!}{2!1!1!1!} = \frac{120}{2} = 60. Let AbA_b be the set of permutations where 'bb' occurs. Treat 'bb' as a block. We permute {a, a, (bb), c, d}. Number of permutations is 5!2!1!1!1!=1202=60\frac{5!}{2!1!1!1!} = \frac{120}{2} = 60. Let Aaa,bbA_{aa,bb} be the set of permutations where 'aa' and 'bb' occur. Treat 'aa' and 'bb' as blocks. We permute {(aa), (bb), c, d}. Number of permutations is 4!=244! = 24. The number of permutations with at least one pair of consecutive identical digits is AaAb=Aa+AbAaAb=60+6024=96|A_a \cup A_b| = |A_a| + |A_b| - |A_a \cap A_b| = 60 + 60 - 24 = 96. The number of permutations where no two consecutive digits are the same is SAaAb=18096=84|S| - |A_a \cup A_b| = 180 - 96 = 84. For each of the 6 choices of {a, b}, there are 84 such arrangements. So, the total number of valid arrangements in Case 2 is 6×84=5046 \times 84 = 504.

The total number of 6-digit numbers satisfying the conditions is the sum of the numbers from Case 1 and Case 2. Total = 96+504=60096 + 504 = 600.

The final answer is 600\boxed{600}.