Sorting


Sorting
Sorting type

Sorting is any process of arranging items in some sequence and/or in different sets, and accordingly, it has two common, yet distinct meanings:

  1. ordering: arranging items of the same kind, class, nature, etc. in some ordered sequence,
  2. categorizing: grouping and labeling items with similar properties together (by sorts).

Contents

Sorting information or data

For sorting we can either specify a weak order "should not come after" or a strict weak order "should come before" (specifying one defines also the other, the two are the complement of the inverse of each other, see operations on binary relations). For the sorting to be unique, these two are restricted to a total order and a strict total order, respectively.

Sorting n-tuples (depending on context also called e.g. records consisting of fields) can be done based on one or more of its components. More generally objects can be sorted based on a property. Such a component or property is called a sort key.

For example, the items are books, the sort key is the title, subject or author, and the order is alphabetical.

A new sort key can be created from two or more sort keys by lexicographical order. The first is then called the primary sort key, the second the secondary sort key, etc.

For example, addresses could be sorted using the city as primary sort key, and the street as secondary sort key.

If the sort key values are totally ordered, the sort key defines a weak order of the items: items with the same sort key are equivalent with respect to sorting. See also stable sorting. If different items have different sort key values then this defines a unique order of the items.

A standard order is often called ascending (corresponding to the fact that the standard order of numbers is ascending, i.e. A to Z, 0 to 9), the reverse order descending (Z to A, 9 to 0). For dates/times ascending means that earlier values precede later ones e.g. 1/1/2000 will sort ahead of 1/1/2001.

In computer science, sorting is one of the most extensively researched subjects because of the need to speed up the operation on thousands or millions of records during a search operation; see sorting algorithm.

The main purpose of sorting information is to optimise its usefulness for specific tasks. In general, there are two ways of grouping information: by category e.g. a shopping catalogue where items are compiled together under headings such as 'home', 'sport & leisure', 'women's clothes' etc. (nominal scale) and by the intensity of some property, such as price, e.g. from the cheapest to most expensive (ordinal scale). Richard Saul Wurman, in his book Information Anxiety, proposes that the most common sorting purposes are Name, by Location and by Time (these are actually special cases of category and hierarchy). Together these give the acronym LATCH (Location, Alphabetical, Time, Category, Hierarchy) and can be used to describe just about every type of ordered information.

Often information is sorted using different methods at different levels of abstraction: e.g. the UK telephone directories which are sorted by location, by category (business or residential) and then alphabetically. New media still subscribe to these basic sorting methods: e.g. a Google search returns a list of web pages in a hierarchical list based on its own scoring system for how closely they match the search criteria (from closest match downwards).

The opposite of sorting, rearranging a sequence of items in a random or meaningless order, is called shuffling.

Physical sorting processes

Various sorting tasks are essential in industrial processes. For example, during the extraction of gold from ore, a device called a shaker table uses gravity, vibration, and flow to separate gold from lighter materials in the ore (sorting by size and weight). Sorting is also a naturally occurring process that results in the concentration of ore or sediment. Sorting results from the application of some criterion or differential stressor to a mass to separate it into its components based on some variable quality. Materials that are different, but only slightly so, such as the isotopes of uranium, are very difficult to separate.

See also

External links


Wikimedia Foundation. 2010.

Look at other dictionaries:

  • Sorting — Sort Sort, v. t. [imp. & p. p. {Sorted}; p. pr. & vb. n. {Sorting}.] 1. To separate, and place in distinct classes or divisions, as things having different qualities; as, to sort cloths according to their colors; to sort wool or thread according… …   The Collaborative International Dictionary of English

  • sorting — Synonyms and related words: EDP, analysis, analyzing, appraisal, arrangement, assessment, assortment, cataloging, categorization, classification, classifying, codification, collating, computer technology, computer typesetting, computing, culling …   Moby Thesaurus

  • sorting — rūšiavimas statusas T sritis automatika atitikmenys: angl. classification; sort; sorting vok. Sortieren, n; Sortierung, f rus. сортировка, f; упорядочение, n pranc. classement, m; tri, m; triage, m …   Automatikos terminų žodynas

  • sorting — rūšiavimas statusas T sritis chemija apibrėžtis Skirstymas rūšimis. atitikmenys: angl. sorting rus. рассортировка; сортирование; сортировка …   Chemijos terminų aiškinamasis žodynas

  • sorting — medicininis rūšiavimas statusas T sritis Gynyba apibrėžtis Sužeistųjų būklės įvertinimas ir jų skirstymas gydymo ir evakuacijos tikslais. Jie rūšiuojami pagal sužeidimo laipsnį, tipą ir galimybę išgyventi, nustatoma gydymo ar evakavimo pirmenybė …   NATO terminų aiškinamasis žodynas

  • sorting — rikiavimas statusas T sritis informatika apibrėžtis Objektų išdėstymas į eilę pagal kurį nors jų parametrą, skaičių – pagal jų dydį, žodžių – pagal raidžių ↑rikiavimo eilę abėcėlėje ir pan. Rikiuoti galima dvejopai: ↑didėjančiai arba ↑mažėjančiai …   Enciklopedinis kompiuterijos žodynas

  • sorting — rūšiavimas statusas T sritis informatika apibrėžtis Objektų skirstymas į grupes (rūšis) pagal tam tikrą požymį: spalvą, tipą ir pan. Jeigu objektai išdėstomi į eilę, tai tada sakoma, kad jie rikiuojami. Rūšiavimas buvo intensyviai naudojamas… …   Enciklopedinis kompiuterijos žodynas

  • sorting — noun 1. the basic cognitive process of arranging into classes or categories • Syn: ↑classification, ↑categorization, ↑categorisation • Derivationally related forms: ↑categorize (for: ↑categorization), ↑ …   Useful english dictionary

  • sorting — 1. A person, thing, or activity from which information is obtained. 2. In clandestine activities, a person (agent), normally a foreign national, in the employ of an intelligence activity for intelligence purposes. 3. In interrogation activities,… …   Military dictionary

  • sorting — /sawr ting/, n. Geol. the process by which sedimentary particles become separated according to some particular characteristic, as size or shape. [SORT + ING1] * * * …   Universalium


Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”

We are using cookies for the best presentation of our site. Continuing to use this site, you agree with this.