Handling precedence constraints in scheduling problems by the sequence pair representation

In this paper, we show that sequence pair (SP) representation, primarily applied to the rectangle packing problems appearing in the VLSI industry, can be a solution representation of precedence constrained scheduling. We present three interpretations of sequence pair, which differ in complexity of schedule evaluation and size of a corresponding solution space. For each interpretation we construct an incremental precedence constrained SP neighborhood evaluation algorithm, computing feasibility of each solution in the insert neighborhood in an amortized constant time per examined solution, and prove the connectivity property of the considered neighborhoods. To compare proposed interpretations of SP, we construct heuristic and metaheuristic algorithms for the multiprocessor job scheduling problem, and verify their efficiency in the numerical experiment.


Introduction
One of the most frequently appearing constraints in various scheduling fields are precedence constraints saying that a job can be executed if all of its predecessors have already completed their execution. The precedence constraints can model the topology of underlying network of machines, production constraints induced by industrial B Andrzej Kozik akozik@math.uni.opole.pl process (Kolisch and Padman 2001) or the orchestration flow in Service Oriented Architecture (SOA)-based systems (Peltz 2003;Światek et al. 2012).
Given the vast body of applications and interest (eg., Agnetis et al. 2012;Chandra et al. 2014;Debczynski and Gawiejnowicz 2013;Driessel and Monch 2011;Lim et al. 2013;Zhao et al. 2013), in this paper we propose a new method of handling precedence constraints in a general solution-search environment. Contrary to the a posteriori technique, in which precedence constraints are verified after solution evaluation, the presented method provides a rigorous structure on the solution neighborhood and efficient algorithms able to filter unfeasible solutions. As a background of the presentation and to illustrate an application example we consider a multiprocessor job scheduling problem under the workspan criterion, but the approach can be easily extended to include release and due dates, malleable and maintenance tasks, as well as other criterion functions (see, Jansen and Zhang 2012;Chen and Chu 2012).
We will show that precedence constraints can be handled using sequence pair (SP) representation of non-overlapping placement of rectangles on a plane (Murata et al. 1996). The SP has many successful industrial applications in the context of physical layout synthesis of VLSI circuits, where it models a placement of transistors, leaf-cells and macro-blocks on a silicon die as a pair of permutations. On the other hand, it was shown in Imahori et al. (2003) that SP can be a solution space for scheduling problems with various definitions of cost functions. Given the importance of precedence constraints, to the best of our knowledge, there was no previous work dealing with feasibility evaluation of arbitrary precedence constraints with SP as a solution space. A restricted form of precedence constraints was considered in the context of rectilinear blocks packing in VLSI (Wakata et al. 2003).
The solution space provided by the SP representation is not free from redundancies, since there is no one-to-one mapping between a schedule and SP. On the other hand, the algorithmic repertoire of computer science includes metaheuristic methods and techniques, in which deficiencies like bigger solution space can be dwarfed by effective exploration of the search space. Examples of such methods are hybridmetaheuristics (Blum et al. 2008), combining complementary strengths of various techniques to collaboratively tackle hard optimization problems. The recent advent of hyper-heuristic approaches (Burke et al. 2003(Burke et al. , 2013, providing a robust upperlevel framework to tune and drive underlying heuristics to adapt to features of solved problems, only strengthens this statement. Nevertheless, complex approaches, able to perform rational and controlled traversal of the solution space, are based on elimination and explorative properties. They include incremental moves and neighborhood structures, which are essential in the context of guiding the search process. Moreover, the efficiency of such methods based on the assumption that one can provide a sequence of moves to every (starting) solution such that every other solution can be reached (especially an optimal one).
The main contribution of this paper is as follows. First, we discuss three interpretations of SP as a scheduling solution, providing three solution-spaces, which differ in size, optimality of representation and complexity of schedule evaluation. For each interpretation, we construct an algorithm that incrementally evaluates an insert neighborhood of SP, computing feasibility of examined solutions in an amortized constant-time per solution. This result is especially important for efficient implemen-tation of constructive heuristics, Tabu Search, Variable Neighborhood Search as well as other metaheuristics (Blum and Roli 2003), where the time complexity of neighborhood evaluation is critical for the efficiency of the overall methodology, and the naive approach, that a posteriori verifies constraint satisfaction for examined solutions is inefficient and unacceptable.
We also prove a connectivity properties of the considered neighborhoods. We show that the results known for the Ulam's metric (Ulam 1972) for permutations 1 can be applied also to the case of precedence constrained permutations-we show an algorithm finding such an optimal transformation. On this basis, we prove connectivity properties for considered precedence-constrained SP neighborhoods. Since presented proofs are constructive, we not only obtain bounds on the diameter of the considered solution spaces, but foremost the resulting algorithms can be independently applied as crossover or path-relinking operators in metaheuristics (Blum and Roli 2003).
To evaluate presented views on SP representation, we constructed heuristics and metaheuristics based on simulated annealing for the considered scheduling problem and, in such a context, verified performance of developed SP neighborhoods in a numerical experiment showing how a choice of SP interpretation impacts the performance of solution search algorithms.
This paper is organized as follows. In Sect. 2, the multiprocessor job scheduling problem is formulated. Section 3 presents details of the SP representation, while an application of SP as a solution space of the scheduling problem and feasibility conditions for the scheduling solution are given in Sect. 4. Next, we construct a incremental precedence constrained SP neighborhood evaluation algorithms, and give neighborhood pruning techniques. Connectivity properties of considered precedence constrained insert neighborhoods of SP are given subsequently. Section 7 is devoted to design and experimental evaluation of solution algorithms for the considered scheduling problem. The last section concludes the paper.

Multiprocessor job scheduling problem formulation
There is a set J = {1, . . . , n} of n jobs (tasks) to be scheduled on m identical parallel processors. Each processor can execute at most one job at a time, and each job j ∈ J requires p j uninterrupted units of processing simultaneously on q j processors. Additionally, to maintain a physical proximity of processors allocated to a job, contiguous machine allocations are requested in a schedule. This case is known in the literature as scheduling on a line, adjacent resource system or nonfragmentable multiprocessor system (Turek et al. 1992;Jansen and Thöle 2010;Duin and Sluis 2006) and denoted by line j in the second field of the three field notation (Graham et al. 1979). Alternatively, q j can be viewed as a required level of a contiguous resource, see Brucker et al. (1999); Günther et al. (2014); Lodi et al. (2002).
The model assumes that there exist a total ordering of processors (resources), i.e., they can be arranged in a line, and contiguous allocations maximize proximity relation between processors. Possible applications range from assigning memory to processes (Huang and Korf 2013) by the operating system, scheduling of ships on a long wharf (Li et al. 2004), usage of radio frequency spectra (Mitola and Maguire 1999) or scheduling check-in counters at airports (Duin and Sluis 2006).
Additionally, there are given precedence constraints, ≺, between jobs. A constraint i ≺ j, i, j ∈ J , implies that job i must be completed before job j can be started. Let G p (V, E p ) be an acyclic directed graph representing precedence constraints between jobs; V is a set of vertices representing jobs and E p is a set of directed edges such that Definition 1 A schedule is feasible if it satisfies all precedence constraints given by G p .
With respect to a schedule S, the completion time of job i is denoted by C i , and the makespan is denoted by C max = max i∈J {C i }. The goal is to find a schedule that minimizes the workspan W max = m · C max , i.e., a product of the makespan and the number of processors m required in the schedule (Rudek et al. 2013). In the three field notation (Graham et al. 1979), the considered problem can be denoted as P| pr ec, line j |W max .
The considered workspan objective function reflects the basic scenario of bonding both dimensions of a schedule, yet it has an easy and strong practical explanation, in which a financial cost of renting servers or hiring a crew concerns the whole duration of a schedule (Rudek et al. 2013). The same criterion, a minimal bounding-box of a schedule, has been considered by Korf (2003) as a total labour cost. On the one side it does not impose any additional constraints on the schedule and enables to focus on the precedence constraints, on the other hand, much more complex application scenarios are possible. It is easy to construct additional neighborhood filters (Adya and Markov 2003;Augustine et al. 2009;Lodi et al. 2002), based on fixed makespan, number of processors (in the case of discrete vertical dimension) or total resource available (in the case of contiguous job heights), without changing time complexity of presented approach. The same applies if dimensions of a job are to be changeda fixed set of job configurations can be handled in the constant time. Similarly, a size of malleable task (Jansen and Thöle 2010;Günther et al. 2014) can be chosen during evaluation. The case of maintenance tasks (Wong et al. 2013) can be handled by VLSI approaches to preplaced rectangles (Lai et al. 2001;Young et al. 2004). Computing jobs vertical positions according to Huang and Korf (2013) enables application of the proposed approach to the general multiprocessor scheduling (not constrained to contiguous processors allocations, see e.g. Günther et al. 2014) and resource-constrained project management problems (Brucker et al. 1999;Brucker and Knust 2012). Note, that the considered approach can be also applied for the classical problems, e.g. Pm| pr ec|C max or Pm| pr ec, si ze j |C max , in which each job requires a single processor or si ze j of processors and the number of available processors is given or fixed as a part of problem formulation (see, Drozdowski 1996).
The decision version (D P) of the considered workspan minimization problem asks whether a given set of jobs can be scheduled under given precedence constraints with a workspan at most A? To show that D P is N P-complete, we give a reduction from any N P-complete decision problem D P involving scheduling jobs into Fig. 1 A schedule corresponding to a certificate of the D P yes-instance bounding-box of given width W and height H , e.g., from decision versions of strongly N P-hard P poly |line j |C max (Jansen and Thöle 2010), in which P poly denotes the number of processors polynomially bounded by the number of jobs, P| pr ec|C max , P||C max (Chen et al. 1999;Svensson 2011) or a variant of strip packing problem (Lodi et al. 2002;Augustine et al. 2009) in the case of contiguous resource instead of discrete processors. Consider an instance of D P : given a set of n jobs with processing times p i and required number of processors q i (possibly equal to one), i = 1, . . . , n, a precedence constraint graph G p (V, E p ) (possibly empty), does there exist a schedule of length at most W and height (either a maximum resource level or number of processors) at most H ? We construct an instance of D P similarly as in Murata et al. (1996). We set the workspan constraint A = (W + H ) · (W + 2H ) and introduce n + 2 jobs: jobs 1, . . . , n from D P , i.e., p i = p i and q i = q i , i = 1, . . . , n and two dummy jobs: job n + 1 with p n+1 = q n+1 = H and job n + 2 with p n+2 = q n+2 = W + H . We set the precedence constraints graph G p with edge set equal to E p ∪ {(i, n + 1)|i = 1, . . . , n}. A schedule of D P corresponding to a certificate for yes-instance of D P is presented in Fig. 1. It is easy to see that we have a yes-instance to D P if and only if we have a solution for D P. Otherwise, if the answer for D P is no, then either precedence constraints are not satisfied, or D P jobs are not fit within intended area.
Horizontal relation between a pair of rectangles imposes their left-to-right arrangement on a plane, i.e., i h → j forces rectangle j to be placed horizontally on the right of rectangle i. In the case of vertical relations, the arrangement is bottom-up. A placement of rectangles and topological relations imposed by a sample SP are depicted in Fig. 2.
The rectangle packing problem asks for a non-overlapping placement of rectangles on a plane, such that the area of the minimal enclosing rectangle (bounding-box) is minimized. The solution space for the rectangle packing problem provided by SP representation consists of (n!) 2 SPs. It is showed in Murata et al. (1996) that each nonoverlapping placement of rectangles can be mapped to a SP and each sequence pair can be mapped to a bottom-left compacted packing, in which all rectangles are shifted maximally to the left and bottom packing boundaries so that topological relations are met. It is showed, that at least one SP (bottom-left compacted packing) corresponds to an optimal rectangle packing solution.
It is convenient for the analysis to represent relations induced by (Γ + , Γ − ) in a form of graphs. Let V = {1, . . . , n} denote set of vertices corresponding to rectangles from B and f : . . , i, . . . , j, . . . )} be a function of SP, returning a set of oriented arcs over V . Consequently, from the SP (Γ + , Γ − ) we can construct a pair of constraint graphs.

Definition 3 Define a vertical constraint graph as
The evaluation of SP, denoted as Evaluate(Γ + , Γ − ), is to compute placement coordinates of rectangles. Consider each vertex j ∈ V has a weight: w j in G h and h j in G v . Define a length of a path as a sum of weights of vertices on that path. The horizontal (vertical) placement coordinate of top-right corner of rectangle j in a bottom-left compacted packing equals the length of the longest path coming to the vertex j in G h (G v ), j ∈ V , respectively. Similarly, the horizontal (vertical) span of the packing equals the length of the longest path in G h (G v ), respectively. Observe that rectangles forming the longest path constraint each other in the same direction and are tightly packed so that any change in their location must produce either overlaps or increase the span of the packing. Therefore, a bottom-left compacted packing is a packing of minimal horizontal and vertical spans that can be obtained from a given SP.
Based on the equivalence between computing longest paths lengths in constraint graphs and longest common subsequences of SP (Takahashi 1996), an optimal, O(n log log n) SP evaluation algorithm was presented in Tang et al. (2001) and fully dynamic evaluation algorithms in Kozik (2013). SP has been successfully applied to handle placement constraints in the packing (Lai et al. 2001;Adya and Markov 2003;Young et al. 2004) and rectilinear blocks (Wakata et al. 2003).

Solution space
Consider the SP representation as the solution space for the multiprocessor job scheduling problem, as in Imahori et al. (2003). Each rectangle corresponds to a job, i.e. B ≡ J , w j = p j and h j = q j , j ∈ {1, . . . , n}. From a given SP, a schedule is obtained from the evaluated rectangle packing solution. The horizontal span of the packing corresponds to the makespan, C max , and vertical span corresponds to number of processors m. In the further part of the paper, we will use scheduling notion of jobs as rectangles in the packing problem.
First we give a sufficient condition of non-feasibility of a schedule represented by SP.
Proof Existence of a horizontal relation j h →i between jobs, denotes that job i is started after termination of the job j, contradicting a precedence relation i ≺ j, which cannot be satisfied.

Definition 4 A horizontal constraint graph
It is easy to see that Corollary 1 provides only necessary condition, and feasibility of a schedule represented by SP can be answered only after evaluation of a packing solution. Therefore, we propose another interpretations of a SP. Let G f h (B, E h ∪ E p ) be a forced horizontal constraint graph, where E h is an edge set of a horizontal constraint graph G h imposed by (Γ + , Γ − ) and E p is an edge set of precedence constraint graph G p .

Theorem 1 A feasible schedule can be obtained from
Proof For a given SP (Γ + , Γ − ), its imposed constraint graphs G v and G h are evaluated separately to decode a corresponding schedule. The G v can be evaluated as in the classical rectangle packing. Longest paths in a directed graph can be computed only if it has no cycle (e.g., by an O(n 2 ) Dijkstra's algorithm). If G f h has no cycle, then, after its evaluation, all topological relations imposed by (Γ + , Γ − ) and all precedence constraints imposed by G p are satisfied.

Definition 5
if it can be evaluated by the algorithm following from Theorem 1.
Using the same argument as in Murata et al. (1996), it can be proved that there exist a forced-feasible SP representing an optimal feasible schedule, which can be evaluated by an algorithm of Theorem 1.
Since the evaluation algorithm following from Theorem 1 requires additional effort, comparing to evaluation of classical bottom-left compacted packings, we relax the assumption that a solution space contains a representation of an optimal schedule. To this end we assume that each SP is evaluated as in the classical rectangle packing.
Since feasibility of possibly-feasible SP cannot be verified before its evaluation, we further limit the solution space.

Theorem 2 A SP (Γ + , Γ − ) represents a feasible schedule if the precedence constraint graph G p is a subgraph of horizontal constraint graph G h imposed by (Γ + , Γ − ).
Proof According to Definition 1 the graph G h represents relative horizontal placements between rectangles. In the case of scheduling, existence of a horizontal relation between jobs, i h → j, denotes that job j is started after termination of the job i, implicitly imposing a precedence relation i ≺ j. Since G p is a subgraph of G h , all precedence constraints defined in G p are explicitly represented in G h and satisfied. Therefore, (Γ + , Γ − ) represents a feasible schedule.
Note that the condition stated in Theorem 2 can give a false-negative result, because even if G p is not a subgraph of G h , the precedence constraints can still be satisfied (thought not explicitly), and some solutions cannot be represented in such a solution space (see, Fig. 3b). Apart from the question whether optimal scheduling solution can be always represented by SP and positively verified by Theorem 2, even loosing an optimal scheduling solution from the solution space cannot be considered an issue, since in practical applications often a possibility of finding an optimal solution is sacrificed for the sufficiently-good solution found in a reasonable time (Burke et al. 2003).
Based on the above discussion we can formulate three solution spaces, with: -forced-feasibility-containing only forced-feasible sequence pairs; -possible-feasibility-containing only possibly-feasible SPs; -explicit-feasibility-containing only explicitly-feasible SPs.
In the case of forced-and explicit-feasibility, solution spaces contain feasible solutions only, whereas in the case of possible-feasibility, solution space contain both feasible and unfeasible solutions. Additional differences between these solution spaces are visible in Fig. 3, showing interpretation of SP ( 5, 1, 6, 4, 7, 2, 3 , 1, 2, 3, 4, 5, 6, 7 ). Its following constraint graphs are given in Fig. 3c, d, precedence constraint graph is given in Fig. 3e. The SP does not belong to the explicit-feasible solution space, since 2 ≺ 6 is not explicitly satisfied in G h . The SP belongs to the possibly-feasible solution space, but evaluated as a bottom-left compacted packing (Fig. 3a) represents an unfeasible schedule (2 ≺ 6 is not satisfied). Finally, the SP is forced-feasible, and can be evaluated to a schedule given in Fig. 3b.
In the further part of the paper, we will prove properties of considered solution spaces and compare their efficiency in a computational experiment.

Solution perturbation and evaluation of feasibility
Let (Γ + , Γ − ) be a feasible SP and let b ∈ J be a job to be rescheduled. Consider an insert move as a solution perturbation, in which a position of job b in Γ + and/or Γ − is changed. Let (Γ + , Γ − ) be a resulting SP and G h be its corresponding horizontal constraint graph.

Lemma 1 A possible-feasibility and explicit-feasibility of solution represented by
Proof Changing a position of job b in Γ + and/or Γ − can be split into removing of job b from (Γ + , Γ − ) followed by its re-insertion at the destination positions.
In the graph interpretation removing of job b from (Γ + , Γ − ) results in removing a vertex b and all its adjacent edges from G h and h is a subgraph of G h and is a transitive closure of itself, therefore all precedence constraints from G p except those adjacent to b are either not contradicted or satisfied explicitly by h is a subgraph of G h , therefore G h can contradicts or not satisfy constraints from G p that are adjacent to b, and feasibility depends on edges adjacent to b in G h .
Let E b be a set of edges adjacent to b in G p and let E b be E b with reversed directions of edges. Using Lemma 1 we can state the following lemmas, which enable efficient verification of feasibility of (Γ + , Γ − ).
is acyclic as well. Therefore, cyclicality of G * h depends only on E b .
Since G D h is transitive closure of itself, therefore, if there exist a path between vertices x and y in G D h , an edge (x, y) ∈ E D h . Since for any (Γ + , Γ − ), its imposed G h is acyclic and G D h ⊂ G h , E b cannot contain edges that make a cycle in G * h . Now consider, that G D h contains two separated paths (not sharing any vertex) that was connected by an edge from G p . Let x be the first vertex on that path and let y be the last. Without lost of generality, we may assume that (Γ + , Γ − ) = ( . . . , x, . . . y, . . . , . . . , y, . . . , x, . . . ). To make a cycle passing through a vertex b, (Γ + , Γ − ) = ( . . . , y, . . . , b, . . . , x, . . . , . . . , y, . . . , b, . . . , x, . . . ), what is not possible for E b resulting from (Γ + , Γ − ). We have showed, that any two (or more) to have a cycle. Therefore, the only possibility is to consider each edge from The edge set E f can be easily computed in O(n 2 ) by performing forward and backward breadth-first search on G(J, E D h ∪ E p ) starting from a vertex b. The insertion of b can be done in O(n 2 ) possibilities, either by straightforward enumeration and evaluation of all insertions or by incremental evaluation of SP insert neighborhood algorithm presented in the next section.

The Precel algorithm
In this section, we develop the Precel algorithm, which evaluates feasibility of all insert moves of a job in a pair of sequences. According to Lemmas 2-4, verifying feasibility of a SP solution with considered interpretations involves checking if some given graph is either contained or avoided in the horizontal constraint graph imposed by SP. Therefore, the Precel algorithm has two variants. The first variant evaluates a SP as feasible, if its imposed horizontal constraint graph contains a given edge set E. We call such SP a c-feasible. The second variant evaluates a SP as feasible, if its imposed horizontal constraint graph avoids a given edge set E. We call such SP a a-feasible. We present the algorithm in the form of Janiak et al. (2010) to ease integration in the case of explicit-feasible solution space. Presented results can also be combined with neighborhood evaluation techniques described in Imahori et al. (2005). In the rest of the section we show properties of SP that enable efficient verification of c-feasibility (Lemma 5) and a-feasibility (Lemma 6). Then, we give an outline of neighborhood evaluation schedule, which enables efficient amortization of feasibility evaluation complexity. The resulting Precel algorithm and neighborhood pruning properties are presented next.

Feasibility evaluation of SP
Let (Γ + , Γ − ) be a SP representing schedule of jobs from J and let b ∈ J be an arbitrarily chosen job.
Informally, the b-split divides jobs surrounding b (in the schedule viewed as a placement of rectangles on a plane) into four subsets: placed on the left to job b (in β h ), placed on the right ( β h ), below (β v ) and above ( Similarly we can prove the following lemma for the a-feasible case. Lemma 6 Let (Γ + , Γ − ) be a a-feasible SP and let (Γ + , Γ − ) be a modification of (Γ + , Γ − ), in which a position of job b in Γ + and Γ − is changed.

SP neighborhood search schedule
Let (Γ + , Γ − ) be a c-or a-feasible SP and let (Γ D with arbitrarily inserted job b and let G h be a horizontal constraint graph imposed by (Γ + , Γ − ).
The SP neighborhood search schedule is given as Algorithm 1. It enumerates all is concatenated with sequences Γ D + and Γ D − , respectively. Denote by M( j, Γ ) an adjacent swap move that exchanges the element j with its right neighbor in sequence Γ . Let us analyze results of changes to (Γ + , Γ − ) in the course of Algorithm 1. Let

The SP neighborhood evaluation algorithm
The Precel algorithm follows the search-schedule of Algorithm 1, but instead of managing (Γ + , Γ − ) explicitly, it only maintains Λand Λ-values and performs c-and a-feasibility evaluation with use of Lemmas 5 and 6, respectively. As Algorithm 2 we present an implementation of c-feasibility variant of the Precel algorithm for neighborhood evaluation of explicit-feasible solution-space, i.e., edges of G p have to be contained in G h . Implementations for forced-feasible and possibly-feasible solutionspaces are analogous.
In The best found solution is recorded by storing its describing factors f * (containing eg. workspan, feasibility mark, etc.) and corresponding insertion positions i * and j * . Construction of the best found solution can be done in O(1) time after evaluation of the whole neighborhood.

Neighborhood pruning techniques
The run-time of the Precel algorithm can be additionally enhanced with the following properties, pruning the neighborhood during the search process.
Property 2 If Λ β h > 0 after the move of case (i) in the Precel algorithm, then all further solutions constructed in the inner-loop are not feasible. Proof Assume after the move of case i) in the Precel algorithm Λ β h > 0. There is no operation that decreases the value of Λ β h in the Precel algorithm once it becomes > 0 in the outer-loop. Therefore for each solution further examined in the neighborhood, Λ β h > 0 and, according to Lemma 2, none of such solutions is feasible.

Algorithm 2 P R EC E L(Γ D
The Algorithm 2 with applied Properties 2-5 is further referenced as the Precel+ algorithm. For the case of a-feasibility variant, the following property holds. Property 6 If Λ β h > 0 after the move of case (ii) in the Precel algorithm, then all further solutions constructed in the inner-loop are not feasible.
Proof Assume after the move of case (ii) in the Precel algorithm Λ β h > 0. The only operation that decreases the value of Λ β h is the Pop All(Λ) in the outer-loop of the Precel algorithm. Therefore, for each solution further examined in the inner-loop, Λ β h > 0 and, according to Lemma 6, none of such solutions is feasible.

Connectivity and diameter of the precedence constrained insert neighborhoods
In this section, we prove connectivity properties for insert neighborhoods of the explicit-and possible-feasibility solution spaces. Connectivity property guarantees that there exist a finite sequence of insert moves transforming any starting solution into any other (especially an optimal one) and is crucial for the efficiency of metaheuristics (Blum and Roli 2003). We first present a result for precedence constrained single permutations, and then we apply it to the SPs. Since presented proofs are constructive, we not only obtain bounds on the diameter of the considered solution spaces, but foremost the resulting algorithms can be independently applied as crossover or path-relinking operators in metaheuristics (see, e.g. Blum and Roli 2003).

A single permutation case
Let S be a space of all permutations of the set B = {1, . . . , n} and let G p be reduced to its transitive reduction. Note that subtracted transitive edges are in fact redundant and are satisfied whenever a solution satisfies the reduced precedence graph.
Definition 10 Define an insert neighborhood of permutation π ∈ S, N (π, b), as a set of permutations obtained by performing all "insert" moves of the element b.
Let π f = lcs(π S , π T ) and k = n − l(π f ), where l(π f ) is the length of a sequence π f and lcs(π S , π T ) is the longest common subsequence of π S and π T . From the works of Ulam (1972) and Fredman (1975) it follows that N (π ) is a connected neighborhood (and therefore it is OPT-connected as well) and k is a minimal number of insert moves needed to transform π S into π T . Hunt and Szymanski (1977) showed an optimal algorithm computing lcs(π S , π T ) in O(n log log n) time. Subsequently we show, that the same bounds apply to the precedence constrained case. Let S P be a space of all explicit-feasible permutations of the set B = {1, . . . , n}.
Definition 12 Define an insert neighborhood of permutation π ∈ S P , N P (π, b), as a set of feasible permutations obtained by performing all "insert" moves of the element b.
Subsequently, we show that N P (π ) is connected by giving an algorithm that computes a transformation between any two feasible permutations, consisting of minimal number of intermediate feasible permutations. Thus, we obtain a strict bound on the diameter of such a solution space.
Let π S , π T ∈ S P and let π f = lcs(π S , π T ). The elements of π f = f 1 , . . . , f k are the fixed-points of transformation of π S into π T , i.e., elements of π f are intact during the transformation (as in the unconstrained case).

Lemma 7 Each element between consecutive fixed-points in π S has to be moved either to the left of its closest left fixed-point, or to the right of its closest right fixed-point, in a transformation of π S into π T .
Proof Let π f = lcs(π S , π T ) = f 1 , . . . , f k . Suppose the considered lemma is not true, and there is an element x such that . . . f i . . . x . . . f i+1 . . . is a subsequence of both π S and π T . Then π f = lcs(π S , π T ) what contradicts the assumption of the lemma.
Denote by d x a direction of a move of an element x. Let L x denote closest left fixed point in π S and R x denotes closest right fixed point in π S , for each element x ∈ π S \ π f . Let pos(x), pos(L x ) and pos(R x ) be positions of x, L x and R x in π T , respectively. If pos(x) < pos (L x Without precedence constraints elements of B \ π f are moved in an arbitrary order, whereas in the case of precedence constrained permutations, all intermediate solutions in a transformation of π S into π T have to be feasible permutations. Therefore, the sequence of moves must be performed in such an order, that preserves precedence constraints during the transformation. First, note that the possibility of violating a precedence constraint a ≺ b is possible in two cases: when d a = → , d b = → and the element a is moved before b (see, Fig. 4a), or when d a = ← , d b = ← and the element b is moved before a. For the first case we say that b blocks a, for the latter, a blocks b. The algorithm PATH, given below, moves the elements in such an order that the above two cases are eliminated.

The PATH algorithm
Let us describe the PATH algorithm, presented as Algorithm 4. Given π S and π T , it first computes the fixed-points of the transformation, π f , and determines a set M = B \π f of elements to be moved. Next, for each element j ∈ M it computes a direction of a move d j and, on this basis it constructs a directed graph of blockades G B (M, E B ), Let π i be an actual intermediate permutation of the transformation (initially equal to π S ). Moves in π i are performed with use of reference points, i.e., elements that not going to change their relative positions in π i in the further course of the transformation. Note that only fixed-points and already moved elements have fixed relative positions in π i and can be reference points for performed moves (all other elements in π i are going to change its positions). Reference points for moves performed on π i are stored in E BT , van Emde Boas Tree (Emde et al. 1977) data structure for the dynamic predecessor problem. The following operations are performed on E BT : , (x, p x ))-adds an element x with the search key p x , a position of x in π T , to the set E BT ; -PRED(E BT, x)-predecessor query-returns an element of E BT with the largest search key that is less than a search key of an element x; -E BT ≡ vEBTree(n + 1)-constructs the data structure E BT to hold elements with search keys in the range [0; n] and inserts an artificial element 0 with the key = 0.
Initially, all elements of π f (fixed-points) are inserted to E BT . The PATH algorithm iteratively processes elements to be moved according to the topological sorting of G B . It picks x as the first element of M, removes x from M, and performs a move of x. First, the element x is inserted to E BT , as it reaches its destination position in the transformation. Next, a move of x is performed in π i such that x is placed to the right of its predecessor in E BT .
To perform an arbitrary insert move in π i in a constant time, consider π i implemented as data structure D, storing a permutation of a set U = {1, . . . , n} under an arbitrary sequence of move operations. The data structure D consist of a table D T of u + 1 nodes. Each table entry (node) D T [ j] corresponds to an element j ∈ U (each node stores its index). Nodes of D T are linked to form a doubly-linked list D L with D T [0] as a head. An order of nodes in the list D L represents a permutation of the set U . Observe that the design of D enables to locate any node x ∈ U in the list D L in the constant time.

Algorithm 3 P AT H(π S , π T , G P )
Proof First, we prove that there exist a topological ordering of G B . Consider, there exist a path from a vertex u to v in G B . According to a definition of G B , vertices on that path have the same direction. There cannot exist a path from v to u since neither u or v cannot have the opposite direction. Since G B is acyclic directed graph, it has a topological ordering.
Let x be processed element and let π i be an actual intermediate permutation of the transformation of π S ∈ S P into π T ∈ S P and assume π i ∈ S P . If a move of x does not violate any precedence constraint with its adjacent veritices in G P , then it does not violate any transitive precedence constraint as well. Therefore, this is sufficient to prove that precedence constraints z ≺ x and x ≺ y, where z ∈ N − (x) and y ∈ N + (x), are satisfied after the move of x. There are 12 cases depending on the directions of x, y and z.
It is easy to see that a move of x cannot violate any constraint adjacent with a vertex of direction − or opposite to d x ; otherwise it would contradict feasibility of π A or π T . On the other hand, moving elements according to the topological ordering of G B eliminates possible blockades and guarantees that the move cannot violate precedence constraints with adjacent vertices of the same direction as d x .
After the move of x π i ∈ S P and, by construction, x is placed in π i such that elements of the set B \ M form a common subsequence of π i and π T . Applying above steps iteratively we get π i = π T .
Each move of x in π i is a move that belongs to N P (π i , x), and therefore the PATH produces a sequence π 0 , π 1 , ..., π k−1 , π k of k solutions π i ∈ S P s.t. π i+1 ∈ N P (π i ) for i = 1, . . . , k − 1, π 0 = π S and π k = π T . Since the PATH algorithm performs moves of the same elements as in the unconstrained case, the k = n − l(lcs(π S , π T )) is a minimal number of moves.

Corollary 3 The neighborhood N P (π A ) is connected and OPT-connected.
Corollary 4 The diameter of the solution space under N P equals n − 1.

Connectivity of precedence constrained sequence pair neighborhoods
In this section we show connectivity properties of considered SP neighborhoods. Let S 2 be a space of all SPs of the set J = {1, . . . , n}, let S 2 P be S 2 limited to possiblyfeasible SPs and let S 2 E be S 2 limited to explicit-feasible SPs. Subsequently, we show that S 2 P and S 2 E are connected under the insert neighborhood.

Explicit-feasibility case
Definition 14 Define an insert neighborhood of an explicit-feasible SP , as a set of explicit-feasible SPs obtained by performing all possible "insert" moves of the element b.
Proof According to Definition 15, According to Theorem 4, there exist finite sequences of moves transforming Γ S Based on a methodology from Wakata et al. 2003, consider a transformation Since each single permutation appearing in the transformation is explicit-feasible, according to Corollary 2 and Theorem 2, each intermediate SP is explicit-feasible as well. The N E (Γ + , Γ − ) is connected and therefore it is OPT-connected.
Note, using insert moves in the transformation, in Theorem 5 we get better bound than can be obtained by bubble-sort based-methodology from Wakata et al. (2003).

Experimental evaluation of sequence pair interpretations
In this section, we investigate the impact of SP interpretations and corresponding neighborhood structures on the efficiency of algorithms solving the considered scheduling problem. To not test the proposed approach on just random solutions, the experiment was designed to utilize most common approaches to problem solving-we developed constructive heuristic based on NEH (Nawaz et al. 1983) as a generator of starting solutions and metaheuristics based on the Simulated Annealing (SA) framework. Both considered techniques has been successively applied in the vast number of areas, e.g., Janiak et al. (2010); Blum and Roli (2003); Blum et al. (2008).

Constructive heuristic
The presented approximate constructive algorithm resembles the insertion technique of NEH (Nawaz et al. 1983), primarily applied to the flow-shop scheduling, where it is still among best constructive heuristics in that field.
Observe that at each step the algorithm deals with an incomplete solution, so the feasibility and the workspan are computed only for a constructed so far fragment of a solution. Therefore, in the Precel neighborhood evaluation algorithm we consider for each iteration i precedence relations between jobs are given by G i

Simulated annealing
The search process of SA is a semi-random trajectory in the search space, biased towards the "good" region of solution space. In its basic form SA combines an intensification strategy (an iterative local search using a neighborhood concept) with a form of diversification (by so-called cooling-schedule allowing uphill moves to escape from the local minimum). Its efficiency, i.e. the criterion value of delivered solution, strongly depends on the number of visited solutions in the search space. This is especially important in the case when search space is filled with infeasible solutions, where SA performs a lot of futile iterations. The obvious improvement of this strategy is to limit the neighborhood to contain only feasible solutions. However, while it may increase the effectiveness of the search process, it may be its killer as well, if the restricted neighborhood does not have an OPT-connectivity property. The guarantee that from any starting solution in the search space, an optimal solution can be reached by a finite sequence of moves (the OPTconnectivity property of neighborhood) is the most important condition allowing SA to converge (with probability) to the global optimum.
The SA starts the search process from a feasible SP, delivered by a constructive heuristic. Then, at each iteration SA performs a random deletion of a job (say, b) from the actual solution S followed by the evaluation of considered SP neighborhood, i.e. all possible insertion positions of b are evaluated, and the new solution S is randomly sampled from this neighborhood. Let the workspan W max (S) be the objective function to be minimized. In the case the new solution S is feasible, it replaces the old solution S either with a probability computed following the Boltz- (S). The temperature τ is decreased after each iteration iter = 1, 2, . . . , Max I ter by a geometric cooling schedule, i.e., τ iter = ατ iter−1 , α ∈ (0, 1). We set τ 0 = 1000, α = 0.998 and Max I ter = 5000 verifying that in each case the annealing stabilizes with a good solution, i.e., the best recorded solution has not been improved by many iterations.

Numerical experiment
To evaluate the presented SP interpretations, we performed a numerical experiment, in which we compared run-times and quality of delivered solutions of SA algorithms. The algorithms were coded in C++ and simulations were run on Intel Core i7 3610QM CPU under Windows 7 Operating System. We consider S A A to be the SA operating in the forced-feasibility solution space, S A B to be the SA operating in the explicit-feasibility solution space, S A C to be the SA operating in the possible-feasibility solution space, and S A D to be the SA operating in the plain SP solution space. In the case of S A A , S A B and S A C , the random move in SA is performed on a neighborhood containing only feasible solutions, filtered by an appropriate variant of Precel algorithm. The starting solutions were constructed by PRE-GIT heuristic. For the PRE-GIT-A algorithm jobs were ordered according to non-increasing workloads of jobs (w i · h i , i = 1, . . . , n).
For the PRE-GIT-B jobs were ordered according to topological sorting of G p . Starting SA from solutions delivered by constructive heuristic enables the test to focus on the question how efficient are particular SA algorithms (SP interpretations) in improving the initial solution. The proposed algorithms were evaluated for the problem sizes of n ∈ {50, 100, 200, 300}. For each problem size n, we considered the constraint graphs of |E P | ∈ {n, n log n, n √ n−n log n 2 , n √ n, 2n √ n} edges (before augmentation to transitive closure), i.e., we tested a behavior of presented algorithms on a wide range of graph densities. For each pair of n and |E P |, 100 different random instances were generated. Parameters of jobs were randomly sampled from the uniform distribution over the integers in the range: w i , h i ∈ [1; 100]. Precedence constraint graphs were generated in such a way, that for each edge (a, b) ∈ G p , b > a.
For  was 3 times slower than S A D , it always gave better results than S A D (thought not by much). The experiment clearly shows the advantages of the proposed method of solving the precedence constrained scheduling problems, in which solutions can be represented by either explicit-feasible permutations (single processor cases) or SPs (multiprocessor task scheduling problems).

Conclusions
In this paper, we showed that SP representation, primarily applied to the rectangle packing problems appearing in the VLSI industry, can be an simple representation of precedence constraints. The SP can span the solution-space of suitable scheduling problems, or represent only a space of directed acyclic graphs, without additional interpretation of its vertices and edges. In that settings, we constructed an incremental precedence constrained SP neighborhood evaluation algorithm, computing feasibility of each solution in the insert neighborhood in an amortized constant time per examined solution, and proved the connectivity property of the considered neighborhood, by showing an algorithm computing Ulam's metric for the precedence constrained case of permutations. Since the length of the optimal number of insert moves in the unconstrained SP case can be viewed as a two-dimensional Ulam's metric, derivation of its properties, as well as properties of its precedence constrained counterpart will constitute the directions of our future research.