title: lexicographic Permutations with Restrictions
body: <p><a href="https://i.stack.imgur.com/JLOCn.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>I'm reading lexicographic Permutations with Restrictions in Selected Papers on
  Design of Algorithms, Donald E. Knuth.
  I don't understand this algorithm.
  Can someone help me?</p>