Find the number of ways of arranging the numbers 1,2 ,3, 4, 5, 6, 7, 8, 9 in a row so that the product of any two adjacent numbers is even.
For two numbers to have an even product, at least one of them must be even.
That is, an odd number can never be adjacent to another odd number.
So, odds and evens have to alternate, such as the example shown in the problem.
Furthermore, since there are more odd numbers, the first number has to be odd.
There are five odd numbers, and five positions into which they can be situated.
So, there are 5 • 4 • 3 • 2 • 1 = 120 ways the odd numbers can be arranged.
And, there are four even numbers, and four positions where they can be located.
So, there are 4 • 3 • 2 • 1 = 24 ways that the even numbers can be arranged.
Any even number arrangement can be combined with any odd number arrangement.
Therefore, the number of possible mixes is 120 • 24 = 2880.
.