I'm trying to figure out a way to calculate this permutation (as an example):
- size n = 5
- members = {0, 1}
On this case we have 2^5 possibility to form a group of 5 numbers using 0 and 1 (e.g. 00000, 00001, ...) The question is, how can I subtract the number of groups that have 2 or more 1's in row (e.g. 01100, 10110, 01110... etc. not 010101 as the 1's are not besides each others on this case).
input: n, output: number of permutations that doesn't have 2 or more consecutive 1's
what would be the equation then?
Thanks in advance!