Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs	(revision 14492)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GAGroupingProblemSampleTest.cs	(revision 14562)
@@ -49,13 +49,13 @@
     public bool Maximization { get { return false; } }
 
-    private bool[,] allowedTogether;
+    private bool[,] adjacencyMatrix;
       
     public override void Initialize() {
       var encoding = new LinearLinkageEncoding(""lle"", length: ProblemSize);
-      allowedTogether = new bool[encoding.Length, encoding.Length];
+      adjacencyMatrix = new bool[encoding.Length, encoding.Length];
       var random = new System.Random(13);
       for (var i = 0; i < encoding.Length - 1; i++)
         for (var j = i + 1; j < encoding.Length; j++)
-          allowedTogether[i, j] = allowedTogether[j, i] = random.Next(2) == 0;
+          adjacencyMatrix[i, j] = adjacencyMatrix[j, i] = random.Next(2) == 0;
       
       Encoding = encoding;
@@ -68,8 +68,9 @@
         for (var j = 0; j < groups[i].Count; j++)
           for (var k = j + 1; k < groups[i].Count; k++)
-            if (!allowedTogether[groups[i][j], groups[i][k]]) penalty++;
+            if (!adjacencyMatrix[groups[i][j], groups[i][k]]) penalty++;
       }
-      if (penalty > 0) return penalty + ProblemSize;
-      else return groups.Count;
+      var result = groups.Count;
+      if (penalty > 0) result += penalty + ProblemSize;
+      return result;
     }
 
@@ -105,7 +106,7 @@
       ga.SetSeedRandomly.Value = false;
       SamplesUtils.RunAlgorithm(ga);
-      Assert.AreEqual(26, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
-      Assert.AreEqual(27.58, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
-      Assert.AreEqual(105, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
+      Assert.AreEqual(127, SamplesUtils.GetDoubleResult(ga, "BestQuality"));
+      Assert.AreEqual(129,38, SamplesUtils.GetDoubleResult(ga, "CurrentAverageQuality"));
+      Assert.AreEqual(132, SamplesUtils.GetDoubleResult(ga, "CurrentWorstQuality"));
       Assert.AreEqual(99100, SamplesUtils.GetIntResult(ga, "EvaluatedSolutions"));
     }
@@ -121,6 +122,6 @@
       #endregion
       #region Algorithm Configuration
-      ga.Name = "Genetic Algorithm - Grouping Problem";
-      ga.Description = "A genetic algorithm which solves a grouping problem using the linear linkage encoding.";
+      ga.Name = "Genetic Algorithm - Graph Coloring";
+      ga.Description = "A genetic algorithm which solves a graph coloring problem using the linear linkage encoding.";
       ga.Problem = problem;
       SamplesUtils.ConfigureGeneticAlgorithmParameters<TournamentSelector, MultiLinearLinkageCrossover, MultiLinearLinkageManipulator>(
Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs	(revision 14492)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab-3.3/Samples/GPTimeSeriesSampleTest.cs	(revision 14562)
@@ -50,8 +50,8 @@
       SamplesUtils.RunAlgorithm(osga);
 
-      Assert.AreEqual(0.020952753415199643, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
-      Assert.AreEqual(0.023220938866319357, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
-      Assert.AreEqual(0.023716788824595391, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
-      Assert.AreEqual(48200, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
+      Assert.AreEqual(0.015441526903606416, SamplesUtils.GetDoubleResult(osga, "BestQuality"), 1E-8);
+      Assert.AreEqual(0.017420834241279298, SamplesUtils.GetDoubleResult(osga, "CurrentAverageQuality"), 1E-8);
+      Assert.AreEqual(0.065195703753298972, SamplesUtils.GetDoubleResult(osga, "CurrentWorstQuality"), 1E-8);
+      Assert.AreEqual(92000, SamplesUtils.GetIntResult(osga, "EvaluatedSolutions"));
     }
 
@@ -63,4 +63,5 @@
       problem.MaximumSymbolicExpressionTreeDepth.Value = 12;
       problem.EvaluatorParameter.Value.HorizonParameter.Value.Value = 10;
+      problem.ApplyLinearScaling.Value = true;
 
       foreach (var symbol in problem.SymbolicExpressionTreeGrammar.Symbols) {
Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs	(revision 14492)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Algorithms.ParameterlessPopulationPyramid-3.3/ParameterlessPopulationPyramidTest.cs	(revision 14562)
@@ -39,5 +39,7 @@
       PrivateObject hidden = new PrivateObject(solver);
       try {
-        hidden.Invoke("Run", new CancellationToken());
+        var ct = new CancellationToken();
+        hidden.Invoke("Initialize", ct);
+        hidden.Invoke("Run", ct);
       } catch (OperationCanceledException) {
         // Ignore
Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs	(revision 14562)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/Auxiliary.cs	(revision 14562)
@@ -0,0 +1,37 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2016 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  public static class Auxiliary {
+    public static bool LinearLinkageIsEqualByPosition(LinearLinkage p1, LinearLinkage p2) {
+      bool equal = (p1.Length == p2.Length);
+      if (equal) {
+        for (int i = 0; i < p1.Length; i++) {
+          if (!p1[i].Equals(p2[i])) {
+            equal = false;
+            break;
+          }
+        }
+      }
+      return equal;
+    }
+  }
+}
Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs	(revision 14562)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/ConversionsTest.cs	(revision 14562)
@@ -0,0 +1,98 @@
+﻿using System;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass()]
+  public class ConversionsTest {
+    private readonly int[][] validForwardEncoding = new[]{
+      new int[0], new[] {0},
+      new[] {0, 1}, new[] {1, 1},
+      new[] {0, 1, 2}, new[] {1, 1, 2}, new[] {2, 1, 2},
+      new[] {0, 2, 2}, new[] {1, 2, 2},
+      new[] {0, 1, 2, 3}, new[] {1, 1, 2, 3}, new[] {2, 1, 2, 3}, new[] {3, 1, 2, 3},
+      new[] {0, 1, 3, 3}, new[] {1, 2, 2, 3}, new[] {2, 1, 3, 3}, new[] {3, 2, 2, 3},
+      new[] {0, 2, 2, 3}, new[] {1, 3, 2, 3},
+      new[] {0, 2, 3, 3}
+    };
+    private readonly int[][] invalidForwardEncoding = new[]{
+      new [] {-1}, new [] {1}, new [] {1, 0},
+      new [] {0, 0, 0}, new [] {0, 0, 1}, new [] {0, 0, 2},
+      new [] {0, 1, 0},
+      new [] {0, 2, 0}, new [] {0, 2, 1},
+      new [] {1, 0, 0}, new [] {1, 0, 1}, new [] {1, 0, 2},
+      new [] {1, 1, 0}, new [] {1, 1, 1},
+      new [] {1, 2, 0}, new [] {1, 2, 1},
+      new [] {2, 0, 0}, new [] {2, 0, 1}, new [] {2, 0, 2},
+      new [] {2, 1, 0}, new [] {2, 1, 1},
+      new [] {2, 2, 0}, new [] {2, 2, 1}, new [] {2, 2, 2},
+    };
+    private readonly int[][] invalidEndEncoding = new[]{
+      new [] {-1}, new [] {1}, new [] {1, 0},
+      new [] {0, 0, 1}, new [] {0, 0, 2},
+      new [] {0, 1, 0},
+      new [] {0, 2, 0}, new [] {0, 2, 1},
+      new [] {1, 0, 0}, new [] {1, 0, 1}, new [] {1, 0, 2},
+      new [] {1, 1, 0}, new [] {1, 1, 1},
+      new [] {1, 2, 0}, new [] {1, 2, 1},
+      new [] {2, 0, 0}, new [] {2, 0, 1}, new [] {2, 0, 2},
+      new [] {2, 1, 0}, new [] {2, 1, 1},
+      new [] {2, 2, 0}, new [] {2, 2, 1},
+    };
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void EndLinksRoundtripTest() {
+      foreach (var values in validForwardEncoding) {
+        var expected = LinearLinkage.FromForwardLinks(values);
+        var llee = expected.ToEndLinks();
+        var actual = LinearLinkage.FromEndLinks(llee);
+        Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, actual),
+          "[{0}] did not roundtrip successfully!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void GroupsRoundtripTest() {
+      foreach (var values in validForwardEncoding) {
+        var expected = LinearLinkage.FromForwardLinks(values);
+        var groups = expected.GetGroups();
+        var actual = LinearLinkage.FromGroups(expected.Length, groups);
+        Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, actual),
+          "[{0}] did not roundtrip successfully!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void InvalidForwardLinksTest() {
+      foreach (var values in invalidForwardEncoding) {
+        var isValid = true;
+        try {
+          var lle = LinearLinkage.FromForwardLinks(values);
+        } catch (ArgumentException e) {
+          isValid = false;
+        }
+        Assert.IsFalse(isValid, "[{0}] is invalid and should throw ArgumentException!", string.Join(", ", values));
+      }
+    }
+
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void InvalidEndLinksTest() {
+      foreach (var values in invalidEndEncoding) {
+        var isValid = true;
+        try {
+          var lle = LinearLinkage.FromEndLinks(values);
+        } catch (ArgumentException e) {
+          isValid = false;
+        }
+        Assert.IsFalse(isValid, "{0} should be invalid", string.Join(", ", values));
+      }
+    }
+  }
+}
Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs	(revision 14562)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Encodings.LinearLinkageEncoding-3.4/GroupCrossoverTest.cs	(revision 14562)
@@ -0,0 +1,53 @@
+﻿using System;
+using HeuristicLab.Random;
+using HeuristicLab.Tests;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Encodings.LinearLinkageEncoding.Tests {
+  [TestClass()]
+  public class GroupCrossoverTest {
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void EqualParentsTest() {
+      var random = new FastRandom(0);
+      var parent = LinearLinkage.SingleElementGroups(10);
+      var child = GroupCrossover.Apply(random, parent, parent);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(parent, child));
+
+      parent = RandomLinearLinkageCreator.Apply(random, 10);
+      child = GroupCrossover.Apply(random, parent, parent);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(parent, child));
+    }
+
+    // Example from paper:
+    // Multi-objective Genetic Algorithms for grouping problems. Korkmaz, E.E. Applied Intelligence (2010) 33: 179. 
+    [TestMethod()]
+    [TestCategory("Encodings.LinearLinkage")]
+    [TestProperty("Time", "short")]
+    public void ExampleFromPaperTest() {
+      var parent1 = LinearLinkage.FromEndLinks(new[] { 3, 4, 3, 3, 4 });
+
+      var parent2 = LinearLinkage.FromEndLinks(new[] { 2, 2, 2, 4, 4 });
+
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 4, 2, 3, 4 }, new[] { 0.0, 0.0, 0.0, 0.0 }); // (i)
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 3, 4 }, new[] { 0.0, 0.0, 0.0, 0.9 }); // (iv)
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 2, 2, 3, 4 }, new[] { 0.0, 0.0, 0.9, 0.0 }); // (iii)
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 2, 2, 3, 4 }, new[] { 0.0, 0.0, 0.9, 0.9 }); // (ii)
+      CheckGroupCrossover(parent1, parent2, new[] { 3, 4, 3, 3, 4 }, new[] { 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 4, 4 }, new[] { 0.9, 0.0, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 2, 2, 4, 4 }, new[] { 0.9, 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 4, 4, 4 }, new[] { 0.9, 0.9, 0.0, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 4, 4, 4 }, new[] { 0.9, 0.9, 0.0, 0.9 });
+      CheckGroupCrossover(parent1, parent2, new[] { 2, 4, 2, 4, 4 }, new[] { 0.9, 0.9, 0.9, 0.0 });
+      CheckGroupCrossover(parent1, parent2, new[] { 4, 4, 2, 4, 4 }, new[] { 0.9, 0.9, 0.9, 0.9 });
+    }
+
+    private void CheckGroupCrossover(LinearLinkage parent1, LinearLinkage parent2, int[] expectedllee, double[] randomNumbers) {
+      var expected = LinearLinkage.FromEndLinks(expectedllee);
+      var random = new TestRandom() { DoubleNumbers = randomNumbers };
+      var child = GroupCrossover.Apply(random, parent1, parent2);
+      Assert.IsTrue(Auxiliary.LinearLinkageIsEqualByPosition(expected, child), "Expected [{0}] but was [{1}]!", string.Join(", ", expected), string.Join(", ", child));
+    }
+  }
+}
Index: branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14492)
+++ branches/MemPRAlgorithm/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 14562)
@@ -511,5 +511,7 @@
     <Compile Include="HeuristicLab.Encodings.IntegerVectorEncoding-3.3\UniformOnePositionManipulatorTest.cs" />
     <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.3\MoveTests.cs" />
-    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.3\ConversionTests.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\Auxiliary.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\ConversionsTest.cs" />
+    <Compile Include="HeuristicLab.Encodings.LinearLinkageEncoding-3.4\GroupCrossoverTest.cs" />
     <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\Auxiliary.cs" />
     <Compile Include="HeuristicLab.Encodings.PermutationEncoding-3.3\CosaCrossoverTest.cs" />
