Editing Lexicographic order

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 3: Line 3:
 
==Examples==
 
==Examples==
 
The lexicographic ordering inherits the properties of the underlying ordering.
 
The lexicographic ordering inherits the properties of the underlying ordering.
* A [[partial order]] on <math>S</math> will give a partial lexicographic order. For example, the [[case-insensitive]] ordering on the Latin alphabet {'''a''', '''b''', ..., '''z''', '''A''', '''B''', ..., '''Z'''} allows us to order English words. When a pair of corresponding elements is not comparable, we skip them. The word '''Poland''' is smaller than the word '''polish''', for example, because '''P''' and '''p''' are not comparable, '''o''' and '''o''' are equal, '''l''' and '''l''' are equal, but at the fourth position, we have '''a''' < '''i'''. Likewise, the word '''polish''' is smaller than the word '''polished''', because it is a proper prefix, and '''Polish''' is also smaller than '''polished'''. The words '''polish''' and '''Polish''', however, are not comparable, since neither is less than the other, but they are also not equal. (Nevertheless, the term ''case-insensitive'', strictly interpreted, suggests that these strings are to be treated as equal; we have used the term in a slightly different way to demonstrate a partial lexicographic ordering.)
+
* A partial order on <math>S</math> will give a partial lexicographic order. For example, the [[case-insensitive]] ordering on the Latin alphabet {'''a''', '''b''', ..., '''z''', '''A''', '''B''', ..., '''Z'''} allows us to order English words. When a pair of corresponding elements is not comparable, we skip them. The word '''Poland''' is smaller than the word '''polish''', for example, because '''P''' and '''p''' are not comparable, '''o''' and '''o''' are equal, '''l''' and '''l''' are equal, but at the fourth position, we have '''a''' < '''i'''. Likewise, the word '''polish''' is smaller than the word '''polished''', because it is a proper prefix, and '''Polish''' is also smaller than '''polished'''. The words '''polish''' and '''Polish''', however, are not comparable, since neither is less than the other, but they are also not equal. (Nevertheless, the term ''case-insensitive'', strictly interpreted, suggests that these strings are to be treated as equal; we have used the term in a slightly different way to demonstrate a partial lexicographic ordering.)
 
* A total order on <math>S</math> will give a total lexicographic order. For example, the set {'''a''', '''b''', ..., '''z'''} is totally ordered (uppercase letters have been excluded). Because no pair of elements can ever fail to be comparable, no pair of sequences can fail to be comparable, either, under our procedure. Hence again we have '''poland''' < '''polish''' < '''polished'''. (The sequences '''Poland''' and '''Polish''' are not allowed this time.)
 
* A total order on <math>S</math> will give a total lexicographic order. For example, the set {'''a''', '''b''', ..., '''z'''} is totally ordered (uppercase letters have been excluded). Because no pair of elements can ever fail to be comparable, no pair of sequences can fail to be comparable, either, under our procedure. Hence again we have '''poland''' < '''polish''' < '''polished'''. (The sequences '''Poland''' and '''Polish''' are not allowed this time.)
 
* A wellorder on <math>S</math> will give a lexicographic wellorder, which means that, given enough time (potentially infinitely much), we can actually list out all sequences in increasing lexicographic order starting from the empty sequence, which is the smallest. For example, the set {'''0''','''1'''} is well-ordered, and we may well-order the binary strings of length less than or equal to 3 as follows: &lambda; < '''0''' < '''00''' < '''000''' < '''001''' < '''01''' < '''010''' < '''011''' < '''1''' < '''10''' < '''100''' < '''101''' < '''11''' < '''110''' < '''111'''.
 
* A wellorder on <math>S</math> will give a lexicographic wellorder, which means that, given enough time (potentially infinitely much), we can actually list out all sequences in increasing lexicographic order starting from the empty sequence, which is the smallest. For example, the set {'''0''','''1'''} is well-ordered, and we may well-order the binary strings of length less than or equal to 3 as follows: &lambda; < '''0''' < '''00''' < '''000''' < '''001''' < '''01''' < '''010''' < '''011''' < '''1''' < '''10''' < '''100''' < '''101''' < '''11''' < '''110''' < '''111'''.

Please note that all contributions to PEGWiki are considered to be released under the Attribution 3.0 Unported (see PEGWiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel | Editing help (opens in new window)