You want to send a message that contains 12 distinct signals and 45 spaces. You want that for any pair of signals in the message, there should be at least 3 spaces between them. How many different messages can you send?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
You want to send a message that contains 12 distinct signals and 45 spaces. You want that for any pair of signals in the message, there should be at least 3 spaces between them. How many different messages can you send?
Название |
---|
Let the number of blank spaces before the first signal be x0, the number of blank spaces between the first and second signal be x1, etc.
Then your problem is equivalent to counting number of solutions to equation x0 + x1 + x2 + ... + xn = T, where T is total number of blank spaces and xi ≥ 3 for all 0 < i < n. You can use variable yi = xi - 3 and get the number of integer solutions to x0 + y1 + y2 + ... + yn - 1 + xn = T - (n - 1) * 3, which is solvable by balls and urns.
As the signals are distinct, multiply by n! in the end.
So is the answer binomial coefficient of (24, 12) * 12!?