So my problem is the following:
Assume that you have a vector of bits:
A = [b1 b2 ... bN]
I want to find an efficient way to produce all the possible A vectors that satisfy the following properties:
-> b1 = bN = 1
-> at least one bit is zero
-> only the following patterns are acceptable :
[11...1 0...0 1...1]
,i.e. all the zeros are gathered together (no 1 in between).
I am trying to avoid the ''brute force'' solution of producing all the possible vectors for some N and then pick the acceptable ones, because I may have to deal with N around 30 or more.
If anyone has any idea or hint it would be greatly appreciated.
Cheers!
Chris

