In this paper, a method to generate permutations of a string under a set of constraints decided by the user is presented. The required permutations are generated without generating all the permutations.
Cite
@article{arxiv.1311.3813,
title = {On Generating Permutations Under User-Defined Constraints},
author = {Dhruvil Badani},
journal= {arXiv preprint arXiv:1311.3813},
year = {2013}
}