Lance has a regular heptagon (7-sided figure). How many distinct ways can he label the vertices of the heptagon with the letters in "OCTAGON" if the "N" cannot be next to an "O"? Rotations of the same labeling are considered equivalent.
I REALLY NEED HELP !!
There are 7! = 5040 ways to label the heptagon. There are 4! = 24 ways where the O's are next to an N, so the number of ways where N is not next to an O is 5040 - 24 = 5016.
We can position the letters in 7!/7 = 720 ways because you have to divide by 7 to eliminate the rotations.
To deal with the restriction, we do complementary counting. If you think of O and N as one letter, meaning they are together, then there are only 6 "letters" so 120 ways however, we have to multiply by two because the O can be to the right of N or the left. This gives 240 cases we do not want. 720-240=480.