since the average size of the cross region is also linear
(i.e., n/3 on average), PMX as originally described
required O(n
2
) time. The runtime of our implemen-
tation in Chips-n-Salsa (Cicirello, 2020) is O(n). In-
stead of linear searches, we generate the inverse of
each permutation in O(n) time to use as a lookup ta-
ble to find each required index in constant time.
The cross region has an average of n/3 elements,
due to which each child inherits n/3 element positions
on average from each parent. Thus, children inherit a
significant number of positions from the parents (at
least 2n/3 on average). Although the cross region of
each child includes consecutive elements (i.e., edges)
from the opposite parent, many edges are broken else-
where, so PMX is disruptive for edges. However,
PMX preserves precedences well.
Uniform Partially Matched Crossover
(UPMX): UPMX uses indexes uniformly dis-
tributed along the permutations rather than PMX’s
contiguous cross region (Cicirello and Smith, 2000).
Parameter u is the probability of including an index.
The elements at the chosen indexes define the swaps
in the same way as in PMX. Runtime is O(n).
Consider p
1
= [7,6, 5,4, 3,2, 1,0] and p
2
=
[1,2, 0,5, 6,4,7,3], and random indexes 3, 1, and 6.
Initialize c
1
= [7,6,5,4,3,2,1,0]. Element 4 is at in-
dex 3 in p
1
, and 5 is at that index in p
2
. UPMX swaps
the 4 and 5 to obtain c
1
= [7,6,4,5,3,2,1,0]. Ele-
ments 6 and 2 are at index 1 in p
1
and p
2
. UMPX
swaps the 6 and 2 to get c
1
= [7, 2,4, 5,3, 6,1, 0]. Ele-
ments 1 and 7 are at index 6 in p
1
and p
2
. Swap the 1
and 7 to get the final c
1
= [1, 2,4,5,3,6,7,0]. Follow
the same process to derive c
2
= [7,6, 0,4, 2,5,1,3].
Children inherit positions and precedences from
parents to about the same degree as in PMX. The uni-
formly distributed indexes likely break most edges.
But if u is low, many edges may also be preserved.
Position Based Crossover (PBX): Barecke and
Detyniecki designed PBX to strongly focus on posi-
tions (Barecke and Detyniecki, 2007). One of PBX’s
objectives is for a child to inherit approximately equal
numbers of element positions from each of its parents.
PBX proceeds in five steps. It first generates a list
mapping each element to its indexes in the parents.
Consider p
1
= [2,5, 1,4, 3,0] and p
2
= [5,4, 3,2, 1,0].
The list of index mappings would be [0 → (5,5),1 →
(2,4),2 → (0, 3),3 → (4,2), 4 → (3,1),5 → (1,0)].
Mapping 1 → (2, 4) means that element 1 is at index
2 in p
1
and index 4 in p
2
. Step 2 randomizes the or-
der of the elements in this list, e.g., [3 → (4,2),5 →
(1,0),0 → (5, 5),2 → (0,3), 1 → (2,4),4 → (3,1)].
Also at this stage, PBX chooses a random subset of
elements (each element chosen with probability 0.5),
and swaps the order of the indexes of those elements.
For this example, elements 5 and 1 are chosen. Map-
ping 5 → (1,0) becomes 5 → (0,1), and 1 → (2,4)
becomes 1 → (4,2). This results in [3 → (4,2),5 →
(0,1),0 → (5, 5),2 → (0,3), 1 → (4,2),4 → (3, 1)].
Step 3 begins populating the children by iterating
this list, and for each mapping e → (i
1
,i
2
) it at-
tempts to put element e at index i
1
in c
1
and in-
dex i
2
in c
2
, skipping any if the index is occupied.
For this example, we’d have: c
1
= [5, x, x,4, 3,0] and
c
2
= [x,5,3,2, x,0]. Step 4 makes a second pass try-
ing the index from the other parent to obtain: c
1
=
[5,x,1,4,3,0] and c
2
= [x,5, 3,2, 1,0]. One final pass
places any remaining elements in open indexes: c
1
=
[5,2, 1,4, 3,0] and c
2
= [4,5, 3,2, 1,0].
PBX is strongly position oriented, although less
so than CX since PBX’s last pass puts some elements
at different indexes than either parent. But unlike CX,
PBX children inherit equal numbers of element posi-
tions from parents on average. As a result, children
also inherit approximately equal numbers of prece-
dences from parents, but many edges are disrupted
since inherited positions are not grouped together.
The runtime of PBX is O(n).
Heuristic-Guided Crossover Operators: We
are primarily focusing on crossover operators that
are problem-independent, and which do not require
any knowledge of the optimization problem at hand.
However, there are also some powerful problem-
dependent crossover operators that utilize a heuristic
for the problem. We discuss a few of these here, al-
though these are not currently included in our open
source library (Cicirello, 2020). One of the more
well known crossover operators of this type is Edge
Assembly Crossover (EAX) (Watson et al., 1998)
for the TSP, which utilizes a TSP specific heuris-
tic. Many have proposed variations and improve-
ments to EAX (Sanches et al., 2017; Nagata and
Kobayashi, 2013; Nagata, 2006), including adapt-
ing to other problems (Nagata et al., 2010; Na-
gata, 2007). Another example of a crossover oper-
ator guided by a heuristic is Heuristic Sequencing
Crossover (HeurX) (Cicirello, 2010), which was orig-
inally designed for scheduling problems, and which
requires a constructive heuristic for the problem.
EAX and its many variations are focused on prob-
lems where edges are most important to solution fit-
ness, whereas HeurX is primarily focused on prece-
dences. There are other crossover operators that rely
on problem-dependent information (Freisleben and
Merz, 1996), and utilize local search while creating
children (Barecke and Detyniecki, 2022).
Algorithmic Complexity: The runtime (worst
and average cases) of the crossover operators in this
section, except the heuristic operators, is O(n).