diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index a634e1d..d1a6648 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -194,7 +194,17 @@ "function-kernel.png", "peano-system-i.png", "peano-system-ii.png", - "relation-ordering-example.png" + "relation-ordering-example.png", + "archimedean-property.png", + "church-rosser.png", + "directed-graph-example.png", + "undirected-graph-example.png", + "cyclic-undirected-labelled.png", + "graph-isomorphic.png", + "graph-induced-subgraph.png", + "graph-subgraph.png", + "graph-non-subgraph.png", + "bfs.gif" ], "File Hashes": { "algorithms/index.md": "3ac071354e55242919cc574eb43de6f8", @@ -374,8 +384,8 @@ "_journal/2024-03-18.md": "8479f07f63136a4e16c9cd07dbf2f27f", "_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b", "set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53", - "set/index.md": "7d09418b46856b721f14c5c1bc7320fa", - "set/graphs.md": "15aa43bf7f73347219f822e4b400e9bf", + "set/index.md": "9ac07f7fc1fadf1b42278df90b464adb", + "set/graphs.md": "a56f867f51e69cb7438bbdf6215fca36", "_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb", "_journal/2024-03/2024-03-18.md": "2c711c50247a9880f7ed0d33b16e1101", "awk/variables.md": "e40a20545358228319f789243d8b9f77", @@ -568,8 +578,8 @@ "lambda-calculus/alpha-conversion.md": "6df655e60976715e5c6fbbe72b628c6d", "lambda-calculus/index.md": "76d58f85c135c7df00081f47df31168e", "x86-64/instructions/condition-codes.md": "9c05ed99f5c96162e25f0ec4db55c656", - "x86-64/instructions/logical.md": "818428b9ef84753920dc61e5c2de9199", - "x86-64/instructions/arithmetic.md": "271218d855e7291f119f96e91f582738", + "x86-64/instructions/logical.md": "49d40018f1fcb4ed1595d9175bbaab57", + "x86-64/instructions/arithmetic.md": "1a8e0731c60f44b40366b475179377b8", "x86-64/instructions/access.md": "3efe399b89b947ab280dc1e045675390", "x86-64/instructions/index.md": "72c19067e938ab39ea51d25d6ac2bad9", "_journal/2024-06-09.md": "935b3ddf65c51e680ac5c000c7e380af", @@ -586,10 +596,10 @@ "_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": "59e449d6756b57c846cdf07b0a1b4330", + "set/functions.md": "b93f460500a6a7228607f842636ed3b3", "_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4", "_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307", - "lambda-calculus/beta-reduction.md": "a8e2825c84e842ceef7aa638a493b91a", + "lambda-calculus/beta-reduction.md": "0935987f2bac0e6298735f2b26fd5885", "_journal/2024-06-16.md": "ded6ab660ecc7c3dce3afd2e88e5a725", "_journal/2024-06/2024-06-15.md": "c3a55549da9dfc2770bfcf403bf5b30b", "_journal/2024-06-17.md": "63df6757bb3384e45093bf2b9456ffac", @@ -675,7 +685,7 @@ "logic/classical/index.md": "ee0a4b2bfcfa2cab0880db449cb62df1", "logic/classical/truth-tables.md": "b739e2824a4a5c26ac446e7c15ce02aa", "formal-system/proof-system/index.md": "800e93b72a9852ea4823ab0a40854bba", - "formal-system/proof-system/equiv-trans.md": "47afc3ffa0bb758d9629d9d4a401394e", + "formal-system/proof-system/equiv-trans.md": "e2eae52f49249b622b87c7fd06967666", "formal-system/logical-system/index.md": "708bb1547e7343c236068c18da3f5dc0", "formal-system/logical-system/pred-logic.md": "34e872f4f920bf4e8c2cd00ee95b310f", "formal-system/logical-system/prop-logic.md": "b61ce051795d5a951c763b928ec5cea8", @@ -746,7 +756,7 @@ "_journal/2024-08/2024-08-15.md": "7c3a96a25643b62b0064bf32cb17d92f", "_journal/2024-08-17.md": "b06a551560c377f61a1b39286cd43cee", "_journal/2024-08/2024-08-16.md": "da1127a1985074a3930b4c3512344025", - "set/order.md": "b69f922200514975b7a7028eef030b59", + "set/order.md": "3bf63dd9c8ce6d2b4c6905dab0bd4aad", "_journal/2024-08-18.md": "6f8aec69e00401b611db2a377a3aace5", "ontology/philosophy/properties.md": "41b32249d3e4c23d73ddb3a417d65a4c", "_journal/2024-08-19.md": "94836e52ec04a72d3e1dbf3854208f65", @@ -756,14 +766,14 @@ "calculus/index.md": "5ee4d950533ae330ca5ef9e113fe87f3", "x86-64/instructions/conditions.md": "c5571deac40ac2eeb8666f2d3b3c278e", "_journal/2024-08-20.md": "e8bec308d1b29e411c6799ace7ef6571", - "algebra/arch-prop.md": "eccdd685f12898ed8679b558d19dc20a", + "algebra/arch-prop.md": "bca3724ef5aae3f7f20907108087af47", "_journal/2024-08/2024-08-19.md": "94836e52ec04a72d3e1dbf3854208f65", "_journal/2024-08-21.md": "59e9483143ba6beec4f9ae2a09eb90a8", "_journal/2024-08-22.md": "050235d5dc772b542773743b57ce3afe", "_journal/2024-08/2024-08-21.md": "1637b8ec8475cf3eb4f41d1d86cbf5df", "_journal/2024-08/2024-08-20.md": "e8bec308d1b29e411c6799ace7ef6571", "_journal/2024-08-23.md": "3b2feab2cc927e267263cb1e9c173d50", - "set/natural-numbers.md": "353d1eef7b50fa8f635adc928df734fa", + "set/natural-numbers.md": "a14465985e87b81ccbe3a5d27159654a", "_journal/2024-08-24.md": "563fad24740e44734a87d7c3ec46cec4", "_journal/2024-08/2024-08-23.md": "7b5a40e83d8f07ff54cd9708017d029c", "_journal/2024-08/2024-08-22.md": "050235d5dc772b542773743b57ce3afe", @@ -771,7 +781,7 @@ "c17/enums.md": "9414fb67aa256a0a11b7240534c67bf6", "c17/derived-types.md": "6fb8f23a2423f05d5bdccb6672a32e38", "c17/basic-types.md": "7c6653bf6dc24c2f2aa72fc95c4f7875", - "c17/types/simple.md": "36445dec496b5f7a066bdb7738b2f17e", + "c17/types/simple.md": "0fab7afc623e441cd17ae23497f6babe", "c17/types/enumerated.md": "e1f70a30677c776b7b44ac3e0ff4e76d", "c17/types/derived.md": "aff0d2b6d218fb67af3cc92ead924de3", "c17/types/basic.md": "5064e21e683c0218890058882e06b6f3", @@ -784,7 +794,7 @@ "_journal/2024-08/2024-08-25.md": "a3337b4658677810127350ef3e0ad146", "_journal/2024-08-27.md": "d9ffc6ea2128ab5a86ab5f2619206736", "_journal/2024-08/2024-08-26.md": "6f40716e2f01cd097d4881259babf1ba", - "c17/types/conversions.md": "477528bf1a297a8fc4eed0ecb4206158", + "c17/types/conversions.md": "843ece1b41a227618c797b25cbcdd98b", "_journal/2024-08-28.md": "c9c0e7ab8bcbf23d6332b3f19ec4d997", "_journal/2024-08-30.md": "ff50eb8dd5124c20d4fa291d8b675238", "_journal/2024-08/2024-08-28.md": "92e653379c8d7594bb23de4b330913fe", @@ -816,7 +826,14 @@ "_journal/2024-09/2024-09-17.md": "caea0dab26b0970c045ccd9e5f2f3765", "_journal/2024-09/2024-09-16.md": "7dd800d514051dd36c33c14623c7c5c8", "_journal/2024-09/2024-09-15.md": "0e5d1ecd73edf343d3a268b25140a921", - "_journal/2024-09-19.md": "612f08e8f9ce35f71378e2c4a636c862" + "_journal/2024-09-19.md": "612f08e8f9ce35f71378e2c4a636c862", + "_journal/2024-09-20.md": "69cf79bb0cb8c116a9c0f671671fdc44", + "_journal/2024-09/2024-09-19.md": "d9ce529c7df341cc5142b52f2de451f2", + "_journal/2024-09-21.md": "c3dbc09d0892e830a16159898f3c30d6", + "_journal/2024-09/2024-09-20.md": "69cf79bb0cb8c116a9c0f671671fdc44", + "_journal/2024-09-22.md": "2d00b00b4eb9964465f30210187603cf", + "_journal/2024-09/2024-09-21.md": "2e6425f4db0187082947c3e0cb24f754", + "algorithms/bfs.md": "2734400c0a5843c92adbc2a0f06d4d56" }, "fields_dict": { "Basic": [ diff --git a/notes/_journal/2024-09-22.md b/notes/_journal/2024-09-22.md new file mode 100644 index 0000000..0c3a85a --- /dev/null +++ b/notes/_journal/2024-09-22.md @@ -0,0 +1,13 @@ +--- +title: "2024-09-22" +--- + +- [x] Anki Flashcards +- [x] KoL +- [ ] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Finished "Inductive Sets" in chapter 4 of "Elements of Set Theory". +* Finished notes on C's enumerated types. +* Notes on [[bfs|BFS]]. \ No newline at end of file diff --git a/notes/_journal/2024-09-19.md b/notes/_journal/2024-09/2024-09-19.md similarity index 100% rename from notes/_journal/2024-09-19.md rename to notes/_journal/2024-09/2024-09-19.md diff --git a/notes/_journal/2024-09/2024-09-20.md b/notes/_journal/2024-09/2024-09-20.md new file mode 100644 index 0000000..7746efd --- /dev/null +++ b/notes/_journal/2024-09/2024-09-20.md @@ -0,0 +1,9 @@ +--- +title: "2024-09-20" +--- + +- [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-09/2024-09-21.md b/notes/_journal/2024-09/2024-09-21.md new file mode 100644 index 0000000..b689ec0 --- /dev/null +++ b/notes/_journal/2024-09/2024-09-21.md @@ -0,0 +1,11 @@ +--- +title: "2024-09-21" +--- + +- [x] Anki Flashcards +- [x] KoL +- [ ] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Additional notes on transitive sets. \ No newline at end of file diff --git a/notes/algebra/arch-prop.md b/notes/algebra/arch-prop.md index e88dbd5..6ec7c5d 100644 --- a/notes/algebra/arch-prop.md +++ b/notes/algebra/arch-prop.md @@ -78,7 +78,7 @@ END%% %%ANKI Basic -What mathematical entities are assumed to exist in the formulate of the Archimedean property of the reals? +What mathematical entities are presumed in the Archimedean property of the reals? Back: Two positive real numbers. Reference: “Archimedean Property,” in _Wikipedia_, June 23, 2024, [https://en.wikipedia.org/w/index.php?title=Archimedean_property](https://en.wikipedia.org/w/index.php?title=Archimedean_property&oldid=1230567137). diff --git a/notes/algorithms/bfs.md b/notes/algorithms/bfs.md new file mode 100644 index 0000000..2ca7e1d --- /dev/null +++ b/notes/algorithms/bfs.md @@ -0,0 +1,177 @@ +--- +title: Breadth-First Search +TARGET DECK: Obsidian::STEM +FILE TAGS: algorithm data_structure::graph +tags: + - bfs + - graph +--- + +## Overview + +Bread-first search operates on a graph $G = \langle V, E \rangle$ and a **source** vertex $s$. It works by distinguishing between discovered and undiscovered nodes, incrementally marking nodes adjacent to discovered nodes from undiscovered to discovered. + +![[bfs.gif]] + +%%ANKI +Basic +What is BFS an acronym for? +Back: **B**readth-**f**irst **s**earch. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Cloze +Breadth-first search is characterized by a graph and a {source vertex}. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Cloze +The {1:source} of breadth-first {2:search} is the {2:root} of the breadth-first {1:tree}. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which of undirected and directed graphs is BFS applicable to? +Back: Both. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +With respect to breadth-first trees, what does the predecessor of a node $N$ refer to? +Back: The node from which $N$ was discovered. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +With respect to breadth-first trees, what does the parent of a node $N$ refer to? +Back: The node from which $N$ was discovered. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +With respect to breadth-first trees, the predecessor of a node is also known as what? +Back: The parent of the node. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +With respect to breadth-first trees, the parent of a node is also known as what? +Back: The predecessor of the node. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What ADT is typically used to manage the set of most recently discovered BFS vertices? +Back: A queue. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which vertices are not discovered during a graph BFS? +Back: Those not reachable from the source vertex. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What basic graph algorithm is the following a demonstration of? +![[bfs.gif]] +Back: Breadth-first search. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +In BFS, what happens to the nodes found within the internal queue? +Back: Undiscovered nodes adjacent to those in the queue are enqueued. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which of BFS or DFS is used to find shortest paths? +Back: BFS. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +When can BFS *not* be used to find shortest paths? +Back: When the graph in question has differently weighted edges. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which weighted graphs can BFS be used on to find shortest paths? +Back: Graphs with equally weighted edges. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which standard graph representation has worst-case BFS running time of $O(\lvert V \rvert + \lvert E \rvert)$? +Back: The adjacency-matrix representation. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Given graph $\langle V, E \rangle$ with adjacency-list representation, what is the worst-case run time of BFS? +Back: $O(\lvert V \rvert + \lvert E \rvert)$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Given graph $\langle V, E \rangle$ with adjacency-matrix representation, what is the worst-case run time of BFS? +Back: $O(\lvert V \rvert^2)$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +*Why* is BFS of an adjacency-list representation $O(\lvert V \rvert + \lvert E \rvert)$? +Back: For each vertex being analyzed, we only examine its immediately adjacent vertices. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +*Why* is BFS of an adjacency-matrix representation $O(\lvert V \rvert^2)$? +Back: For each vertex being analyzed, we must examine $\lvert V \rvert$ entries for adjacent vertices. +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/algorithms/images/bfs.gif b/notes/algorithms/images/bfs.gif new file mode 100644 index 0000000..ac6e519 Binary files /dev/null and b/notes/algorithms/images/bfs.gif differ diff --git a/notes/algorithms/images/dfs.gif b/notes/algorithms/images/dfs.gif new file mode 100644 index 0000000..a699903 Binary files /dev/null and b/notes/algorithms/images/dfs.gif differ diff --git a/notes/c17/types/conversions.md b/notes/c17/types/conversions.md index 3eb90a7..3f1fbc7 100644 --- a/notes/c17/types/conversions.md +++ b/notes/c17/types/conversions.md @@ -216,14 +216,26 @@ What is the type domain of `a + b`? unsigned short a; signed int b; ``` -Back: Indeterminate. +Back: Real. Reference: “ISO: Programming Languages - C,” April 12, 2011, [https://port70.net/~nsz/c/c11/n1570.pdf](https://port70.net/~nsz/c/c11/n1570.pdf). END%% %%ANKI Basic -*Why* is the type domain of `a + b` indeterminate? +What is the common real type of `a + b`? +```c +unsigned short a; +signed int b; +``` +Back: Indeterminate. +Reference: “ISO: Programming Languages - C,” April 12, 2011, [https://port70.net/~nsz/c/c11/n1570.pdf](https://port70.net/~nsz/c/c11/n1570.pdf). + +END%% + +%%ANKI +Basic +*Why* is the common real type of `a + b` indeterminate? ```c unsigned short a; int b; @@ -235,7 +247,7 @@ END%% %%ANKI Basic -What *might* the type domain of `a + b` be? +What *might* the common real type of `a + b` be? ```c unsigned short a; signed int b; @@ -259,7 +271,7 @@ END%% %%ANKI Basic -When is the type domain of `a + b` equal to `unsigned int`? +When is the common real type of `a + b` equal to `unsigned int`? ```c unsigned short a; signed int b; diff --git a/notes/c17/types/simple.md b/notes/c17/types/simple.md index 2f32e8b..37c77e8 100644 --- a/notes/c17/types/simple.md +++ b/notes/c17/types/simple.md @@ -764,6 +764,64 @@ Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Program END%% +### Integer Constant Expressions + +An integer constant expression (ICE) is a compile-time integer value. Its value must be determinable at compile time (e.g. no function calls are permitted), and also no evaluation of an object must participate as an operand. + +%%ANKI +Basic +What is ICE an acronym for? +Back: **I**nteger **c**onstant **e**xpression. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +*Why* isn't `b42` in the following considered an ICE? +```c +enum { b42 = 42 } +``` +Back: N/A. It is. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +*Why* isn't `b42` in the following considered an ICE? +```c +signed const a42 = 42; +enum { b42 = a42 } +``` +Back: Because it depends on the evaluation of object `a42`. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +*Why* isn't `c52` in the following considered an ICE? +```c +enum { b42 = 42, c52 = b42 + 10 } +``` +Back: N/A. It is. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +*Why* isn't `b42` in the following considered an ICE? +```c +signed const a42() { return 42; } +enum { b42 = a42() } +``` +Back: Because it depends on a function call. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + ## Floating Point ### Literals @@ -933,7 +991,56 @@ Reference: Van der Linden, Peter. _Expert C Programming: Deep C Secrets_. Progra END%% +%%ANKI +Basic +Positional values of `enum`s start at what value? +Back: `0` +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +What type is given to enumeration constants? +Back: `signed int` +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +What kind of integer expressions are `enum` constants limited to? +Back: Integer constant expressions. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +Besides being an ICE, what other condition is expected on `enum` values? +Back: The ICE evaluates to an integer that fits within a `signed int`. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +What mechanism(s) are available for defining constants of type `signed int`? +Back: `enum`s and macros. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + +%%ANKI +Basic +What mechanism(s) are available for defining constants of type `unsigned int`? +Back: Macros. +Reference: Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). + +END%% + ## Bibliography * “ISO: Programming Languages - C,” April 12, 2011, [https://port70.net/~nsz/c/c11/n1570.pdf](https://port70.net/~nsz/c/c11/n1570.pdf). +* Jens Gustedt, _Modern C_ (Shelter Island, NY: Manning Publications Co, 2020). * Van der Linden, Peter. _Expert C Programming: Deep C Secrets_. Programming Languages / C. Mountain View, Cal.: SunSoft Pr, 1994. diff --git a/notes/formal-system/proof-system/equiv-trans.md b/notes/formal-system/proof-system/equiv-trans.md index 3e4186a..0e6ee10 100644 --- a/notes/formal-system/proof-system/equiv-trans.md +++ b/notes/formal-system/proof-system/equiv-trans.md @@ -468,13 +468,6 @@ $$ END%% -%%ANKI -Cloze -The system of evaluation has {equivalences} whereas the formal system has {theorems}. -Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. - -END%% - %%ANKI Basic What is a "theorem" in the equivalence-transformation formal system? diff --git a/notes/lambda-calculus/beta-reduction.md b/notes/lambda-calculus/beta-reduction.md index 64385a4..7b3c7a9 100644 --- a/notes/lambda-calculus/beta-reduction.md +++ b/notes/lambda-calculus/beta-reduction.md @@ -395,7 +395,7 @@ END%% %%ANKI Basic -What proposition explains how applications relate to the definition of $\beta\text{-nf}$? +What proposition explains how atoms and applications relate to the definition of $\beta\text{-nf}$? Back: For all atoms $a$, if $M, N \in \beta\text{-nf}$, then $aMN \in \beta\text{-nf}$. Reference: Hindley, J Roger, and Jonathan P Seldin. “Lambda-Calculus and Combinators, an Introduction,” n.d. [https://www.cin.ufpe.br/~djo/files/Lambda-Calculus%20and%20Combinators.pdf](https://www.cin.ufpe.br/~djo/files/Lambda-Calculus%20and%20Combinators.pdf). diff --git a/notes/set/functions.md b/notes/set/functions.md index 5bcdd04..7130020 100644 --- a/notes/set/functions.md +++ b/notes/set/functions.md @@ -1655,7 +1655,7 @@ END%% %%ANKI Basic -Let $A$ be closed under $S$. With maximum specificity, what kind of mathematical object is $A$? +Let $A$ be closed under $S$. What kind of mathematical object is $A$? Back: A set. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). @@ -1663,7 +1663,7 @@ END%% %%ANKI Basic -Let $A$ be closed under $S$. With maximum specificity, what kind of mathematical object is $S$? +Let $A$ be closed under $S$. What kind of mathematical object is $S$? Back: A function. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). diff --git a/notes/set/graphs.md b/notes/set/graphs.md index 13cd6fa..3f972de 100644 --- a/notes/set/graphs.md +++ b/notes/set/graphs.md @@ -1203,7 +1203,7 @@ END%% %%ANKI Basic -With maximum specificity, is $\langle B, D, E, J, K, B, A \rangle$ a path, trail, or walk? +Is $\langle B, D, E, J, K, B, A \rangle$ most precisely a path, trail, or walk? ![[cyclic-undirected-labelled.png]] Back: A trail. Reference: 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). @@ -1212,7 +1212,7 @@ END%% %%ANKI Basic -With maximum specificity, is $\langle B, D, E, J, K, B \rangle$ a path, trail, or walk? +Is $\langle B, D, E, J, K, B \rangle$ most precisely a path, trail, or walk? ![[cyclic-undirected-labelled.png]] Back: A path. Reference: 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). @@ -1221,7 +1221,7 @@ END%% %%ANKI Basic -With maximum specificity, is $\langle B, D, B, K, L \rangle$ a path, trail, or walk? +Is $\langle B, D, B, K, L \rangle$ most precisely a path, trail, or walk? ![[cyclic-undirected-labelled.png]] Back: A walk. Reference: 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). @@ -1230,7 +1230,7 @@ END%% %%ANKI Basic -With maximum specificity, is $\langle A, B, D \rangle$ a path, trail, or walk? +Is $\langle A, B, D \rangle$ most precisely a path, trail, or walk? ![[cyclic-undirected-labelled.png]] Back: A path. Reference: 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). diff --git a/notes/set/index.md b/notes/set/index.md index 984f4f5..7d99ce4 100644 --- a/notes/set/index.md +++ b/notes/set/index.md @@ -787,6 +787,38 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +%%ANKI +Basic +Let $A$ be a set. What does $\bigcup \mathscr{P} A$ evaluate to? +Back: $A$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $A$ be a set. *Why* does $\bigcup \mathscr{P} A = A$? +Back: Because $\mathscr{P} A$ evaluates to the subsets of $A$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $A$ be a set. What does $\bigcap \mathscr{P} A$ evaluate to? +Back: $\varnothing$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $A$ be a set. *Why* does $\bigcap \mathscr{P} A = \varnothing$? +Back: Because $\varnothing \in \mathscr{P} A$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + ## Subset Axioms For each formula $\_\_\_$ not containing $B$, the following is an axiom: $$\forall t_1, \cdots, \forall t_k, \forall c, \exists B, \forall x, (x \in B \Leftrightarrow x \in c \land \_\_\_)$$ diff --git a/notes/set/natural-numbers.md b/notes/set/natural-numbers.md index 5906de3..8d853ed 100644 --- a/notes/set/natural-numbers.md +++ b/notes/set/natural-numbers.md @@ -283,7 +283,7 @@ END%% %%ANKI Basic -Suppose $n \in \omega$. What other sets *must* $n$ be a member of? +Suppose $n \in \omega$. By definition of natural numbers, what other sets must $n$ be a member of? Back: Every other inductive set. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). @@ -377,6 +377,8 @@ A **Peano system** is a triple $\langle N, S, e \rangle$ consisting of a set $N$ * $S$ is one-to-one; * Any subset $A$ of $N$ that contains $e$ and is closed under $S$ equals $N$ itself. +Given $\sigma = \{\langle n, n^+ \rangle \mid n \in \omega\}$, $\langle \omega, \sigma, 0 \rangle$ is a Peano system. + %%ANKI Basic A Peano system is a tuple consisting of how many members? @@ -387,7 +389,7 @@ END%% %%ANKI Basic -Consider Peano system $\langle N, S, e \rangle$. With maximum specificity, what kind of mathematical object is $N$? +Consider Peano system $\langle N, S, e \rangle$. What kind of mathematical object is $N$? Back: A set. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). @@ -395,7 +397,7 @@ END%% %%ANKI Basic -Consider Peano system $\langle N, S, e \rangle$. With maximum specificity, what kind of mathematical object is $S$? +Consider Peano system $\langle N, S, e \rangle$. What kind of mathematical object is $S$? Back: A function. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). @@ -419,7 +421,7 @@ END%% %%ANKI Basic -Consider Peano system $\langle N, S, e \rangle$. With maximum specificity, what kind of mathematical object is $e$? +Consider Peano system $\langle N, S, e \rangle$. What kind of mathematical object is $e$? Back: A set or urelement. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). @@ -538,6 +540,70 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +%%ANKI +Basic +Which Peano system serves as the prototypical example? +Back: $\langle \omega, \sigma, 0 \rangle$ where $\sigma$ denotes the successor restricted to the natural numbers. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. How is $\omega$ defined? +Back: As the set of natural numbers. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. How is $\sigma$ defined? +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 +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. What kind of mathematical object is $\sigma$? +Back: A function. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. What is the domain of $\sigma$? +Back: $\omega$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. What is the codomain of $\sigma$? +Back: $\omega$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. Its Peano induction postulate goes by what other name? +Back: The induction principle for $\omega$. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Let $\langle \omega, \sigma, 0 \rangle$ be a Peano system. The induction principle for $\omega$ satisfies what postulate of the system? +Back: The Peano induction postulate. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + ## Transitivity A set $A$ is said to be **transitive** iff every member of a member of $A$ is itself a member of $A$. We can equivalently express this using any of the following formulations: @@ -668,6 +734,110 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% +%%ANKI +Basic +Which sets serve as the prototypical example of transitive sets? +Back: The natural numbers. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Is $n \in \omega$ a transitive set? +Back: Yes. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Is $\omega$ a transitive set? +Back: Yes. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How can we alternatively state "$\omega$ is a transitive set"? +Back: Every natural number is a set of natural numbers. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +How can we more concisely state "every natural number is a set of natural numbers"? +Back: $\omega$ is a transitive set. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +What does $\mathscr{P}\,0$ evaluate to? +Back: $1$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +What does $\mathscr{P}\,1$ evaluate to? +Back: $2$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +What does $\mathscr{P}\,2$ evaluate to? +Back: $\{0, 1, 2, \{1\}\}$ +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Suppose $X$ is transitive. Is $\bigcup X$ transitive? +Back: Yes. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Suppose for all $x \in X$, $x$ is transitive. Is $X$ transitive? +Back: Not necessarily. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Suppose for all $x \in X$, $x$ is transitive. Is $\bigcup X$ transitive? +Back: Yes. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Suppose for all $x \in X$, $x$ is transitive. Is $\bigcap X$ transitive? +Back: N/A. If $X = \varnothing$, $\bigcap X$ is undefined. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + +%%ANKI +Basic +Suppose $X \neq \varnothing$ and for all $x \in X$, $x$ is transitive. Is $\bigcap X$ transitive? +Back: Yes. +Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). + +END%% + ## Bibliography * Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). \ No newline at end of file diff --git a/notes/set/order.md b/notes/set/order.md index 40720c1..2e7478b 100644 --- a/notes/set/order.md +++ b/notes/set/order.md @@ -487,7 +487,7 @@ END%% %%ANKI Basic -Consider an equivalence class of $x$ (modulo $R$). With maximum specificity, what kind of mathematical object is $R$? +Consider an equivalence class of $x$ (modulo $R$). What kind of mathematical object is $R$? Back: A relation. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). diff --git a/notes/x86-64/instructions/arithmetic.md b/notes/x86-64/instructions/arithmetic.md index c745f65..c69a638 100644 --- a/notes/x86-64/instructions/arithmetic.md +++ b/notes/x86-64/instructions/arithmetic.md @@ -32,7 +32,7 @@ END%% %%ANKI Cloze -The {`leaq`} instruction is to x86-64 as the {`&`} operator is to C. +The {`leaq`} instruction is to x86-64 as the {`&`} unary operator is to C. Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. Tags: c17 diff --git a/notes/x86-64/instructions/logical.md b/notes/x86-64/instructions/logical.md index 85187cb..82f8b06 100644 --- a/notes/x86-64/instructions/logical.md +++ b/notes/x86-64/instructions/logical.md @@ -31,7 +31,7 @@ END%% %%ANKI Cloze -The {`NEG`} instruction class is to x86-64 whereas the {`-`} *unary* operator is to C. +The {`NEG`} instruction class is to x86-64 whereas the {`-`} unary operator is to C. Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. Tags: c17