This is hard as, besides its size(there are n! orderings given n commands to apply), the search spaceis typically sparse (very few orderings adhere to the specification,cf. our example above).