From 4dc9e0fab164d0eea57fffc7ded72e0039aa97cc Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Tue, 30 Jul 2024 06:25:23 -0600 Subject: [PATCH] Alternative commands, BSTs, RDF. --- .../plugins/obsidian-to-anki-plugin/data.json | 26 ++- notes/_journal/2024-07-30.md | 13 ++ notes/_journal/{ => 2024-07}/2024-07-28.md | 0 notes/_journal/2024-07/2024-07-29.md | 11 + notes/algorithms/order-growth.md | 2 +- notes/data-structures/binary-search-tree.md | 195 ++++++++++++++++++ .../images/binary-search-tree.png | Bin 0 -> 16249 bytes .../logical-system/pred-logic.md | 6 +- .../proof-system/natural-deduction.md | 6 +- notes/lambda-calculus/alpha-conversion.md | 4 +- notes/ontology/rdf/index.md | 51 +++++ notes/programming/pred-trans.md | 143 +++++++++++++ notes/proofs/index.md | 24 ++- notes/set/relations.md | 11 +- 14 files changed, 460 insertions(+), 32 deletions(-) create mode 100644 notes/_journal/2024-07-30.md rename notes/_journal/{ => 2024-07}/2024-07-28.md (100%) create mode 100644 notes/_journal/2024-07/2024-07-29.md create mode 100644 notes/data-structures/binary-search-tree.md create mode 100644 notes/data-structures/images/binary-search-tree.png diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index f15b806..1971eee 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -145,7 +145,8 @@ "church-rosser.png", "infinite-cartesian-product.png", "function-kernel.png", - "triple-table-repr.png" + "triple-table-repr.png", + "binary-search-tree.png" ], "File Hashes": { "algorithms/index.md": "3ac071354e55242919cc574eb43de6f8", @@ -189,7 +190,7 @@ "algorithms/loop-invariants.md": "cbefc346842c21a6cce5c5edce451eb2", "algorithms/loop-invariant.md": "3b390e720f3b2a98e611b49a0bb1f5a9", "algorithms/running-time.md": "5efc0791097d2c996f931c9046c95f65", - "algorithms/order-growth.md": "1c3f7ff710b6e67a04e16cdfd0f63e8c", + "algorithms/order-growth.md": "764610efa15de0be6d4092127b61440c", "_journal/2024-02-08.md": "19092bdfe378f31e2774f20d6afbfbac", "algorithms/sorting/selection-sort.md": "73415c44d6f4429f43c366078fd4bf98", "algorithms/index 1.md": "6fada1f3d5d3af64687719eb465a5b97", @@ -418,7 +419,7 @@ "_journal/2024-04-30.md": "369f98b9d91de89cc1f4f581bc530c0d", "_journal/2024-04/2024-04-29.md": "b4fa2fd62e1b4fe34c1f71dc1e9f5b0b", "proofs/induction.md": "36ab5a92ae3cf9bb2def333dc41d79ff", - "proofs/index.md": "18808a0527a25af788aabb821686bcee", + "proofs/index.md": "6251417184116a217e6eef39abc12077", "_journal/2024-05-01.md": "959ff67fe3db585ba6a7b121d853bbac", "_journal/2024-05-02.md": "d7d6ba7e065d807986f0bd77281c0bb1", "data-structures/priority-queues.md": "8c5c6bf62b1a39d8f1f72b800fcb17ff", @@ -448,7 +449,7 @@ "_journal/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b", "_journal/2024-05/2024-05-12.md": "ca9f3996272152ef89924bb328efd365", "git/remotes.md": "cbe2cd867f675f156e7fe71ec615890d", - "programming/pred-trans.md": "77fa537ef0b96ab1b90ebf2309bc345d", + "programming/pred-trans.md": "a1e486d3665a7fab7be77120cd572b1c", "set/axioms.md": "063955bf19c703e9ad23be2aee4f1ab7", "_journal/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5", "_journal/2024-05/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b", @@ -511,12 +512,12 @@ "_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": "6063a3a4be5b5983d17600b18220897a", + "set/relations.md": "ac51368a5cd0a4cc02c3f608af78cf53", "_journal/2024-06-07.md": "795be41cc3c9c0f27361696d237604a2", "_journal/2024-06/2024-06-06.md": "db3407dcc86fa759b061246ec9fbd381", "_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8", "_journal/2024-06/2024-06-07.md": "c6bfc4c1e5913d23ea7828a23340e7d3", - "lambda-calculus/alpha-conversion.md": "007828faf9b4ace5bd30b87a36a90dcf", + "lambda-calculus/alpha-conversion.md": "4dc6cceec27ef88ab2b256c05fc5d91d", "lambda-calculus/index.md": "76d58f85c135c7df00081f47df31168e", "x86-64/instructions/condition-codes.md": "1f59f0b81b2e15582b855d96d1d377da", "x86-64/instructions/logical.md": "818428b9ef84753920dc61e5c2de9199", @@ -628,14 +629,14 @@ "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/pred-logic.md": "34e872f4f920bf4e8c2cd00ee95b310f", "formal-system/logical-system/prop-logic.md": "b61ce051795d5a951c763b928ec5cea8", "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": "4890ec679f68a2f86bb59f94a4114a22", + "formal-system/proof-system/natural-deduction.md": "87b7b9a78ea7f038f1b4e4fd15039fe8", "startups/term-sheet.md": "6b6152af78addb3fe818a7fc9d375fbf", "startups/financing-rounds.md": "00a622fda2b4b442901bde2842309088", "_journal/2024-07-23.md": "35e18a1d9a8dd0a97e1d9898bc1d8f01", @@ -651,11 +652,16 @@ "_journal/2024-07-28.md": "8a2393673132ac57a86b3b528bfc4a16", "_journal/2024-07/2024-07-27.md": "7c48690746d8320494e29e92390eb6ee", "ontology/rdf/uri.md": "5d9f355f314a54c5fb5099d751070656", - "ontology/rdf/index.md": "48e8347fa123b2c2ccc09f8b8c6ab142", + "ontology/rdf/index.md": "df9ce690a970cfca741b828cf1255146", "ontology/philosophy/permissivism.md": "643e815a79bc5c050cde9f996aa44ef5", "ontology/philosophy/nominalism.md": "46245c644238157e15c7cb6def27d90a", "ontology/philosophy/index.md": "6c7c60f91f78fdc1cdd8c012b1ac4ebd", - "ontology/philosophy/dialetheism.md": "56dd05b38519f90c5cab93637978b3b3" + "ontology/philosophy/dialetheism.md": "56dd05b38519f90c5cab93637978b3b3", + "_journal/2024-07-29.md": "a480e577b06a94755b6ebf4ac9ee5732", + "_journal/2024-07/2024-07-28.md": "ff5dcfb3dc1b5592894363414e20b02f", + "_journal/2024-07-30.md": "025194b9b770b56a81b5a52d96a305f2", + "_journal/2024-07/2024-07-29.md": "ab496a55aacc60d9456378920c599871", + "data-structures/binary-search-tree.md": "c2076aa12f7afacc96fa504dd89dae5e" }, "fields_dict": { "Basic": [ diff --git a/notes/_journal/2024-07-30.md b/notes/_journal/2024-07-30.md new file mode 100644 index 0000000..f6ed93a --- /dev/null +++ b/notes/_journal/2024-07-30.md @@ -0,0 +1,13 @@ +--- +title: "2024-07-30" +--- + +- [x] Anki Flashcards +- [x] KoL +- [x] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Finished "Level 0: Encounter" of "Modern C". +* Initial notes on [[binary-search-tree|binary search trees]]. +* Finish through 3.3 of "Semantic Web for the Working Ontologist". \ No newline at end of file diff --git a/notes/_journal/2024-07-28.md b/notes/_journal/2024-07/2024-07-28.md similarity index 100% rename from notes/_journal/2024-07-28.md rename to notes/_journal/2024-07/2024-07-28.md diff --git a/notes/_journal/2024-07/2024-07-29.md b/notes/_journal/2024-07/2024-07-29.md new file mode 100644 index 0000000..7c7818f --- /dev/null +++ b/notes/_journal/2024-07/2024-07-29.md @@ -0,0 +1,11 @@ +--- +title: "2024-07-29" +--- + +- [x] Anki Flashcards +- [x] KoL +- [x] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Notes on chapter 10 "The Alternative Command" of "The Science of Programming". \ No newline at end of file diff --git a/notes/algorithms/order-growth.md b/notes/algorithms/order-growth.md index 76ea5ac..c90da6d 100644 --- a/notes/algorithms/order-growth.md +++ b/notes/algorithms/order-growth.md @@ -995,7 +995,7 @@ END%% %%ANKI Basic What theorem relates $\Theta(g(n))$, $O(g(n))$, and $\Omega(g(n))$? -Back: $f(n) = \Theta(g(n))$ if and only if $f(n) = O(g(n))$ and $f(n) = \Omega(g(n))$. +Back: $f(n) = \Theta(g(n))$ iff $f(n) = O(g(n))$ and $f(n) = \Omega(g(n))$. Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). END%% diff --git a/notes/data-structures/binary-search-tree.md b/notes/data-structures/binary-search-tree.md new file mode 100644 index 0000000..6b4109c --- /dev/null +++ b/notes/data-structures/binary-search-tree.md @@ -0,0 +1,195 @@ +--- +title: Binary Search Tree +TARGET DECK: Obsidian::STEM +FILE TAGS: data_structure::bst +tags: + - bst + - data_structure +--- + +## Overview + +A binary search tree (BST) is a [[trees#Binary Trees|binary tree]] satisfying the **binary-search-tree property**: + +> Let $x$ be a node in a binary search tree. If $y$ is a node in the left subtree of $x$, then $y.key \leq x.key$. If $y$ is a node in the right subtree of $x$, then $y.key \geq x.key$. + +Consider an arbitrary node $x$ of some BST. Then: + +* An **inorder** traversal visits $x$'s left child, then $x$, then $x$'s right child. +* A **preorder** traversal visits $x$, then $x$'s left child, then $x$'s right child. +* A **postorder** traversal visits $x$'s left child, then $x$'s right child, then $x$. + +%%ANKI +Basic +Which of binary trees and binary search trees are more general? +Back: Binary trees. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +A binary search tree is a binary tree with what property? +Back: The binary-search-tree property. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What does the binary-search-tree property state? +Back: The value of a node is $\geq$ those of its left subtree and $\leq$ those of its right subtree. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Let $x$ be a binary search tree node and $y$ be in $x$'s left subtree. How do $x$ and $y$ compare? +Back: $y \leq x$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Let $x$ be a binary tree node and $y$ be in $x$'s right subtree. How do $x$ and $y$ compare? +Back: Indeterminate. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Let $x$ be a binary search tree node and $y$ be in $x$'s right subtree. How do $x$ and $y$ compare? +Back: $x \leq y$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Let $x$ be a binary tree node and $y$ be in $x$'s left subtree. How do $x$ and $y$ compare? +Back: Indeterminate. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +In what order are nodes of a binary tree printed in an inorder traversal? +Back: Left child, root, right child. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +In what order are nodes of a binary tree printed in a postorder traversal? +Back: Left child, right child, root. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +In what order are nodes of a binary tree printed in a preorder traversal? +Back: Root, left child, right child. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which binary tree node is printed first in an inorder traversal? +Back: The leftmost child. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which binary tree node is printed last in an inorder traversal? +Back: The rightmost child. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which binary tree node is printed first in a preorder traversal? +Back: The root. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which binary tree node is printed last in a preorder traversal? +Back: The rightmost child. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which binary tree node is printed first in a postorder traversal? +Back: The leftmost child. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Which binary tree node is printed last in a postorder traversal? +Back: The root. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Consider the following binary search tree. List the nodes visited in postorder traversal. +![[binary-search-tree.png]] +Back: 2, 5, 5, 8, 7, 6 +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Consider the following binary search tree. List the nodes visited in preorder traversal. +![[binary-search-tree.png]] +Back: 6, 5, 2, 5, 7, 8 +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +Consider the following binary search tree. List the nodes visited in inorder traversal. +![[binary-search-tree.png]] +Back: 2, 5, 5, 6, 7, 8 +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What path should be followed to find the minimum of a binary search tree? +Back: The one formed by following all $left$ pointers. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What path should be followed to find the maximum of a binary search tree? +Back: The one formed by following all $right$ pointers. +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/data-structures/images/binary-search-tree.png b/notes/data-structures/images/binary-search-tree.png new file mode 100644 index 0000000000000000000000000000000000000000..35a591eedd1531b8e086ff346fa0124414b348d8 GIT binary patch literal 16249 zcmeIYbx@p5(>DqU5}Y8x-F+%>>nIGm{GP2sV?Y@5VQGQ`o<5MmOLbdGpb;CKb(5 z-s;528eKQlPDbQfDYOINy2iyYB=Glnnn4zh=Ng37NshlwUqG&;gni0>Ln`BY1!^W zY0>20#1yO=IGb1XoiV4(kG_Fb0o+dPUun*#K@@WA7}*QNWn!xh2G>wB1$JJ-oV7T*xS>!3D(cj+lB379)Mu!1d|%pj~# z2WP?{efwvqF3g=qSyXqo%i zne$svii#i$K?MK?4iI-RIn=@4(MX6|a^>~7=aNdCkVZ06+QE=)-Y^ppQnJ_l!I z<$tkvbo&Pi03K{murnJwD~Qd(f$i@j+}x!-0Ve+t=>IyxO$!K8HVufIlZUH0MA{SL z=uY)_78d6J8t?4kYX3(a3v)JzJ;VVZbpvK)|BoqU<(1X`HR1^ZD;o#rKcfJ!|AW%q z#`51_{fBH%J%7~syCA^ufARef>VN9~hZvwzRu+(QGWU2APhLux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vHn~riBu884d0D^hxsG(D!OI3+Iz)uI(Dykv z1vtWOWNvQnI#4#e_epoR^GV++;@awXe=sse5U(!HDlXx6cZCr({I&8eqvu_15L_UI zqk$?Nv<**dw_B;;h%wU}UcqBuhfw8}=?8c+!}{i-1tSN`g%mW=!bYWJ=V4Ohc9y(I zrlv)4HZR}`MboLVvr$tgJbHhVZ*72RMJHDg{O{H<*f+`vrF@{vvTr! zOxNmCLkzlMABY5gTJx)$rl4vPcTe@u@aoDIYTulE^dz>j;5kL-X4Lg_ipCa5z%UEi p(=+k~^#7eV<$rsQ?v?k5_*rr^!GvoBI3vTr$V;n8RY{nJ{67`lF53VA literal 0 HcmV?d00001 diff --git a/notes/formal-system/logical-system/pred-logic.md b/notes/formal-system/logical-system/pred-logic.md index d90fb6f..f5830fe 100644 --- a/notes/formal-system/logical-system/pred-logic.md +++ b/notes/formal-system/logical-system/pred-logic.md @@ -145,15 +145,15 @@ END%% %%ANKI Basic -How do we write the equivalent existence (not uniqueness) assertion made by $\exists! x, P(x)$? -Back: $\exists x, P(x))$ +How do we write the existence (not uniqueness) assertion made by $\exists! x, P(x)$? +Back: $\exists x, P(x)$ Reference: Patrick Keef and David Guichard, “An Introduction to Higher Mathematics,” n.d. END%% %%ANKI Basic -How do we write the equivalent uniqueness (not existence) assertion made by $\exists! x, P(x)$? +How do we write the uniqueness (not existence) assertion made by $\exists! x, P(x)$? Back: $\forall x, \forall y, (P(x) \land P(y)) \Rightarrow (x = y)$ Reference: Patrick Keef and David Guichard, “An Introduction to Higher Mathematics,” n.d. diff --git a/notes/formal-system/proof-system/natural-deduction.md b/notes/formal-system/proof-system/natural-deduction.md index a6e7739..e2ad6a5 100644 --- a/notes/formal-system/proof-system/natural-deduction.md +++ b/notes/formal-system/proof-system/natural-deduction.md @@ -84,7 +84,7 @@ 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}$$ +Back: $$\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. END%% @@ -92,7 +92,7 @@ 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}$$ +Back: $$\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. END%% @@ -219,7 +219,7 @@ END%% %%ANKI Basic How is ${\Rightarrow}{\text{-}}I$ expressed in schematic notation? -Back: $${\Rightarrow}{\text{-}}I: \quad \begin{array}{c} \text{from } E_1, \cdots, E_n \text{ infer } E \\ \hline (E_1 \land \cdots \land E_n) \Rightarrow E \end{array}$$ +Back: $$\begin{array}{c} \text{from } E_1, \cdots, E_n \text{ infer } E \\ \hline (E_1 \land \cdots \land E_n) \Rightarrow E \end{array}$$ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. END%% diff --git a/notes/lambda-calculus/alpha-conversion.md b/notes/lambda-calculus/alpha-conversion.md index a506a43..eef1f2a 100644 --- a/notes/lambda-calculus/alpha-conversion.md +++ b/notes/lambda-calculus/alpha-conversion.md @@ -147,7 +147,7 @@ END%% %%ANKI Basic -Is the following identity true? $$\lambda x y. x(xy) \equiv_\alpha \lambda u v. u(uv))$$ +Is the following identity true? $$\lambda x y. x(xy) \equiv_\alpha \lambda u v. u(uv)$$ Back: Yes. 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). @@ -257,7 +257,7 @@ END%% %%ANKI Basic -What happens if the antecedent is false in $v \not\in FV(M) \Rightarrow [P/v][v/x]M \equiv_\alpha [P/x]M$? +What happens if the antecedent is false in the following? $$v \not\in FV(M) \Rightarrow [P/v][v/x]M \equiv_\alpha [P/x]M$$ Back: The LHS of the identity has more occurrences of $P$ than the right. 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/ontology/rdf/index.md b/notes/ontology/rdf/index.md index 121144f..6da553f 100644 --- a/notes/ontology/rdf/index.md +++ b/notes/ontology/rdf/index.md @@ -11,6 +11,22 @@ tags: The **Resource Description Framework** (RDF) is the foundational representation language of the Semantic Web. The basic building block of RDF is the **triple** containing a **subject**, **predicate**, and **object**. Global identifiers of resources are represented as [[uri|URIs]] (or, more generally, IRIs). These URIs can be expressed more compactly as [[uri#CURIEs|CURIEs]]. +%%ANKI +Basic +Which organization standardized RDF? +Back: W3C +Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web for the Working Ontologist_. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. + +END%% + +%%ANKI +Basic +What is W3C an acronym for? +Back: **W**orld **W**ide **W**eb **C**onsortium. +Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web for the Working Ontologist_. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. + +END%% + %%ANKI Basic What is RDF an acronym for? @@ -113,6 +129,41 @@ Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web END%% +## Standard Namespaces + +W3C have defined a number of standard namespaces for use with Web technologies: + +* `xsd` + * Refers to the XML schema definition. +* `xmlns` + * Refers to XML namespaces. +* `rdf` + * Refers to identifiers used in RDF. + +%%ANKI +Basic +What is the standard `xsd` namespace an acronym for? +Back: **X**ML **S**chema **D**efinition. +Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web for the Working Ontologist_. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. + +END%% + +%%ANKI +Basic +What is the standard `xmlns` namespace an acronym for? +Back: **XML** **N**ame**s**pace. +Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web for the Working Ontologist_. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. + +END%% + +%%ANKI +Basic +What is the standard `rdf` namespace an acronym for? +Back: **R**esource **D**escription **F**ramework. +Reference: Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web for the Working Ontologist_. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. + +END%% + ## Bibliography * Allemang, Dean, James A. Hendler, and Fabien L. Gandon. _Semantic Web for the Working Ontologist_. 3e ed. ACM Books 33. New York: Association for computing machinery, 2020. \ No newline at end of file diff --git a/notes/programming/pred-trans.md b/notes/programming/pred-trans.md index 86d7456..d49bfb6 100644 --- a/notes/programming/pred-trans.md +++ b/notes/programming/pred-trans.md @@ -872,6 +872,149 @@ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in END%% +### Alternative + +The general form of the **alternative command** is: $$\begin{align*} \textbf{if } & B_1 \rightarrow S_1 \\ \textbf{ | } & B_2 \rightarrow S_2 \\ & \quad\cdots \\ \textbf{ | } & B_n \rightarrow S_n \\ \textbf{fi } & \end{align*}$$ + +Each $B_i \rightarrow S_i$ is called a **guarded command**. To execute the alternative command, find one true guard and execute the corresponding command. Notice this is nondeterministic. We denote the alternative command as $\text{IF}$ and define $\text{IF}$ in terms of $wp$ as: $$\begin{align*} wp(\text{IF}, R) = \;& (\forall i, 1 \leq i \leq n \Rightarrow domain(B_i)) \;\land \\ & (\exists i, 1 \leq i \leq n \land B_i) \;\land \\ & (\forall i, 1 \leq i \leq n \Rightarrow (B_i \Rightarrow wp(S_i, R))) \end{align*}$$ + +%%ANKI +Basic +How is the alternative command compactly denoted? +Back: As $\text{IF}$. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +What kind of command is $\text{IF}$ a representation of? +Back: An alternative command. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +What is the general form of the alternative command? +Back: $$\begin{align*} \textbf{if } & B_1 \rightarrow S_1 \\ \textbf{ | } & B_2 \rightarrow S_2 \\ & \quad\cdots \\ \textbf{ | } & B_n \rightarrow S_n \\ \textbf{fi } & \end{align*}$$ +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +What do "guarded commands" refer to? +Back: Each $B_i \rightarrow S_i$ found in the alternative command. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +*Why* are guarded commands named the way they are? +Back: The execution of the command is "guarded" by the truthiness of the condition. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +How are alternative commands executed? +Back: By finding any true guard and executing the corresponding command. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Cloze +Consider $\text{IF}$ containing $B_i \rightarrow S_i$ for $1 \leq i \leq n$. Then $wp(\text{IF}, R)$ is the conjunction of: +* {$\forall i, 1 \leq i \leq n \Rightarrow domain(B_i)$} +* {$\exists i, 1 \leq i \leq n \land B_i$} +* {$\forall i, 1 \leq i \leq n \Rightarrow (B_i \Rightarrow wp(S_i, R))$} +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +What assumption is made when defining $\text{IF}$ as follows? $$\begin{align*} wp(\text{IF}, R) = \;& (\exists i, 1 \leq i \leq n \land B_i) \;\land \\ & (\forall i, 1 \leq i \leq n \Rightarrow (B_i \Rightarrow wp(S_i, R))) \end{align*}$$ +Back: $domain(B_i)$ for $1 \leq i \leq n$. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +Under what two conditions does the alternative command abort? +Back: If a condition isn't well-defined or no condition is satisfied. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +In what way is the alternative command's execution different from traditional case statements? +Back: It is nondeterministic. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +When *might* the following alternative command abort? $$\begin{align*} \textbf{if } & x > 0 \rightarrow z \coloneqq x \\ \textbf{ | } & x < 0 \rightarrow z \coloneqq -x \\ \textbf{fi } & \end{align*}$$ +Back: When $x = 0$. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +When is the first guarded command of the following executed? $$\begin{align*} \textbf{if } & x \geq 0 \rightarrow z \coloneqq x \\ \textbf{ | } & x \leq 0 \rightarrow z \coloneqq -x \\ \textbf{fi } & \end{align*}$$ +Back: When $x \geq 0$. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +When are both of the following guarded commands executed? $$\begin{align*} \textbf{if } & x \geq 0 \rightarrow z \coloneqq x \\ \textbf{ | } & x \leq 0 \rightarrow z \coloneqq -x \\ \textbf{fi } & \end{align*}$$ +Back: N/A. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +When are either of the following guarded commands executed? $$\begin{align*} \textbf{if } & x \geq 0 \rightarrow z \coloneqq x \\ \textbf{ | } & x \leq 0 \rightarrow z \coloneqq -x \\ \textbf{fi } & \end{align*}$$ +Back: When $x = 0$. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Cloze +Alternative command {$\textbf{if fi}$} is equivalent to command {$abort$}. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +*Why* does command $\textbf{if fi}$ abort? +Back: Because no guarded command is true (vacuously) by time of execution. +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + +%%ANKI +Basic +How is command $skip$ wrapped in a no-op alternative command? +Back: As $\textbf{if } T \rightarrow skip \textbf{ fi}$ +Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. + +END%% + ## Bibliography * Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. \ No newline at end of file diff --git a/notes/proofs/index.md b/notes/proofs/index.md index dd775fb..9f211c8 100644 --- a/notes/proofs/index.md +++ b/notes/proofs/index.md @@ -39,7 +39,7 @@ An **indirect proof** works by assuming the denial of the desired conclusion lea %%ANKI Basic What is an indirect proof? -Back: A proof in which the denial of a conclusion is assumed and shown to yield a contradiction. +Back: A proof in which the denial of a proposition is assumed and shown to yield a contradiction. Reference: Patrick Keef and David Guichard, “An Introduction to Higher Mathematics,” n.d. END%% @@ -106,7 +106,7 @@ END%% %%ANKI Basic -Which natural deduction rule immediatley depends on the existence of a conditional proof? +Which natural deduction rule depends directly 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. @@ -255,7 +255,15 @@ END%% %%ANKI Basic -Is a constructive proof considered direct or indirect? +Which of existence proofs or constructive proofs is more general? +Back: Existence proofs. +Reference: “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). + +END%% + +%%ANKI +Basic +Is a constructive proof usually direct or indirect? Back: Usually direct. Reference: “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). @@ -271,7 +279,15 @@ END%% %%ANKI Basic -Is a non-constructive proof considered direct or indirect? +Which of non-constructive proofs or existence proofs is more general? +Back: Existence proofs. +Reference: “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). + +END%% + +%%ANKI +Basic +Is a non-constructive proof usually direct or indirect? Back: Usually indirect. Reference: “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). diff --git a/notes/set/relations.md b/notes/set/relations.md index e7c62a7..af7bee6 100644 --- a/notes/set/relations.md +++ b/notes/set/relations.md @@ -685,7 +685,7 @@ END%% %%ANKI Cloze -Suppose $xRx$ for all $x \in A$, $R$ is said to be reflexive {on} $A$. +If $xRx$ for all $x \in A$, $R$ is said to be reflexive {on} $A$. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). END%% @@ -760,7 +760,7 @@ END%% %%ANKI Cloze -Suppose $\neg xRx$ for all $x \in A$, $R$ is said to be irreflexive {on} $A$. +If $\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). END%% @@ -1452,13 +1452,6 @@ Reference: “Partition of a Set,” in _Wikipedia_, June 18, 2024, [https://en. END%% -%%ANKI -Cloze -Let $R$ be an equivalence relation. Then {1:cell} $[x]$ of partition $A / R$ is an {2:equivalence class of $A$} (modulo {2:$R$}). -Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - -END%% - %%ANKI Basic Let $R$ be the equivalence relation induced by partition $\Pi$ of $A$. What does $A / R$ equal?