sec lower bounds for sorting xyz xyz yzx xzy zxy yxz zyx yes yxz yxz yzx zyx [ ]< [ ]( < ?no xyz xyz xzy zxy yes no yes no [ ]< [ ] [ ]< [ ]yzx ( < ?yxz xzy ( < ?xyz yzx xzy zyx zxy yes no yes no [ ]< [ ] [ ]< [ ]zxy ( < ?xzy zyx ( < ?yzx figure decision tree for insertion sort when processing three values labeled xyand zinitially stored at positions and respectivelyin input array initially stored in positions and respectivelyof input array consider the possible outputs initiallywe know nothing about the final positions of the three values in the sorted output array the correct output could be any permutation of the input values for three valuesthere are permutations thusthe root node of the decision tree lists all six permutations that might be the eventual result of the algorithm when the first comparison made by insertion sort is between the second item in the input array (yand the first item in the array (xthere are two possibilitieseither the value of is less than that of xor the value of is not less than that of this decision is modeled by the first branch in the tree if is less than xthen the left branch should be taken and must appear before in the final output only three of the original six permutations have this propertyso the left child of the root lists the three permutations where appears before xyxzyzxand zyx likewiseif were not less than xthen the right branch would be takenand only the three permutations in which appears after are possible outcomesxyzxzyand zxy these are listed in the right child of the root let us assume for the moment that is less than and so the left branch is taken in this caseinsertion sort swaps the two values at this point the array stores yxz thusin figure the left child of the root shows yxz above the line nextthe third value in the array is compared against the second ( is