diff --git a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json index 0036413..c8f49bd 100644 --- a/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json +++ b/notes/.obsidian/plugins/obsidian-to-anki-plugin/data.json @@ -123,7 +123,8 @@ "array-1d-row-major.png", "array-1d-col-major.png", "array-multi-row-major.png", - "array-multi-col-major.png" + "array-multi-col-major.png", + "graph-isomorphic.png" ], "File Hashes": { "algorithms/index.md": "3ac071354e55242919cc574eb43de6f8", @@ -304,7 +305,7 @@ "_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b", "set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53", "set/index.md": "f2e907b2643cd4e5023169dcd96ca828", - "set/graphs.md": "242195a7af5dc5dfefdc07ccba8b0fa4", + "set/graphs.md": "51f1346e7c0e13daaa2cc9ce816bd1e0", "_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb", "_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391", "awk/variables.md": "e40a20545358228319f789243d8b9f77", @@ -400,7 +401,7 @@ "_journal/2024-05-01.md": "959ff67fe3db585ba6a7b121d853bbac", "_journal/2024-05-02.md": "d7d6ba7e065d807986f0bd77281c0bb1", "data-structures/priority-queues.md": "8c5c6bf62b1a39d8f1f72b800fcb17ff", - "data-structures/heaps.md": "0cba4acb7667dcab80fa4e7778e86cc8", + "data-structures/heaps.md": "0317372dcae8d81e4345c3ffa5c0cf90", "data-structures/index.md": "2605977fad54956b5dc2d8dda9be2b10", "abstract-data-types/priority-queues.md": "d3dad736cb05c47bdc93c52a3a4af083", "abstract-data-types/index.md": "6b110b20393c561497629ca4c3e09472", @@ -411,17 +412,18 @@ "_journal/2024-04/2024-04-30.md": "369f98b9d91de89cc1f4f581bc530c0d", "_journal/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7", "_journal/2024-05/2024-05-04.md": "866af1876896a343e7a7d9d09d0c24bb", - "_journal/2024-05-09.md": "c2c84166b15df42c8243fc1be0550aac", + "data-structures/intrusive.md": "e43c435136c5de92a094e4e49af9f436", + "data-structures/linked-lists.md": "a68e7709791e449bee7875ad9680dd96", + "data-structures/arrays.md": "bb6b8609d16f9f2565d5238c0f9b8566", + "abstract-data-types/stacks.md": "d4324db19a88211dc6bf4f0e56c74cec", + "abstract-data-types/queues.md": "db668234b6c6051635321730b7176dcb", + "_journal/2024-05-12.md": "46f68b2a55e3b4948d90c70009b325d8", + "_journal/2024-05/2024-05-11.md": "f80bb3f8ca9cad70a2016224c6a44734", + "_journal/2024-05/2024-05-10.md": "ae2d0ac5b24d3b8e55b691894d852324", + "_journal/2024-05/2024-05-09.md": "2339530b1654a2e8e96d908ecb91b8d1", "_journal/2024-05/2024-05-08.md": "0f1b1b9e2abcf3203b511b9e034e86f4", "_journal/2024-05/2024-05-07.md": "4b1dde039a251f9a6dc7e606de98616d", - "_journal/2024-05/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7", - "_journal/2024-05-10.md": "b594772387b409cd38245d8b319260ae", - "data-structures/arrays.md": "1c648464841ee2cc86382ca176890950", - "_journal/2024-05-11.md": "3448f51b254fecca15b310d03881d734", - "_journal/2024-05/2024-05-10.md": "036bda39b619b2719dc763516d8de096", - "_journal/2024-05/2024-05-09.md": "c2c84166b15df42c8243fc1be0550aac", - "abstract-data-types/queues.md": "db668234b6c6051635321730b7176dcb", - "abstract-data-types/stacks.md": "d4324db19a88211dc6bf4f0e56c74cec" + "_journal/2024-05/2024-05-06.md": "bc9306348b7063b87741768391d9d8a7" }, "fields_dict": { "Basic": [ diff --git a/notes/_journal/2024-05-12.md b/notes/_journal/2024-05-12.md index 734f36c..78b7946 100644 --- a/notes/_journal/2024-05-12.md +++ b/notes/_journal/2024-05-12.md @@ -6,4 +6,7 @@ title: "2024-05-12" - [x] KoL - [ ] Sheet Music (10 min.) - [ ] Go (1 Life & Death Problem) -- [ ] Korean (Read 1 Story) \ No newline at end of file +- [ ] Korean (Read 1 Story) + +* Notes on linked lists and intrusive/non-intrusive data structures. +* Notes on graphs/isomorphisms. \ No newline at end of file diff --git a/notes/data-structures/arrays.md b/notes/data-structures/arrays.md index f7ad7c2..d29f15e 100644 --- a/notes/data-structures/arrays.md +++ b/notes/data-structures/arrays.md @@ -65,6 +65,36 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition ( END%% +%%ANKI +Cloze +The {head} of an array refers to {its first element}. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Cloze +The {tail} of an array refers to {all but its first element}. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What is the runtime of prepending an element to a large enough array? +Back: $O(n)$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What is the runtime of finding the $k$th element of an array? +Back: $O(1)$ +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/intrusive.md b/notes/data-structures/intrusive.md new file mode 100644 index 0000000..07b5302 --- /dev/null +++ b/notes/data-structures/intrusive.md @@ -0,0 +1,219 @@ +--- +title: Intrusive Containers +TARGET DECK: Obsidian::STEM +FILE TAGS: data_structure::intrusive +tags: + - data_structure +--- + +## Overview + +An intrusive container is a data structure used to hold a collection of objects in which membership bookkeeping is stored in the objects themselves rather than a separate structure. For example, consider the following `struct`: + +```c +struct Point { + float x, y; +} +``` + +A non-intrusive implementation of a [[linked-lists|doubly linked list]] would look as follows: + +```c +struct ListNode { + struct Point val; + struct ListNode *next, *prev; +} +``` + +An intrusive implementation would instead modify `Point` like so: + +```c +struct Point { + float x, y; + struct Point *next, *prev; +} +``` + +%%ANKI +Basic +What is an intrusive container? +Back: A collection of objects in which membership bookkeeping is stored in the objects themselves. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +What is the opposite of an "intrusive container"? +Back: A non-intrusive container. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Given the following `struct`, implement an intrusive doubly linked list. +```c +struct Point { + float x, y; +} +``` +Back: +```c +struct Point { + float x, y; + struct Point *next, *prev; +} +``` +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). +Tags: c17 data_structure::linked_list + +END%% + +%%ANKI +Basic +Is the following considered an intrusive container or non-intrusive container? +```c +struct Point { + float x, y; + struct Point *next, *prev; +} +``` +Back: Intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). +Tags: c17 data_structure::linked_list + +END%% + +%%ANKI +Basic +Is the following considered an intrusive container or non-intrusive container? +```c +struct ListNode { + struct Point val; + struct ListNode *next, *prev; +} +``` +Back: Non-intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Given the following `struct`, implement a non-intrusive doubly linked list. +```c +struct Point { + float x, y; +} +``` +Back: +```c +struct ListNode { + struct Point val; + struct ListNode *next, *prev; +} +``` +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). +Tags: c17 data_structure::linked_list + +END%% + +%%ANKI +Basic +Given the following `struct`, how many linked lists can a `Point` exist in? +```c +struct Point { + float x, y; + struct Point *next, *prev; +} +``` +Back: Zero or one. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). +Tags: c17 data_structure::linked_list + +END%% + +%%ANKI +Basic +Given the following `struct`, how many linked lists can a `Point` exist in? +```c +struct ListNode { + struct Point *val; + struct ListNode *next, *prev; +} +``` +Back: Zero or more. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). +Tags: c17 data_structure::linked_list + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers allow a `struct` to exist in an arbitrary number of linked lists? +Back: Non-intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). +Tags: data_structure::linked_list + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers perform more allocations? +Back: Non-intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers perform more de-allocations? +Back: Non-intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers has better spatial locality? +Back: Intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers avoid modifying object definitions? +Back: Non-intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers allow implicitly finding *all* containers an object is contained in? +Back: Intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers cannot be used for opaque types? +Back: Intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +%%ANKI +Basic +Which of intrusive or non-intrusive containers requires searching in each container for the same reference? +Back: Non-intrusive. +Reference: Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). + +END%% + +## Bibliography + +* Fuchsia. “Introduction to Fbl Intrusive Containers.” Accessed May 12, 2024. [https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction](https://fuchsia.dev/fuchsia-src/development/languages/c-cpp/fbl_containers_guide/introduction). \ No newline at end of file diff --git a/notes/data-structures/linked-lists.md b/notes/data-structures/linked-lists.md new file mode 100644 index 0000000..af3fbe9 --- /dev/null +++ b/notes/data-structures/linked-lists.md @@ -0,0 +1,108 @@ +--- +title: Linked Lists +TARGET DECK: Obsidian::STEM +FILE TAGS: data_structure::linked_list +tags: + - data_structure + - linked_list +--- + +## Overview + +%%ANKI +Basic +What does it mean for a linked list to be singly linked? +Back: Each entry in the list has a `next` pointer only. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What condition is used to check if a singly linked list is empty? +Back: Its empty if the head of the list is `NIL`. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Cloze +The {head} of a linked list refers to {its first element}. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Cloze +The {tail} of a linked list refers to {its last element}. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What does it mean for a singly linked list to be circular? +Back: The tail points to the head. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What is the runtime of inserting an element at the front of a singly linked list? +Back: $O(1)$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What is the runtime of finding the $k$th element of a singly linked list? +Back: $O(n)$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What does it mean for a linked list to be doubly linked? +Back: Each entry in the list have `next` and `prev` pointers. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What condition is used to check if a doubly linked list is empty? +Back: Its empty if the head of the list is `NIL`. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What does it mean for a doubly linked list to be circular? +Back: The tail points to the head, and the head points to the tail. +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What is the runtime of prepending an element to a doubly linked list? +Back: $O(1)$ +Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022). + +END%% + +%%ANKI +Basic +What is the runtime of finding the $k$th element of a doubly linked list? +Back: $O(n)$ +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/set/graphs.md b/notes/set/graphs.md index b01e63b..a90dc6e 100644 --- a/notes/set/graphs.md +++ b/notes/set/graphs.md @@ -1020,6 +1020,129 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition ( END%% +## Isomorphisms + +An **isomorphism** between two graphs $G_1$ and $G_2$ is a bijection $f \colon V_1 \rightarrow V_2$ between the vertices of the graphs such that $(a, b)$ is an edge in $G_1$ if and only if $(f(a), f(b))$ is an edge in $G_2$. Here parenthesis are used to denote either ordered pairs (for directed graphs) or unordered pairs (for undirected graphs). + +We say $G_1$ and $G_2$ are **isomorphic**, denoted $G_1 \cong G_2$, if and only if there exists an isomorphism between $G_1$ and $G_2$. + +%%ANKI +Basic +What kind of mathematical object is an isomorphism between graphs? +Back: A function. +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 +What *kind* of function is an isomorphism between two graphs? +Back: A bijective function. +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 +What *is* an isomorphism between graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$? +Back: A bijection $f \colon V_1 \rightarrow V_2$ such that $(a, b) \in E_1$ if and only if $(f(a), f(b)) \in E_2$. +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 +What is the domain of an isomorphism between graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$? +Back: $V_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%% + +%%ANKI +Basic +What is the codomain of an isomorphism between graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$? +Back: $V_2$. +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 +What is the edge relation of isomorphism $f$ between graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$? +Back: $(a, b) \in E_1$ if and only if $(f(a), f(b)) \in E_2$. +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 +What does it mean for graphs $G_1$ and $G_2$ to be isomorphic? +Back: There exists an isomorphism between them. +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 +If two graphs are equal, are they isomorphic? +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 +If two graphs are isomorphic, are they equal? +Back: Not necessarily. +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 +Are the following two graphs equal? +![[graph-isomorphic.png]] +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 +Are the following two graphs isomorphic? +![[graph-isomorphic.png]] +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 +If the following graphs are isomorphic, what is the domain of the isomorphism? +![[graph-isomorphic.png]] +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%% + +%%ANKI +Basic +If the following graphs are isomorphic, what is the codomain of the isomorphism? +![[graph-isomorphic.png]] +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%% + +%%ANKI +Basic +What does it mean for two graphs to be equal? +Back: Two graphs are equal if their vertex and edge sets are equal. +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%% + ## Bibliography +* 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). * 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/set/images/graph-isomorphic.png b/notes/set/images/graph-isomorphic.png new file mode 100644 index 0000000..2d22861 Binary files /dev/null and b/notes/set/images/graph-isomorphic.png differ