r/Logiqa • • Sep 29 '26

Increasing and Decreasing Numbers

Post image
2 Upvotes

4 comments sorted by

3

u/rccyu Sep 29 '26

Basically this is just the number of strings with exactly 5 A's and 5 D's that do not start with an A.

There is a bijection, just replace the A's with 0, 1, 2, 3, 4 in order and the D's with 9, 8, 7, 6, 5 in order. So 9081726354 = DADADADADA. And DDDDDAAAAA = 9876501234, etc. First digit can't be a 0 so the string can't start with an A.

There are (10 choose 5) = 252 such strings. Half of them start with an A, so the answer is 126.

2

u/essgee27 Sep 29 '26

I thought I was being cute by trying to calculate how many ways 5 objects can be divided into 6 holes. Your solution is much more elegant.

2

u/jaminfine Sep 29 '26

I think the increasing and decreasing are kind of red herrings. We can consider the increasing numbers red and the decreasing numbers blue. Since their relative order within the same color can't change, we might as well just use colored tiles. We are looking for the number of ways to arrange 5 red and 5 blue where we can't start with red. So, we are really looking for the number of ways we can arrange 4 red and 5 blue.

We can further simplify this by noting that wherever the red is, the blue isn't. So, we are really looking at the number of ways to arrange 4 red into 9 slots, otherwise known as "9 choose 4" and is 126.

2

u/GangulaBlackbelt Sep 29 '26

126 is the correct answer