Hashing, relations, VCs.

c-declarations
Joshua Potter 2024-06-21 19:29:45 -06:00
parent f19695685c
commit 50ec869da9
23 changed files with 816 additions and 66 deletions

View File

@ -193,7 +193,7 @@
"binary/index.md": "9089c6f0e86a0727cd03984f51350de0", "binary/index.md": "9089c6f0e86a0727cd03984f51350de0",
"_journal/2024-02-09.md": "a798d35f0b2bd1da130f7ac766166109", "_journal/2024-02-09.md": "a798d35f0b2bd1da130f7ac766166109",
"c/types.md": "cf3e66e5aee58a94db3fdf0783908555", "c/types.md": "cf3e66e5aee58a94db3fdf0783908555",
"logic/quantification.md": "8898b8c0b9f6818942068df0c4428b26", "logic/quantification.md": "1116c6ac2267198a6ad9cc8b673b1c5b",
"c/declarations.md": "2de27f565d1020819008ae80593af435", "c/declarations.md": "2de27f565d1020819008ae80593af435",
"algorithms/sorting/bubble-sort.md": "872fb23e41fb3ac36e8c46240e9a027f", "algorithms/sorting/bubble-sort.md": "872fb23e41fb3ac36e8c46240e9a027f",
"_journal/2024-02-10.md": "562b01f60ea36a3c78181e39b1c02b9f", "_journal/2024-02-10.md": "562b01f60ea36a3c78181e39b1c02b9f",
@ -253,7 +253,7 @@
"_journal/2024-02/2024-02-21.md": "f423137ae550eb958378750d1f5e98c7", "_journal/2024-02/2024-02-21.md": "f423137ae550eb958378750d1f5e98c7",
"_journal/2024-02-23.md": "219ce9ad15a8733edd476c97628b71fd", "_journal/2024-02-23.md": "219ce9ad15a8733edd476c97628b71fd",
"_journal/2024-02/2024-02-22.md": "312e55d57868026f6e80f7989a889c2b", "_journal/2024-02/2024-02-22.md": "312e55d57868026f6e80f7989a889c2b",
"c17/strings.md": "cd4c15b6616613d2d2458aed3053306c", "c17/strings.md": "f3cc8bd2d8c0e771079dc846d3015b42",
"c17/index.md": "78576ee41d0185df82c59999142f4edb", "c17/index.md": "78576ee41d0185df82c59999142f4edb",
"c17/escape-sequences.md": "a8b99070336878b4e8c11e9e4525a500", "c17/escape-sequences.md": "a8b99070336878b4e8c11e9e4525a500",
"c17/declarations.md": "3ed374b028112c554bb4ee96f9f65231", "c17/declarations.md": "3ed374b028112c554bb4ee96f9f65231",
@ -322,7 +322,7 @@
"_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b", "_journal/2024-03/2024-03-17.md": "23f9672f5c93a6de52099b1b86834e8b",
"set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53", "set/directed-graph.md": "b4b8ad1be634a0a808af125fe8577a53",
"set/index.md": "24a66a792b7b75329590dcfc495faa91", "set/index.md": "24a66a792b7b75329590dcfc495faa91",
"set/graphs.md": "2ca3d1541345365f495657c4e6635d82", "set/graphs.md": "75f0ee994436ae39f7ba94a4eb73435a",
"_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb", "_journal/2024-03-19.md": "a0807691819725bf44c0262405e97cbb",
"_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391", "_journal/2024-03/2024-03-18.md": "63c3c843fc6cfc2cd289ac8b7b108391",
"awk/variables.md": "e40a20545358228319f789243d8b9f77", "awk/variables.md": "e40a20545358228319f789243d8b9f77",
@ -444,7 +444,7 @@
"_journal/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b", "_journal/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b",
"_journal/2024-05/2024-05-12.md": "ca9f3996272152ef89924bb328efd365", "_journal/2024-05/2024-05-12.md": "ca9f3996272152ef89924bb328efd365",
"git/remotes.md": "2208e34b3195b6f1ec041024a66fb38b", "git/remotes.md": "2208e34b3195b6f1ec041024a66fb38b",
"programming/pred-trans.md": "611dfb04df2126d35d67ca7ca1b39f52", "programming/pred-trans.md": "bea38879a7c500bc06e6319207f2c3d4",
"set/axioms.md": "063955bf19c703e9ad23be2aee4f1ab7", "set/axioms.md": "063955bf19c703e9ad23be2aee4f1ab7",
"_journal/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5", "_journal/2024-05-14.md": "f6ece1d6c178d57875786f87345343c5",
"_journal/2024-05/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b", "_journal/2024-05/2024-05-13.md": "71eb7924653eed5b6abd84d3a13b532b",
@ -454,12 +454,12 @@
"_journal/2024-05-16.md": "580c7ec61ec56be92fa8d6affcf0a5f6", "_journal/2024-05-16.md": "580c7ec61ec56be92fa8d6affcf0a5f6",
"_journal/2024-05/2024-05-15.md": "4e6a7e6df32e93f0d8a56bc76613d908", "_journal/2024-05/2024-05-15.md": "4e6a7e6df32e93f0d8a56bc76613d908",
"logic/pred-logic.md": "c23c3da8756ac0ef17b9710a67440d84", "logic/pred-logic.md": "c23c3da8756ac0ef17b9710a67440d84",
"logic/prop-logic.md": "ae3434527fbac9b01d536c955d4961ea", "logic/prop-logic.md": "5f20f5c27c7b59c59fc125ba78e37bd8",
"_journal/2024-05-17.md": "fb880d68077b655ede36d994554f3aba", "_journal/2024-05-17.md": "fb880d68077b655ede36d994554f3aba",
"_journal/2024-05/2024-05-16.md": "9fdfadc3f9ea6a4418fd0e7066d6b10c", "_journal/2024-05/2024-05-16.md": "9fdfadc3f9ea6a4418fd0e7066d6b10c",
"_journal/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c", "_journal/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c",
"hashing/direct-addressing.md": "acff356a70980cb4135094fccb3b3187", "hashing/direct-addressing.md": "f75cc22e74ae974fe4f568a2ee9f951f",
"hashing/index.md": "2f75e951aac609a2a9da731ef5444214", "hashing/index.md": "577ce1d6655e60e2c3a7a9b5a9c2fa8a",
"set/classes.md": "6776b4dc415021e0ef60b323b5c2d436", "set/classes.md": "6776b4dc415021e0ef60b323b5c2d436",
"_journal/2024-05-19.md": "fddd90fae08fab9bd83b0ef5d362c93a", "_journal/2024-05-19.md": "fddd90fae08fab9bd83b0ef5d362c93a",
"_journal/2024-05/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c", "_journal/2024-05/2024-05-18.md": "c0b58b28f84b31cea91404f43b0ee40c",
@ -507,17 +507,17 @@
"_journal/2024-06/2024-06-04.md": "52b28035b9c91c9b14cef1154c1a0fa1", "_journal/2024-06/2024-06-04.md": "52b28035b9c91c9b14cef1154c1a0fa1",
"_journal/2024-06-06.md": "3f9109925dea304e7172df39922cc95a", "_journal/2024-06-06.md": "3f9109925dea304e7172df39922cc95a",
"_journal/2024-06/2024-06-05.md": "b06a0fa567bd81e3b593f7e1838f9de1", "_journal/2024-06/2024-06-05.md": "b06a0fa567bd81e3b593f7e1838f9de1",
"set/relations.md": "d486836acec494ea3b185ec9746df7c9", "set/relations.md": "3355df45182a017a56670594ba8d5a13",
"_journal/2024-06-07.md": "795be41cc3c9c0f27361696d237604a2", "_journal/2024-06-07.md": "795be41cc3c9c0f27361696d237604a2",
"_journal/2024-06/2024-06-06.md": "db3407dcc86fa759b061246ec9fbd381", "_journal/2024-06/2024-06-06.md": "db3407dcc86fa759b061246ec9fbd381",
"_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8", "_journal/2024-06-08.md": "b20d39dab30b4e12559a831ab8d2f9b8",
"_journal/2024-06/2024-06-07.md": "c6bfc4c1e5913d23ea7828a23340e7d3", "_journal/2024-06/2024-06-07.md": "c6bfc4c1e5913d23ea7828a23340e7d3",
"lambda-calculus/alpha-conversion.md": "d3a10cb834e696909b04611c83f738cb", "lambda-calculus/alpha-conversion.md": "e87b499517c2471cae4717703ca3aba0",
"lambda-calculus/index.md": "756c93b8717fd00b04f8a99509066486", "lambda-calculus/index.md": "756c93b8717fd00b04f8a99509066486",
"x86-64/instructions/condition-codes.md": "56ad6eb395153609a1ec51835925e8c9", "x86-64/instructions/condition-codes.md": "56ad6eb395153609a1ec51835925e8c9",
"x86-64/instructions/logical.md": "818428b9ef84753920dc61e5c2de9199", "x86-64/instructions/logical.md": "818428b9ef84753920dc61e5c2de9199",
"x86-64/instructions/arithmetic.md": "271218d855e7291f119f96e91f582738", "x86-64/instructions/arithmetic.md": "271218d855e7291f119f96e91f582738",
"x86-64/instructions/access.md": "ab8605e11c0a3936735b18993e215513", "x86-64/instructions/access.md": "c19bc3392cf493fcc9becf46c818cc50",
"x86-64/instructions/index.md": "72c19067e938ab39ea51d25d6ac2bad9", "x86-64/instructions/index.md": "72c19067e938ab39ea51d25d6ac2bad9",
"_journal/2024-06-09.md": "935b3ddf65c51e680ac5c000c7e380af", "_journal/2024-06-09.md": "935b3ddf65c51e680ac5c000c7e380af",
"_journal/2024-06/2024-06-08.md": "9e1ebc8882a395b96ca765ad5c982d68", "_journal/2024-06/2024-06-08.md": "9e1ebc8882a395b96ca765ad5c982d68",
@ -527,16 +527,31 @@
"_journal/2024-06/2024-06-10.md": "1fe3a8beb03b1cc9af188b85933339e4", "_journal/2024-06/2024-06-10.md": "1fe3a8beb03b1cc9af188b85933339e4",
"_journal/2024-06-12.md": "8cc810c0f594093768117f57461e2e9e", "_journal/2024-06-12.md": "8cc810c0f594093768117f57461e2e9e",
"_journal/2024-06/2024-06-11.md": "764ccba25646673fdf7bb6a5f090394d", "_journal/2024-06/2024-06-11.md": "764ccba25646673fdf7bb6a5f090394d",
"hashing/open-addressing.md": "c27e92f2865bbb426fdd1e30fc52f1ed", "hashing/open-addressing.md": "c6f3fb2a5dbb270043c71af32bceae5b",
"hashing/closed-addressing.md": "962a48517969bf5e410cf78fc584051f", "hashing/closed-addressing.md": "afc4aac46e73208039edfd4e40824ed5",
"_journal/2024-06-13.md": "dec86b3a3e43eca306c3cf9a46b260ed", "_journal/2024-06-13.md": "dec86b3a3e43eca306c3cf9a46b260ed",
"_journal/2024-06/2024-06-12.md": "f82dfa74d0def8c3179d3d076f94558e", "_journal/2024-06/2024-06-12.md": "f82dfa74d0def8c3179d3d076f94558e",
"_journal/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307", "_journal/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307",
"_journal/2024-06/2024-06-13.md": "e2722a00585d94794a089e8035e05728", "_journal/2024-06/2024-06-13.md": "e2722a00585d94794a089e8035e05728",
"set/functions.md": "34bf35a8ae16a0d735ce7e3e1b5bfa05", "set/functions.md": "9fc813971de5fdda7aaac0cf91a721ad",
"_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4", "_journal/2024-06-15.md": "92cb8dc5c98e10832fb70c0e3ab3cec4",
"_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307", "_journal/2024-06/2024-06-14.md": "5d12bc272238ac985a1d35d3d63ea307",
"lambda-calculus/beta-reduction.md": "aa1b302755cde85085abedbde85161df" "lambda-calculus/beta-reduction.md": "aa1b302755cde85085abedbde85161df",
"_journal/2024-06-16.md": "ded6ab660ecc7c3dce3afd2e88e5a725",
"_journal/2024-06/2024-06-15.md": "c3a55549da9dfc2770bfcf403bf5b30b",
"_journal/2024-06-17.md": "63df6757bb3384e45093bf2b9456ffac",
"_journal/2024-06/2024-06-16.md": "ded6ab660ecc7c3dce3afd2e88e5a725",
"_journal/2024-06-18.md": "927e8a3329deadb685ac58241066fdae",
"_journal/2024-06/2024-06-17.md": "49840b71f2c5e37c89e0afcc1c20850a",
"_journal/2024-06-19.md": "ef5364091417de463a1d00dc18c628e8",
"_journal/2024-06/2024-06-18.md": "390d3c78d46a4e25164ea595f37a23bf",
"startups/venture-capitalist.md": "73de72c88261e54e9280f02cdf6f890d",
"startups/index.md": "00fd32876fc7a190dfecb2c37c15aadc",
"startups/fundraising.md": "a8ba72cc16941a91f2367e96114daf15",
"_journal/2024-06-20.md": "e67a8832003f0eb286dc6b5d6a916494",
"_journal/2024-06/2024-06-19.md": "363852585ef0c6e7e8ee250b3ec7fc38",
"_journal/2024-06-21.md": "54dabfa53a12e0ffd4df319978401903",
"_journal/2024-06/2024-06-20.md": "12d4d8cc2f6dfa37b8d2c09095c5e636"
}, },
"fields_dict": { "fields_dict": {
"Basic": [ "Basic": [

View File

@ -1,9 +0,0 @@
---
title: "2024-06-16"
---
- [ ] Anki Flashcards
- [ ] KoL
- [ ] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)

View File

@ -0,0 +1,12 @@
---
title: "2024-06-21"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Notes on [[functions#Inverses|inverses]] and [[functions#Compositions|compositions]] of functions.
* Finished Chapter 8 of "The Science of Programming" on sequential composition.

View File

@ -0,0 +1,9 @@
---
title: "2024-06-16"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)

View File

@ -0,0 +1,9 @@
---
title: "2024-06-17"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)

View File

@ -0,0 +1,12 @@
---
title: "2024-06-18"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Preliminary read on condition codes in "Computer Systems: A Programmer's Perspective".
* Notes on the load factor of open/closed addressing hash tables.

View File

@ -0,0 +1,11 @@
---
title: "2024-06-19"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Read through the introduction of "Venture Deals"

View File

@ -0,0 +1,11 @@
---
title: "2024-06-20"
---
- [x] Anki Flashcards
- [x] KoL
- [x] OGS
- [ ] Sheet Music (10 min.)
- [ ] Korean (Read 1 Story)
* Read Chapter 1 of "Venture Deals". Begin note-taking on [[venture-capitalist|VCs]].

View File

@ -651,7 +651,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
How many digits follows `e` in the output of `printf` specifier `%e`? How many digits follow `e` in the output of `printf` specifier `%e`?
Back: At least `2`. Back: At least `2`.
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). 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).
Tags: printf Tags: printf

View File

@ -49,6 +49,104 @@ Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” acc
<!--ID: 1718198755496--> <!--ID: 1718198755496-->
END%% END%%
%%ANKI
Basic
What is the theoretical maximum load factor in closed addressing?
Back: N/A
Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).
<!--ID: 1718759188231-->
END%%
%%ANKI
Basic
*Why* is the theoretical maximum load factor of closed addressing unbounded?
Back: A closed addressing hash table can always have more entries inserted into it.
Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).
<!--ID: 1718759188234-->
END%%
%%ANKI
Basic
When is the load factor of a closed addressing hash table $0$?
Back: When no entries are stored in the table.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188238-->
END%%
%%ANKI
Basic
When is the load factor of a closed addressing hash table $1$?
Back: When there exist the same number of total entries as slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188241-->
END%%
%%ANKI
Basic
When is the load factor of a closed addressing hash table $> 1$?
Back: When there exist more total entries than number of slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188245-->
END%%
## Chaining
The most common form of closed addressing is **chaining**. In this scheme, each slot $j$ is a (nullable) pointer to the head of a linked list containing all the elements with hash value $j$.
%%ANKI
Basic
What is the most common implementation of closed addressing?
Back: Chaining.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188249-->
END%%
%%ANKI
Basic
What data structure is typically used in a hash table with chaining?
Back: Linked lists.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188252-->
END%%
%%ANKI
Basic
Consider a hash table with chaining. What is in an empty slot?
Back: A NIL pointer.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188256-->
END%%
%%ANKI
Basic
Consider a hash table with chaining. What is in a nonempty slot?
Back: A pointer to the head of a linked list.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188261-->
END%%
%%ANKI
Basic
Consider a hash table with chaining. How many linked list instances exist?
Back: One for each slot in the hash table.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188269-->
END%%
%%ANKI
Cloze
A hash table with chaining is an example of {closed} addressing.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188275-->
END%%
%%ANKI
Cloze
A hash table with chaining is an example of {open} hashing.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188281-->
END%%
## Bibliography ## Bibliography
* “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). * “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).

View File

@ -137,6 +137,14 @@ Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” acc
<!--ID: 1718199205872--> <!--ID: 1718199205872-->
END%% END%%
%%ANKI
Basic
What is the theoretical maximum load factor in direct addressing?
Back: $1$
Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).
<!--ID: 1718759188227-->
END%%
## Bibliography ## Bibliography
* “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). * “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).

View File

@ -137,6 +137,68 @@ Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (
<!--ID: 1716307180980--> <!--ID: 1716307180980-->
END%% END%%
Consider hash table $T$ with $m$ slots that stores $n$ entries. Then the **load factor** $\alpha$ for $T$ is defined to be $n / m$, i.e. the average number of entries that map to the same slot.
%%ANKI
Basic
The load factor is a ratio of what two numbers?
Back: The number of entries in the table to the number of slots stored in the table.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188190-->
END%%
%%ANKI
Cloze
The load factor of a hash table {increases} as the number of slots {decrease}.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188194-->
END%%
%%ANKI
Cloze
The load factor of a hash table {decreases} as the number of total entries {decrease}.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188199-->
END%%
%%ANKI
Cloze
The load factor of a hash table {increases} as the number of total entries {increase}.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188204-->
END%%
%%ANKI
Cloze
The load factor of a hash table {decreases} as the number of slots {increase}.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188208-->
END%%
%%ANKI
Basic
Let $n / m$ denote the load factor of a hash table. What does $n$ represent?
Back: The total number of entries in the table.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188214-->
END%%
%%ANKI
Basic
Let $n / m$ denote the load factor of a hash table. What does $m$ represent?
Back: The number of slots in the table.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188218-->
END%%
%%ANKI
Basic
*Why* is the load factor $\alpha$ of a hash table defined the way it is?
Back: It represents the average number of entries stored at a slot.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188222-->
END%%
An **independent uniform hash function** is the ideal theoretical abstraction. For each possible input $k$ in universe $U$, an output $h(k)$ is produced randomly and independently chosen from range $\{0, 1, \ldots, m - 1\}$. Once a value $h(k)$ is chosen, each subsequent call to $h$ with the same input $k$ yields the same output $h(k)$. An **independent uniform hash function** is the ideal theoretical abstraction. For each possible input $k$ in universe $U$, an output $h(k)$ is produced randomly and independently chosen from range $\{0, 1, \ldots, m - 1\}$. Once a value $h(k)$ is chosen, each subsequent call to $h$ with the same input $k$ yields the same output $h(k)$.
%%ANKI %%ANKI

View File

@ -49,6 +49,46 @@ Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” acc
<!--ID: 1718198755486--> <!--ID: 1718198755486-->
END%% END%%
%%ANKI
Basic
What is the theoretical maximum load factor in open addressing?
Back: $1$
Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).
<!--ID: 1718759188171-->
END%%
%%ANKI
Basic
*Why* is the theoretical maximum load factor of open addressing unbounded?
Back: An open addressing hash table can only store as many entries as slots.
Reference: “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).
<!--ID: 1718759188176-->
END%%
%%ANKI
Basic
When is the load factor of an open addressing hash table $0$?
Back: When no entries are stored in the table.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188179-->
END%%
%%ANKI
Basic
When is the load factor of a open addressing hash table $1$?
Back: When there exist the same number of total entries as slots.
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188182-->
END%%
%%ANKI
Basic
When is the load factor of an open addressing hash table $> 1$?
Back: N/A
Reference: Thomas H. Cormen et al., Introduction to Algorithms, Fourth edition (Cambridge, Massachusett: The MIT Press, 2022).
<!--ID: 1718759188186-->
END%%
## Bibliography ## Bibliography
* “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html). * “Hash Tables: Open vs Closed Addressing | Programming.Guide,” accessed June 12, 2024, [https://programming.guide/hash-tables-open-vs-closed-addressing.html](https://programming.guide/hash-tables-open-vs-closed-addressing.html).

View File

@ -62,10 +62,10 @@ END%%
%%ANKI %%ANKI
Basic Basic
What property must $y$ satisfy for $\lambda x. M \equiv_\alpha \lambda y. M$? What property must $y$ satisfy for $\lambda x. M \equiv_\alpha \lambda y. [y/x]M$?
Back: $y \not\in FV(M)$ Back: $y \not\in FV(M)$
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). 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).
<!--ID: 1717687744147--> <!--ID: 1718802166425-->
END%% END%%
%%ANKI %%ANKI
@ -336,7 +336,7 @@ END%%
%%ANKI %%ANKI
Cloze Cloze
{$F$} $\Rightarrow [P/x][Q/x]M \equiv_\alpha [([P/x]Q)/x]M$ {$T$} $\Rightarrow [P/x][Q/x]M \equiv_\alpha [([P/x]Q)/x]M$
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). 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).
<!--ID: 1718422235912--> <!--ID: 1718422235912-->
END%% END%%
@ -402,7 +402,7 @@ For $\lambda$-terms $M$, $M'$, $N$, and $N'$, and variable $x$, $$M \equiv_\alph
%%ANKI %%ANKI
Basic Basic
The proof of which implication shows "substitution is well-behaved w.r.t. $\alpha$-conversion"? The proof of which implication shows "substitution is well-behaved w.r.t. $\alpha$-conversion"?
Back: $M \equiv_\alpha M' \land N \equiv_\alpha N' \Rightarrow [N/x]M \equiv_\alpha [N'/x]M'$ Back: $P \equiv_\alpha P' \land M \equiv_\alpha M' \Rightarrow [P/x]M \equiv_\alpha [P'/x]M'$
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). 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).
<!--ID: 1718422973129--> <!--ID: 1718422973129-->
END%% END%%

View File

@ -335,7 +335,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
Is $(b \land c)$ well-defined in $\{(b, T), (c, F)\}$? Is $(b \land c)$ well-defined in $\{\langle b, T \rangle, \langle c, F \rangle\}$?
Back: Yes. Back: Yes.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1706994861318--> <!--ID: 1706994861318-->
@ -343,7 +343,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
Is $(b \lor d)$ well-defined in $\{(b, T), (c, F)\}$? Is $(b \lor d)$ well-defined in $\{\langle b, T \rangle, \langle c, F \rangle\}$?
Back: No. Back: No.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1706994861320--> <!--ID: 1706994861320-->
@ -368,7 +368,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
What set of states does proposition $a \land b$ represent? What set of states does proposition $a \land b$ represent?
Back: $\{\{(a, T), (b, T)\}\}$ Back: $\{\{\langle a, T \rangle, \langle b, T \rangle\}\}$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1706994861339--> <!--ID: 1706994861339-->
END%% END%%
@ -376,7 +376,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
What set of states does proposition $a \lor b$ represent? What set of states does proposition $a \lor b$ represent?
Back: $\{\{(a, T), (b, T)\}, \{(a, T), (b, F)\}, \{(a, F), (b, T)\}\}$ Back: $\{\{\langle a, T \rangle, \langle b, T \rangle\}, \{\langle a, T \rangle, \langle b, F \rangle\}, \{\langle a, F \rangle, \langle b, T \rangle\}\}$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1715895996324--> <!--ID: 1715895996324-->
END%% END%%

View File

@ -190,29 +190,6 @@ END%%
Identifiers are said to be **bound** if they are parameters to a quantifier. Identifiers that are not bound are said to be **free**. A first-order logic formula is said to be in **prenex normal form** (PNF) if written in two parts: the first consisting of quantifiers and bound variables (the **prefix**), and the second consisting of no quantifiers (the **matrix**). Identifiers are said to be **bound** if they are parameters to a quantifier. Identifiers that are not bound are said to be **free**. A first-order logic formula is said to be in **prenex normal form** (PNF) if written in two parts: the first consisting of quantifiers and bound variables (the **prefix**), and the second consisting of no quantifiers (the **matrix**).
%%ANKI
Basic
When is an identifier said to be bound?
Back: When it is specified as a parameter to a quantifier.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796768-->
END%%
%%ANKI
Basic
When is an identifier said to be free?
Back: When it isn't specified as a parameter to a quantifier.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796770-->
END%%
%%ANKI
Cloze
An identifier that is not {bound} is instead {free}.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1707674796772-->
END%%
%%ANKI %%ANKI
Basic Basic
Prenex normal form consists of what two parts? Prenex normal form consists of what two parts?

View File

@ -55,7 +55,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
What is the antecedent of $\{Q\}\; S\; \{R\}$ in English? Interpret $\{Q\}\; S\; \{R\}$ in English. What is the antecedent of the implication?
Back: $S$ is executed in a state satisfying $Q$. Back: $S$ is executed in a state satisfying $Q$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1714420640229--> <!--ID: 1714420640229-->
@ -63,7 +63,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
What is the consequent of $\{Q\}\; S\; \{R\}$ in English? Interpret $\{Q\}\; S\; \{R\}$ in English. What is the consequent of the implication?
Back: $S$ terminates in a finite amount of time in a state satisfying $R$. Back: $S$ terminates in a finite amount of time in a state satisfying $R$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1714420640231--> <!--ID: 1714420640231-->
@ -504,8 +504,8 @@ For any predicate $R$, $wp(skip, R) = R$.
%%ANKI %%ANKI
Basic Basic
How is the $skip$ command defined? How is the $skip$ command defined in terms of $wp$?
Back: As $wp(skip, R) = R$. Back: For any predicate $R$, $wp(skip, R) = R$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1716810300099--> <!--ID: 1716810300099-->
END%% END%%
@ -531,8 +531,8 @@ For any predicate $R$, $wp(abort, R) = F$.
%%ANKI %%ANKI
Basic Basic
How is the $abort$ command defined? How is the $abort$ command defined in terms of $wp$?
Back: As $wp(abort, R) = F$. Back: For any predicate $R$, $wp(abort, R) = F$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1716810300116--> <!--ID: 1716810300116-->
END%% END%%
@ -584,6 +584,42 @@ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in
<!--ID: 1716810300145--> <!--ID: 1716810300145-->
END%% END%%
### Sequential Composition
**Sequential composition** is one way of composing larger program segments from smaller segments. Let $S1$ and $S2$ be two commands. Then $S1; S2$ is defined as $$wp(''S1; S2'', R) = wp(S1, wp(S2, R))$$
%%ANKI
Basic
Let $S1$ and $S2$ be two commands. How is their sequential composition denoted?
Back: $S1; S2$
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1719019485648-->
END%%
%%ANKI
Basic
How is $S1; S2$ defined in terms of $wp$?
Back: For any predicate $R$, $wp(''S1; S2'', R) = wp(S1, wp(S2, R))$.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1719019485654-->
END%%
%%ANKI
Basic
Is sequential composition commutative?
Back: No.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1719019485662-->
END%%
%%ANKI
Basic
Is sequential composition associative?
Back: Yes.
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
<!--ID: 1719019485666-->
END%%
## Bibliography ## Bibliography
* Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981. * Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.

View File

@ -328,7 +328,7 @@ END%%
%%ANKI %%ANKI
Cloze Cloze
Let $F$ be a function. Then $F$ maps {$\mathop{\text{dom}}F$} onto {$\mathop{\text{ran}}F$}. Let $F$ be a function. Then $F$ maps {$\mathop{\text{dom} }F$} onto {$\mathop{\text{ran} }F$}.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977). Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1718427443419--> <!--ID: 1718427443419-->
END%% END%%
@ -364,7 +364,7 @@ END%%
Basic Basic
*Why* isn't the following a surjection? *Why* isn't the following a surjection?
![[function-general.png]] ![[function-general.png]]
Back: No element of $X$ maps to $b \in Y$. Back: No element of $X$ maps to $a$ or $b$.
Reference: “Bijection, Injection and Surjection,” in _Wikipedia_, May 2, 2024, [https://en.wikipedia.org/w/index.php?title=Bijection_injection_and_surjection](https://en.wikipedia.org/w/index.php?title=Bijection,_injection_and_surjection&oldid=1221800163). Reference: “Bijection, Injection and Surjection,” in _Wikipedia_, May 2, 2024, [https://en.wikipedia.org/w/index.php?title=Bijection_injection_and_surjection](https://en.wikipedia.org/w/index.php?title=Bijection,_injection_and_surjection&oldid=1221800163).
<!--ID: 1718465870573--> <!--ID: 1718465870573-->
END%% END%%
@ -438,6 +438,244 @@ Reference: “Bijection, Injection and Surjection,” in _Wikipedia_, May 2, 202
<!--ID: 1718465870605--> <!--ID: 1718465870605-->
END%% END%%
## Inverses
Let $F$ be an arbitrary set. The **inverse** of $F$ is the set $$F^{-1} = \{\langle u, v \rangle \mid vFu\}.$$
%%ANKI
Basic
What kind of mathematical object does the inverse operation apply to?
Back: Sets.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770704-->
END%%
%%ANKI
Basic
What is the "arity" of the inverse operation in set theory?
Back: $1$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017251246-->
END%%
%%ANKI
Basic
Let $F$ be a set. How is the inverse of $F$ denoted?
Back: $F^{-1}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770741-->
END%%
%%ANKI
Basic
What kind of mathematical object does the inverse operation emit?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770749-->
END%%
%%ANKI
Basic
How is the inverse of set $F$ defined in set-builder notation?
Back: $F^{-1} = \{\langle u, v \rangle \mid vFu\}$\
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770752-->
END%%
%%ANKI
Basic
Consider set $A$. Is $A^{-1}$ a relation?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770755-->
END%%
%%ANKI
Basic
Consider set $A$. Is $A^{-1}$ a function?
Back: Not necessarily.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770759-->
END%%
%%ANKI
Basic
Consider relation $R$. Is $R^{-1}$ a relation?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770763-->
END%%
%%ANKI
Basic
Consider relation $R$. Is $R^{-1}$ a function?
Back: Not necessarily.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770767-->
END%%
%%ANKI
Basic
Consider function $F \colon A \rightarrow B$. Is $F^{-1}$ a relation?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770772-->
END%%
%%ANKI
Basic
Consider function $F \colon A \rightarrow B$. Is $F^{-1}$ a function?
Back: Not necessarily.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770778-->
END%%
%%ANKI
Basic
Let $F \colon A \rightarrow B$ be an injection. Is $F^{-1}$ a function?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770782-->
END%%
%%ANKI
Basic
Let $F \colon A \rightarrow B$ be an injection. Is $F^{-1}$ one-to-one?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770787-->
END%%
%%ANKI
Basic
Let $F \colon A \rightarrow B$ be an injection. Is $F^{-1}$ onto $A$?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770792-->
END%%
%%ANKI
Basic
Let $F \colon A \rightarrow B$ be a surjection. Is $F^{-1}$ a function?
Back: Not necessarily.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770796-->
END%%
%%ANKI
Basic
Let $F \colon A \rightarrow B$ be a surjection. Is $F^{-1}$ a relation?
Back: Yes.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770800-->
END%%
%%ANKI
Basic
Consider function $F \colon A \rightarrow B$. What is the domain of $F^{-1}$?
Back: $\mathop{\text{ran}}F$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770805-->
END%%
%%ANKI
Basic
Consider function $F \colon A \rightarrow B$. What is the range of $F^{-1}$?
Back: $A$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016770812-->
END%%
%%ANKI
Basic
Consider function $F$. How does $(F^{-1})^{-1}$ relate to $F$?
Back: They are equal.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016946539-->
END%%
%%ANKI
Basic
Consider relation $R$. How does $(R^{-1})^{-1}$ relate to $R$?
Back: They are equal.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016946547-->
END%%
%%ANKI
Basic
Consider set $A$. How does $(A^{-1})^{-1}$ relate to $A$?
Back: $(A^{-1})^{-1}$ is a subset of $A$.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719016946554-->
END%%
%%ANKI
Basic
When does $A \neq (A^{-1})^{-1}$?
Back: If there exists an $x \in A$ such that $x$ is not an ordered pair.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017560113-->
END%%
## Compositions
Let $F$ and $G$ be arbitrary sets. The **composition** of $F$ and $G$ is the set $$F \circ G = \{\langle u, v \rangle \mid \exists t, uGt \land tFv \}$$
%%ANKI
Basic
What kind of mathematical object does the composition operation apply to?
Back: Sets.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017251256-->
END%%
%%ANKI
Basic
What kind of mathematical object does the composition operation emit?
Back: Relations.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017251259-->
END%%
%%ANKI
Basic
Let $F$ and $G$ be arbitrary sets. How is the composition of $G$ and $F$ denoted?
Back: $G \circ F$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017251252-->
END%%
%%ANKI
Basic
Let $F$ and $G$ be arbitrary sets. How is the composition of $F$ and $G$ denoted?
Back: $F \circ G$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017251262-->
END%%
%%ANKI
Basic
What is the "arity" of the composition operation in set theory?
Back: $2$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017251265-->
END%%
%%ANKI
Cloze
{$(F \circ G)(x)$} is alternatively written as {$F(G(x))$}.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017560120-->
END%%
%%ANKI
Basic
How is the composition of sets $F$ and $G$ defined in set-builder notation?
Back: $F \circ G = \{\langle u, v \rangle \mid \exists t, uGt \land tFv\}$
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1719017560123-->
END%%
## Bibliography ## Bibliography
* “Bijection, Injection and Surjection,” in _Wikipedia_, May 2, 2024, [https://en.wikipedia.org/w/index.php?title=Bijection_injection_and_surjection](https://en.wikipedia.org/w/index.php?title=Bijection,_injection_and_surjection&oldid=1221800163). * “Bijection, Injection and Surjection,” in _Wikipedia_, May 2, 2024, [https://en.wikipedia.org/w/index.php?title=Bijection_injection_and_surjection](https://en.wikipedia.org/w/index.php?title=Bijection,_injection_and_surjection&oldid=1221800163).

View File

@ -1061,7 +1061,7 @@ END%%
%%ANKI %%ANKI
Basic Basic
What is the codomain of an isomorphism between graphs $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$? 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$. 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). 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).
<!--ID: 1715537560183--> <!--ID: 1715537560183-->
END%% END%%

View File

@ -189,6 +189,14 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1718107987862--> <!--ID: 1718107987862-->
END%% END%%
%%ANKI
Basic
What is the most general mathematical object the $\mathop{\text{dom}}$ operation can be applied to?
Back: Sets.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1718546439334-->
END%%
%%ANKI %%ANKI
Basic Basic
Let $A$ be a set containing no ordered pairs. What is $\mathop{\text{dom}} A$? Let $A$ be a set containing no ordered pairs. What is $\mathop{\text{dom}} A$?
@ -281,6 +289,14 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1718107987880--> <!--ID: 1718107987880-->
END%% END%%
%%ANKI
Basic
What is the most general mathematical object the $\mathop{\text{ran}}$ operation can be applied to?
Back: Sets.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1718546439338-->
END%%
%%ANKI %%ANKI
Basic Basic
Let $A$ be a set containing no ordered pairs. What is $\mathop{\text{ran}} A$? Let $A$ be a set containing no ordered pairs. What is $\mathop{\text{ran}} A$?
@ -337,6 +353,14 @@ Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Pre
<!--ID: 1718327739955--> <!--ID: 1718327739955-->
END%% END%%
%%ANKI
Basic
What is the most general mathematical object the $\mathop{\text{fld}}$ operation can be applied to?
Back: Sets.
Reference: Herbert B. Enderton, *Elements of Set Theory* (New York: Academic Press, 1977).
<!--ID: 1718546439341-->
END%%
%%ANKI %%ANKI
Basic Basic
$\mathop{\text{fld}} R = \bigcup \bigcup R$ is necessary for what condition? $\mathop{\text{fld}} R = \bigcup \bigcup R$ is necessary for what condition?

7
notes/startups/index.md Normal file
View File

@ -0,0 +1,7 @@
---
title: Startups
TARGET DECK: Obsidian::H&SS
FILE TAGS: startups
tags:
- startups
---

View File

@ -0,0 +1,190 @@
---
title: Venture Capitalist
TARGET DECK: Obsidian::H&SS
FILE TAGS: startups::vc
tags:
- startups
---
## Overview
A **venture capitalist** (VC) is an investor who provides capital to companies in exchange for an equity stake on behalf of a firm. A firm comprises of the following roles (in order of seniority):
* **Managing director** (MD) or **general partner** (GP). The VCs that make the final investment decisions and sit on the boards of directors of the companies they invest in.
* **Principal** or **director**. Junior deal professionals looking to become managing directors.
* **Associate**. Work for one or more deal partners, usually a managing director.
* **Analyst**. Individuals with similar responsibilites as the associate, though usually less deal-centric.
%%ANKI
Basic
What is VC short for?
Back: **V**enture **c**apitalist.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788273-->
END%%
%%ANKI
Basic
What ambiguity does the term "VC" introduce?
Back: It may refer to a VC firm or an individual of said firm.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788303-->
END%%
%%ANKI
Cloze
Typically VCs provide {capital} in exchange for {equity}.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788311-->
END%%
%%ANKI
Basic
How is a "venture capitalist" defined?
Back: An investor who provides capital to companies, on behalf of a firm, in exchange for equity.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788328-->
END%%
%%ANKI
Basic
What form of capital does a VC typically work in?
Back: Cash flow.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788334-->
END%%
%%ANKI
Basic
Within a VC firm, what does MD stand for?
Back: **M**anaging **d**irector.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788338-->
END%%
%%ANKI
Basic
Within a VC firm, what does GP stand for?
Back: **G**eneral **p**artner.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788342-->
END%%
%%ANKI
Basic
With respect to a VC firm, what does a "managing director" refer to?
Back: A senior VC, generally responsible for making final investment decisions.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311552-->
END%%
%%ANKI
Basic
With respect to a VC firm, what does a "general partner" refer to?
Back: A senior VC, generally responsible for making final investment decisions.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788345-->
END%%
%%ANKI
Cloze
A {general partner} is also known as a {managing director}.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788348-->
END%%
%%ANKI
Cloze
The {principal/director} role follows the {MD/GP} role in seniority.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788353-->
END%%
%%ANKI
Basic
With respect to a VC firm, what does a "principal" refer to?
Back: A VC working their way up to becoming a GP.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788357-->
END%%
%%ANKI
Basic
With respect to a VC firm, what does a "director" refer to?
Back: A VC working their way up to becoming an MD.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311558-->
END%%
%%ANKI
Cloze
A {principal} is also known as a {director}.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788361-->
END%%
%%ANKI
Basic
What types of VCs are grouped under term "deal partner"?
Back: GPs and principals.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718878788368-->
END%%
%%ANKI
Basic
What distinguishes VCs from angel investors?
Back: The former use a pool of investors' money. The latter uses their own money.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311563-->
END%%
%%ANKI
Cloze
The {associate} role follows the {principal/director} role in seniority.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311566-->
END%%
%%ANKI
Cloze
The {analyst} role follows the {associate} role in seniority.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311572-->
END%%
%%ANKI
Basic
How are analysts and associates typically distinguished?
Back: The latter are usually more deal-centric than the former.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311577-->
END%%
%%ANKI
Basic
What role is a recent college graduate likely given at a VC firm?
Back: Analyst.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311581-->
END%%
%%ANKI
Basic
With respect to a VC firm, what does an "associate" refer to?
Back: An employee usually working directly for one or more deal managers.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311586-->
END%%
%%ANKI
Basic
With respect to a VC firm, what does an "analyst" refer to?
Back: An employee working on general functions for the firm.
Reference: Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.
<!--ID: 1718879311590-->
END%%
## Bibliography
* Brad Feld and Jason Mendelson, _Venture Deals_, 3rd ed., n.d.

View File

@ -348,7 +348,7 @@ Basic
How is `pushq %rbp` equivalently written using a pair of instructions? How is `pushq %rbp` equivalently written using a pair of instructions?
Back: Back:
```asm ```asm
subq 8,%rsp subq $8,%rsp
movq %rbp,(%rsp) movq %rbp,(%rsp)
``` ```
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
@ -361,7 +361,7 @@ How is `popq %rax` equivalently written using a pair of instructions?
Back: Back:
```asm ```asm
movq (%rsp),%rax movq (%rsp),%rax
addq 8,%rsp addq $8,%rsp
``` ```
Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016. Reference: Bryant, Randal E., and David O'Hallaron. *Computer Systems: A Programmer's Perspective*. Third edition, Global edition. Always Learning. Pearson, 2016.
<!--ID: 1715377284962--> <!--ID: 1715377284962-->