wBd1
That is: two things, in a fixed order.
An ordered pair can be thought of as a sequence of length 2
y=2
x=-2 x=2
y=2
y=2
x=-2 x=2
y=2
>>> [a,b] ## ordered pair
['one thing', 'another thing']
>>> {{a},{a,b}} ## ordered pair with sets
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: unhashable type: 'set'
>>>Ordered Pair
An ordered pair is a set of two elements, a set containing the head element of the pair, and a set containing both elements of the pair.
\[ \begin{align*} \text{Head}(p) &:= x : x \in \bigcap p \\ \text{Head}(p) &:= x : \forall Y \in p : x \in Y \end{align*} \]
\[ \begin{align*} \text{Tail}(p) &:= x : x \in \bigcup p \setminus \bigcap p \\ \text{Tail}(p) &:= x : \exists Y_1, Y_2 \in p : x \in Y_1 \land x \notin Y_2 \end{align*} \]
Amtrak is an ordered pairAmtrak = (Stations, Trains)
| ALBANY | EVERETT | PORTLAND | TUKWILA | EUGENE |
| BELLINGHAM | KELSO/LONGVIEW | SALEM | VANCOUVER BC | OREGON CITY |
| CENTRALIA | MOUNT VERNON | SEATTLE | VANCOUVER WA | TACOMA |
| EDMONDS | OLYMPIA/LACEY | STANWOOD |
| CENTRALIA | OLYMPIA/LACEY | SEATTLE | TUKWILA |
| KELSO/LONGVIEW | PORTLAND | TACOMA | VANCOUVER WA |
*p refers to the value at location p.**p does not refer to to p, rather, we would use & to go in the reverse direction.Order north-to-south:
SEATTLE
TUKWILA
TACOMA
OLYMPIA/LACEY
CENTRALIA
KELSO/LONGVIEW
VANCOUVER WA
PORTLANDCentralia and Keslo/Longview is an edge.
The others, like Seattle and Tacoma, are not edges.
| (SEATTLE, TUKWILA) | (CENTRALIA, KELSO) |
| (TUKWILA, TACOMA) | (KELSO, VANCOUVER) |
| (TACOMA, OLYMPIA) | (VANCOUVER, PORTLAND) |
| (OLYMPIA, CENTRALIA) |
We can express G using only sets over elements of stations (this is basically JSON):
Amtrak recently added lines, including the Hiawatha, with service from Milwaukee to the world’s greatest city, Chicago.
From the grandeur of Grant Park’s Buckingham Fountain to iconic museums and skyscrapers, see for yourself why Chicago was once dubbed “Paris on the Prairie.” Engage in retail therapy on the Magnificent Mile or root for the home team within the friendly confines of famed Wrigley Field.
We denote all pairs using a “Cartesian product”:
\(S \times S\) in LaTeX
\[ C \times C = \{ (G, Y), (G, R), (Y, R), (Y, G),(R, G), (R, Y) \} \]
\[ C \times C = \{ (G, Y), (G, R), (Y, R), (Y, G),(R, G), (R, Y) \} \]
L(G) = YgLy| \(G\) | \(Y\) | \(R\) | |
|---|---|---|---|
| \(G\) | x | ||
| \(Y\) | x | ||
| \(R\) | x |
| \(G\) | \(Y\) | \(R\) | |
|---|---|---|---|
| \(G\) | x | ||
| \(Y\) | x | ||
| \(R\) |
We note that Rainbow \(B\) (\(R\) is taken) is also a binary relation.
We will explore its properties. \[ B \subset C \times C = \{ (R,Y), (Y,G) \} \]
We additionally note that while \(R\) is immediately above \(Y\), it is also above \(G\)
\[ ((a, b) \in R \land (b, c) \in R) \implies (a, c) \in R \]
| \(G\) | \(Y\) | \(R\) | |
|---|---|---|---|
| \(G\) | x | ||
| \(Y\) | x | ||
| \(R\) |
\[ R^+ \supseteq R \]
R⁺ ⊃ R
\[ \forall p \in R, p \in R^+ \]
\[ \forall x,y \in S, (x,y) \in R \subset S \times S \implies (x,y) \in R^+ \]
\[ ((a, b) \in R \land (b, c) \in R) \implies (a, c) \in R \]
\[ G = (V, E) := \{ \{V\}, \{V,E\}\} \]
\(\text{Cyclic}(G = (V, E)) := \exists v \in V: \{v, v\} \in E^+\)
list_t using trees.3 is of height 2.4 is of depth 2.