1

I've found two definitions – roughly:

  • the order of things that feels natural or standard to humans (like alphabetic order)
  • the order of things that is natural or intrinsic to the data type in question (like ordering numbers from smaller to bigger)

The two can obviously overlap, since what's "natural to a data type" is often something humans decided it is natural.

Is it possible that "natural" comes from "natural language"?

6
  • 1
    The "natural order" is what is broadly understood as the default ordering for a particular data type. Humans decide the convention - it isn't ordained. Alphabetical strings are always "naturally" sorted in lexicographical order. Dates by date order. Numerics are sorted by magnitude.
    – Steve
    Commented Jun 15, 2020 at 23:58
  • @Steve if normal humans considered lexicographical order natural then natural sort wouldn’t exist. Commented Jun 16, 2020 at 0:32
  • @candied_orange, I did qualify it by talking of alphabetical strings - precisely to avoid confounding cases of numbers and symbols and so on. The OP seemed to have a broader idea of "natural order" than just string sorting.
    – Steve
    Commented Jun 16, 2020 at 0:49
  • @Steve what I’m trying to call attention to is that for some things there simply isn’t a single obvious ordering. A reality that has confounded some collection libraries. In some cases looking hard at the data simply isn’t going to resolve the issue any better than a coin flip would. Commented Jun 16, 2020 at 0:55
  • 1
    @candied_orange, I agree. There is no one true way to sort data sufficient for all circumstances. It's a matter of convention for the technology and the application.
    – Steve
    Commented Jun 16, 2020 at 1:14

5 Answers 5

6

The term of “natural order” is very artificial, because the natural state of things is chaos and not order.

It appears that some (early) artificial concepts relate to physical things in the nature. For example:

  • Natural numbers can be related to quantities of countable things like the number of sheep in a herd, or like on this 5000 year old papyrus that you can witness in the Egyptian gallery of the Louvre, a number of bags of corn that someone owed to Pharao (accounting documents is really an old concept)
  • Decimal numbers can easily be related to measurable things, like the length of a field.

The natural order then refers to the order of the the natural thing to which the artificial abstraction corresponds:

  • a natural number is larger than another when it represents more things.
  • a decimal number is smaller than another if the field is smaller (visually) or if it takes less time to walk from one end to the other.

This is how a very long time ago the notion of natural order emerged for numbers. And mathematicians around the world still agree.

In modern times the true meaning “natural order" is that someone decided what "natural” shall be and that order appeared logic and useful to some people. Encyclopedist in the 18th century invented the lexicographic order for easily and systematically find a word in their large books. This quickly became “natural”.

But in reality there is no alphabet in the nature. The alphabetical order of the occidental alphabet might appear completely unnatural and illogical to the users of the Chinese alphabet. So often, natural just means “arbitrary but useful convention” and “natural” just hides the diversity of conceptual mappings in the world.

Take a provocative counter-example: Imagine you have designed a system that manages a list if objects of class People. What should be according to uou the natural order: the alphabetical order of their name? the numerical order of their social security id? the chronological order of their date of birth? their size? their wealth? whatever the choice, it’ll be completely arbitrary and not at all natural, even if many would immediately think at the alphabetical order (which puts me personally always at the end of the list).

In conclusion, both definitions are equally misleading. Use the term natural order only if you can map this order to physical dimensions. In all the other cases, clarify the nature if the order, because “natural” doesn’t exist in this case. Never hide well founded but nevertheless arbitrary and artificial behind ”natural”

2

In languages that support a comparison interface that can be included in the definition a type (e.g. the Comparable interface of Java), the term "natural order" has the precise technical meaning "ascending order as specified by the type's own comparison operation", versus an externally defined order (e.g. using a Comparator in Java).

2

I still did not see an answer with respect to formal data. Natural refers to by nature.

nature = intrinsic property

(My ad-hoc definition, there might be better ones.)

Having a list data structure with (11, 3, 61, 5) the natural order would be 11, 3, 61, 5.

Having a hash set, a set having no order, but a hash set using integer hash keys, indices into an array with possibly empty slots, then the natural order would be in order of the artificial hash key numbers.

The order can be quite chaotic like a list of classes loaded by a java virtual machine. The opposite (to natural order) would be to apply a sorting, order those classes by name.

So the natural order is defined by the most obvious (=natural, by nature) traversal (as the internals, intrinsic nature, allows; the laziest).

In computer science "natural order" has indeed that meaning IMHO.

1

Natural sort order is an ordering of strings in alphabetical order, except that multi-digit numbers are treated atomically, i.e., as if they were a single character. Natural sort order has been promoted as being more human-friendly ("natural") than the machine-oriented pure alphabetical order.[1]

For example, in alphabetical sorting "z11" would be sorted before "z2" because "1" is sorted as smaller than "2", while in natural sorting "z2" is sorted before "z11" because "2" is sorted as smaller than "11".

https://en.m.wikipedia.org/wiki/Natural_sort_order

As for your definitions, I'd consider them both the same. Default string sorting looks at each individual character in a string. While this works for some purely alphabetical strings, this way of sorting often feels off, or unnatural, in human-built strings.

When encountering numbers, humans often sort these atomically: By looking at the number as a whole. This means that 23 comes before 100, even though the character '1' comes before the character '2'.

Therefore, a natural sorting algorithm looks at the implied data type, and sorts according to the most 'natural' order in this context. If it encounters numeric characters, it breaks out of the default String sorting, and uses numerical (integer) sorting for that part of the string.

Because it approaches our 'natural' human way of sorting more closely than regular string sorting would, it's been given the name "natural order numerical sorting": http://www.naturalordersort.org/

0

Order Theory does not distinguish orders between "natural" and "not natural." Since ordering is a mathematical property this makes sense. Order Theory does distinguish between Total Orderings and Partial Orderings.

There is probably some overlap between the notion of "natural ordering" and total ordering. But the notion of "natural order" is philosophically suspect. Humans don't all agree on alphabetic order. It's worth noting that "natural language" has an ostensive definition: natural language is defined by use not by theory or definition.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.