Merge Sort: Arbitrary Merge

Objective

The objective of this experiment is to demonstrate that the sequence of operations involved in performing mergesort is not unique. It is possible to arbitrarity select the sequence of operations.

Experiment Setup

This experiment is similar to the recursive mergesort experiment. You are presented with the same graph consisting of data and operation nodes. The difference here is that when you click on a split node, you are not provided with the nodes that lead to the corresponding merge. You are free to select any two sorted nodes and merge them together to form anther sorted node.

Procedure

  1. Click on the split nodes to split nodes to split the list into two.
  2. Select any two sorted lists to get the merge node.
  3. Click on the merge node to merge the two sorted lists.
  4. Observe that in the end you always get the sorted version of the original list.