Restructured notes on combinatorics.
parent
cbca6f018b
commit
2a2d8f8195
|
@ -89,7 +89,7 @@
|
|||
"c/escape-sequences.md": "0d6219ebb51f6f21e026de67603e25b8",
|
||||
"c/index.md": "a021c92f19831bdd2bca4cbf813882fe",
|
||||
"gawk/index.md": "dd851e023e11c556c0272a0dcb6dd55d",
|
||||
"gawk/variables.md": "a7d95bd458e07b5a329c62366f368c8d",
|
||||
"gawk/variables.md": "73b12bd0d7d6f97b4a7285aaf2c45bfa",
|
||||
"index.md": "e48e895feeed7046425bb2ee15419770",
|
||||
"journal/2024-01-31.md": "7c7fbfccabc316f9e676826bf8dfe970",
|
||||
"journal/2024-02-01.md": "3aa232387d2dc662384976fd116888eb",
|
||||
|
@ -101,7 +101,7 @@
|
|||
"nix/callPackage.md": "140a02e57cd01d646483e3c21d72243d",
|
||||
"nix/index.md": "4efc7fcc4ea22834ba595497e5fb715c",
|
||||
"posix/index.md": "97b1b8ecb9a953e855a9acf0ab25b8c8",
|
||||
"posix/signals.md": "2120ddd933fc0d57abb93c33f639afd8",
|
||||
"posix/signals.md": "4fe63c3c9507b2e15c9ad6f3a2b541db",
|
||||
"templates/daily.md": "7866014e730e85683155207a02e367d8",
|
||||
"posix/regexp.md": "43825a1b9ed0dd7eeb1b6fe35c928bfe",
|
||||
"journal/2024-02-04.md": "e2b5678fc53d7284b71ed6820c02b954",
|
||||
|
@ -114,7 +114,7 @@
|
|||
"_journal/2024-02-02.md": "a3b222daee8a50bce4cbac699efc7180",
|
||||
"_journal/2024-02-01.md": "3aa232387d2dc662384976fd116888eb",
|
||||
"_journal/2024-01-31.md": "7c7fbfccabc316f9e676826bf8dfe970",
|
||||
"logic/equiv-trans.md": "afcd52fefbbbb8397220194062626a7a",
|
||||
"logic/equiv-trans.md": "4d825c23bf54e8b1e645584d52b2b993",
|
||||
"_journal/2024-02-07.md": "8d81cd56a3b33883a7706d32e77b5889",
|
||||
"algorithms/loop-invariants.md": "cbefc346842c21a6cce5c5edce451eb2",
|
||||
"algorithms/loop-invariant.md": "d883dfc997ee28a7a1e24b995377792b",
|
||||
|
@ -149,10 +149,10 @@
|
|||
"_journal/2024-02/2024-02-11.md": "afee9f502b61e17de231cf2f824fbb32",
|
||||
"encoding/ascii.md": "c01e50f96d0493d94dc4d520c0b6bb71",
|
||||
"encoding/index.md": "071cfa6a5152efeda127b684f420d438",
|
||||
"c/strings.md": "e08be6bdc820ec4903480a736448a5d7",
|
||||
"c/strings.md": "2c3b6ecf6cf1815598a7be623983856c",
|
||||
"logic/truth-tables.md": "7892ceaa416c9a65acc79ca1e6ff778f",
|
||||
"logic/short-circuit.md": "26d300f407f14883022d0ef8dc4f7300",
|
||||
"logic/boolean-algebra.md": "370065481448e60aa8ffa67a437b5482",
|
||||
"logic/boolean-algebra.md": "f9101b2dfdedb73dc13c34c1a70a0010",
|
||||
"_journal/2024-02-13.md": "6242ed4fecabf95df6b45d892fee8eb0",
|
||||
"_journal/2024-02/2024-02-12.md": "618c0035a69b48227119379236a02f44",
|
||||
"binary/shifts.md": "146ee4898faa13b26f00a31024020c2e",
|
||||
|
@ -165,10 +165,16 @@
|
|||
"algebra/floor-ceiling.md": "456fa31bedb9ec7c2fa1d6f75db81dec",
|
||||
"algebra/index.md": "90b842eb694938d87c7c68779a5cacd1",
|
||||
"algorithms/binary-search.md": "08cb6dc2dfb204a665d8e8333def20ca",
|
||||
"_journal/2024-02-17.md": "0fad7bf64837646e1018885504d40f41",
|
||||
"_journal/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
|
||||
"_journal/2024-02/2024-02-16.md": "e701902e369ec53098fc2deed4ec14fd",
|
||||
"binary/integer-encoding.md": "a2c8c83a20f1124fd5af0f3c23894284",
|
||||
"combinatorics/index.md": "c5b005bdce7ab01facfd614b00938ef2"
|
||||
"combinatorics/index.md": "f9de9671fdb6068ef2bb5e63051734be",
|
||||
"_journal/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629",
|
||||
"_journal/2024-02/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
|
||||
"combinatorics/multiplicative-principle.md": "aec83fc4bafad4ae17bd3b4e92e068a1",
|
||||
"combinatorics/additive-principle.md": "99320b513f16ef6be62bf766cfbd328d",
|
||||
"_journal/2024-02-19.md": "77ade15d43f3fba69bde96d0e062ec13",
|
||||
"_journal/2024-02/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629"
|
||||
},
|
||||
"fields_dict": {
|
||||
"Basic": [
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
---
|
||||
title: "2024-02-19"
|
||||
---
|
||||
|
||||
- [x] Anki Flashcards
|
||||
- [x] KoL
|
||||
- [ ] Sheet Music (10 min.)
|
||||
- [ ] OGS (1 Life & Death Problem)
|
||||
- [ ] Korean (Read 1 Story)
|
||||
- [ ] Interview Prep (1 Practice Problem)
|
||||
- [ ] Log Work Hours (Max 3 hours)
|
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
title: "2024-02-18"
|
||||
---
|
||||
|
||||
- [x] Anki Flashcards
|
||||
- [x] KoL
|
||||
- [ ] Sheet Music (10 min.)
|
||||
- [x] OGS (1 Life & Death Problem)
|
||||
- [ ] Korean (Read 1 Story)
|
||||
- [ ] Interview Prep (1 Practice Problem)
|
||||
- [ ] Log Work Hours (Max 3 hours)
|
||||
|
||||
* 101weiqi problems (serial numbers)
|
||||
* Q-59934
|
||||
* Q-264298
|
||||
* Q-349700
|
||||
* Q-138042
|
||||
* Q-11151
|
||||
* Q-267485
|
||||
* Q-84172
|
||||
* Q-87250
|
||||
* Q-260737
|
||||
* Q-12517
|
|
@ -168,7 +168,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`d` and `i`} format specifer(s) output a(n) {decimal `signed int`}.
|
||||
The {`d` and `i`} format specifers output a {decimal `signed int`}.
|
||||
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
|
||||
<!--ID: 1707852083040-->
|
||||
|
@ -184,7 +184,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`u`} format specifier(s) output a(n) {decimal `unsigned int`}.
|
||||
The {`u`} format specifier outputs a {decimal `unsigned int`}.
|
||||
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
|
||||
<!--ID: 1707852083047-->
|
||||
|
@ -201,7 +201,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier(s) were probably used to yield `printf` output `-12`?
|
||||
Which format specifiers were probably used to yield `printf` output `-12`?
|
||||
Back: `d` or `i`
|
||||
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
|
||||
|
@ -219,7 +219,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`x`} format specifier(s) output a(n) {lowercase hexadecimal `unsigned int`}.
|
||||
The {`x`} format specifier outputs a {lowercase hexadecimal `unsigned int`}.
|
||||
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
|
||||
<!--ID: 1707852083063-->
|
||||
|
@ -227,7 +227,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier(s) were probably used to yield `printf` output `7af`?
|
||||
Which format specifier were probably used to yield `printf` output `7af`?
|
||||
Back: `x`
|
||||
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
|
||||
|
@ -236,7 +236,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`X`} format specifier(s) output a(n) {uppercase hexadecimal `unsigned int`}.
|
||||
The {`X`} format specifier outputs an {uppercase hexadecimal `unsigned int`}.
|
||||
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
|
||||
<!--ID: 1707852083074-->
|
||||
|
@ -244,7 +244,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier(s) were probably used to yield `printf` output `7AF`?
|
||||
Which format specifier were probably used to yield `printf` output `7AF`?
|
||||
Back: `X`
|
||||
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
|
||||
|
@ -262,7 +262,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`o`} format specifier(s) output a(n) {octal `unsigned int`}.
|
||||
The {`o`} format specifier outputs an {octal `unsigned int`}.
|
||||
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
|
||||
<!--ID: 1707852083091-->
|
||||
|
@ -279,7 +279,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`s`} format specifier(s) output a(n) {`NUL`-terminated string}.
|
||||
The {`s`} format specifiers outputs a {`NUL`-terminated string}.
|
||||
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
|
||||
<!--ID: 1707852083100-->
|
||||
|
@ -287,7 +287,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier(s) were probably used to yield `printf` output `abc`?
|
||||
Which format specifier was probably used to yield `printf` output `abc`?
|
||||
Back: `s`
|
||||
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
|
||||
|
@ -296,7 +296,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`c`} format specifier(s) output a(n) {`char` character}.
|
||||
The {`c`} format specifier outputs a {`char` character}.
|
||||
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
|
||||
<!--ID: 1707852083109-->
|
||||
|
@ -304,7 +304,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier(s) were probably used to yield `printf` output `a`?
|
||||
Which format specifier was probably used to yield `printf` output `a`?
|
||||
Back: `c`
|
||||
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
|
||||
|
@ -313,7 +313,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The {`p`} format specifier(s) output a(n) {`void*` address}.
|
||||
The {`p`} format specifier outputs a {`void*` address}.
|
||||
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
|
||||
<!--ID: 1707852083117-->
|
||||
|
@ -321,7 +321,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which format specifier(s) were probably used to yield `printf` output `0b80000000`?
|
||||
Which format specifier was probably used to yield `printf` output `0b80000000`?
|
||||
Back: `p`
|
||||
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
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
---
|
||||
title: Additive Principle
|
||||
TARGET DECK: Obsidian::STEM
|
||||
FILE TAGS: combinatorics set
|
||||
tags:
|
||||
- combinatorics
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The **additive principle** states that two finite and disjoint sets $A$ and $B$ satisfy $$|A \cup B| = |A| + |B|$$
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the additive principle state?
|
||||
Back: Given finite and disjoint sets $A$ and $B$, $|A \cup B| = |A| + |B|$.
|
||||
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: 1708217738464-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
The additive property applies to sets exhibiting what two properties?
|
||||
Back: Finiteness and disjointedness.
|
||||
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: 1708217738473-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Why does $|A \cup B| \neq |A| + |B|$ in the general sense?
|
||||
Back: Members of $A \cap B$ are counted twice erroneously.
|
||||
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: 1708346613616-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which C construct corresponds to the additive property?
|
||||
Back: `union`
|
||||
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).
|
||||
Tags: c
|
||||
<!--ID: 1708221293486-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do we denote $A$ and $B$ are disjoint using standard set notation?
|
||||
Back: $A \cap B = \varnothing$
|
||||
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: 1708217738491-->
|
||||
END%%
|
||||
|
||||
## References
|
||||
|
||||
* 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).
|
|
@ -1,89 +1,3 @@
|
|||
---
|
||||
title: Combinatorics
|
||||
TARGET DECK: Obsidian::STEM
|
||||
FILE TAGS: combinatorics set
|
||||
tags:
|
||||
- combinatorics
|
||||
- set
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The **additive principle** states that two finite and disjoint sets $A$ and $B$ satisfy $$|A \cup B| = |A| + |B|$$
|
||||
|
||||
The **multiplicative principle** states that two finite sets $A$ and $B$ satisfy $$|A \times B| = |A| \cdot |B|$$
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the additive principle state?
|
||||
Back: Given finite and disjoint sets $A$ and $B$, $|A \cup B| = |A| + |B|$.
|
||||
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: 1708217738464-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the multiplicative principle state?
|
||||
Back: Given finite sets $A$ and $B$, $|A \times B| = |A| \cdot |B|$.
|
||||
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: 1708217738469-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
The additive property applies to sets exhibiting what two properties?
|
||||
Back: Finiteness and disjointedness.
|
||||
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: 1708217738473-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
The multiplicative property applies to sets exhibiting what property?
|
||||
Back: Finiteness.
|
||||
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: 1708217738477-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The additive principle is to {$\cup$} whereas the multiplicative principle is to {$\times$}.
|
||||
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: 1708217738480-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
If $A$ is finite, how is $A \times B$ rewritten as $|A|$ disjoint sets?
|
||||
Back: Given $A = \{a_1, \ldots, a_n\}$, $(\{a_1\} \times B) \cup \cdots \cup (\{a_n\} \times B)$.
|
||||
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: 1708217738483-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
If $B$ is finite, how is $A \times B$ rewritten as $|B|$ disjoint sets?
|
||||
Back: Given $B = \{b_1, \ldots, b_n\}$, $(A \times \{b_1\}) \cup \cdots \cup (A \times \{b_n\})$.
|
||||
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: 1708217738487-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How do we denote $A$ and $B$ are disjoint using standard set notation?
|
||||
Back: $A \cap B = \varnothing$
|
||||
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: 1708217738491-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How is the cartesian product $A \times B$ defined?
|
||||
Back: $A \times B = \{\langle x, y \rangle : x \in A \land y \in B\}$
|
||||
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: 1708217738494-->
|
||||
END%%
|
||||
|
||||
## References
|
||||
|
||||
* 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).
|
|
@ -0,0 +1,120 @@
|
|||
---
|
||||
title: Combinatorics
|
||||
TARGET DECK: Obsidian::STEM
|
||||
FILE TAGS: combinatorics set
|
||||
tags:
|
||||
- combinatorics
|
||||
- set
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
The **multiplicative principle** states that two finite sets $A$ and $B$ satisfy $$|A \times B| = |A| \cdot |B|$$
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does the multiplicative principle state?
|
||||
Back: Given finite sets $A$ and $B$, $|A \times B| = |A| \cdot |B|$.
|
||||
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: 1708217738469-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
The multiplicative property applies to sets exhibiting what property?
|
||||
Back: Finiteness.
|
||||
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: 1708217738477-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
{`union`} is to the additive property whereas {`struct`} is to the multiplicative property.
|
||||
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).
|
||||
Tags: c
|
||||
<!--ID: 1708221293483-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
Which C construct corresponds to the multiplicative property?
|
||||
Back: `struct`
|
||||
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).
|
||||
Tags: c
|
||||
<!--ID: 1708221293489-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
The additive principle is to {$\cup$} whereas the multiplicative principle is to {$\times$}.
|
||||
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: 1708217738480-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
If $A$ is finite, how is $A \times B$ rewritten as $|A|$ disjoint sets?
|
||||
Back: Given $A = \{a_1, \ldots, a_n\}$, $(\{a_1\} \times B) \cup \cdots \cup (\{a_n\} \times B)$.
|
||||
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: 1708217738483-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
If $B$ is finite, how is $A \times B$ rewritten as $|B|$ disjoint sets?
|
||||
Back: Given $B = \{b_1, \ldots, b_n\}$, $(A \times \{b_1\}) \cup \cdots \cup (A \times \{b_n\})$.
|
||||
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: 1708217738487-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How is the cartesian product $A \times B$ defined?
|
||||
Back: $A \times B = \{\langle x, y \rangle : x \in A \land y \in B\}$
|
||||
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: 1708217738494-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How many functions exist between $\{1, 2, 3, 4, 5\}$ and $\{a, b, c, d\}$?
|
||||
Back: $4 \cdot 4 \cdot 4 \cdot 4 \cdot 4 = 4^5$
|
||||
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: 1708221293492-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How many functions exist between finite sets $A$ and $B$?
|
||||
Back: $|B|^{|A|}$
|
||||
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: 1708221293496-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What combinatorial concept explains the number of functions between two finite sets?
|
||||
Back: The multiplicative principle.
|
||||
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: 1708351482412-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How is the "count of three letter license plates" reimagined as a count of functions?
|
||||
Back: As the number of functions from $\{1, 2, 3\}$ to $\{A, B, \ldots, Z\}$.
|
||||
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: 1708221293499-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
How is the "maximum unsigned $w$-bit number" reimagined as a count of functions?
|
||||
Back: As one less than the number of functions from $\{1, 2, \ldots, w\}$ to $\{0, 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).
|
||||
<!--ID: 1708221293502-->
|
||||
END%%
|
||||
|
||||
## References
|
||||
|
||||
* 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).
|
|
@ -207,7 +207,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does incrementing `NF` do?
|
||||
What two things does incrementing `NF` do?
|
||||
Back: Creates the field and rebuilds the record.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1707829863717-->
|
||||
|
@ -215,7 +215,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
What does decrementing `NF` do?
|
||||
What two things does decrementing `NF` do?
|
||||
Back: Throws away fields and rebuilds the record.
|
||||
Reference: Robbins, Arnold D. “GAWK: Effective AWK Programming,” October 2023. [https://www.gnu.org/software/gawk/manual/gawk.pdf](https://www.gnu.org/software/gawk/manual/gawk.pdf)
|
||||
<!--ID: 1707829863726-->
|
||||
|
|
|
@ -19,6 +19,14 @@ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in
|
|||
<!--ID: 1706994861304-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What set operation parallels conjunction?
|
||||
Back: $\cap$
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1708221293474-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What name is given to $\lor$ operands?
|
||||
|
@ -27,6 +35,14 @@ Reference: Gries, David. *The Science of Programming*. Texts and Monographs in
|
|||
<!--ID: 1706994861306-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What set operation parallels disjunction?
|
||||
Back: $\cup$
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1708221293479-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What C logical operator corresponds to $\neg$?
|
||||
|
|
|
@ -606,7 +606,7 @@ Basic
|
|||
What is the role of $E$ in textual substitution $E_e^x$?
|
||||
Back: It is the expression in which free occurrences of $x$ are replaced.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707762304126-->
|
||||
<!--ID: 1708347042194-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
|
@ -614,7 +614,7 @@ Basic
|
|||
What is the role of $e$ role in textual substitution $E_e^x$?
|
||||
Back: It is the expression that is evaluated and substituted into $E$.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707762304127-->
|
||||
<!--ID: 1708347042199-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
|
@ -622,7 +622,7 @@ Basic
|
|||
What is the role of $x$ in textual substitution $E_e^x$?
|
||||
Back: It is the identifier matching free occurrences in $E$ that are replaced.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707762304129-->
|
||||
<!--ID: 1708347042203-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
|
@ -651,7 +651,7 @@ END%%
|
|||
|
||||
%%ANKI
|
||||
Basic
|
||||
Why might $E_e^x = E$ be an equivalence despite identifier $x$ existing in $E$?
|
||||
If $x \neq e$, why might $E_e^x = E$ be an equivalence despite $x$ existing in $E$?
|
||||
Back: If the only occurrences of $x$ in $E$ are bound.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707762304135-->
|
||||
|
@ -708,7 +708,7 @@ END%%
|
|||
%%ANKI
|
||||
Basic
|
||||
What is the role of $\bar{e}$ role in textual substitution $E_{\bar{e}}^{\bar{x}}$?
|
||||
Back: It is the expressions that are evaluated and substituted into $E$.
|
||||
Back: It is the expressions that are substituted into $E$.
|
||||
Reference: Gries, David. *The Science of Programming*. Texts and Monographs in Computer Science. New York: Springer-Verlag, 1981.
|
||||
<!--ID: 1707762304127-->
|
||||
END%%
|
||||
|
|
|
@ -35,6 +35,21 @@ Tags: linux::cli
|
|||
<!--ID: 1706668253908-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Basic
|
||||
What command can we run to print POSIX signals to the terminal?
|
||||
Back: `kill -l`
|
||||
Reference: Cooper, Mendel. “Advanced Bash-Scripting Guide,” n.d., 916.
|
||||
<!--ID: 1708265979300-->
|
||||
END%%
|
||||
|
||||
%%ANKI
|
||||
Cloze
|
||||
{`ascii`} is to ASCII as {`kill -l`} is to POSIX signals.
|
||||
Reference: Cooper, Mendel. “Advanced Bash-Scripting Guide,” n.d., 916.
|
||||
<!--ID: 1708265979304-->
|
||||
END%%
|
||||
|
||||
### SIGHUP (1)
|
||||
|
||||
A process receives a `SIGHUP` signal when the terminal it is attached to goes away before it finishes executing.
|
||||
|
@ -143,4 +158,5 @@ END%%
|
|||
|
||||
## References
|
||||
|
||||
* Cooper, Mendel. “Advanced Bash-Scripting Guide,” n.d., 916.
|
||||
* Dowling, “A List of Signals and What They Mean.”
|
||||
|
|
Loading…
Reference in New Issue