sec reductions figure an illustration of pairing the two lists of numbers are paired up so that the least values from each list make pairthe next smallest values from each list make pairand so on known in software engineering as software reuse to illustrate thislet us consider another problem pairinginputtwo sequences of integers ( xn- and ( yn- outputa pairing of the elements in the two sequences such that the least value in is paired with the least value in ythe next least value in is paired with the next least value in yand so on figure illustrates pairing one way to solve pairing is to use an existing sorting program by sorting each of the two sequencesand then pairing-off items based on their position in sorted order technicallywe say that pairing is reduced to sortingbecause sorting is used to solve pairing notice that reduction is three-step process the first step is to convert an instance of pairing into two instances of sorting the conversion step is not very interestingit simply takes each sequence and assigns it to an array to be passed to sorting the second step is to sort the two arrays ( apply sorting to each arraythe third step is to convert the output of sorting to the output for pairing this is done by pairing the first elements in the sorted arraysthe second elementsand so on the reduction of pairing to sorting helps to establish an upper bound on the cost of pairing in terms of asymptotic notationassuming that we can