Sorting is any process of arranging items in some sequence and/or in different sets, and accordingly, it has two common, yet distinct meanings:
Contents |
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). In Mathematics, especially Order theory, a strict weak ordering is a Binary relation S that is a strict partial order In Mathematics, a binary relation (or a dyadic or 2-place relation) is an arbitrary association of elements within a set or with elements of For the sorting to be unique, these two are restricted to a total order and a strict total order, respectively. In Mathematics and Set theory, a total order, linear order, simple order, or (non-strict ordering is a Binary relation
Sorting n-tuples (depending on context also called e. In Mathematics, a tuple is a Sequence (also known as an "ordered list" of values called the components of the tuple g. records consisting of fields) can be done based on one or more of its components. In Computer science, object composition (not to be confused with function composition) is a way and practice to combine simple objects or 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. In Mathematics, the lexicographic or lexicographical order, (also known as dictionary order, alphabetic order or lexicographic(al product 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. In Mathematics and Set theory, a total order, linear order, simple order, or (non-strict ordering is a Binary relation In Mathematics, especially Order theory, a strict weak ordering is a Binary relation S that is a strict partial order See also stable sorting. In Computer science and Mathematics, a sorting algorithm is an Algorithm that puts elements of a list in a certain order. 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).
Now if you sort on different keys, then you get different lists of header information (such as the author's name) with the appended tailing records (such as title or publisher). Sorting in computer science 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. Computer science (or computing science) is the study and the Science of the theoretical foundations of Information and Computation and their In Computer science and Mathematics, a sorting algorithm is an Algorithm that puts elements of a list in a certain order.
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. Sampling is that part of Statistical practice concerned with the selection of individual observations intended to yield some knowledge about a population of concern g. from the cheapest to most expensive (ordinal scale). This is illustrated by the following story:
Managers are on a course of basic computer terms and they are explained the meaning of sorting. The lecturer comes in and throws hundreds of various nails and screws, new, old, rusty and crooked, of different size and material on the table. S/he then tells them to: sort! The students in no time create a dozen or so heaps each with relatively homogeneous members, and with some undecided cases left. The lecturer picks up a straight and strong nail, and hammers it in the wall with his/her shoe sole. "You failed to ask sort what for, or what to sort on" - s/he would tell the puzzled audience.
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). Richard Saul Wurman (born 1935 in Philadelphia is an American Architect and Graphic designer. 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 reshuffling. Shuffling is a procedure used to randomize a deck of Playing cards to provide an element of chance in Card games Shuffling is often followed by a
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). Gold (ˈɡoʊld is a Chemical element with the symbol Au (from its Latin name aurum) and Atomic number 79 Gravitation is a natural Phenomenon by which objects with Mass attract one another Oscillation is the repetitive variation typically in Time, of some measure about a central value (often a point of Equilibrium) or between two or more different states Sorting is also a naturally occurring process that results in the concentration of ore or sediment. An ore is a volume of rock containing components or Minerals in a mode of occurrence that renders it valuable for mining Sorting indicates the distribution of grain size of Sediments either in Unconsolidated deposits or in Sedimentary rocks Poorly sorted 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.