From ffe76a1a39c0dc20b4885c3c3382d4e6b2268fba Mon Sep 17 00:00:00 2001 From: Joshua Potter Date: Sun, 7 Jul 2024 08:55:30 -0600 Subject: [PATCH] Notes on bags and multigraphs. --- .../plugins/obsidian-to-anki-plugin/data.json | 9 +- notes/_journal/2024-07-07.md | 11 ++ notes/_journal/{ => 2024-07}/2024-07-06.md | 0 notes/set/bags.md | 144 ++++++++++++++++++ notes/set/graphs.md | 47 +++++- notes/set/index.md | 2 + 6 files changed, 208 insertions(+), 5 deletions(-) create mode 100644 notes/_journal/2024-07-07.md rename notes/_journal/{ => 2024-07}/2024-07-06.md (100%) create mode 100644 notes/set/bags.md diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index a87c846..69479be 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -322,8 +322,8 @@ "_journal/2024-03-18.md": "8479f07f63136a4e16c9cd07dbf2f27f", "_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b", "set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53", - "set/index.md": "fb066e22d2531f530e2899df975e4e35", - "set/graphs.md": "75f0ee994436ae39f7ba94a4eb73435a", + "set/index.md": "5302d73c3f54892d46413533b1eb04d0", + "set/graphs.md": "55298be7241906cb6b61673cf0a2e709", "_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb", "_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391", "awk/variables.md": "e40a20545358228319f789243d8b9f77", @@ -580,7 +580,10 @@ "_journal/2024-07/2024-07-04.md": "d34b6c7ed601ca8d0792c749ae40f8a9", "_journal/2024-07/2024-07-03.md": "55d4b1e159b41c6dd52943e5b7a50961", "_journal/2024-07/2024-07-02.md": "489464ee47c3ba21307bfabae569ad29", - "_journal/2024-07/2024-07-01.md": "7cffc27813fe7a7338e411d054ac3bd5" + "_journal/2024-07/2024-07-01.md": "7cffc27813fe7a7338e411d054ac3bd5", + "set/bags.md": "ba7990801734f411838d7b33e7ec0542", + "_journal/2024-07-07.md": "fbd2ad529330b632d65280c7fc221122", + "_journal/2024-07/2024-07-06.md": "2b794e424985f0e7d4d899163ce5733c" }, "fields_dict": { "Basic": [ diff --git a/notes/_journal/2024-07-07.md b/notes/_journal/2024-07-07.md new file mode 100644 index 0000000..0676b45 --- /dev/null +++ b/notes/_journal/2024-07-07.md @@ -0,0 +1,11 @@ +--- +title: "2024-07-07" +--- + +- [x] Anki Flashcards +- [x] KoL +- [ ] OGS +- [ ] Sheet Music (10 min.) +- [ ] Korean (Read 1 Story) + +* Notes on [[bags]] and multigraphs. \ No newline at end of file diff --git a/notes/_journal/2024-07-06.md b/notes/_journal/2024-07/2024-07-06.md similarity index 100% rename from notes/_journal/2024-07-06.md rename to notes/_journal/2024-07/2024-07-06.md diff --git a/notes/set/bags.md b/notes/set/bags.md new file mode 100644 index 0000000..48b318f --- /dev/null +++ b/notes/set/bags.md @@ -0,0 +1,144 @@ +--- +title: Bags +TARGET DECK: Obsidian::STEM +FILE TAGS: set::bag +tags: + - bag + - set +--- + +## Overview + +Sets can contain the same element only once. This means $\{1, 1\} = \{1\}$. A **bag** (or **multiset**) can include a single element multiple times. + +%%ANKI +Basic +What is a bag? +Back: A set in which we are allowed to include a single element multiple times. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +What alternative term do "bags" go by? +Back: Multisets. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Cloze +The {multiplicity} of an element in a bag is the {number of instances given for that element}. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +How many bags exist with members $a$ and $b$? +Back: An infinite amount. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +What is the multiplicity of $a$ in bag $\{a, b\}$? +Back: $1$ +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +What is the multiplicity of $a$ in bag $\{a, a, a, b, b, c\}$? +Back: $3$ +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +What distinguishes a bag from a tuple? +Back: Order is irrelevant in the former. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +What is the cardinality of $a$ in bag $\{a, a, a, b, b, c\}$? +Back: N/A. Cardinality applies to bags, not members. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +What is the cardinality of bag $\{a, a, a, b, b, c\}$? +Back: $6$ +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +How is the cardinality of a bag calculated? +Back: By summing the multiplicities of each member. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +When viewed as a function, a multiset has domain what? +Back: The set comprising each member of the multiset. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +When viewed as a function, a multiset has range what? +Back: The set comprising the multiplicities of the multiset's members. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +When viewed as a function, a multiset has codomain what? +Back: The positive integers. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +Do all multisets correspond to sets? +Back: No. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +Do all sets correspond to multisets? +Back: Yes. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +%%ANKI +Basic +Under what condition is a bag also a set? +Back: When the multiplicity of each element in the bag is $1$. +Reference: “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). + +END%% + +## Bibliography + +* “Multiset,” in _Wikipedia_, April 4, 2024, [https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725](https://en.wikipedia.org/w/index.php?title=Multiset&oldid=1217165725). +* 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). \ No newline at end of file diff --git a/notes/set/graphs.md b/notes/set/graphs.md index eab6fc4..f317aa6 100644 --- a/notes/set/graphs.md +++ b/notes/set/graphs.md @@ -243,6 +243,49 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition ( END%% +A graph that allows multiple edges between vertices is called a **multigraph**. It is analagous to the concept of [[bags|multisets]] in set theory. + +%%ANKI +Basic +What is a multigraph? +Back: A graph with multiple edges between any two vertices. +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). + +END%% + +%%ANKI +Cloze +{Multigraphs} are to graph theory as {multisets} are to set theory. +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). + +END%% + +%%ANKI +Basic +Does every multigraph correspond to a graph? +Back: No. +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). + +END%% + +%%ANKI +Basic +Does every graph correspond to a multigraph? +Back: Yes. +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). + +END%% + +%%ANKI +Basic +Under what conditions is a multigraph considered a graph? +Back: When the number of edges between any two vertices is $1$. +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). + +END%% + +## Incidence + If $\langle u, v \rangle$ is an edge of a directed graph, we say $\langle u, v \rangle$ is **incident to** $v$ and **incident from** $u$. Furthermore, we say $v$ is **adjacent** to $u$. If $\{u, v\}$ was instead an edge of an undirected graph, we say $\{u, v\}$ is **incident on** $u$ and $v$. Likewise, $v$ is adjacent to $u$ and $u$ is adjacent to $v$. %%ANKI @@ -1120,7 +1163,7 @@ END%% Basic If the following graphs are isomorphic, what is the domain of the isomorphism? ![[graph-isomorphic.png]] -Back: $\{a, b, c\}$. +Back: $\{a, b, c\}$ 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). END%% @@ -1129,7 +1172,7 @@ END%% Basic If the following graphs are isomorphic, what is the codomain of the isomorphism? ![[graph-isomorphic.png]] -Back: $\{u, v, w\}$. +Back: $\{u, v, w\}$ 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). END%% diff --git a/notes/set/index.md b/notes/set/index.md index 2a3f75d..2ec5e98 100644 --- a/notes/set/index.md +++ b/notes/set/index.md @@ -8,6 +8,8 @@ tags: ## Overview +Set theory begins with two primitive notions of sets and membership. Other axioms are defined relative to these concepts. + %%ANKI Basic What are the two primitive notions of set theory?