I need help

Given a set {1;2;3;4;5}\{1;2;3;4;5\}, find the number of 5 digits numbers that none of its consecutive digits are equal to each other,. If possible, find the sum of them

#Combinatorics

Note by P C
4 years, 8 months ago

No vote yet
1 vote

  Easy Math Editor

This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science.

When posting on Brilliant:

  • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused .
  • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone.
  • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
  • Stay on topic — we're all here to learn more about math and science, not to hear about your favorite get-rich-quick scheme or current world events.

MarkdownAppears as
*italics* or _italics_ italics
**bold** or __bold__ bold

- bulleted
- list

  • bulleted
  • list

1. numbered
2. list

  1. numbered
  2. list
Note: you must add a full line of space before and after lists for them to show up correctly
paragraph 1

paragraph 2

paragraph 1

paragraph 2

[example link](https://brilliant.org)example link
> This is a quote
This is a quote
    # I indented these lines
    # 4 spaces, and now they show
    # up as a code block.

    print "hello world"
# I indented these lines
# 4 spaces, and now they show
# up as a code block.

print "hello world"
MathAppears as
Remember to wrap math in \( ... \) or \[ ... \] to ensure proper formatting.
2 \times 3 2×3 2 \times 3
2^{34} 234 2^{34}
a_{i-1} ai1 a_{i-1}
\frac{2}{3} 23 \frac{2}{3}
\sqrt{2} 2 \sqrt{2}
\sum_{i=1}^3 i=13 \sum_{i=1}^3
\sin \theta sinθ \sin \theta
\boxed{123} 123 \boxed{123}

Comments

Assuming that the given set is the set of digits we can use (with replacement) to form the 5-digit numbers, the number of such 5-digit numbers with no two consecutive digits equal to each other is equal to 5×44=12805\times 4^4=1280. The combinatorial argument here is constructive: We can select the first digit in 5 ways, then the second digit in 4 ways (excluding the first digit), the third digit in 4 ways (excluding the second digit) and so on till the 5th digit. By the rule of product, there are 12801280 such numbers.

Now, to find the sum of all such numbers, note that every digit appears exactly 44=2564^4=256 times at each digit-place among all such numbers. This can be proved easily using the argument used above. If we fix a digit at a digit-place, its adjacent digits can be chosen in 44 ways and their adjacent digits can also be chosen in 44 ways since we can't have adjacent digits equal to each other. Repeating this argument shows that for each fixed digit at a fixed digit place, there are exactly 256256 numbers having the said digit at the said digit-place.

Hence, by the rule of product, the sum is given by, 256(1+2+3+4+5)(104+103+102+10+1)=42666240256(1+2+3+4+5)(10^4+10^3+10^2+10+1)=42666240


To generalize this to some extent, if SS be the set of digits that can be used to make nn-digit numbers with no two consecutive digits equal to each other, then,

  • If 0S0\notin S, there are S×(S1)n1|S|\times (|S|-1)^{n-1} such numbers and their sum is given by, (S1)n1(kSk)(k=0n110k)=(S1)n1(10n1)(kSk)9 (|S|-1)^{n-1}\left(\sum_{k\in S}k\right)\left(\sum\limits_{k=0}^{n-1}10^k\right)=\frac{(|S|-1)^{n-1}(10^n-1)\left(\sum\limits_{k\in S}k\right)}9\\~\\

  • If 0S0\in S, then there are (S1)n(|S|-1)^n such numbers. I'm pretty sure that there's a closed form for their sum, but it gets a bit complicated for me. I'm still working on it. I'll edit this comment when I get the closed form.

Prasun Biswas - 4 years, 8 months ago
×

Problem Loading...

Note Loading...

Set Loading...