title: Calculating all possible row combination that satisfies its row constraint in a nonogram
body: <p>So basicly what I'm asking is the exactly same as what this person asked a year ago: <a href="https://stackoverflow.com/questions/25127342/calculation-of-all-possible-mutations-of-a-nonogram">Calculation of all possible mutations of a nonogram</a> which was closed as unclear, though I can't see why it would be.</p>
  
  <p>To recap the exact problem. In nonograms row and columns can be filled in different ways that must satisfy a constriction.</p>
  
  <p>As an example, if a row has the constraint [2,3,2] and length 10, it means 2 adjecent cells must be filled, then a blank, then 3 adjecent, a blank and finally 2 adjecent.</p>
  
  <p>All the possible combinations would then be:</p>
  
  <p>[2,3,2] : x x _ x x x _ x x _ <br/>
  [2,3,2] : x x _ x x x _ _ x x <br/>
  [2,3,2] : x x _ _ x x x _ x x <br/>
  [2,3,2] : _ x x _ x x x _ x x <br/></p>
  
  <p>I imagined it would be quite easy creating a general function for calculating all possible combinations for any row length and constraint, but I've been trying this the whole weekend and it's driving me insane! Any help is very much appreciated.</p>