Answer:
20,160
Explanation:
The arrangement of the 9 differently colored bead can be presented as follows;
Where 1 is the purple bead and 2 is the green bead, the number of ways of arrangement where the green bead cannot be adjacent to the green either horizontally, vertically, or diagonally
Placing the purple bead at 1, the location of the green bead = 3, 6, 7, 8, or 9
The number of ways = 5 ways × 7! ways of arranging the other beads
With the purple bead at 2, the location of the green bead = 7, 8, or 9
The number of ways = 3 × 7!
With the purple at 3, we also have 5 × 7! ways
At 4, similar to 2, we have, 3 × 7! ways
At 5, we have, 0 × 7!
At 6, we have 3 × 7!
For 7, 8, and 9, we have, (5 + 3 + 5) × 7!
The total number of ways = (5 + 3 + 5 + 3 + 0 + 3 + 5 + 3 + 5) × 7! ways
However, placing the purple bead at 1, 2, 3, 4, 6, 7, 8, and 9, (8 positions) can be taken as reflection and rotation of each other and can be considered the same
Therefore, the total number of acceptable ways = (5 + 3 + 5 + 3 + 0 + 3 + 5 + 3 + 5) × 7!/8 = 20,160 ways