Formal systems and hashing.

c-declarations
Joshua Potter 2024-07-27 07:02:30 -06:00
parent 0eeb72b9ec
commit 77fb7cfa0f
18 changed files with 902 additions and 247 deletions

View File

@ -273,7 +273,7 @@
"_journal/2024-02/2024-02-27.md": "f75a0d04a875aeee932343dae0c78768",
"filesystems/index.md": "cbd2b0290a3ba3b32abec4bd8bfefad5",
"filesystems/cas.md": "d41c0d2e943adecbadd10a03fd1e4274",
"git/objects.md": "4ad7a2ab275b5573055ea0433be1e4d7",
"git/objects.md": "03c452a26374b1a99983157f236c5a3d",
"git/index.md": "ca842957bda479dfa1170ae85f2f37b8",
"encoding/integer.md": "f9786eab7f64ec63272dcca010961fe8",
"_journal/2024-02-29.md": "f610f3caed659c1de3eed5f226cab508",
@ -417,7 +417,7 @@
"_journal/2024-04-30.md": "369f98b9d91de89cc1f4f581bc530c0d",
"_journal/2024-04/2024-04-29.md": "b4fa2fd62e1b4fe34c1f71dc1e9f5b0b",
"proofs/induction.md": "36ab5a92ae3cf9bb2def333dc41d79ff",
"proofs/index.md": "ab48e1812838365767eaca2e95611b48",
"proofs/index.md": "18808a0527a25af788aabb821686bcee",
"_journal/2024-05-01.md": "959ff67fe3db585ba6a7b121d853bbac",
"_journal/2024-05-02.md": "d7d6ba7e065d807986f0bd77281c0bb1",
"data-structures/priority-queues.md": "8c5c6bf62b1a39d8f1f72b800fcb17ff",
@ -447,7 +447,7 @@
"_journal/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b",
"_journal/2024-05/2024-05-12.md": "ca9f3996272152ef89924bb328efd365",
"git/remotes.md": "cbe2cd867f675f156e7fe71ec615890d",
"programming/pred-trans.md": "78abe68030d68e5b253564920ee85cfb",
"programming/pred-trans.md": "77fa537ef0b96ab1b90ebf2309bc345d",
"set/axioms.md": "063955bf19c703e9ad23be2aee4f1ab7",
"_journal/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5",
"_journal/2024-05/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b",
@ -462,7 +462,7 @@
"_journal/2024-05/2024-05-16.md": "9fdfadc3f9ea6a4418fd0e7066d6b10c",
"_journal/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c",
"hashing/direct-addressing.md": "f75cc22e74ae974fe4f568a2ee9f951f",
"hashing/index.md": "b260890abe8ef5cde8bd0804c58c341e",
"hashing/index.md": "90be101304334dc8771ca141fae0092c",
"set/classes.md": "6776b4dc415021e0ef60b323b5c2d436",
"_journal/2024-05-19.md": "fddd90fae08fab9bd83b0ef5d362c93a",
"_journal/2024-05/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c",
@ -510,7 +510,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": "6033e9506744dc845da6b36856aaf45c",
"set/relations.md": "a77290da08db947ace9c6c3374b4f12c",
"_journal/2024-06-07.md": "795be41cc3c9c0f27361696d237604a2",
"_journal/2024-06/2024-06-06.md": "db3407dcc86fa759b061246ec9fbd381",
"_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8",
@ -536,7 +536,7 @@
"_journal/2024-06/2024-06-12.md": "f82dfa74d0def8c3179d3d076f94558e",
"_journal/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307",
"_journal/2024-06/2024-06-13.md": "e2722a00585d94794a089e8035e05728",
"set/functions.md": "b739ef156a4420a141f76dbcecaff8cf",
"set/functions.md": "02b0f1e2a585e918e14a8ccf29fd578d",
"_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4",
"_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307",
"lambda-calculus/beta-reduction.md": "6c9a9f4983b0974e0184acaee7c27a22",
@ -598,9 +598,9 @@
"_journal/2024-07-13.md": "13b5101306b5542b8a1381a6477378ca",
"_journal/2024-07/2024-07-12.md": "6603ed8a3f9a9e87bf40e81b03e96356",
"hashing/static.md": "3ec6eaee73fb9b599700f5a56b300b83",
"hashing/addressing.md": "a78c0cbea13bc9deeadb2fc643c122ce",
"hashing/addressing.md": "e97c1905cdf5787d94c857fb5f22be8a",
"ontology/index.md": "15e97e3e8068660314499fb4d1bdd53e",
"ontology/permissivism.md": "5b66dd065aa66d5a2624eda032d75b94",
"ontology/permissivism.md": "643e815a79bc5c050cde9f996aa44ef5",
"ontology/properties.md": "d417db0cecf11b1ed2e17f165d879fa5",
"_journal/2024-07-14.md": "9a74d2dd0f44db58e14f57c8908c3342",
"_journal/2024-07/2024-07-13.md": "60e8eb09812660a2f2bf86ffafab5714",
@ -624,22 +624,29 @@
"_journal/2024-07/2024-07-20.md": "d8685729effc374e4ece1e618c2fdad3",
"logic/classical/index.md": "ee0a4b2bfcfa2cab0880db449cb62df1",
"logic/classical/truth-tables.md": "b739e2824a4a5c26ac446e7c15ce02aa",
"formal-system/proof-system/index.md": "1c95481cbb2e79ae27f6be1869599657",
"formal-system/proof-system/equiv-trans.md": "4d5e9236944c3ea99f484bfcb14292d0",
"formal-system/proof-system/index.md": "800e93b72a9852ea4823ab0a40854bba",
"formal-system/proof-system/equiv-trans.md": "abd8fe3ca5b61f0bdec0870f230734af",
"formal-system/logical-system/index.md": "708bb1547e7343c236068c18da3f5dc0",
"formal-system/logical-system/pred-logic.md": "6db7f2a3734b6f3d48313410dc611bd5",
"formal-system/logical-system/prop-logic.md": "b61ce051795d5a951c763b928ec5cea8",
"formal-system/index.md": "3d31c99bffdcb05de9f2e32ac6319952",
"formal-system/index.md": "4c3d4de525e8e3254efd208341a300b1",
"programming/short-circuit.md": "c256ced42dc3b493aff5a356e5383b6e",
"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": "62db68d3cfbda84426f390ddd4a16a54",
"formal-system/proof-system/natural-deduction.md": "48e6907912c293a26b08ecbfd76ff058",
"startups/term-sheet.md": "6b6152af78addb3fe818a7fc9d375fbf",
"startups/financing-rounds.md": "00a622fda2b4b442901bde2842309088",
"_journal/2024-07-23.md": "35e18a1d9a8dd0a97e1d9898bc1d8f01",
"_journal/2024-07/2024-07-22.md": "8170a92496c2c5374fc3411bddf3b17d",
"_journal/2024-07-24.md": "e7f4b617435e528b00a241b26fde1ce9"
"_journal/2024-07-24.md": "9a7bdbfc23996908645d00dd622db6bf",
"_journal/2024-07/2024-07-23.md": "ad2e11d3f2752430ad8048d1af8f04d1",
"_journal/2024-07-25.md": "087a54db6fb7003994aa409c0b2ca379",
"_journal/2024-07/2024-07-24.md": "9a7bdbfc23996908645d00dd622db6bf",
"_journal/2024-07-26.md": "2dfc0c1049e88c75e91a3130819d1608",
"_journal/2024-07/2024-07-25.md": "087a54db6fb7003994aa409c0b2ca379",
"_journal/2024-07-27.md": "1ab2b013a217143a91c8e6de068e9f6f",
"_journal/2024-07/2024-07-26.md": "c167f734a5037e1a5537b1e95ca6790f"
},
"fields_dict": {
"Basic": [

View File

@ -0,0 +1,12 @@
---
title: "2024-07-27"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Finished reading section 11.3 "Hash functions" in "Introduction to Algorithms".
* High-level notes on open addressing.

View File

@ -8,4 +8,4 @@ title: "2024-07-23"
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Worked through first half of Protege [New Pizza Tutorial](https://www.michaeldebellis.com/post/new-protege-pizza-tutorial).
* Worked through first half of the Protege [New Pizza Tutorial](https://www.michaeldebellis.com/post/new-protege-pizza-tutorial).

View File

@ -0,0 +1,13 @@
---
title: "2024-07-24"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Expand on a variety of [[proofs/index|proof methods]].
* Add final rules on natural deduction w.r.t. propositional logic.
* Finished basic portion of the Protege [New Pizza Tutorial](https://www.michaeldebellis.com/post/new-protege-pizza-tutorial).

View File

@ -1,5 +1,5 @@
---
title: "2024-07-24"
title: "2024-07-25"
---
- [x] Anki Flashcards
@ -8,4 +8,4 @@ title: "2024-07-24"
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Expand on a variety of [[proofs/index|proof methods]].
* Notes on asymmetric and antisymmetry.

View File

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

View File

@ -12,19 +12,31 @@ tags:
A **formal system** is an abstract structure and formalization of an axiomatic system used for inferring theorems from axioms by a set of inference rules. It consists of two components: a **formal language** and a **deductive system**.
%%ANKI
Basic
How are conclusions drawn in deductive reasoning?
Back: From valid inferences on a set of premises.
Cloze
{Deductive} reasoning begins with {a set of premises} and draws conclusions by {applying valid inferences}.
Reference: “Deductive Reasoning,” in _Wikipedia_, June 16, 2024, [https://en.wikipedia.org/w/index.php?title=Deductive_reasoning](https://en.wikipedia.org/w/index.php?title=Deductive_reasoning&oldid=1229329170).
<!--ID: 1721561534082-->
<!--ID: 1721991104381-->
END%%
%%ANKI
Basic
How are conclusions drawn in inductive reasoning?
Back: By generalizing from some body of observations.
Cloze
{Inductive} reasoning begins with {a body of observations} and draws conclusions by {generalizing the observations}.
Reference: “Inductive Reasoning,” in _Wikipedia_, May 6, 2024, [https://en.wikipedia.org/w/index.php?title=Inductive_reasoning](https://en.wikipedia.org/w/index.php?title=Inductive_reasoning&oldid=1222455892).
<!--ID: 1721561534087-->
<!--ID: 1721991104385-->
END%%
%%ANKI
Cloze
Deduction is to {premises} whereas induction is to {observations}.
Reference: “Inductive Reasoning,” in _Wikipedia_, May 6, 2024, [https://en.wikipedia.org/w/index.php?title=Inductive_reasoning](https://en.wikipedia.org/w/index.php?title=Inductive_reasoning&oldid=1222455892).
<!--ID: 1721991207202-->
END%%
%%ANKI
Cloze
Deduction is to {valid inferences} whereas induction is to {generalizations}.
Reference: “Inductive Reasoning,” in _Wikipedia_, May 6, 2024, [https://en.wikipedia.org/w/index.php?title=Inductive_reasoning](https://en.wikipedia.org/w/index.php?title=Inductive_reasoning&oldid=1222455892).
<!--ID: 1721991207211-->
END%%
%%ANKI
@ -143,8 +155,7 @@ END%%
%%ANKI
Basic
Is the following a WFF of propositional logic?
Back: $(a \Rightarrow b) \Leftrightarrow c$
Is the following a WFF of propositional logic? $(a \Rightarrow b) \Leftrightarrow c$
Back: Yes.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
Tags: formal-system::propositional
@ -153,8 +164,7 @@ END%%
%%ANKI
Basic
Is the following a WFF of propositional logic?
Back: $(a \Rightarrow b( \Leftrightarrow c$
Is the following a WFF of propositional logic? $(a \Rightarrow b( \Leftrightarrow c$
Back: No.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
Tags: formal-system::propositional
@ -163,11 +173,11 @@ END%%
%%ANKI
Basic
Is the following a WFF of propositional logic?
Back: $\forall x, x \in A \Rightarrow x = y$
Is the following a WFF of propositional logic? $\forall x, x \in A \Rightarrow x = y$
Back: No.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
Tags: logic::propositional logic::predicate
<!--ID: 1722075143977-->
END%%
%%ANKI
@ -214,7 +224,7 @@ END%%
%%ANKI
Basic
An alphabet belong to which of the two parts of a formal system?
An alphabet belongs to which of the two parts of a formal system?
Back: The formal language.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534170-->
@ -222,7 +232,7 @@ END%%
%%ANKI
Basic
A formal grammar belong to which of the two parts of a formal system?
A formal grammar belongs to which of the two parts of a formal system?
Back: The formal language.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534173-->
@ -244,29 +254,29 @@ END%%
%%ANKI
Cloze
A {metalanguage} refers to the {language used to talk about a formal system}.
A {metalanguage} refers to the {language used to talk *about* a formal system}.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534185-->
END%%
%%ANKI
Cloze
An {object language} refers to the {formal language found in a formal system}.
An {object} language refers to the {formal language found in a formal system}.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534189-->
END%%
%%ANKI
Basic
In a discussion of propositional logic, what is the metalanguage?
Back: English (or whatever natural language is being used).
In a discussion of propositional logic, what does the metalanguage refer to?
Back: The natural language being used to describe propositional logic.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534194-->
END%%
%%ANKI
Basic
In a discussion of propositional logic, what is the object language?
In a discussion of propositional logic, what does the object language refer to?
Back: The formal language of propositional logic.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534200-->

View File

@ -866,15 +866,7 @@ END%%
%%ANKI
Basic
Maintaining selector update syntax, how is $(c; 1{:}3)[1]$ more explicitly written with a selector?
Back: $(c; [1]{:}3)[1]$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1714395640948-->
END%%
%%ANKI
Basic
Maintaining selector update syntax, how is $(c; 1{:}3)[1]$ rewritten with $[1]$ commuted as leftward as possible?
Maintaining selector update syntax, how is $(c; [1]{:}3)[1]$ rewritten with $[1]$ commuted as leftward as possible?
Back: $(c[1]; \epsilon{:}3)$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1714395640953-->
@ -1142,7 +1134,7 @@ END%%
%%ANKI
Basic
Suppose $x$, $y$, and $z$ are distinct. What is the result of a single evaluation step? $$\large{E_{e_1, e_2, e_3}^{x, y, z}}$$
Suppose $x$, $y$, $z$ are distinct. What next simplification step can be taken before substitution? $$\large{E_{e_1, e_2, e_3}^{x, y, z}}$$
Back: N/A.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721495879854-->
@ -1150,7 +1142,7 @@ END%%
%%ANKI
Basic
Suppose $x \neq y$. What is the result of a single evaluation step? $$\large{E_{e_1, e_2, e_3}^{x, y, x}}$$
Suppose $x \neq y$. What next simplification step can be taken before substitution? $$\large{E_{e_1, e_2, e_3}^{x, y, x}}$$
Back: $$\large{E_{e_1, e_3, e_2}^{x, x, y}}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721495879855-->
@ -1158,7 +1150,7 @@ END%%
%%ANKI
Basic
Suppose $x \neq y$. What is the result of a single evaluation step? $$\large{E_{e_1, e_3, e_2}^{x, x, y}}$$
Suppose $x \neq y$. What next simplification step can be taken before substitution? $$\large{E_{e_1, e_3, e_2}^{x, x, y}}$$
Back: $$\large{E_{(x; \,\epsilon{:}e_1; \,\epsilon{:}e_3), e_2}^{x, y}}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721495879856-->
@ -1166,7 +1158,7 @@ END%%
%%ANKI
Basic
Suppose $x \neq y$. What is the result of a single evaluation step? $$\large{E_{(x; \,\epsilon{:}e_1; \,\epsilon{:}e_3), e_2}^{x, y}}$$
Suppose $x \neq y$. What next simplification step can be taken before substitution? $$\large{E_{(x; \,\epsilon{:}e_1; \,\epsilon{:}e_3), e_2}^{x, y}}$$
Back: $$\large{E_{e_3, e_2}^{x, y}}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721495879857-->
@ -1190,7 +1182,7 @@ END%%
%%ANKI
Basic
Consider array $b$ and $i \in \mathop{domain}(b)$. What is the result of a single evaluation step? $$\large{E_{e}^{b[i]}}$$
Consider array $b$ and $i \in \mathop{domain}(b)$. What next simplification step can be taken before substitution? $$\large{E_{e}^{b[i]}}$$
Back: $$\large{E_{(b; [i]{:}e)}^{b}}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721495879860-->
@ -1198,7 +1190,7 @@ END%%
%%ANKI
Basic
Consider identifier $x$, array $b$ and $i \in \mathop{domain}(b)$. What is the result of a single evaluation step? $$\large{E_{b[i]}^{x}}$$
Consider identifier $x$, array $b$ and $i \in \mathop{domain}(b)$. What next simplification step can be taken before substitution? $$\large{E_{b[i]}^{x}}$$
Back: N/A.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721495879861-->

View File

@ -42,6 +42,14 @@ Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipe
<!--ID: 1721561534223-->
END%%
%%ANKI
Basic
In a formal system, a proof is a sequence of what?
Back: Well-formed formulas.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534235-->
END%%
%%ANKI
Basic
In a proof system, a proof is used to produce what?
@ -52,16 +60,8 @@ END%%
%%ANKI
Basic
In a proof system, a proof is a sequence of what?
Back: Well-formed formulas.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534235-->
END%%
%%ANKI
Basic
In a proof system, how are WFFs produced from one another?
Back: Via inference rules.
In a proof system, what mechanism is used to produce WFFs from one another?
Back: Inference rules.
Reference: “Formal System,” in _Wikipedia_, May 10, 2024, [https://en.wikipedia.org/w/index.php?title=Formal_system](https://en.wikipedia.org/w/index.php?title=Formal_system&oldid=1223254138).
<!--ID: 1721561534241-->
END%%

View File

@ -34,7 +34,7 @@ END%%
## Inference Rules
Scoped to just propositional logic, there are 10 inference rules corresponding to an "introduction" and "elimination" of each propositional logic operator. When extending to predicate logic, we also include an introduction and elimination rule for both the [[pred-logic#Existentials|existential]] and [[pred-logic#Universals|universal]] quantifers.
Scoped to propositional logic, there are 10 inference rules corresponding to an "introduction" and "elimination" of each propositional logic operator.
%%ANKI
Basic
@ -44,14 +44,6 @@ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in
<!--ID: 1721655978493-->
END%%
%%ANKI
Basic
With respect to predicate logic, how many inference rules does natural deduction include?
Back: $14$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721655978496-->
END%%
%%ANKI
Basic
How are natural deduction's inference rules categorized into two?
@ -70,8 +62,40 @@ END%%
### Negation
For proposition $E1$, $$\neg{\text{-}}I{:} \quad \text{TODO}$$
and $$\neg{\text{-}}E{:} \quad \text{TODO}$$
For propositions $E_1$ and $E_2$, $$\neg{\text{-}}I{:} \quad \begin{array}{c} \text{from } E_1 \text{ infer } E_2 \land \neg E_2 \\ \hline \neg E_1 \end{array}$$
and $$\neg{\text{-}}E{:} \quad \begin{array}{c} \text{from } \neg E_1 \text{ infer } E_2 \land \neg E_2 \\ \hline E_1 \end{array}$$
%%ANKI
Basic
In natural deduction, how is negation introduction denoted?
Back: As $\neg{\text{-}}I$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721825479315-->
END%%
%%ANKI
Basic
In natural deduction, how is negation elimination denoted?
Back: As $\neg{\text{-}}E$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721825479325-->
END%%
%%ANKI
Basic
How is $\neg{\text{-}}I$ expressed in schematic notation?
Back: $$\neg{\text{-}}I{:} \quad \begin{array}{c} \text{from } E_1 \text{ infer } E_2 \land \neg E_2 \\ \hline \neg E_1 \end{array}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721825479330-->
END%%
%%ANKI
Basic
How is $\neg{\text{-}}E$ expressed in schematic notation?
Back: $$\neg{\text{-}}E{:} \quad \begin{array}{c} \text{from } \neg E_1 \text{ infer } E_2 \land \neg E_2 \\ \hline E_1 \end{array}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721825479336-->
END%%
### Conjunction
@ -112,7 +136,7 @@ END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P, Q, R \\ \hline P \land R \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \\ 2. & Q \\ 3. & R \\ \hline & P \land R \end{array}$$
Back: $\land{\text{-}}I$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721656730330-->
@ -120,7 +144,7 @@ END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P \land Q \\ \hline P \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \land Q \\ \hline & P \end{array}$$
Back: $\land{\text{-}}E$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721656601607-->
@ -165,7 +189,7 @@ END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P, Q \\ \hline R \lor P \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \\ 2. & Q \\ \hline & R \lor P \end{array}$$
Back: $\lor{\text{-}}I$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721656730337-->
@ -173,7 +197,7 @@ END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P \lor Q, P \Rightarrow R, 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 & P \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-->
@ -234,7 +258,7 @@ END%%
%%ANKI
Basic
How is ${\Rightarrow}{\text{-}}E$ expressed in schematic notation?
Back: $$\begin{array}{c} E1 \Rightarrow E2, E1 \\ \hline E2 \end{array}$$
Back: $$\begin{array}{c} E_1 \Rightarrow E_2, E_1 \\ \hline E_2 \end{array}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721665510228-->
END%%
@ -242,14 +266,14 @@ END%%
%%ANKI
Basic
How is *modus ponens* expressed in schematic notation?
Back: $$\begin{array}{c} E1 \Rightarrow E2, E1 \\ \hline E2 \end{array}$$
Back: $$\begin{array}{c} E_1 \Rightarrow E_2, E_1 \\ \hline E_2 \end{array}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721665541955-->
END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P \Rightarrow Q, P \\ \hline R \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \Rightarrow Q \\ 2. & P \\ \hline & R \end{array}$$
Back: N/A.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721666244354-->
@ -257,7 +281,7 @@ END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P \Rightarrow Q, P \\ \hline Q \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \Rightarrow Q \\ 2. & P \\ \hline & Q \end{array}$$
Back: ${\Rightarrow}{\text{-}}E$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721666244357-->
@ -265,8 +289,8 @@ END%%
### Biconditional
For propositions $E1$ and $E2$, $${\Leftrightarrow}{\text{-}}I: \quad \begin{array}{c} E1 \Rightarrow E2, E2 \Rightarrow E1 \\ \hline E1 \Leftrightarrow E2 \end{array}$$
and $${\Leftrightarrow}{\text{-}}E: \quad \begin{array}{c} E1 \Leftrightarrow E2 \\ \hline E1 \Rightarrow E2, E2 \Rightarrow E1 \end{array}$$
For propositions $E_1$ and $E_2$, $${\Leftrightarrow}{\text{-}}I: \quad \begin{array}{c} E_1 \Rightarrow E_2, E_2 \Rightarrow E_1 \\ \hline E_1 \Leftrightarrow E_2 \end{array}$$
and $${\Leftrightarrow}{\text{-}}E: \quad \begin{array}{c} E_1 \Leftrightarrow E_2 \\ \hline E_1 \Rightarrow E_2, E_2 \Rightarrow E_1 \end{array}$$
%%ANKI
Basic
@ -287,14 +311,14 @@ END%%
%%ANKI
Basic
How is ${\Leftrightarrow}{\text{-}}I$ expressed in schematic notation?
Back: $$\begin{array}{c} E1 \Rightarrow E2, E2 \Rightarrow E1 \\ \hline E1 \Leftrightarrow E2 \end{array}$$
Back: $$\begin{array}{c} E_1 \Rightarrow E_2, E_2 \Rightarrow E_1 \\ \hline E_1 \Leftrightarrow E_2 \end{array}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721666244362-->
END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P \Rightarrow Q, Q \Rightarrow P \\ \hline Q \Leftrightarrow P \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \Rightarrow Q \\ 2. & Q \Rightarrow P \\ \hline & Q \Leftrightarrow P \end{array}$$
Back: ${\Leftrightarrow}{\text{-}}I$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721666244367-->
@ -303,27 +327,19 @@ END%%
%%ANKI
Basic
How is ${\Leftrightarrow}{\text{-}}E$ expressed in schematic notation?
Back: $$\begin{array}{c} E1 \Leftrightarrow E2 \\ \hline E1 \Rightarrow E2, E2 \Rightarrow E1 \end{array}$$
Back: $$\begin{array}{c} E_1 \Leftrightarrow E_2 \\ \hline E_1 \Rightarrow E_2, E_2 \Rightarrow E_1 \end{array}$$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721666244366-->
END%%
%%ANKI
Basic
Which natural deduction inference rule is used in the following? $$\begin{array}{c} P \Leftrightarrow Q \\ \hline Q \Rightarrow P \end{array}$$
Which natural deduction inference rule is used in the following? $$\begin{array}{rc} 1. & P \Leftrightarrow Q \\ \hline & Q \Rightarrow P \end{array}$$
Back: ${\Leftrightarrow}{\text{-}}E$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721666244364-->
END%%
### Existential Quantification
TODO
### Universal Quantification
TODO
## Bibliography
* Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.

View File

@ -204,8 +204,8 @@ The **b**inary **l**arge **ob**ject (blob) is used to represent arbitrary files.
%%ANKI
Basic
Why are git blobs named the way they are?
Back: It is an acronym for **b**inary **l**arge **ob**ject.
What are git blobs an acronym for?
Back: **B**inary **l**arge **ob**ject.
Reference: Scott Chacon, *Pro Git*, Second edition, The Experts Voice in Software Development (New York, NY: Apress, 2014).
<!--ID: 1709345254720-->
END%%

View File

@ -231,6 +231,114 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (
<!--ID: 1718759188245-->
END%%
%%ANKI
Basic
Consider a closed addressing hash table of $m$ slots. What is its hash function's domain?
Back: $U$, the universe of keys.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080163402-->
END%%
%%ANKI
Basic
Consider a closed addressing hash table of $m$ slots. What is its hash function's codomain?
Back: $\{0, 1, \ldots, m - 1\}$, i.e. the $m$ slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080163405-->
END%%
%%ANKI
Basic
Consider open hashing in a table of $m$ slots. What is the hash function's domain?
Back: $U$, the universe of keys.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955435-->
END%%
%%ANKI
Basic
Consider open hashing in a table of $m$ slots. What is its hash function's codomain?
Back: $\{0, 1, \ldots, m - 1\}$, i.e. the $m$ slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955439-->
END%%
### Ideal Hashing
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 closed addressing 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).
<!--ID: 1718197741507-->
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).
<!--ID: 1718197741527-->
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).
<!--ID: 1718197741537-->
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).
<!--ID: 1718197741545-->
END%%
%%ANKI
Basic
Where does "memory" come into play with independent uniform hash functions?
Back: Hashing of a key always produces the same hash value.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718197741555-->
END%%
%%ANKI
Basic
What is "uniform" in independent uniform hashing?
Back: An input key is equally likely to hash into any slot.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1719174576842-->
END%%
%%ANKI
Basic
What is "independent" in independent uniform hashing?
Back: The slot an element hashes to is independent of where other elements hash to.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1719174576848-->
END%%
%%ANKI
Basic
In practice, hash functions are designed to handle keys of what two types?
Back: A fixed-width nonnegative integer or a vector of them.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1720821498614-->
END%%
%%ANKI
Basic
How does Cormen et al. define a "good" hash function?
Back: It satisfies (approximately) the assumption of independent uniform hashing.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1720821498625-->
END%%
### Chaining
The most common form of closed addressing is **chaining**. In this scheme, each slot $j$ is a (nullable) pointer to the head of a linked list containing all the elements with hash value $j$.
@ -361,6 +469,14 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (
<!--ID: 1719176797760-->
END%%
%%ANKI
Basic
Consider a hash table of $m$ slots with $n = O(m)$ elements. How is the load factor described in complexity notation?
Back: $\alpha = O(1)$
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080163409-->
END%%
## Open
In **open addressing**, keys always reside in the hash table. Collisions are dealt with by searching for other empty buckets within the hash table.
@ -444,6 +560,155 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (
<!--ID: 1718759188186-->
END%%
Sequential examination of slots during dictionary operations is called **probing**. Given hash function $h$, the **probe sequence** refers to the sequence $\langle h(k, 0), h(k, 1), \ldots, h(k, m - 1) \rangle$ visited when probing. Every probe sequence is expected to be a permutation of $\langle 0, 1, \ldots, m - 1 \rangle$.
%%ANKI
Basic
Consider an open addressing hash table of $m$ slots. What is its hash function's domain?
Back: Given universe of keys $U$, $U \times \{0, 1, \ldots, m\}$.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080163416-->
END%%
%%ANKI
Basic
Consider an open addressing hash table of $m$ slots. What is its hash function's codomain?
Back: $\{0, 1, \ldots, m - 1\}$, i.e. the $m$ slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080163421-->
END%%
%%ANKI
Basic
Consider closed hashing in a table of $m$ slots. What is the hash function's domain?
Back: Given universe of keys $U$, $U \times \{0, 1, \ldots, m\}$.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955442-->
END%%
%%ANKI
Basic
Consider closed hashing in a table of $m$ slots. What is its hash function's codomain?
Back: $\{0, 1, \ldots, m - 1\}$, i.e. the $m$ slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955446-->
END%%
%%ANKI
Cloze
{Probing} refers to the {sequential examining of slots} performed in open addressing.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080563925-->
END%%
%%ANKI
Basic
In open addressing, probing produces what kind of sequence?
Back: A probe sequence.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080563934-->
END%%
%%ANKI
Basic
Consider open addressed hash table with $m$ slots. What condition must every probe sequence satisfy?
Back: Each sequence must be a permutation of $\langle 0, 1, \ldots, m - 1 \rangle$.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080563937-->
END%%
%%ANKI
Basic
In open addressing, when does probing usually stop?
Back: When encountering an empty slot.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080563941-->
END%%
%%ANKI
Basic
In open addressing, when *must* probing stop?
Back: When every slot was iterated over.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955449-->
END%%
%%ANKI
Basic
Is probing related to open or closed addressing?
Back: Open.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080563945-->
END%%
%%ANKI
Basic
Is probing related to open or closed hashing?
Back: Closed.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722080563930-->
END%%
%%ANKI
Basic
*Why* are probe sequences expected to be permutations of hash table slots?
Back: So every hash table slot is considered as the table fills up.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955453-->
END%%
### Ideal Hashing
An **independent uniform permutation hash function** is the ideal theoretical abstraction in open addressing. The probe sequence of each key is equally likely to be any of the $m!$ permutations of $\langle 0, 1, \ldots, m - 1 \rangle$.
%%ANKI
Basic
What is considered the ideal open addressing hash function?
Back: An independent uniform permutation hash function.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955457-->
END%%
%%ANKI
Basic
Given independent uniform permutation hash function $h$, what about $h$ is "independent"?
Back: Each key's probe sequence is determined independently from other keys.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955461-->
END%%
%%ANKI
Basic
Given independent uniform permutation hash function $h$, what about $h$ is "uniform"?
Back: Every probe sequence is equally likely to be any permutation of $\langle 0, 1, \ldots, m - 1 \rangle$.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955464-->
END%%
%%ANKI
Basic
Where does "memory" come into play with independent uniform permutation hash functions?
Back: The probe sequence for any key is fixed.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955468-->
END%%
%%ANKI
Basic
What is "uniform" in independent uniform permutation hashing?
Back: An input key's probe sequence is equally likely to be any permutation of slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955472-->
END%%
%%ANKI
Basic
What is "independent" in independent uniform permutation hashing?
Back: An element's probe sequence is independent of those of other elements.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1722081955476-->
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).

View File

@ -201,80 +201,6 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (
<!--ID: 1718759188222-->
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 an ideal (though theoretical) 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).
<!--ID: 1718197741507-->
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).
<!--ID: 1718197741527-->
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).
<!--ID: 1718197741537-->
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).
<!--ID: 1718197741545-->
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).
<!--ID: 1718197741555-->
END%%
%%ANKI
Basic
What is uniform hashing?
Back: Hasing in which an input key is equally likely to hash into any slot.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1719174576842-->
END%%
%%ANKI
Basic
What is independent hashing?
Back: The slot an element hashes to is independent of where other elements hash to.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1719174576848-->
END%%
%%ANKI
Basic
In practice, hash functions are designed to handle keys of what two types?
Back: A fixed-width nonnegative integer or a vector of them.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1720821498614-->
END%%
%%ANKI
Basic
How does Cormen et al. define a "good" hash function?
Back: It satisfies (approximately) the assumption of independent uniform hashing.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1720821498625-->
END%%
## Static Hashing
**Static hashing** refers to providing a single fixed hash function intended to work well on *any* data. Generally speaking, this should not be favored over random hashing.
@ -714,7 +640,7 @@ END%%
%%ANKI
Basic
Consider universe $U$ and $\mathscr{H} = \{h\}$ where $h(x) = 0$. Is $\mathscr{H}$ universal?
Back: Not necessarily.
Back: Indeterminate.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
Tags: hashing::random hashing::universal
<!--ID: 1721482559021-->
@ -774,6 +700,14 @@ Tags: hashing::random hashing::universal
<!--ID: 1721482559069-->
END%%
%%ANKI
Basic
What is it that universal hashing makes impossible?
Back: The ability of an adversary forcing the worst-case running time of hash table operations.
Tags: hashing::random hashing::universal
<!--ID: 1722080163399-->
END%%
## Bibliography
* Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).

View File

@ -61,7 +61,7 @@ END%%
%%ANKI
Basic
How does a permissivist interpret English statement "There is an $X$"?
How is English statement "There is an $X$" interpreted by a permissivist?
Back: As "$X$ exists".
Reference: Nikk Effingham, _An Introduction to Ontology_ (Cambridge: Polity Press, 2013).
<!--ID: 1720912238035-->

View File

@ -770,7 +770,7 @@ where each $x_i$ is an identifier, each $s_i$ is a [[equiv-trans#Selectors|selec
%%ANKI
Basic
How is $x \coloneqq e$ expressed in more general form $x_1 \circ s_1, \ldots, x_n \circ s_n \coloneqq e_1, \ldots, e_n$?
How is simple assignment $x \coloneqq e$ expressed in the following, more general form? $$x_1 \circ s_1, \ldots, x_n \circ s_n \coloneqq e_1, \ldots, e_n$$
Back: As $x \circ \epsilon \coloneqq e$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721497014033-->
@ -778,7 +778,7 @@ END%%
%%ANKI
Basic
How is $b[i] \coloneqq e$ expressed in more general form $x_1 \circ s_1, \ldots, x_n \circ s_n \coloneqq e_1, \ldots, e_n$?
How is simple assignment $b[i] \coloneqq e$ expressed in the following, more general form? $$x_1 \circ s_1, \ldots, x_n \circ s_n \coloneqq e_1, \ldots, e_n$$
Back: As $b \circ [i] \coloneqq e$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721497014038-->
@ -850,7 +850,7 @@ END%%
%%ANKI
Basic
What assumption is made when defining assignment as "$wp(''\bar{x} \coloneqq \bar{e}'', R) = R_{\bar{e}}^{\bar{x}}$"?
What assumption is made when defining assignment as the following? $$wp(''\bar{x} \coloneqq \bar{e}'', R) = R_{\bar{e}}^{\bar{x}}$$
Back: $domain(\bar{e})$, i.e. evaluation of each member of $\bar{e}$ is well-defined.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721497014076-->

View File

@ -104,6 +104,14 @@ Reference: Patrick Keef and David Guichard, “An Introduction to Higher Mathema
<!--ID: 1721824073092-->
END%%
%%ANKI
Basic
Which natural deduction rule immediatley depends on the existence of a conditional proof?
Back: ${\Rightarrow}{\text{-}}I$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721825479299-->
END%%
### Proof by Contraposition
Since a conditional and its contrapositive are logically equivalent, we can instead prove the negation of the conclusion leads to the negation of our hypotheses.
@ -191,6 +199,14 @@ Reference: Patrick Keef and David Guichard, “An Introduction to Higher Mathema
<!--ID: 1721824073130-->
END%%
%%ANKI
Basic
Which natural deduction inference rules embody proof by contradiction?
Back: $\neg{\text{-}}I$ and $\neg{\text{-}}E$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1721825479310-->
END%%
## Existence Proofs
An **existence proof** is a proof method used to prove an existential statement, i.e. statements of form: $$\exists x, P(x)$$
@ -404,5 +420,6 @@ END%%
## Bibliography
* “Constructive Proof,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Constructive_proof](https://en.wikipedia.org/w/index.php?title=Constructive_proof&oldid=1217198357).
* Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
* Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n.d., [https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf](https://discrete.openmathbooks.org/pdfs/dmoi3-tablet.pdf).
* Patrick Keef and David Guichard, “An Introduction to Higher Mathematics,” n.d.

View File

@ -1516,7 +1516,7 @@ END%%
%%ANKI
Basic
What condition on set $F$ makes the following true? $F[\![A \cap B]\!] \subseteq F[\![A]\!] \cap F[\![B]\!]$
What condition on set $F$ makes the following true? $$F[\![A \cap B]\!] \subseteq F[\![A]\!] \cap F[\![B]\!]$$
Back: N/A. This is always true.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720386023264-->
@ -1524,7 +1524,7 @@ END%%
%%ANKI
Basic
What condition on set $F$ makes the following true? $F[\![A \cap B]\!] = F[\![A]\!] \cap F[\![B]\!]$
What condition on set $F$ makes the following true? $$F[\![A \cap B]\!] = F[\![A]\!] \cap F[\![B]\!]$$
Back: $F$ is single-rooted.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720386023267-->
@ -1532,7 +1532,7 @@ END%%
%%ANKI
Basic
What condition on set $F$ makes the following true? $F[\![A]\!] \cap F[\![B]\!] \subseteq F[\![A \cap B]\!]$
What condition on set $F$ makes the following true? $$F[\![A]\!] \cap F[\![B]\!] \subseteq F[\![A \cap B]\!]$$
Back: $F$ is single-rooted.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720386023270-->
@ -1540,7 +1540,7 @@ END%%
%%ANKI
Basic
What is the generalization of identity $F[\![A \cap B]\!] \subseteq F[\![A]\!] \cap F[\![B]\!]$?
What is the generalization of the following identity? $$F[\![A \cap B]\!] \subseteq F[\![A]\!] \cap F[\![B]\!]$$
Back: $F[\![\bigcap\mathscr{A}]\!] \subseteq \bigcap\,\{F[\![A]\!] \mid A \in \mathscr{A}\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720386023273-->
@ -1548,7 +1548,7 @@ END%%
%%ANKI
Basic
What is the specialization of identity $F[\![\bigcap\mathscr{A}]\!] \subseteq \bigcap\,\{F[\![A]\!] \mid A \in \mathscr{A}\}$?
What is the specialization of the following identity? $$F[\![\bigcap\mathscr{A}]\!] \subseteq \bigcap\,\{F[\![A]\!] \mid A \in \mathscr{A}\}$$
Back: $F[\![A \cap B]\!] \subseteq F[\![A]\!] \cap F[\![B]\!]$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720386023276-->
@ -1604,7 +1604,7 @@ END%%
%%ANKI
Basic
What condition on set $F$ makes the following true? $F[\![A - B]\!] \subseteq F[\![A]\!] - F[\![B]\!]$
What condition on set $F$ makes the following true? $$F[\![A - B]\!] \subseteq F[\![A]\!] - F[\![B]\!]$$
Back: $F$ is single-rooted.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720665351101-->
@ -1612,7 +1612,7 @@ END%%
%%ANKI
Basic
What condition on set $F$ makes the following true? $F[\![A - B]\!] = F[\![A]\!] - F[\![B]\!]$
What condition on set $F$ makes the following true? $$F[\![A - B]\!] = F[\![A]\!] - F[\![B]\!]$$
Back: $F$ is single-rooted.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720665351105-->
@ -1620,7 +1620,7 @@ END%%
%%ANKI
Basic
What condition on set $F$ makes the following true? $F[\![A]\!] - F[\![B]\!] \subseteq F[\![A - B]\!]$
What condition on set $F$ makes the following true? $$F[\![A]\!] - F[\![B]\!] \subseteq F[\![A - B]\!]$$
Back: N/A. This is always true.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720665351109-->

View File

@ -608,19 +608,24 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1718329620208-->
END%%
## Equivalence Relations
## Reflexivity
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 **reflexive on $A$** if $xRx$ for all $x \in A$.
* $R$ is **symmetric** if whenever $xRy$, then $yRx$.
* $R$ is **transitive** if whenever $xRy$ and $yRz$, then $xRz$.
A relation $R$ is **reflexive on $A$** iff $xRx$ for all $x \in A$. In relational algebra, we define $R$ to be reflexive on $A$ iff $I_A \subseteq R$.
%%ANKI
Cloze
Binary relation $R$ is {reflexive on $A$} iff {$xRx$ for all $x \in A$}.
Basic
How is reflexivity of relation $R$ on set $A$ defined in FOL?
Back: $\forall x \in A, xRx$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429790-->
<!--ID: 1721869969493-->
END%%
%%ANKI
Basic
How is reflexivity of relation $R$ on set $A$ defined in relational algebra?
Back: $I_A \subseteq R$
Reference: “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).
<!--ID: 1721869969498-->
END%%
%%ANKI
@ -663,6 +668,13 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--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\}$?
@ -679,10 +691,130 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
END%%
%%ANKI
Cloze
Binary relation $R$ is {symmetric} iff {$xRy \Rightarrow yRx$}.
Basic
The term "reflexive" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429828-->
<!--ID: 1721693996250-->
END%%
### Irreflexivity
A relation $R$ is **irreflexive on $A$** iff $\neg xRx$ for all $x \in A$. That is, it is *never* the case that $xRx$.
%%ANKI
Basic
How is irreflexivity of relation $R$ on set $A$ defined in FOL?
Back: $\forall x \in A, \neg xRx$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888378-->
END%%
%%ANKI
Basic
Why is it incorrect to ask if $R$ is irreflexive?
Back: We have to ask if $R$ is irreflexive on some reference set.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888384-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ irreflexive?
Back: N/A. The question must provide a reference set.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888387-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ irreflexive on $a$?
Back: N/A. We must ask if $R$ is irreflexive on a set.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888391-->
END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, c \rangle\}$, is $R$ irreflexive on $\{a\}$?
Back: No.
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.
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\}$?
Back: Because $\langle a, a \rangle \in R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888406-->
END%%
%%ANKI
Cloze
Suppose $\neg xRx$ for all $x \in A$, $R$ is said to be irreflexive {on} $A$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888411-->
END%%
%%ANKI
Basic
The term "irreflexive" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870888417-->
END%%
%%ANKI
Basic
Can a nonempty relation be neither reflexive nor irreflexive on the same set?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721911994966-->
END%%
%%ANKI
Basic
Can a nonempty relation be both reflexive and irreflexive on the same set?
Back: No.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721911994996-->
END%%
%%ANKI
Basic
If a nonempty relation isn't reflexive, is it irreflexive?
Back: Not necessarily.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721911995004-->
END%%
## Symmetry
A relation $R$ is **symmetric** iff whenever $xRy$, then $yRx$. In relational algebra, we define $R$ to be symmetric iff $R^{-1} \subseteq R$.
%%ANKI
Basic
How is symmetry of relation $R$ defined in FOL?
Back: $\forall x, \forall y, xRy \Rightarrow yRx$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870204117-->
END%%
%%ANKI
Basic
How is symmetry of relation $R$ defined in relational algebra?
Back: $R^{-1} \subseteq R$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870204123-->
END%%
%%ANKI
@ -703,17 +835,280 @@ END%%
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, b \rangle\}$, which of reflexivity (on $\{a, b\}$), symmetry, and transitivity does $R$ exhibit?
Back: Reflexivity on $\{a, b\}$ and symmetry.
The term "symmetric" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429839-->
<!--ID: 1721694448727-->
END%%
### Antisymmetry
A relation $R$ is **antisymmetric** iff whenever $x \neq y$ and $xRy$, then $\neg yRx$.
%%ANKI
Basic
How is antisymmetry of relation $R$ defined in FOL?
Back: $\forall x, \forall y, x \neq y \land xRy \Rightarrow \neg yRx$
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: 1721909725683-->
END%%
%%ANKI
Basic
A relation $R$ on set $A$ that satisfies the following exhibits what property? $$\forall x, y \in A, xRy \land yRx \Rightarrow x = y$$
Back: Antisymmetry.
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: 1721909971801-->
END%%
%%ANKI
Basic
Is $R = \{\langle a, a \rangle, \langle a, b \rangle, \langle b, a \rangle, \langle b, c \rangle\}$ antisymmetric?
Back: No.
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.
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?
Back: Yes.
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: 1721909725700-->
END%%
%%ANKI
Basic
Can a nonempty relation be both symmetric and antisymmetric on the same set?
Back: Yes.
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: 1721909725703-->
END%%
%%ANKI
Basic
Can a nonempty relation be neither symmetric nor antisymmetric on the same set?
Back: Yes.
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: 1721909971804-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or antisymmetry does $\{\langle a, a \rangle, \langle b, b \rangle\}$ exhibit?
Back: All three.
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: 1721909725707-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or antisymmetry does $\{\langle a, a \rangle, \langle b, c \rangle\}$ exhibit?
Back: Antisymmetry.
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: 1721909725711-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or antisymmetry does $\{\langle a, a \rangle, \langle b, c \rangle, \langle c, b \rangle\}$ exhibit?
Back: Symmetry.
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: 1721909725715-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or antisymmetry does $\{\langle a, b \rangle, \langle b, c \rangle, \langle c, b \rangle\}$ exhibit?
Back: None of them.
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: 1721909971807-->
END%%
%%ANKI
Basic
If a nonempty relation isn't symmetric, is it antisymmetric?
Back: Not necessarily.
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: 1721911804446-->
END%%
%%ANKI
Basic
The term "antisymmetric" is used to describe what kind of mathematical object?
Back: Relations.
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: 1721912048138-->
END%%
### Asymmetry
A relation $R$ is **asymmetric** iff whenever $xRy$, then $\neg yRx$.
%%ANKI
Basic
How is antisymmetry of relation $R$ defined in FOL?
Back: $\forall x, \forall y, xRy \Rightarrow \neg yRx$
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).
END%%
%%ANKI
Basic
What distinguishes the antecedent of antisymmetry's and asymmetric'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-->
END%%
%%ANKI
Basic
Are antisymmetric relations necessarily asymmetric?
Back: No.
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: 1721910949023-->
END%%
%%ANKI
Basic
Are asymmetric relations necessarily antisymmetric?
Back: Yes.
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: 1721910949029-->
END%%
%%ANKI
Cloze
Binary relation $R$ is {transitive} iff {$xRy \land yRz \Rightarrow xRz$}.
A relation is {asymmetric} if and only if it is both {irreflexive} and {antisymmetric}.
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: 1721910949033-->
END%%
%%ANKI
Basic
Can a relation be both symmetric and asymmetric?
Back: Yes.
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: 1721910949037-->
END%%
%%ANKI
Give an example of a relation that is both symmetric and asymmetric?
Back: $\varnothing$
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).
END%%
%%ANKI
Basic
Can a nonempty relation be both symmetric and asymmetric?
Back: No.
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: 1721910949042-->
END%%
%%ANKI
Basic
Can a nonempty relation be neither symmetric nor asymmetric?
Back: Yes.
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: 1721911667937-->
END%%
%%ANKI
Give an example of a nonempty relation that is both symmetric and asymmetric?
Back: N/A.
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).
END%%
%%ANKI
Basic
Can a nonempty relation be both reflexive and asymmetric on the same set?
Back: No.
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: 1721910949047-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or asymmetry does $\{\langle a, a \rangle, \langle b, b \rangle\}$ exhibit?
Back: Reflexivity and symmetry.
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: 1721910949051-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or asymmetry does $\{\langle a, a \rangle, \langle b, c \rangle\}$ exhibit?
Back: None of them.
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: 1721910949055-->
END%%
%%ANKI
Basic
Which of reflexivity, symmetry, and/or asymmetry does $\{\langle a, b \rangle, \langle b, c \rangle\}$ exhibit?
Back: Asymmetry.
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: 1721910949059-->
END%%
%%ANKI
Basic
A relation $R$ is asymmetric if and only if what other two properties of $R$ hold?
Back: $R$ is both irreflexive and antisymmetric.
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: 1721911011861-->
END%%
%%ANKI
Basic
If a nonempty relation isn't symmetric, is it asymmetric?
Back: Not necessarily.
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: 1721911804453-->
END%%
%%ANKI
Basic
The term "asymmetric" is used to describe what kind of mathematical object?
Back: Relations.
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: 1721912048142-->
END%%
## Transitivity
A relation $R$ is **transitive** iff whenever $xRy$ and $yRz$, then $xRz$. In relational algebra, we define $R$ to be transitive iff $R \circ R \subseteq R$.
%%ANKI
Basic
How is transitivity of relation $R$ defined in FOL?
Back: $\forall x, \forall y, \forall z, xRy \land yRz \Rightarrow xRz$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429843-->
<!--ID: 1721870318644-->
END%%
%%ANKI
Basic
How is transitivity of relation $R$ defined in relational algebra?
Back: $R \circ R \subseteq R$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721870318654-->
END%%
%%ANKI
@ -732,6 +1127,34 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1720967429850-->
END%%
%%ANKI
Basic
Which of symmetric relations and transitive relations is more general?
Back: N/A.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720969371859-->
END%%
%%ANKI
Basic
The term "transitive" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721694448736-->
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.
%%ANKI
Basic
Given $R = \{\langle a, a \rangle, \langle b, b \rangle\}$, which of reflexivity (on $\{a, b\}$), symmetry, and transitivity does $R$ exhibit?
Back: Reflexivity on $\{a, b\}$ and symmetry.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720967429839-->
END%%
%%ANKI
Basic
What is an equivalence relation on $A$?
@ -779,14 +1202,6 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1720967429873-->
END%%
%%ANKI
Basic
Which of symmetric relations and transitive relations is more general?
Back: N/A.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1720969371859-->
END%%
%%ANKI
Basic
Which of equivalence relations on $A$ and symmetric relations is more general?
@ -803,44 +1218,6 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1720969371869-->
END%%
%%ANKI
Basic
The term "reflexive" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721693996250-->
END%%
%%ANKI
Basic
The term "symmetric" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721694448727-->
END%%
%%ANKI
Cloze
$R$ is symmetric iff {$R^{-1}$} {$\subseteq$} $R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721694448733-->
END%%
%%ANKI
Basic
The term "transitive" is used to describe what kind of mathematical object?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721694448736-->
END%%
%%ANKI
Cloze
$R$ is transitive iff {$R \circ R$} {$\subseteq$} $R$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1721694448740-->
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$)**.
@ -1243,6 +1620,9 @@ END%%
## Bibliography
* “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).
* “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).
* “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).
* Reference: “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).