Pizza-topping problem with 8 slices, 10 toppings and constraints We have to prepare pizza with 8 slices, and have 10 toppings to put on the pizza. We can put only one topping on each slice but can use the same topping on zero or more slices. In how many unique ways can we prepare the slices so that the same topping is not used in adjacent slices?
I have seen this question with 4 slices and 5 toppings but that seems to be visualizable. But with 8 slices, I am confused on the part when we select 7 or less toppings with identical objects in circular permutation. Please help on how should be problem be approached and solved.
 A: A type of pizza is a string of $8$ digits where each neighboring pair is different, including the first and the last.  We regard two strings as equivalent if one is a cyclic shift of the other.  
To take care of having different first and last digits, we define two sequences.  $A(n)$ is the number of $n$ digit strings with the first and last digits the same.  $B(n)$ is the number of $n$ digit strings with the first and last digits different.  Before considering the circular shifts we want $B(8)$.  
The recurrence is $A(n)=B(n-1)$ because any string that doesn't have matching first and last digits can be extended in $1$ way to a string that does.  $B(n)=9A(n-1)+8B(n-1)$ because we can extend a string with matching first and last in $9$ ways by choosing any other digit but if the first and last do not match and we need them still not to match we only have $8$ choices.  Our starting cases are $A(1)=10,B(1)=0$.  A quick spreadsheet gives $B(8)=43\ 046\ 730.$  
Most pizzas can be rotated eight different ways, but there are $B(2)=90$ that alternate two toppings.  They can only be rotated two ways, so there are $45$ pizzas that have only two different toppings.  There are $B(4)=6570$ that have two runs of four toppings.  We have already counted $90$ of these.  The other $6570-90$ can be rotated four ways.  The final count is then $\frac {90}2+\frac {6570-90}4+\frac {43\ 046\ 730-6570}8=5\ 381\ 685$ different pizzas
A: Lets Start from any slice. the no. of choice of toppings for this slice is 10. The choice of toppings for slices adjacent to this slice on both sides is 9, since we cannot use same topping on adjacent slices. Similarly for next 2 slices on both sides. this continues till we reach the last slice. For this slice the choice of toppings depend on the topping on the adjacent slices. There are 2 cases: The topping on these 2 slices can either be same or be different. We compute the number of combinations in both these cases and sum them up.
So for case 1 (Same topping): No. of combinations= 10*9*9*9*9*9*1*9
for case 2 (Different topping): No. of combinations=10*9*9*9*9*9*8*8
So Total combinations: 10*9*9*9*9*(9*1*9 + 9*8*8)=43105770  
