diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index d5bb933..dd51510 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -134,7 +134,10 @@ "venn-diagram-intersection.png", "venn-diagram-rel-comp.png", "venn-diagram-abs-comp.png", - "venn-diagram-symm-diff.png" + "venn-diagram-symm-diff.png", + "relation-ordering-example.png", + "open-addressing.png", + "closed-addressing.png" ], "File Hashes": { "algorithms/index.md": "3ac071354e55242919cc574eb43de6f8", @@ -173,7 +176,7 @@ "_journal/2024-02-02.md": "a3b222daee8a50bce4cbac699efc7180", "_journal/2024-02-01.md": "3aa232387d2dc662384976fd116888eb", "_journal/2024-01-31.md": "7c7fbfccabc316f9e676826bf8dfe970", - "logic/equiv-trans.md": "d6d9c7dacac07540ddc20608c8a805e5", + "logic/equiv-trans.md": "8bfb004bc500f32620aff7b95c0d92d7", "_journal/2024-02-07.md": "8d81cd56a3b33883a7706d32e77b5889", "algorithms/loop-invariants.md": "cbefc346842c21a6cce5c5edce451eb2", "algorithms/loop-invariant.md": "3b390e720f3b2a98e611b49a0bb1f5a9", @@ -314,7 +317,7 @@ "_journal/2024-03-18.md": "8479f07f63136a4e16c9cd07dbf2f27f", "_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b", "set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53", - "set/index.md": "d1fcdfe4506aab4ec86f30118464fb2a", + "set/index.md": "24a66a792b7b75329590dcfc495faa91", "set/graphs.md": "4bbcea8f5711b1ae26ed0026a4a69800", "_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb", "_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391", @@ -451,8 +454,8 @@ "_journal/2024-05-17.md": "fb880d68077b655ede36d994554f3aba", "_journal/2024-05/2024-05-16.md": "9fdfadc3f9ea6a4418fd0e7066d6b10c", "_journal/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c", - "hashing/direct-addressing.md": "87d1052ac7eae3061d88d011432cb693", - "hashing/index.md": "8912a564ac1066de14044421fdc35b75", + "hashing/direct-addressing.md": "acff356a70980cb4135094fccb3b3187", + "hashing/index.md": "2f75e951aac609a2a9da731ef5444214", "set/classes.md": "6776b4dc415021e0ef60b323b5c2d436", "_journal/2024-05-19.md": "fddd90fae08fab9bd83b0ef5d362c93a", "_journal/2024-05/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c", @@ -475,7 +478,7 @@ "_journal/2024-05/2024-05-25.md": "3e8a0061fa58a6e5c48d12800d1ab869", "_journal/2024-05-27.md": "b36636d10eab34380f17f288868df3ae", "_journal/2024-05/2024-05-26.md": "abe84b5beae74baa25501c818e64fc95", - "algebra/set.md": "7eb2f9cae83e9aaf16aa42f82cea944f", + "algebra/set.md": "9aadf7ca6153592b5af7e942021e56de", "algebra/boolean.md": "ee41e624f4d3d3aca00020d9a9ae42c8", "git/merge-conflicts.md": "761ad6137ec51d3877f7d5b3615ca5cb", "_journal/2024-05-28.md": "0f6aeb5ec126560acdc2d8c5c6570337", @@ -500,7 +503,7 @@ "_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": "42f3dff509071ad31d6831e1c05e5aa9", + "set/relations.md": "80ad79358f1ce6ecf488a059c4de78bb", "_journal/2024-06-07.md": "795be41cc3c9c0f27361696d237604a2", "_journal/2024-06/2024-06-06.md": "db3407dcc86fa759b061246ec9fbd381", "_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8", @@ -516,8 +519,12 @@ "_journal/2024-06/2024-06-08.md": "9e1ebc8882a395b96ca765ad5c982d68", "_journal/2024-06-10.md": "84d27300b97c8544ab4ec68b06edd824", "_journal/2024-06/2024-06-09.md": "4c336a39775846b416aa73278435065f", - "_journal/2024-06-11.md": "4988503ee98aa4fe32d5eeaea2cc65a5", - "_journal/2024-06/2024-06-10.md": "1fe3a8beb03b1cc9af188b85933339e4" + "_journal/2024-06-11.md": "48f46f654a1b8dfeebc01b3adb2bc1d1", + "_journal/2024-06/2024-06-10.md": "1fe3a8beb03b1cc9af188b85933339e4", + "_journal/2024-06-12.md": "8cc810c0f594093768117f57461e2e9e", + "_journal/2024-06/2024-06-11.md": "764ccba25646673fdf7bb6a5f090394d", + "hashing/open-addressing.md": "c27e92f2865bbb426fdd1e30fc52f1ed", + "hashing/closed-addressing.md": "962a48517969bf5e410cf78fc584051f" }, "fields_dict": { "Basic": [ diff --git a/notes/_journal/2024-06-11.md b/notes/_journal/2024-06-11.md deleted file mode 100644 index b89420e..0000000 --- a/notes/_journal/2024-06-11.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: "2024-06-11" ---- - -- [x] Anki Flashcards -- [x] KoL -- [x] OGS -- [ ] Sheet Music (10 min.) -- [ ] Korean (Read 1 Story) \ No newline at end of file diff --git a/notes/_journal/2024-06-12.md b/notes/_journal/2024-06-12.md new file mode 100644 index 0000000..348ae53 --- /dev/null +++ b/notes/_journal/2024-06-12.md @@ -0,0 +1,11 @@ +--- +title: "2024-06-12" +--- + +- [x] Anki Flashcards +- [x] KoL +- [x] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Notes on [[open-addressing|open]] and [[closed-addressing|closed]] hashing. \ No newline at end of file diff --git a/notes/_journal/2024-06/2024-06-11.md b/notes/_journal/2024-06/2024-06-11.md new file mode 100644 index 0000000..b6bca3d --- /dev/null +++ b/notes/_journal/2024-06/2024-06-11.md @@ -0,0 +1,12 @@ +--- +title: "2024-06-11" +--- + +- [x] Anki Flashcards +- [x] KoL +- [x] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Cartesian product [[set#Cancellation Laws|cancellation laws]]. +* Notes on [[relations]]. \ No newline at end of file diff --git a/notes/algebra/set.md b/notes/algebra/set.md index 0beb234..ec4e71e 100644 --- a/notes/algebra/set.md +++ b/notes/algebra/set.md @@ -27,6 +27,85 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +## Symmetric Difference + +Define the **symmetric difference** of sets $A$ and $B$ as $$A \mathop{\triangle} B = (A - B) \cup (B - A)$$ + +%%ANKI +Basic +What two operators are used in the definition of the symmetric difference? +Back: $\cup$ and $-$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the symmetric difference of sets $A$ and $B$ denoted? +Back: $A \mathop{\triangle} B$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is $A \mathop{\triangle} B$ defined? +Back: As $(A - B) \cup (B - A)$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +## Cartesian Product + +Given two sets $A$ and $B$, the **Cartesian product** $A \times B$ is defined as: $$A \times B = \{\langle x, y \rangle \mid x \in A \land y \in B\}$$ + +%%ANKI +Basic +How is the Cartesian product of $A$ and $B$ denoted? +Back: $A \times B$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Using ordered pairs, how is $A \times B$ defined? +Back: $\{\langle x, y \rangle \mid x \in A \land y \in B\}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Who is attributed the representation of points in a plane? +Back: René Descartes. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Why is the Cartesian product named the way it is? +Back: It is named after René Descartes. +Reference: “Cartesian Product,” in _Wikipedia_, April 17, 2024, [https://en.wikipedia.org/w/index.php?title=Cartesian_product&oldid=1219343305](https://en.wikipedia.org/w/index.php?title=Cartesian_product&oldid=1219343305). + +END%% + +%%ANKI +Basic +Suppose $x, y \in A$. What set is $\langle x, y \rangle$ in? +Back: $\mathscr{P}\mathscr{P}A$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Cloze +{$x \in A$} iff {$\{x\} \subseteq A$} iff {$\{x\} \in \mathscr{P}A$}. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + ## Laws The algebra of sets obey laws reminiscent (but not exactly) of the algebra of real numbers. @@ -676,32 +755,43 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% -## Symmetric Difference +### Cancellation Laws -Define the **symmetric difference** of sets $A$ and $B$ as $$A \mathop{\triangle} B = (A - B) \cup (B - A)$$ +Let $A$, $B$, and $C$ be sets. If $A \neq \varnothing$, + +* $(A \times B = A \times C) \Rightarrow B = C$ +* $(B \times A = C \times A) \Rightarrow B = C$ %%ANKI Basic -What two operators are used in the definition of the symmetric difference? -Back: $\cup$ and $-$. +What is the left cancellation law of the Cartesian product? +Back: $(A \times B = A \times C) \Rightarrow B = C$ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + END%% %%ANKI Basic -How is the symmetric difference of sets $A$ and $B$ denoted? -Back: $A \mathop{\triangle} B$ +$(A \times B = A \times C) \Rightarrow B = C$ is always true if what condition is satisfied? +Back: $A \neq \varnothing$ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + END%% %%ANKI Basic -How is $A \mathop{\triangle} B$ defined? -Back: As $(A - B) \cup (B - A)$. +What is the right cancellation law of the Cartesian product? +Back: $(B \times A = C \times A) \Rightarrow B = C$ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + +END%% + +%%ANKI +Basic +$(B \times A = C \times A) \Rightarrow B = C$ is always true if what condition is satisfied? +Back: $A \neq \varnothing$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + END%% ## Bibliography diff --git a/notes/hashing/closed-addressing.md b/notes/hashing/closed-addressing.md new file mode 100644 index 0000000..4ea0bf5 --- /dev/null +++ b/notes/hashing/closed-addressing.md @@ -0,0 +1,55 @@ +--- +title: Closed Addressing +TARGET DECK: Obsidian::STEM +FILE TAGS: hashing::closed +tags: + - hashing +--- + +## Overview + +In **closed addressing**, a key is always stored in the bucket it's hashed to. Collisions are dealt with using separate data structures on a per-bucket basis. + +%%ANKI +Basic +What does "closed" refer to in term "closed addressing"? +Back: A key is always stored in the slot it hashes to. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Basic +What does "open" refer to in term "open hashing"? +Back: A key may resides in a data structure separate from the hash table. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Cloze +{Closed} addressing is also known as {open} hashing. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Cloze +The following is an example of {closed} addressing. +![[closed-addressing.png]] +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Cloze +The following is an example of {open} hashing. +![[closed-addressing.png]] +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +## Bibliography + +* “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). +* Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). \ No newline at end of file diff --git a/notes/hashing/direct-addressing.md b/notes/hashing/direct-addressing.md index 269b8c4..ee411d1 100644 --- a/notes/hashing/direct-addressing.md +++ b/notes/hashing/direct-addressing.md @@ -121,6 +121,23 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition ( END%% +%%ANKI +Basic +What distinguishes direct addressing from closed and open addressing? +Back: Direct addressing isn't concerned with conflicting keys. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Basic +Direct addressing sits between what other addressing types? +Back: Open and closed addressing. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + ## Bibliography +* “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). * Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). \ No newline at end of file diff --git a/notes/hashing/images/closed-addressing.png b/notes/hashing/images/closed-addressing.png new file mode 100644 index 0000000..bf2e44a Binary files /dev/null and b/notes/hashing/images/closed-addressing.png differ diff --git a/notes/hashing/images/open-addressing.png b/notes/hashing/images/open-addressing.png new file mode 100644 index 0000000..ae8ea6a Binary files /dev/null and b/notes/hashing/images/open-addressing.png differ diff --git a/notes/hashing/index.md b/notes/hashing/index.md index b7793fd..d7ac158 100644 --- a/notes/hashing/index.md +++ b/notes/hashing/index.md @@ -137,6 +137,48 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition ( END%% +An **independent uniform hash function** is the ideal theoretical abstraction. For each possible input $k$ in universe $U$, an output $h(k)$ is produced randomly and independently chosen from range $\{0, 1, \ldots, m - 1\}$. Once a value $h(k)$ is chosen, each subsequent call to $h$ with the same input $k$ yields the same output $h(k)$. + +%%ANKI +Basic +What is considered the ideal (though only theoretical) hash function? +Back: The independent uniform hash function. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Given independent uniform hash function $h$, what about $h$ is "independent"? +Back: Each key $k$ has output $h(k)$ determined independently from other keys. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Given independent uniform hash function $h$, what about $h$ is "uniform"? +Back: Every output of $h$ is equally likely to be any of the values in its range. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +With respect to hashing, a random oracle refers to what kind of hash function? +Back: An independent uniform hash function. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Where does "memory" come into play with independent uniform hash functions? +Back: Once $h(k)$ is determined, subsequent calls to $h$ with $k$ always yield the same value. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + ## Bibliography * Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). \ No newline at end of file diff --git a/notes/hashing/open-addressing.md b/notes/hashing/open-addressing.md new file mode 100644 index 0000000..c4e9e14 --- /dev/null +++ b/notes/hashing/open-addressing.md @@ -0,0 +1,55 @@ +--- +title: Open Addressing +TARGET DECK: Obsidian::STEM +FILE TAGS: hashing::open +tags: + - hashing +--- + +## Overview + +In **open addressing**, keys always reside in the hash table. Collisions are dealt with by searching for other empty buckets within the hash table. + +%%ANKI +Basic +What does "closed" refer to in term "closed hashing"? +Back: A key must reside in the hash table. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Basic +What does "open" refer to in term "open addressing"? +Back: A key is not necessarily stored in the slot it hashes to. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Cloze +{Open} addressing is also known as {closed} hashing. +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Cloze +The following is an example of {closed} hashing. +![[open-addressing.png]] +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +%%ANKI +Cloze +The following is an example of {open} addressing. +![[open-addressing.png]] +Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). + +END%% + +## Bibliography + +* “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). +* Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). \ No newline at end of file diff --git a/notes/logic/equiv-trans.md b/notes/logic/equiv-trans.md index cece1b3..984a904 100644 --- a/notes/logic/equiv-trans.md +++ b/notes/logic/equiv-trans.md @@ -621,8 +621,8 @@ END%% %%ANKI Basic -Execution of `b[i] := e` of array $b$ yields what new value of $b$? -Back: $b = (b; i{:}e)$ +Execution of `b[i] := e` of array $b$ in state $s$ yields what new value of $b$? +Back: $b = (b; i{:}s(e))$ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. END%% diff --git a/notes/set/images/relation-ordering-example.png b/notes/set/images/relation-ordering-example.png new file mode 100644 index 0000000..620abad Binary files /dev/null and b/notes/set/images/relation-ordering-example.png differ diff --git a/notes/set/index.md b/notes/set/index.md index fb25007..0bc3d58 100644 --- a/notes/set/index.md +++ b/notes/set/index.md @@ -255,6 +255,14 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +%%ANKI +Basic +Let $A$ and $B$ be sets. Proving the following is equivalent to showing what class is a set? $$\exists C, \forall y, (y \in C \Leftrightarrow y = \{x\} \times B \text{ for some } x \in A)$$ +Back: $\{\{x\} \times B \mid x \in A\}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + ## Empty Set Axiom There exists a set having no members: $$\exists B, \forall x, x \not\in B$$ diff --git a/notes/set/relations.md b/notes/set/relations.md index 3bd796f..9a591ce 100644 --- a/notes/set/relations.md +++ b/notes/set/relations.md @@ -95,53 +95,130 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% -Given two sets $A$ and $B$, the **Cartesian product** $A \times B$ is defined as: $$A \times B = \{\langle x, y \rangle \mid x \in A \land y \in B\}$$ +A **relation** $R$ is a set of ordered pairs. The **domain** of $R$ ($\mathop{\text{dom}}{R}$), the **range** of $R$ ($\mathop{\text{ran}}{R}$), and the **field** of $R$ ($\mathop{\text{fld}}{R}$) is defined as: + +* $x \in \mathop{\text{dom}}{R} \Leftrightarrow \exists y, \langle x, y \rangle \in R$ +* $x \in \mathop{\text{ran}}{R} \Leftrightarrow \exists t, \langle t, x \rangle \in R$ +* $\mathop{\text{fld}}{R} = \mathop{\text{dom}}{R} \cup \mathop{\text{ran}}{R}$ %%ANKI Basic -How is the Cartesian product of $A$ and $B$ denoted? -Back: $A \times B$ +What is a relation? +Back: A set of ordered pairs. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + END%% %%ANKI Basic -Using ordered pairs, how is $A \times B$ defined? -Back: $\{\langle x, y \rangle \mid x \in A \land y \in B\}$ +Are relations or sets the more general concept? +Back: Sets. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + END%% %%ANKI Basic -Who is attributed the representation of points in a plane? -Back: René Descartes. +How is the ordering relation $<$ on $\{2, 3, 5\}$ defined? +Back: As set $\{\langle 2, 3\rangle, \langle 2, 5 \rangle, \langle 3, 5 \rangle\}$. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + END%% %%ANKI Basic -Why is the Cartesian product named the way it is? -Back: It is named after René Descartes. -Reference: “Cartesian Product,” in _Wikipedia_, April 17, 2024, [https://en.wikipedia.org/w/index.php?title=Cartesian_product&oldid=1219343305](https://en.wikipedia.org/w/index.php?title=Cartesian_product&oldid=1219343305). - +How is the ordering relation $<$ on $\{2, 3, 5\}$ visualized? +Back: +![[relation-ordering-example.png]] +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + END%% %%ANKI Basic -Suppose $x, y \in A$. What set is $\langle x, y \rangle$ in? -Back: $\mathscr{P}\mathscr{P}A$ +A relation is a set of ordered pairs with what additional restriction? +Back: N/A. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + END%% %%ANKI Cloze -{$x \in A$} iff {$\{x\} \subseteq A$} iff {$\{x\} \in \mathscr{P}A$}. +For relation $R$, {$xRy$} is alternative notation for {$\langle x, y \rangle \in R$}. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - + +END%% + +%%ANKI +Basic +How is ordering relation $<$ on set $\mathbb{R}$ defined using set-builder notation? +Back: As $\{\langle x, y\rangle \in \mathbb{R} \times \mathbb{R} \mid x \text{ is less than } y\}$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is $x < y$ rewritten to emphasize that $<$ is a relation? +Back: $\langle x, y \rangle \in \;<$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the identity relation on $\omega$ defined using set-builder notation? +Back: $\{\langle n, n \rangle \mid n \in \omega\}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the domain of relation $R$ denoted? +Back: $\mathop{\text{dom}}{R}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the domain of relation $R$ defined? +Back: $x \in \mathop{\text{dom}}{R} \Leftrightarrow \exists y, \langle x, y \rangle \in R$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the range of relation $R$ denoted? +Back: $\mathop{\text{ran}}{R}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the range of relation $R$ defined? +Back: $x \in \mathop{\text{ran}}{R} \Leftrightarrow \exists t, \langle t, x \rangle \in R$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the field of relation $R$ denoted? +Back: $\mathop{\text{fld}}{R}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How is the field of relation $R$ defined? +Back: $\mathop{\text{fld}}{R} = \mathop{\text{dom}}{R} \cup \mathop{\text{ran}}{R}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + END%% ## Bibliography