Hasse diagrams for sorts of size 3 and 4?

326 Views Asked by At

Does anyone know what does the following mean? I understand that a Hasse diagram represents a given partial order but I don't seem to get this example.

Below is a Hasse diagrams for sorts of size 3 and 4.

enter image description here

2

There are 2 best solutions below

0
On

The diagrams are describing the steps in some sorting algorithm (couldn't tell you which) and giving the resulting partial order at each step in the form of a Hasse diagram. It appears that each case starts with an antichain and ends in a chain.

0
On

Based on the link you provided, it's now clear what this diagram is. The diagram is obtained by collapsing the decision tree of a comparison-based sorting algorithm, as follows. First draw the decision tree for a sorting algorithm, with the two solid dots in each step representing the two elements that are being compared. In the resulting decision tree, whenever the left and right subtrees of a node are isomorphic, replace the two subtrees with a single subtree. This gives the collapsed diagram that you have.