Having a hard time wrapping my head around order relations

78 Views Asked by At

I am having a hard time trying to understand what partial order and total order relations are. I need to answer a question in which I am given "two sequences S1 and S2 of n elements, possibly containing duplicates, on which a total order relation is defined".

Can someone give me a concrete example of what S1 and S2 might look like? Using that same example, please also explain what exactly makes this a total order relation.

3

There are 3 best solutions below

9
On BEST ANSWER

The wording is somewhat ambiguous: is $n$ the length of the sequences? Is $n$ the number of elements on which the total order is defined? Is the total order defined on the two sequences or the $n$ elements? (The answer to this last question is surely the $n$ elements, since an order on two things is not interesting.) But the point is to understand orders, so...

A simple example of a total order is the usual $\le$ relation on the integers. It wasn't specified in the question that the elements of the sequence had to be in order, but assuming they do, such a sequence might look like $(1,2,3,3,3,7)$. In a total order, it is clear how any two elements $x, y$ relate to each other: either $x < y$, $x = y$, or $x > y$.

In a partial order, we can't necessarily compare two elements. A natural example is the subset relation between sets. Some sets are comparable, e.g., $\emptyset \subset \{1,2\} \subset \{1,2,3,4,5\}$; others, however, cannot be compared: it is not true that $\{1,2\} \subset \{1,3,5\}$, nor is it true that $\{1,3,5\} \subset \{1,2\}$, nor are they equal. This is the partial. Nevertheless, this relation behaves in predictable ways: if $A \subset B$ and $B \subset C$, then we know that $A \subset C$. This is the order.

0
On

This means that all the elements of $S_1$ and $S_2$ (that can be seen as multisets) can be compared to one another.

  • For example, you could have sequences of integers, as integers are totally ordered (by the usual "smaller than" $≤$ or "greater than" $≥$ relations): e.g. $S_1 ≝ (1, 2, 2, 4) \quad S_2 ≝ (2, 2, 6, 1)$

  • But the same can't be said of sequences of pairs of integers for the pointwise order: $$(a, b) ≤ (a', b') ⟺ a ≤ a' ∧ b ≤ b'$$

    In this case, you only have a partial order: you can't compare $(0, 1)$ and $(1, 0)$ for example. So, for example, $S_1 ≝ \big((0, 1), (1, 0)\big) \quad S_2 ≝ \big((0, 0), (1, 0), (0, 2)\big)$ wouldn't satisfy your hypothesis.

1
On

A totally ordered set is a set along with a binary relation $\mathbb {R}$ which is transitive, antisymmetric and connex.

Transitive means $$ a \mathbb {R} b\text { and } b \mathbb {R} c \implies a \mathbb {R} c$$

Antisymmetric means $$ a \mathbb {R} b\text { and }b \mathbb {R} a \implies a=b$$

Connex means For every pair $a$ and $b$, either $ a \mathbb {R} b$ or $ b \mathbb {R} a$

As an example $$A=\{5,12,34,52\}$$ with the regular $\le$ is a totally ordered set.

Another example: $$A=\{a,b,c,d,e,f\}$$ with the dictionary order is a totally ordered set.