Binary prioritization

from Wikipedia, the free encyclopedia

Binary prioritizing or binary prioritization is a sorting process , with a lot to be done Direction tasks prioritized (or more generally to be sorted elements sorted ) can be by important tasks during the prioritized process are continually prioritized to the top while deferred tasks not be prioritized.

In contrast to other binary methods (e.g. binary search ), when using this method, it is assumed that the deferred tasks (have to) will be prioritized again in a later process, but that their order is not relevant at the current time . As a result, the tasks classified as more important are processed more quickly and the effort of sorting is reduced due to the subset of the less important tasks that cannot be sorted. In each iteration , the effort is reduced by the sorted out elements.

Requirements for the application

When using binary prioritization, it is assumed that the elements to be prioritized are in an unsorted stack (more abstractly: an unsorted list ).

algorithm

The binary prioritization algorithm works as follows:

step 1
  • An element is taken from the stack (or list).
  • The element (the task) is analyzed for priority (importance) relative to the other elements.
Level 2
  • If the element is judged to be important , it is sorted onto a new stack (into a new list) of important elements; instead, if it is considered unimportant , it is sorted onto another stack (into a different list) of unimportant items. This is repeated in the first run until all elements have been assessed and are available in two new stacks (or lists).
level 3
  • The two stacks (lists) are reunited by placing the stack of important items on top of the items considered unimportant. The last element of the list of the elements classified as important ( separator ) is noted .
Level 4
  • The algorithm is then applied in a further iteration on the newly created (combined) stack up to the element until the noted separator element has been processed.
  • If only one element was edited in the last step, the algorithm is complete. The elements classified as most important are on top of the stack, while the lowest elements are classified as unimportant but not sorted.

application

An example of the use of binary sorting is the following scenario:

The processor of a post box has a batch of letters to be answered or a large number of incoming e-mails that should not be processed in the order in which they were received, but sorted according to importance (see post box case study ). In the time in which the processor sorts the rather unimportant e-mails according to importance, he could have already started editing or forwarding the important ones and sort the rather unimportant ones in a second pass.