Binary prioritization

Binary prioritize, or Binary prioritization is a sorting process by which a lot of to-do Descending tasks prioritized (or more generally, elements to be sorted sorted ) may be by important tasks are increasingly prioritized during the prioritized process up while deferred tasks not be prioritized.

Unlike other binary method (eg binary search) is followed during the application of this procedure assumes that the deferred work are prioritized again in a later process ( must ), but their order at the current time is not relevant. This faster processing of classified important tasks is achieved and due to the non reduces the effort of sorting to be sorted subset of the less important tasks. In each iteration, the cost is reduced by the sorted elements.

Conditions for the application

In applying the binary prioritization is assumed that the elements to be prioritized in an unsorted stack ( abstract: an unordered list ) are present.

Algorithm

The algorithm of the binary prioritization takes place as follows:

  • The stack (or of the list), an element is removed.
  • The element ( the object ) will be analyzed on a priority (importance ) relative to the other elements.
  • If the item is judged to be important, it is sorted on a new stack ( in a new list ) of important elements; Instead, it is considered important, it is sorted in a different batch insignificant ( in other list) elements. This is repeated in the first pass until all items have been evaluated in two new stacks ( or lists ) are present. level 2
  • The two stacks (lists) are reunited by the stacking of the important elements is placed on the measures which are both important elements. This one remembers the last element of the list as the important classified elements ( separator). level 3
  • The algorithm is then applied in a further iteration on the newly created ( united) stack up to the element until the pinned separator element was processed.
  • If only one item is being edited in the last step, the algorithm is complete. The most important classified as elements lie on top of the stack, while the lowest elements classified as unimportant, but were not sorted in itself. level 4

Application

An example of the application of Binary sorting is the following scenario:

The editor of a mailbag there is a stack of letters to be answered Direction or a large amount of received e - mails that are to be processed not sorted in order of receipt, but in order of importance (see mailbag case study ). In the time in which the agent rather unimportant e- mails in order of importance, he could already use the Edit or forward the important and have begun the sort rather unimportant in a second pass.

  • Sorting algorithm
125511
de