B-trees, preorders, and partial orders.

main
Joshua Potter 2024-08-16 07:56:37 -06:00
parent d5bb63618f
commit 3f54cbe3b9
10 changed files with 290 additions and 138 deletions

View File

@ -163,40 +163,12 @@
]
},
"Added Media": [
"closed-addressing.png",
"open-addressing.png",
"binary-search-tree.png",
"bst-right-child.png",
"bst-right-child-after.png",
"bst-left-child.png",
"bst-left-child-after.png",
"bst-right-succ.png",
"bst-right-succ-after.png",
"bst-deep-succ.png",
"bst-deep-succ-after.png",
"free-tree.png",
"forest.png",
"cyclic-undirected.png",
"rooted-tree.png",
"ordered-rooted-tree-cmp.png",
"ordered-binary-tree-cmp.png",
"lcrs-nodes.png",
"binary-tree-nodes.png",
"perfect-tree.png",
"complete-tree.png",
"non-complete-tree.png",
"relation-ordering-example.png",
"infinite-cartesian-product.png",
"b-tree-full-node.png",
"b-tree-split-node.png",
"b-tree-initial.png",
"b-tree-inserted-b.png",
"b-tree-inserted-q.png",
"church-rosser.png",
"normalized-form.png",
"denormalized-form.png",
"infinity.png",
"nan.png"
"relation-ordering-example.png"
],
"File Hashes": {
"algorithms/index.md": "3ac071354e55242919cc574eb43de6f8",
@ -562,14 +534,14 @@
"_journal/2024-06/2024-06-04.md": "52b28035b9c91c9b14cef1154c1a0fa1",
"_journal/2024-06-06.md": "3f9109925dea304e7172df39922cc95a",
"_journal/2024-06/2024-06-05.md": "b06a0fa567bd81e3b593f7e1838f9de1",
"set/relations.md": "baf811b946bf2326d8343f126ffc6ef5",
"set/relations.md": "fa91d0d77961f49651f7d9f5d4c392f5",
"_journal/2024-06-07.md": "795be41cc3c9c0f27361696d237604a2",
"_journal/2024-06/2024-06-06.md": "db3407dcc86fa759b061246ec9fbd381",
"_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8",
"_journal/2024-06/2024-06-07.md": "c6bfc4c1e5913d23ea7828a23340e7d3",
"lambda-calculus/alpha-conversion.md": "6df655e60976715e5c6fbbe72b628c6d",
"lambda-calculus/index.md": "76d58f85c135c7df00081f47df31168e",
"x86-64/instructions/condition-codes.md": "b9430cc0ad207f210a8d5ca6dacccbd5",
"x86-64/instructions/condition-codes.md": "9c05ed99f5c96162e25f0ec4db55c656",
"x86-64/instructions/logical.md": "818428b9ef84753920dc61e5c2de9199",
"x86-64/instructions/arithmetic.md": "271218d855e7291f119f96e91f582738",
"x86-64/instructions/access.md": "c19bc3392cf493fcc9becf46c818cc50",
@ -686,7 +658,7 @@
"formal-system/abstract-rewriting.md": "8424314a627851c5b94be6163f64ba30",
"_journal/2024-07-22.md": "d2ca7ce0bbeef76395fee33c9bf36e9d",
"_journal/2024-07/2024-07-21.md": "62c2651999371dd9ab10d964dac3d0f8",
"formal-system/proof-system/natural-deduction.md": "87b7b9a78ea7f038f1b4e4fd15039fe8",
"formal-system/proof-system/natural-deduction.md": "88cf72e12f3135312c715497493d21ff",
"startups/term-sheet.md": "6b6152af78addb3fe818a7fc9d375fbf",
"startups/financing-rounds.md": "00a622fda2b4b442901bde2842309088",
"_journal/2024-07-23.md": "35e18a1d9a8dd0a97e1d9898bc1d8f01",
@ -730,7 +702,7 @@
"_journal/2024-08/2024-08-07.md": "119c052f4109a3e098d825b771af89de",
"_journal/2024-08-09.md": "2ce3e0c468f51750d8ad86a19bcc3264",
"_journal/2024-08/2024-08-08.md": "b8211a4c576ff594217e2e9cae9396c0",
"data-structures/b-tree.md": "ccd4256aaef57e7c793ca72da6de5808",
"data-structures/b-tree.md": "73d87a471173962a21ad059a709c55c4",
"data-structures/binary-tree.md": "67b0b5b9688faa205983993fe507079a",
"_journal/2024-08-10.md": "08e7ea4a78c46645b93ec51e2372d04f",
"_journal/2024-08/2024-08-09.md": "2ce3e0c468f51750d8ad86a19bcc3264",
@ -738,7 +710,14 @@
"_journal/2024-08/2024-08-10.md": "08e7ea4a78c46645b93ec51e2372d04f",
"_journal/2024-08-12.md": "8a37a2d1381f9d9e29d83031bad80dd0",
"_journal/2024-08/2024-08-11.md": "acc91e07b43590e90846d2c936dcb3d5",
"c17/types.md": "2bca56b2d95cc358553fb798acde6522"
"c17/types.md": "2bca56b2d95cc358553fb798acde6522",
"_journal/2024-08-14.md": "800650b9fa2f4445a174e0a547c2fa95",
"_journal/2024-08/2024-08-13.md": "8b64225b06d1164a91176b123a3513a2",
"_journal/2024-08/2024-08-12.md": "e57b03b929410f3111c894e43e1728ec",
"_journal/2024-08-15.md": "fabf6e09bfd99cd180a4c674f83ebcb9",
"_journal/2024-08/2024-08-14.md": "f7d1dede5ab6e4634ad9de3d3426c6f7",
"_journal/2024-08-16.md": "15fab7ec5b9dc08e4065a1bce88653c7",
"_journal/2024-08/2024-08-15.md": "7c3a96a25643b62b0064bf32cb17d92f"
},
"fields_dict": {
"Basic": [

View File

@ -0,0 +1,11 @@
---
title: "2024-08-16"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Notes on [[relations#Preorders|preorders]] and [[relations#Partial Orders|partial orders]].

View File

@ -0,0 +1,9 @@
---
title: "2024-08-13"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)

View File

@ -0,0 +1,9 @@
---
title: "2024-08-14"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)

View File

@ -0,0 +1,11 @@
---
title: "2024-08-15"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Implemented B+-tree search, insertions, and deletions.

View File

@ -36,7 +36,7 @@ END%%
%%ANKI
Basic
How is the order of a B-tree typically determined?
How is the order of a B-tree typically decided?
Back: By choosing a value that best aligns with the size of a memory block.
Reference: Donald Ervin Knuth, _Art of Computer Programming, 3: Sorting and Searching_, 2. ed., 34. (Reading, Mass: Addison-Wesley, 1995).
<!--ID: 1723289256285-->

View File

@ -197,7 +197,7 @@ END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \lor Q \\ 2. & P \Rightarrow R \\ 3. & Q \Rightarrow R \\ \hline & P \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \lor Q \\ 2. & P \Rightarrow R \\ 3. & Q \Rightarrow R \\ \hline & R \end{array}$$
Back: $\lor{\text{-}}E$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721656601613-->

View File

@ -570,8 +570,8 @@ END%%
%%ANKI
Basic
Is $\{\langle x, y \rangle, \langle x, y, z \rangle\}$ a relation?
Back: Yes.
*Why* isn't $\{\langle x, y \rangle, \langle x, y, z \rangle\}$ a relation?
Back: N/A. It is.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1718329620187-->
END%%
@ -654,27 +654,20 @@ END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ reflexive on $\{a\}$?
Back: Yes.
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ reflexive on $\{a\}$?
Back: N/A. It is.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429812-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ reflexive on $\{a, b\}$?
Back: No.
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ reflexive on $\{a, b\}$?
Back: Because $\langle b, b \rangle \not\in R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429817-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ reflexive on $\{a, b\}$?
Back: No.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, *why* isn't $R$ reflexive on $\{a, b\}$?
@ -736,23 +729,23 @@ END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ irreflexive on $\{a\}$?
Back: No.
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ irreflexive on $\{a\}$?
Back: Because $\langle a, a \rangle \in R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888395-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ irreflexive on $\{b\}$?
Back: Yes.
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ irreflexive on $\{b\}$?
Back: N/A. It is.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888400-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, *why* isn't $R$ irreflexive on $\{a, b\}$?
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ irreflexive on $\{a, b\}$?
Back: Because $\langle a, a \rangle \in R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888406-->
@ -819,8 +812,8 @@ END%%
%%ANKI
Basic
Given $R = \{\langle a, b \rangle, \langle b, c \rangle\}$, is $R$ symmetric?
Back: No.
*Why* isn't $R = \{\langle a, b \rangle, \langle b, c \rangle\}$ symmetric?
Back: Because $aRb$ and $bRc$ but $\neg bRa$ and $\neg cRb$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429832-->
END%%
@ -863,28 +856,20 @@ END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle, \langle a, b \rangle, \langle b, a \rangle, \langle b, c \rangle\}$ antisymmetric?
Back: No.
*Why* isn't $R = \{\langle a, a \rangle, \langle a, b \rangle, \langle b, a \rangle, \langle b, c \rangle\}$ antisymmetric?
Back: Because $aRb$ and $bRa$.
Reference: “Antisymmetric Relation,” in _Wikipedia_, January 24, 2024, [https://en.wikipedia.org/w/index.php?title=Antisymmetric_relation](https://en.wikipedia.org/w/index.php?title=Antisymmetric_relation&oldid=1198625107).
<!--ID: 1721909725690-->
END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle, \langle b, b \rangle, \langle b, c \rangle\}$ antisymmetric?
Back: Yes.
*Why* isn't $R = \{\langle a, a \rangle, \langle b, b \rangle, \langle b, c \rangle\}$ antisymmetric?
Back: N/A. It is.
Reference: “Antisymmetric Relation,” in _Wikipedia_, January 24, 2024, [https://en.wikipedia.org/w/index.php?title=Antisymmetric_relation](https://en.wikipedia.org/w/index.php?title=Antisymmetric_relation&oldid=1198625107).
<!--ID: 1721909725693-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle a, b \rangle, \langle b, a \rangle, \langle b, c \rangle\}$ antisymmetric?
Back: Because $aRb$ and $bRa$.
Reference: “Antisymmetric Relation,” in _Wikipedia_, January 24, 2024, [https://en.wikipedia.org/w/index.php?title=Antisymmetric_relation](https://en.wikipedia.org/w/index.php?title=Antisymmetric_relation&oldid=1198625107).
<!--ID: 1721909725696-->
END%%
%%ANKI
Basic
Can a nonempty relation be both reflexive and antisymmetric on the same set?
@ -970,7 +955,7 @@ END%%
%%ANKI
Basic
What distinguishes the antecedent of antisymmetry's and asymmetric's FOL definition?
What distinguishes the antecedent of antisymmetry's and asymmetry's FOL definition?
Back: The former only considers *distinct* pairs of elements.
Reference: “Asymmetric Relation,” in _Wikipedia_, February 21, 2024, [https://en.wikipedia.org/w/index.php?title=Asymmetric_relation](https://en.wikipedia.org/w/index.php?title=Asymmetric_relation&oldid=1209290822).
<!--ID: 1721910949017-->
@ -1122,20 +1107,12 @@ END%%
%%ANKI
Basic
Given $R = \{\langle a, b \rangle, \langle b, c \rangle\}$, is $R$ transitive?
Back: No.
*Why* isn't $R = \{\langle a, b \rangle, \langle b, c \rangle\}$ transitive?
Back: Because $\langle a, c \rangle \not\in R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429846-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, b \rangle, \langle b, c \rangle\}$, what additional member(s) must be added to make $R$ transitive?
Back: Just $\langle a, c \rangle$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429850-->
END%%
%%ANKI
Basic
Which of symmetric relations and transitive relations is more general?
@ -1166,16 +1143,16 @@ END%%
%%ANKI
Basic
Is $R = \{\langle a, b \rangle\}$ connected on set $\{a, b\}$?
Back: Yes.
*Why* isn't $R = \{\langle a, b \rangle\}$ connected on set $\{a, b\}$?
Back: N/A. It is.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1722735199637-->
END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle\}$ connected on set $\{a, b\}$?
Back: No.
*Why* isn't $R = \{\langle a, a \rangle\}$ connected on set $\{a, b\}$?
Back: Because $\langle a, b \rangle \not\in R$ and $\langle b, a \rangle \not\in R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1722735199645-->
END%%
@ -1212,14 +1189,6 @@ Reference: “Connected Relation,” in _Wikipedia_, July 14, 2024, [https://en.
<!--ID: 1722735199672-->
END%%
%%ANKI
Basic
Is $R = \{\langle a, b \rangle\}$ strongly connected on set $\{a, b\}$?
Back: No.
Reference: “Connected Relation,” in _Wikipedia_, July 14, 2024, [https://en.wikipedia.org/w/index.php?title=Connected_relation](https://en.wikipedia.org/w/index.php?title=Connected_relation&oldid=1234415201).
<!--ID: 1722735199678-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, b \rangle\}$ strongly connected on set $\{a, b\}$?
@ -1281,20 +1250,12 @@ END%%
%%ANKI
Basic
Is $R = \{\langle 2, 3 \rangle, \langle 2, 5 \rangle, \langle 3, 5 \rangle\}$ trichotomous on $\{2, 3, 5\}$?
Back: Yes.
*Why* isn't $R = \{\langle 2, 3 \rangle, \langle 2, 5 \rangle, \langle 3, 5 \rangle\}$ trichotomous on $\{2, 3, 5\}$?
Back: N/A. It is.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1723245187602-->
END%%
%%ANKI
Basic
Is $R = \{\langle 2, 3 \rangle, \langle 3, 5 \rangle\}$ trichotomous on $\{2, 3, 5\}$?
Back: No.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1723245187605-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle 2, 3 \rangle, \langle 3, 5 \rangle\}$ trichotomous on $\{2, 3, 5\}$?
@ -1303,14 +1264,6 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1723245187609-->
END%%
%%ANKI
Basic
Is $R = \{\langle 2, 2 \rangle\}$ trichotomous on $\{2\}$?
Back: No.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1723245187613-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle\}$ trichotomous on $\{a\}$?
@ -1398,9 +1351,180 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1723245187669-->
END%%
## Preorders
$R$ is a **preorder on $A$** iff $R$ is a binary relation that is reflexive on set $A$ and transitive.
%%ANKI
Basic
What is a preorder on $A$?
Back: A binary relation reflexive on $A$ and transitive.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834775-->
END%%
%%ANKI
Basic
Which of preorders or equivalence relations are the more general concept?
Back: Preorders.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834780-->
END%%
%%ANKI
Basic
*Why* are preorders named the way they are?
Back: The name suggests its almost a partial order.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834783-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle\}$ a preorder?
Back: N/A. The question must provide a reference set.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834790-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle\}$ a preorder on $\{a\}$?
Back: N/A. It is.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834793-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, b \rangle, \langle b, c \rangle, \langle a, c \rangle\}$ a preorder on $\{a, b, c\}$?
Back: Because $R$ isn't reflexive on $\{a, b, c\}$.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834800-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, b \rangle \}$ a preorder on $\{a, b\}$?
Back: N/A. It is.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834804-->
END%%
## Partial Orders
$R$ is a **partial order on $A$** iff $R$ is a binary relation on set $A$ that is reflexive on $A$, antisymmetric, and transitive.
In other words, a partial order is an antisymmetric preorder.
%%ANKI
Basic
What is a partial order on $A$?
Back: A binary relation on $A$ that is reflexive on $A$, antisymmetric, and transitive.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108460-->
END%%
%%ANKI
Basic
Which of preorders and partial orders is the more general concept?
Back: Preorders.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108468-->
END%%
%%ANKI
Basic
Which of partial orders and equivalence relations is the more general concept?
Back: N/A.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108472-->
END%%
%%ANKI
Cloze
A preorder satisfying {antisymmetry} is a {partial order}.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723816108477-->
END%%
%%ANKI
Basic
What two properties do partial orders and equivalence relations have in common?
Back: Reflexivity and transitivity.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108482-->
END%%
%%ANKI
Basic
What property distinguishes partial orders from equivalence relations?
Back: The former is antisymmetric whereas the latter is symmetric.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108487-->
END%%
%%ANKI
Basic
*Why* is a partial order named the way it is?
Back: Not every pair of elements needs to be comparable.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108494-->
END%%
%%ANKI
Basic
Can a relation be both an equivalence relation and a partial order?
Back: Yes.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108501-->
END%%
%%ANKI
Basic
Can a nonempty relation be both an equivalence relation and a partial order?
Back: Yes.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108508-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, b \rangle\}$ a partial order?
Back: N/A. The question must provide a reference set.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108514-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, b \rangle\}$ a partial order on $\{a, b\}$?
Back: N/A. It is.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108519-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ a partial order on $\{a, b\}$?
Back: N/A. It is.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108524-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle, \langle c, b \rangle\}$ a partial order on $\{a, b\}$?
Back: It isn't antisymmetric.
Reference: “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
<!--ID: 1723816108531-->
END%%
## Equivalence Relations
Given relation $R$ and set $A$, $R$ is an **equivalence relation on $A$** iff $R$ is a binary relation on $A$ that is reflexive on $A$, symmetric, and transitive.
$R$ is an **equivalence relation on $A$** iff $R$ is a binary relation on set $A$ that is reflexive on $A$, symmetric, and transitive.
In other words, an equivalence relation is a symmetric preorder.
%%ANKI
Basic
@ -1418,6 +1542,13 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1720967429853-->
END%%
%%ANKI
Cloze
A preorder satisfying {symmetry} is an {equivalence relation}.
Reference: “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).
<!--ID: 1723814834787-->
END%%
%%ANKI
Cloze
An equivalence relation on $A$ is a {$2$}-ary relation on $A$.
@ -1427,7 +1558,7 @@ END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle\}$ an equivalence relation?
*Why* isn't $R = \{\langle a, a \rangle\}$ an equivalence relation?
Back: N/A. The question must provide a reference set.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429860-->
@ -1435,20 +1566,12 @@ END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle\}$ an equivalence relation on $\{a\}$?
Back: Yes.
*Why* isn't $R = \{\langle a, a \rangle\}$ an equivalence relation on $\{a\}$?
Back: N/A. It is.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429864-->
END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ an equivalence relation on $\{a\}$?
Back: No.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429868-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ an equivalence relation on $\{a\}$?
@ -1473,6 +1596,14 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1720969371869-->
END%%
%%ANKI
Basic
*Why* isn't $R = \{\langle a, a \rangle, \langle b, c \rangle\}$ an equivalence relation on $\{a, b\}$?
Back: It isn't symmetric.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1723816108538-->
END%%
### Equivalence Classes
The set $[x]_R$ is defined by $[x]_R = \{t \mid xRt\}$. If $R$ is an equivalence relation and $x \in \mathop{\text{fld}}R$, then $[x]_R$ is called the **equivalence class of $x$ (modulo $R$)**.
@ -1874,4 +2005,6 @@ END%%
* “Connected Relation,” in _Wikipedia_, July 14, 2024, [https://en.wikipedia.org/w/index.php?title=Connected_relation](https://en.wikipedia.org/w/index.php?title=Connected_relation&oldid=1234415201).
* “Equivalence Relation,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Equivalence_relation](https://en.wikipedia.org/w/index.php?title=Equivalence_relation&oldid=1235801091).
* Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
* “Partition of a Set,” in _Wikipedia_, June 18, 2024, [https://en.wikipedia.org/w/index.php?title=Partition_of_a_set](https://en.wikipedia.org/w/index.php?title=Partition_of_a_set&oldid=1229656401).
* “Partially Ordered Set,” in _Wikipedia_, June 22, 2024, [https://en.wikipedia.org/w/index.php?title=Partially_ordered_set](https://en.wikipedia.org/w/index.php?title=Partially_ordered_set&oldid=1230452839).
* “Partition of a Set,” in _Wikipedia_, June 18, 2024, [https://en.wikipedia.org/w/index.php?title=Partition_of_a_set](https://en.wikipedia.org/w/index.php?title=Partition_of_a_set&oldid=1229656401).
* “Preorder,” in _Wikipedia_, July 21, 2024, [https://en.wikipedia.org/w/index.php?title=Preorder](https://en.wikipedia.org/w/index.php?title=Preorder&oldid=1235839474).

View File

@ -325,17 +325,17 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program
END%%
%%ANKI
Basic
Cloze
{1:`setl`} is to {2:signed} integers whereas {2:`setb`} is to {1:unsigned} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723413572761-->
<!--ID: 1723722545356-->
END%%
%%ANKI
Basic
Cloze
{1:`setnae`} is to {2:unsigned} integers whereas {2:`setnge`} is to {1:signed} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723413572765-->
<!--ID: 1723722615056-->
END%%
%%ANKI
@ -386,17 +386,17 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program
END%%
%%ANKI
Basic
Cloze
{1:`setle`} is to {2:signed} integers whereas {2:`setbe`} is to {1:unsigned} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723466419240-->
<!--ID: 1723722615060-->
END%%
%%ANKI
Basic
Cloze
{1:`setna`} is to {2:unsigned} integers whereas {2:`setng`} is to {1:signed} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723466419242-->
<!--ID: 1723722615063-->
END%%
%%ANKI
@ -431,17 +431,17 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program
END%%
%%ANKI
Basic
Cloze
{1:`setg`} is to {2:signed} integers whereas {2:`seta`} is to {1:unsigned} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723466537473-->
<!--ID: 1723722615067-->
END%%
%%ANKI
Basic
Cloze
{1:`setnle`} is to {2:signed} integers whereas {2:`setnbe`} is to {1:unsigned} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723466537477-->
<!--ID: 1723722615071-->
END%%
%%ANKI
@ -476,17 +476,17 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program
END%%
%%ANKI
Basic
Cloze
{1:`setge`} is to {2:signed} integers whereas {2:`setae`} is to {1:unsigned} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723466622316-->
<!--ID: 1723722615075-->
END%%
%%ANKI
Basic
Cloze
{1:`setnb`} is to {2:unsigned} integers whereas {2:`setnl`} is to {1:signed} integers.
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1723466622319-->
<!--ID: 1723722615079-->
END%%
%%ANKI