  This article studies the problem of modifying the action ordering of a plan
in order to optimise the plan according to various criteria. One of these
criteria is to make a plan less constrained and the other is to minimize its
parallel execution time. Three candidate definitions are proposed for the first
of these criteria, constituting a sequence of increasing optimality guarantees.
Two of these are based on deordering plans, which means that ordering relations
may only be removed, not added, while the third one uses reordering, where
arbitrary modifications to the ordering are allowed. It is shown that only the
weakest one of the three criteria is tractable to achieve, the other two being
NP-hard and even difficult to approximate. Similarly, optimising the parallel
execution time of a plan is studied both for deordering and reordering of
plans. In the general case, both of these computations are NP-hard. However, it
is shown that optimal deorderings can be computed in polynomial time for a
class of planning languages based on the notions of producers, consumers and
threats, which includes most of the commonly used planning languages. Computing
optimal reorderings can potentially lead to even faster parallel executions,
but this problem remains NP-hard and difficult to approximate even under quite
severe restrictions.
