Haskell code to generate feasible or unfeasible problems of this kind :