Index: trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/ExhaustiveInsertionMoveGenerator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/ExhaustiveInsertionMoveGenerator.cs	(revision 3702)
+++ trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/ExhaustiveInsertionMoveGenerator.cs	(revision 3706)
@@ -35,4 +35,5 @@
     public static TranslocationMove[] Apply(Permutation permutation) {
       int length = permutation.Length;
+      if (length == 1) throw new ArgumentException("ExhaustiveInsertionMoveGenerator: There cannot be an insertion move given a permutation of length 1.", "permutation");
       TranslocationMove[] moves = null;
       int count = 0;
@@ -45,11 +46,16 @@
         }
       } else {
-        moves = new TranslocationMove[length * (length - 1) - 2];
-        for (int i = 0; i < length; i++) {
-          for (int j = 1; j <= length - 1; j++) {
-            if (i == 0 && j == length - 1
-              || i == length - 1 && j == 1) continue;
-            moves[count++] = new TranslocationMove(i, i, (i + j) % length);
+        if (length > 2) {
+          moves = new TranslocationMove[length * (length - 1) - 2];
+          for (int i = 0; i < length; i++) {
+            for (int j = 1; j <= length - 1; j++) {
+              if (i == 0 && j == length - 1
+                || i == length - 1 && j == 1) continue;
+              moves[count++] = new TranslocationMove(i, i, (i + j) % length);
+            }
           }
+        } else { // doesn't make sense, but just create a dummy move to not crash the algorithms
+          moves = new TranslocationMove[1];
+          moves[0] = new TranslocationMove(0, 0, 1);
         }
       }
Index: trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs	(revision 3702)
+++ trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationMultiMoveGenerator.cs	(revision 3706)
@@ -54,5 +54,5 @@
       TranslocationMove[] moves = new TranslocationMove[sampleSize];
       for (int i = 0; i < sampleSize; i++) {
-        moves[i] = StochasticThreeOptSingleMoveGenerator.Apply(permutation, random);
+        moves[i] = StochasticTranslocationSingleMoveGenerator.Apply(permutation, random);
       }
       return moves;
Index: trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs	(revision 3702)
+++ trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/ThreeOpt/StochasticTranslocationSingleMoveGenerator.cs	(revision 3706)
@@ -31,10 +31,10 @@
   [Item("StochasticTranslocationSingleMoveGenerator", "Randomly samples one from all possible translocation and insertion moves (3-opt) from a given permutation.")]
   [StorableClass]
-  public class StochasticThreeOptSingleMoveGenerator : TranslocationMoveGenerator, IStochasticOperator, ISingleMoveGenerator {
+  public class StochasticTranslocationSingleMoveGenerator : TranslocationMoveGenerator, IStochasticOperator, ISingleMoveGenerator {
     public ILookupParameter<IRandom> RandomParameter {
       get { return (ILookupParameter<IRandom>)Parameters["Random"]; }
     }
 
-    public StochasticThreeOptSingleMoveGenerator()
+    public StochasticTranslocationSingleMoveGenerator()
       : base() {
       Parameters.Add(new LookupParameter<IRandom>("Random", "The random number generator."));
@@ -43,4 +43,6 @@
     public static TranslocationMove Apply(Permutation permutation, IRandom random) {
       int length = permutation.Length;
+      if (length == 1) throw new ArgumentException("StochasticThreeOptSingleMoveGenerator: There cannot be an insertion move given a permutation of length 1.", "permutation");
+      if (permutation.PermutationType != PermutationTypes.Absolute && length == 2) return new TranslocationMove(0, 0, 1);
       int index1, index2, index3;
       do {
Index: trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs	(revision 3702)
+++ trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/ExhaustiveInversionMoveGenerator.cs	(revision 3706)
@@ -32,4 +32,5 @@
     public static InversionMove[] Apply(Permutation permutation) {
       int length = permutation.Length;
+      if (length == 1) throw new ArgumentException("ExhaustiveInversionMoveGenerator: There cannot be an inversion move given a permutation of length 1.", "permutation");
       int totalMoves = (length) * (length - 1) / 2;
       InversionMove[] moves = null;
@@ -37,11 +38,16 @@
 
       if (permutation.PermutationType == PermutationTypes.RelativeUndirected) {
-        moves = new InversionMove[totalMoves - 3];
-        for (int i = 0; i < length - 1; i++) {
-          for (int j = i + 1; j < length; j++) {
-            // doesn't make sense to inverse the whole permutation or the whole but one in case of relative undirected permutations
-            if (j - i >= length - 2) continue;
-            moves[count++] = new InversionMove(i, j);
+        if (totalMoves - 3 > 0) {
+          moves = new InversionMove[totalMoves - 3];
+          for (int i = 0; i < length - 1; i++) {
+            for (int j = i + 1; j < length; j++) {
+              // doesn't make sense to inverse the whole permutation or the whole but one in case of relative undirected permutations
+              if (j - i >= length - 2) continue;
+              moves[count++] = new InversionMove(i, j);
+            }
           }
+        } else { // when length is 3 or less, there's actually no difference, but for the sake of not crashing the algorithm create a dummy move
+          moves = new InversionMove[1];
+          moves[0] = new InversionMove(0, 1);
         }
       } else {
Index: trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs	(revision 3702)
+++ trunk/sources/HeuristicLab.Encodings.PermutationEncoding/3.3/Moves/TwoOpt/StochasticInversionSingleMoveGenerator.cs	(revision 3706)
@@ -43,9 +43,12 @@
     public static InversionMove Apply(Permutation permutation, IRandom random) {
       int length = permutation.Length;
+      if (length == 1) throw new ArgumentException("StochasticInversionSingleMoveGenerator: There cannot be an inversion move given a permutation of length 1.", "permutation");
       int index1 = random.Next(length - 1);
       int index2 = random.Next(index1 + 1, length);
       if (permutation.PermutationType == PermutationTypes.RelativeUndirected) {
-        while (index2 - index1 >= length - 2)
-          index2 = random.Next(index1 + 1, length);
+        if (length > 3) {
+          while (index2 - index1 >= length - 2)
+            index2 = random.Next(index1 + 1, length);
+        }
       }
       return new InversionMove(index1, index2);
