From f0f7eb4621a62225d92d215a5a002d7b73b69c45 Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sun, 12 Jan 2025 15:53:38 -0700 Subject: [PATCH] Reorganize finite automata. Flashcard fixups. --- .../plugins/obsidian-to-anki-plugin/data.json | 28 +- notes/algebra/complex.md | 6 +- notes/algorithms/dfs.md | 4 +- notes/c17/strings/printf.md | 2 +- notes/combinators/index.md | 2 +- notes/computability/automaton.md | 794 +++++++++--------- ...{state-diagram-ends0.png => dfa-ends0.png} | Bin ...{state-diagram-ends1.png => dfa-ends1.png} | Bin .../{state-diagram.png => dfa-example.png} | Bin notes/linkers/relocatable.md | 6 +- notes/ontology/reification.md | 8 +- notes/set/cardinality.md | 16 +- 12 files changed, 443 insertions(+), 423 deletions(-) rename notes/computability/images/{state-diagram-ends0.png => dfa-ends0.png} (100%) rename notes/computability/images/{state-diagram-ends1.png => dfa-ends1.png} (100%) rename notes/computability/images/{state-diagram.png => dfa-example.png} (100%) diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index 48a1977..eff49f9 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -226,7 +226,15 @@ "**/*.excalidraw.md" ] }, - "Added Media": [], + "Added Media": [ + "dfa-example.png", + "dfa-ends1.png", + "dfa-ends0.png", + "schroder-bernstein.png", + "dfs.gif", + "dfs-edge-classification.png", + "complex-plane-point.png" + ], "File Hashes": { "algorithms/index.md": "3ac071354e55242919cc574eb43de6f8", "algorithms/sorting/index.md": "4a66e28bce754de5df31ec2f4aed7e93", @@ -902,7 +910,7 @@ "_journal/2024-10/2024-10-16.md": "cd778e1be2737462d885ae038c7b9744", "_journal/2024-10/2024-10-15.md": "c21679bd2c3b29f5a86d56a1fd23b18f", "_journal/2024-10-22.md": "4af65962007cfecdb2c679b44b56d25f", - "algorithms/dfs.md": "53dc80b458c10e99f711237d84867cae", + "algorithms/dfs.md": "0f86e65b9ac6c4dbdd3b9c2a108a65fb", "_journal/2024-10/2024-10-21.md": "de1a0861e87df29aeff11a291f8fbd45", "_journal/2024-10-23.md": "51b2ca6edf23b6a64fd7d3638a0b54cb", "_journal/2024-10/2024-10-22.md": "5ff4eb7eba58e77c4fb65b7162a485e6", @@ -954,7 +962,7 @@ "_journal/2024-11/2024-11-21.md": "951b6034d60a40dbd8201c50abf0dbb9", "_journal/2024-11/2024-11-20.md": "951b6034d60a40dbd8201c50abf0dbb9", "_journal/2024-11/2024-11-19.md": "d879f57154cb27cb168eb1f1f430e312", - "set/cardinality.md": "a684ba2638e90d6d5647054230b3f35f", + "set/cardinality.md": "9610578a6ef32f70f90bfc7b52dea844", "geometry/area.md": "7f947bb5ac782495a1fb4a63bb2463e7", "_journal/2024-11-23.md": "911f82ab8aede5ecdb96493aef64b0b9", "_journal/2024-11/2024-11-22.md": "51117030e2364dbce3a8d507dead86ae", @@ -1014,7 +1022,7 @@ "_journal/2024-12-16.md": "d867a62a955f3d080ae25f31464d53c4", "_journal/2024-12/2024-12-15.md": "be66c8808d8bb66d4e7b91db7c93c94a", "linkers/elf.md": "0734c90bf5b09319ae1f3bdd965de1c1", - "c17/strings/printf.md": "8b67cfbccaf35dd9488b73e7e5555405", + "c17/strings/printf.md": "d3ec56f588a309f708efaa16b5951dfd", "c17/strings/index.md": "3fa6f42967f3cc786740bb8537c62682", "_journal/2024-12-17.md": "ae55db66c9835876c4a0343ac0806951", "_journal/2024-12/2024-12-16.md": "03fe3263baca3bba63a9129595733d5f", @@ -1029,7 +1037,7 @@ "_journal/2024-12/2024-12-20.md": "3c896dac68ce1bfb1f28cb7da4325c6c", "encoding/xml/rdf.md": "f4491dd28b937da3182d701a863e40fe", "encoding/xml/index.md": "01a66b1a102cccc682f8f1cab0f50bc6", - "ontology/reification.md": "8b51f0583bed52a366f2b1fe9608d094", + "ontology/reification.md": "cd2c785db81110099ecff1cbec9a2d5e", "ontology/rdf.md": "fd273c30bec6f46b68547f0d392620b1", "data-models/rdf.md": "4aa5af33cc8badada41ca165e05b1381", "serialization/xml.md": "84b632282ebcc2b6216923a02abdd4c2", @@ -1038,7 +1046,7 @@ "_journal/2024-12-22.md": "015dbf675853a81db07d641e8dab7fd4", "_journal/2024-12/2024-12-21.md": "1c1a5791f7519c92e882957cf417b51f", "formal-system/language.md": "7797d33a0b0eb187d43dda46a138fb25", - "computability/automaton.md": "adebd457532a94c801221e128e92decc", + "computability/automaton.md": "fbcaa13a3e2053f252c58f0662fe7ada", "computability/index.md": "d7938428ed0b0224c1fe1e59d1fab118", "_journal/2024-12-23.md": "72b0964a8a5ed8ba0acf7fe10b5de279", "_journal/2024-12/2024-12-22.md": "75375a867efc5b3aff406c73394d4814", @@ -1049,13 +1057,13 @@ "_journal/2024-12/2024-12-23.md": "72b0964a8a5ed8ba0acf7fe10b5de279", "_journal/2024-12-25.md": "1717d37b074df58175ec0272adc278de", "_journal/2024-12/2024-12-24.md": "dcd3bd8b82ca4d47a9642a46d8bece0d", - "linkers/relocatable.md": "58d45ac26d43c765b33cb9f88823a5ea", + "linkers/relocatable.md": "b6f0c13e07ed57ea73dea6b4a72560d1", "data-models/federation.md": "1d92747304186bd2833a00a488fcac48", "_journal/2024-12-26.md": "022aeaf68d46fd39b23aca9c577f3f41", "_journal/2024-12/2024-12-25.md": "1717d37b074df58175ec0272adc278de", "_journal/2024-12-27.md": "abc4a39a50305f3558181189eefb2058", "_journal/2024-12/2024-12-26.md": "59e59cad1ae568adbe8e27e98d36c59c", - "combinators/index.md": "ca8ed1ce82da585b908e06c2b457922d", + "combinators/index.md": "8e324bbcf49cca9c0c0f9bbf843cbebb", "_journal/2024-12-28.md": "1ad3caec4ea6f597cc5156f19b274c50", "_journal/2024-12/2024-12-27.md": "abc4a39a50305f3558181189eefb2058", "_journal/2024-12-29.md": "e7808872f56a12b51165fc86a1c48e60", @@ -1403,7 +1411,7 @@ "_journal/2025-01-01.md": "3cf29f753c27313c95a435a7845b4c13", "_journal/2025-01-02.md": "d836d831495d0646e7bf8c564579f9f1", "_journal/2025-01/2025-01-01.md": "3cf29f753c27313c95a435a7845b4c13", - "algebra/complex.md": "37befb93643418cd8905c49e2f53627b", + "algebra/complex.md": "56cb9e1f6da0fe1e75f750709a35803f", "_journal/2025-01-03.md": "357ed3ed9951645822fd743bfa82c0c4", "_journal/2025-01/2025-01-02.md": "34d34115bf1e09f72443aab02f33c7d8", "_journal/2025-01-05.md": "0217401ed8718d4354d856a92a19a345", @@ -1420,7 +1428,7 @@ "_journal/2025-01/2025-01-10.md": "a7929276f89cc19193622dd1f1dd2588", "_journal/2025-01/2025-01-09.md": "166ff75c5ea1bf5110931fa054e1565e", "_journal/2025-01/2025-01-08.md": "d8dbe63942449a91fbf793c318032e10", - "_journal/2025-01-12.md": "a9bec846b6d23b24044eec112807d64e", + "_journal/2025-01-12.md": "78a1a91743280f9caf2e700ee0a0f830", "_journal/2025-01/2025-01-11.md": "057a8b69a650941d1a838d220d5f59ab" }, "fields_dict": { diff --git a/notes/algebra/complex.md b/notes/algebra/complex.md index 4ef785f..702a42e 100644 --- a/notes/algebra/complex.md +++ b/notes/algebra/complex.md @@ -14,7 +14,7 @@ where $i$ is the **imaginary number** defined as $i^2 = -1$. %%ANKI Basic -How is set the complex numbers denoted? +How is the set of complex numbers denoted? Back: As $\mathbb{C}$. Reference: John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh edition, Pearson new international edition (Harlow: Pearson, 2014). @@ -76,7 +76,7 @@ Reference: John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh editi END%% %%ANKI -Cloze +Basic What real number is identified with $-\pi + 0i$? Back: $-\pi$ Reference: John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh edition, Pearson new international edition (Harlow: Pearson, 2014). @@ -84,7 +84,7 @@ Reference: John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh editi END%% %%ANKI -Cloze +Basic What real number is identified with $\pi + 2i$? Back: N/A. Reference: John B. Fraleigh, _A First Course in Abstract Algebra_, Seventh edition, Pearson new international edition (Harlow: Pearson, 2014). diff --git a/notes/algorithms/dfs.md b/notes/algorithms/dfs.md index 3d38816..f0f9ed6 100644 --- a/notes/algorithms/dfs.md +++ b/notes/algorithms/dfs.md @@ -584,7 +584,7 @@ END%% %%ANKI Basic -Let $v$ be black when $\langle u, v \rangle$ is explored. If $u.d < v.d$, what kind of edge is $\langle u, v \rangle$ classified as? +Let $v$ be black when $\langle u, v \rangle$ is explored. If $u{.}d < v{.}d$, what kind of edge is $\langle u, v \rangle$ classified as? Back: A forward edge. Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). @@ -592,7 +592,7 @@ END%% %%ANKI Basic -Let $v$ be black when $\langle u, v \rangle$ is explored. If $v.d < u.d$, what kind of edge is $\langle u, v \rangle$ classified as? +Let $v$ be black when $\langle u, v \rangle$ is explored. If $v{.}d < u{.}d$, what kind of edge is $\langle u, v \rangle$ classified as? Back: A cross edge. Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). diff --git a/notes/c17/strings/printf.md b/notes/c17/strings/printf.md index 76d0e8c..b8110eb 100644 --- a/notes/c17/strings/printf.md +++ b/notes/c17/strings/printf.md @@ -683,7 +683,7 @@ END%% %%ANKI Basic How does `%g` handle non-integral values differently from `%f`? -Back: It excludes insignifant `0`s after the decimal point. +Back: It excludes insignificant `0`s after the decimal point. Reference: “Printf,” in *Wikipedia*, January 18, 2024, [https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962](https://en.wikipedia.org/w/index.php?title=Printf&oldid=1196716962). END%% diff --git a/notes/combinators/index.md b/notes/combinators/index.md index d4818be..ab48329 100644 --- a/notes/combinators/index.md +++ b/notes/combinators/index.md @@ -235,7 +235,7 @@ END%% %%ANKI Basic In a combinatory logic system, what is a combinator? -Back: A closed term with no atomic constants. +Back: A closed term with no atomic constants (besides the basic combinators). 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). END%% diff --git a/notes/computability/automaton.md b/notes/computability/automaton.md index db023bc..8f11b46 100644 --- a/notes/computability/automaton.md +++ b/notes/computability/automaton.md @@ -7,275 +7,22 @@ tags: - computability --- -## Finite Automata +## Overview -A **finite automaton** is a $5$-tuple $\langle Q, \Sigma, \delta, q_0, F \rangle$, where +**Finite automata** are classified as either **deterministic** or **nondeterministic**. These two representations are equivalent. -1. $Q$ is a finite set called the **states**; -2. $\Sigma$ is a finite set called the alphabet; -3. $\delta \colon Q \times \Sigma \rightarrow Q$ is the **transition function**; -4. $q_0 \in Q$ is the **start state**; and -5. $F \subseteq Q$ is the set of **final states**. +If $s$ is processed by finite automaton $M$ such that $M$ finishes in an accept state, we say $M$ **accepts** $s$. Otherwise $M$ **rejects** $s$. If $A$ is the set of all strings that $M$ accepts, we say that $A$ is the **language of machine $M$**, denoted $L(M) = A$. We say that $M$ **recognizes** $A$. -These automaton are typically denoted using a **state diagram** like below. The start state is indicated by an arrow pointing at it from nowhere. An accept state is denoted with a double circle. - -![[state-diagram.png]] - -A [[language]] is called a **regular language** if a finite automaton recognizes it. +A [[computability/index|language]] is called a **regular language** if a finite automaton recognizes it. %%ANKI Basic -A finite automaton is defined as a tuple of how many components? -Back: Five. +Finite automaton are largely classified in what two buckets? +Back: Deterministic and nondeterministic. Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - + END%% -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What kind of mathematical entity is $Q$? -Back: A finite set of states. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What name is given to $Q$? -Back: $M$'s states. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What is $\Sigma$? -Back: An alphabet. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What kind of mathematical entity is $\delta$? -Back: A function. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What name is given to $\delta$? -Back: $M$'s transition function. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What is $\delta$'s domain? -Back: $Q \times \Sigma$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What is $\delta$'s codomain? -Back: $Q$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What kind of mathematical entity is $q_0$? -Back: An urelement. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What name is given to $q_0$? -Back: $M$'s start state. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What name is given to $F$? -Back: $M$'s final states. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What kind of mathematical entity is $F$? -Back: A finite set. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. How does $F$ relate to $Q$? -Back: $F \subseteq Q$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. How does $q_0$ relate to $Q$? -Back: $q_0 \in Q$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. How does $q_0$ relate to $F$? -Back: N/A. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M$. How many start states does $M$ have? -Back: One. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M$. How many accept states does $M$ have? -Back: Zero or more. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M$. How is $M$'s start state denoted in a state diagram? -Back: With an arrow pointing to it from nowhere. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M$. How is $M$'s final states denoted in a state diagram? -Back: With double circles. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M$. How is $M$'s transition function denoted in a state diagram? -Back: As edges to and from states. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M$. How is $M$'s alphabet denoted in a state diagram? -Back: With symbols labeling each edge. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider diagram of finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What does $Q$ evaluate to? -![[state-diagram.png]] -Back: $Q = \{q_1, q_2, q_3\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider diagram of finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What does $\Sigma$ evaluate to? -![[state-diagram.png]] -Back: $\Sigma = \{0, 1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider diagram of finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What does $q_0$ evaluate to? -![[state-diagram.png]] -Back: $q_0 = q_1$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider diagram of finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What does $\mathop{\text{dom}}\delta$ evaluate to? -![[state-diagram.png]] -Back: $\{q_1, q_2, q_3\} \times \{0, 1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider diagram of finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What does $\mathop{\text{ran}}\delta$ evaluate to? -![[state-diagram.png]] -Back: $\{q_1, q_2, q_3\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider diagram of finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$. What does $F$ evaluate to? -![[state-diagram.png]] -Back: $F = \{q_2\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -What name is given to a finite automaton's standard graphical depiction? -Back: Its state diagram. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Cloze -{1:Edges} are to {2:graphs} whereas {2:transitions} are to {1:state diagrams}. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Cloze -{1:Vertices} are to {2:graphs} whereas {2:states} are to {1:state diagrams}. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Cloze -The {final} states of a finite automaton are also called the {accept} states. -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -If $s$ is processed by machine $M$ such that $M$ finishes in an accept state, we say $M$ **accepts** $s$. Otherwise $M$ **rejects** $s$. If $A$ is the set of all strings that $M$ accepts, we say that $A$ is the **language of machine $M$**, denoted $L(M) = A$. We say that $M$ **recognizes** $A$. - %%ANKI Basic What does it mean for finite automaton $M$ to accept string $s$? @@ -349,138 +96,12 @@ END%% %%ANKI Basic -Suppoe finite automaton $M$ does not accept any strings. What language does it recognize? +Suppose finite automaton $M$ does not accept any strings. What language does it recognize? Back: $\varnothing$ Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). END%% -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $Q$ evaluate to? -![[state-diagram-ends1.png]] -Back: $Q = \{q_1, q_2\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $\Sigma$ evaluate to? -![[state-diagram-ends1.png]] -Back: $\Sigma = \{0, 1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $F$ evaluate to? -![[state-diagram-ends1.png]] -Back: $F = \{q_2\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $q_0$ evaluate to? -![[state-diagram-ends1.png]] -Back: $q_0 = q_1$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $\mathop{\text{dom}}\delta$ evaluate to? -![[state-diagram-ends1.png]] -Back: $\{q_1, q_2\} \times \{0, 1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $\mathop{\text{ran}}\delta$ evaluate to? -![[state-diagram-ends1.png]] -Back: $\{q_1, q_2\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $L(M)$ evaluate to? -![[state-diagram-ends1.png]] -Back: $\{w \mid w \text{ ends with a } 1 \}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $Q$ evaluate to? -![[state-diagram-ends0.png]] -Back: $Q = \{q_1, q_2\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $\Sigma$ evaluate to? -![[state-diagram-ends0.png]] -Back: $\Sigma = \{0, 1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $F$ evaluate to? -![[state-diagram-ends0.png]] -Back: $F = \{q_1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $q_0$ evaluate to? -![[state-diagram-ends0.png]] -Back: $q_0 = q_1$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $\mathop{\text{dom}}\delta$ evaluate to? -![[state-diagram-ends0.png]] -Back: $\{q_1, q_2\} \times \{0, 1\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $\mathop{\text{ran}}\delta$ evaluate to? -![[state-diagram-ends0.png]] -Back: $\{q_1, q_2\}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - -%%ANKI -Basic -Consider finite automaton $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ below. What does $L(M)$ evaluate to? -![[state-diagram-ends0.png]] -Back: $\{w \mid w = \epsilon \lor w \text{ ends with a } 0 \}$ -Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). - -END%% - %%ANKI Basic What is a regular language? @@ -504,6 +125,405 @@ Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third ed END%% +## Determinism + +A **deterministic finite automaton** (DFA) is a $5$-tuple $\langle Q, \Sigma, \delta, q_0, F \rangle$, where + +1. $Q$ is a finite set called the **states**; +2. $\Sigma$ is a finite set called the alphabet; +3. $\delta \colon Q \times \Sigma \rightarrow Q$ is the **transition function**; +4. $q_0 \in Q$ is the **start state**; and +5. $F \subseteq Q$ is the set of **final states**. + +These automaton are typically denoted using a **state diagram** like below. The start state is indicated by an arrow pointing at it from nowhere. An accept state is denoted with a double circle. + +![[dfa-example.png]] + +%%ANKI +Basic +A deterministic finite automaton is defined as a tuple of how many components? +Back: Five. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +What is DFA an acronym for? +Back: **D**eterministic **f**inite **a**utomata. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What kind of mathematical entity is $Q$? +Back: A finite set of states. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What name is given to $Q$? +Back: $M$'s states. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What is $\Sigma$? +Back: An alphabet. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What kind of mathematical entity is $\delta$? +Back: A function. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What name is given to $\delta$? +Back: $M$'s transition function. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What is $\delta$'s domain? +Back: $Q \times \Sigma$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What is $\delta$'s codomain? +Back: $Q$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What kind of mathematical entity is $q_0$? +Back: An urelement. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What name is given to $q_0$? +Back: $M$'s start state. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What name is given to $F$? +Back: $M$'s final states. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. What kind of mathematical entity is $F$? +Back: A finite set. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. How does $F$ relate to $Q$? +Back: $F \subseteq Q$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. How does $q_0$ relate to $Q$? +Back: $q_0 \in Q$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be a DFA. How does $q_0$ relate to $F$? +Back: N/A. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M$ be a DFA. How many start states does $M$ have? +Back: One. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M$ be a DFA. How many accept states does $M$ have? +Back: Zero or more. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M$ be a DFA. How is $M$'s start state denoted in a state diagram? +Back: With an arrow pointing to it from nowhere. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M$ be a DFA. How is $M$'s final states denoted in a state diagram? +Back: With double circles. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M$ be a DFA. How is $M$'s transition function denoted in a state diagram? +Back: As edges to and from states. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M$ be a DFA. How is $M$'s alphabet denoted in a state diagram? +Back: With symbols labeling each edge. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $Q$ evaluate to? +![[dfa-example.png]] +Back: $Q = \{q_1, q_2, q_3\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\Sigma$ evaluate to? +![[dfa-example.png]] +Back: $\Sigma = \{0, 1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $q_0$ evaluate to? +![[dfa-example.png]] +Back: $q_0 = q_1$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\mathop{\text{dom}}\delta$ evaluate to? +![[dfa-example.png]] +Back: $\{q_1, q_2, q_3\} \times \{0, 1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\mathop{\text{ran}}\delta$ evaluate to? +![[dfa-example.png]] +Back: $\{q_1, q_2, q_3\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $F$ evaluate to? +![[dfa-example.png]] +Back: $F = \{q_2\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +What name is given to a DFA's standard graphical depiction? +Back: Its state diagram. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Cloze +{1:Edges} are to {2:graphs} whereas {2:transitions} are to {1:state diagrams}. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Cloze +{1:Vertices} are to {2:graphs} whereas {2:states} are to {1:state diagrams}. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Cloze +The {final} states of a DFA are also called the {accept} states. +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $Q$ evaluate to? +![[dfa-ends1.png]] +Back: $Q = \{q_1, q_2\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\Sigma$ evaluate to? +![[dfa-ends1.png]] +Back: $\Sigma = \{0, 1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $F$ evaluate to? +![[dfa-ends1.png]] +Back: $F = \{q_2\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $q_0$ evaluate to? +![[dfa-ends1.png]] +Back: $q_0 = q_1$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\mathop{\text{dom}}\delta$ evaluate to? +![[dfa-ends1.png]] +Back: $\{q_1, q_2\} \times \{0, 1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\mathop{\text{ran}}\delta$ evaluate to? +![[dfa-ends1.png]] +Back: $\{q_1, q_2\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $L(M)$ evaluate to? +![[dfa-ends1.png]] +Back: $\{w \mid w \text{ ends with a } 1 \}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $Q$ evaluate to? +![[dfa-ends0.png]] +Back: $Q = \{q_1, q_2\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\Sigma$ evaluate to? +![[dfa-ends0.png]] +Back: $\Sigma = \{0, 1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $F$ evaluate to? +![[dfa-ends0.png]] +Back: $F = \{q_1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $q_0$ evaluate to? +![[dfa-ends0.png]] +Back: $q_0 = q_1$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\mathop{\text{dom}}\delta$ evaluate to? +![[dfa-ends0.png]] +Back: $\{q_1, q_2\} \times \{0, 1\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $\mathop{\text{ran}}\delta$ evaluate to? +![[dfa-ends0.png]] +Back: $\{q_1, q_2\}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + +%%ANKI +Basic +Let $M = \langle Q, \Sigma, \delta, q_0, F \rangle$ be the depicted DFA. What does $L(M)$ evaluate to? +![[dfa-ends0.png]] +Back: $\{w \mid w = \epsilon \lor w \text{ ends with a } 0 \}$ +Reference: Michael Sipser, _Introduction to the Theory of Computation_, Third edition, international edition (Australia Brazil Japan Korea Mexiko Singapore Spain United Kingdom United States: Cengage Learning, 2013). + +END%% + ## Regular Operations Let $A$ and $B$ be languages. Then the **regular operations** union, intersection, concatenation, and Kleene star are defined as: diff --git a/notes/computability/images/state-diagram-ends0.png b/notes/computability/images/dfa-ends0.png similarity index 100% rename from notes/computability/images/state-diagram-ends0.png rename to notes/computability/images/dfa-ends0.png diff --git a/notes/computability/images/state-diagram-ends1.png b/notes/computability/images/dfa-ends1.png similarity index 100% rename from notes/computability/images/state-diagram-ends1.png rename to notes/computability/images/dfa-ends1.png diff --git a/notes/computability/images/state-diagram.png b/notes/computability/images/dfa-example.png similarity index 100% rename from notes/computability/images/state-diagram.png rename to notes/computability/images/dfa-example.png diff --git a/notes/linkers/relocatable.md b/notes/linkers/relocatable.md index 5eddc6b..d7d5290 100644 --- a/notes/linkers/relocatable.md +++ b/notes/linkers/relocatable.md @@ -602,7 +602,7 @@ END%% %%ANKI Basic Linking fails at symbol resolution if what set(s) are nonempty? -Back: Either the set of unresolved symbols or relocatable object files. +Back: The set of unresolved symbols. Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. END%% @@ -620,7 +620,7 @@ Basic Let `p.o` depends on `libx.a`. What minimal command lets `cc` resolve all symbol references? Back: ```bash -$ cc p.o -x +$ cc p.o -lx ``` Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. @@ -631,7 +631,7 @@ Basic Let `p.o` depends on `liby.a` which depends on `libx.a` . What minimal command lets `cc` resolve all symbol references? Back: ```bash -$ cc p.o -y -x +$ cc p.o -ly -lx ``` Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. diff --git a/notes/ontology/reification.md b/notes/ontology/reification.md index edda154..2eeb79f 100644 --- a/notes/ontology/reification.md +++ b/notes/ontology/reification.md @@ -59,7 +59,7 @@ END%% %%ANKI Basic -What "form" of reification does the following sentence take on? $$\text{Wikipedia says Shakespeare wrote Hamlet.}$$ +What "form(s)" of reification does the following sentence take on? $$\text{Wikipedia says Shakespeare wrote Hamlet.}$$ Back: Provenance. 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. @@ -75,7 +75,7 @@ END%% %%ANKI Basic -What "form" of reification does the following sentence take on? $$\text{It is 90\% probable that Shakespeare wrote Hamlet.}$$ +What "form(s)" of reification does the following sentence take on? $$\text{It is 90\% probable that Shakespeare wrote Hamlet.}$$ Back: Likelihood. 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. @@ -91,7 +91,7 @@ END%% %%ANKI Basic -What "form" of reification does the following sentence take on? $$\text{Kenneth Branagh played Hamlet in the movie.}$$ +What "form(s)" of reification does the following sentence take on? $$\text{Kenneth Branagh played Hamlet in the movie.}$$ Back: Context. 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. @@ -107,7 +107,7 @@ END%% %%ANKI Basic -What "form" of reification does the following sentence take on? $$\text{Hamlet plays on Broadway Jan. 11th through Mar. 12th.}$$ +What "form(s)" of reification does the following sentence take on? $$\text{Hamlet plays on Broadway Jan. 11th through Mar. 12th.}$$ Back: Time frame. 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. diff --git a/notes/set/cardinality.md b/notes/set/cardinality.md index f5654e3..f2584d8 100644 --- a/notes/set/cardinality.md +++ b/notes/set/cardinality.md @@ -493,14 +493,6 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre END%% -%%ANKI -Basic -According to Enderton, what is the "essential demand" for defining cardinal numbers? -Back: Defining cardinal numbers such that for any sets $A$ and $B$, $\mathop{\text{card}} A = \mathop{\text{card}} B$ iff $A \approx B$. -Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). - -END%% - %%ANKI Basic What name is given to $\mathop{\text{card}} \omega$? @@ -726,7 +718,7 @@ END%% %%ANKI Basic Let $K$ and $L$ be disjoint sets. What does $\mathop{\text{card}}(K \cup L)$ evaluate to? -Back: As $\kappa + \lambda$ where $\kappa = \mathop{\text{card}} K$ and $\lambda = \mathop{\text{card}} L$. +Back: $\mathop{\text{card}}K + \mathop{\text{card}}L$ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). END%% @@ -873,14 +865,14 @@ END%% %%ANKI Basic Let $K$ and $L$ be sets. What does $\mathop{\text{card}}(K \times L)$ evaluate to? -Back: As $\kappa \cdot \lambda$ where $\kappa = \mathop{\text{card}} K$ and $\lambda = \mathop{\text{card}} L$. +Back: $\mathop{\text{card}}K \cdot \mathop{\text{card}}L$ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). END%% %%ANKI Basic -Let $K \approx \kappa$ and $L \approx \lambda$. What is necessary for $\mathop{\text{card}}(K \times L) \approx \kappa \cdot \lambda$? +Let $\mathop{\text{card}}K = \kappa$ and $\mathop{\text{card}}L = \lambda$. What is necessary for $\mathop{\text{card}}(K \times L) = \kappa \cdot \lambda$? Back: N/A. This is true by definition. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). @@ -1067,7 +1059,7 @@ END%% %%ANKI Basic Let $K$ and $L$ be sets. What does $\mathop{\text{card}}(^LK)$ evaluate to? -Back: As $\kappa^\lambda$ where $\kappa = \mathop{\text{card}} K$ and $\lambda = \mathop{\text{card}} L$. +Back: To $\kappa^\lambda$ where $\kappa = \mathop{\text{card}} K$ and $\lambda = \mathop{\text{card}} L$. Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). END%%