Combinatorics matrix on counting strategies.

c-declarations
Joshua Potter 2024-02-23 12:08:50 -07:00
parent 15001806d0
commit c1a19058ef
4 changed files with 78 additions and 5 deletions

View File

@ -172,14 +172,14 @@
"_journal/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
"_journal/2024-02/2024-02-16.md": "e701902e369ec53098fc2deed4ec14fd",
"binary/integer-encoding.md": "ed39771ee9de86423f75fda74b8c5aa2",
"combinatorics/index.md": "f9de9671fdb6068ef2bb5e63051734be",
"combinatorics/index.md": "9a85e8858c50c9797243d6d01e1dcbe7",
"_journal/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629",
"_journal/2024-02/2024-02-17.md": "7c37cb10515ed3d2f5388eaf02a67048",
"combinatorics/multiplicative-principle.md": "eae60248d68ba8bd2da5e4c3fea70109",
"combinatorics/additive-principle.md": "e968028670f95ee9a7c5499ff7cb6792",
"_journal/2024-02-19.md": "30d16c5373deb9cb128d2e7934ae256a",
"_journal/2024-02/2024-02-18.md": "67e36dbbb2cac699d4533b5a2eaeb629",
"combinatorics/permutations.md": "606b4b2b8018797ca54857112235d96e",
"combinatorics/permutations.md": "bde773a70e212e669ff4b8bae0f1d1f0",
"combinatorics/combinations.md": "6fc179a9bf4e3958f28c4c3f7da5cda0",
"_journal/2024-02-20.md": "b85ba0eeeb16e30a602ccefabcc9763e",
"_journal/2024-02/2024-02-19.md": "df1a9ab7ab89244021b3003c84640c78",
@ -189,7 +189,7 @@
"algebra/radices.md": "0fcd901c798eaed8075ff1375e2429dd",
"_journal/2024-02-22.md": "e01f1d4bd2f7ac2a667cdfd500885a2a",
"_journal/2024-02/2024-02-21.md": "f423137ae550eb958378750d1f5e98c7",
"_journal/2024-02-23.md": "9750fc77ccd67fd29dc5af0cdc0d16b7",
"_journal/2024-02-23.md": "75eec3feffa90a219de77151771fe3fe",
"_journal/2024-02/2024-02-22.md": "312e55d57868026f6e80f7989a889c2b",
"c17/strings.md": "bbe8983602adbeb38eff214beddedd84",
"c17/index.md": "78576ee41d0185df82c59999142f4edb",

View File

@ -8,7 +8,7 @@ title: "2024-02-23"
- [x] OGS (1 Life & Death Problem)
- [ ] Korean (Read 1 Story)
- [ ] Interview Prep (1 Practice Problem)
- [ ] Log Work Hours (Max 3 hours)
- [x] Log Work Hours (Max 3 hours)
* 101weiqi (serial numbers)
* Q-28857
@ -17,3 +17,6 @@ title: "2024-02-23"
* Q-10929
* Q-10924
* Q-9107
* Read about extension and truncation of integral values using unsigned and two's-complement encoding.
* Read through last sections of "Discrete Mathematics: An Open Introduction"'s first chapter.
* I took a few little notes but I didn't pay as close attention to these sections as others.

View File

@ -1,3 +1,71 @@
---
title: Combinatorics
TARGET DECK: Obsidian::STEM
FILE TAGS: combinatorics set
tags:
- combinatorics
- set
---
## Overview
When selecting objects, we can use the given table to hint at what counting strategy we should use:
Order | Repeats | Answer Shape | Reference
----- | ------- | ------------------ | ---------
Yes | Yes | $n^k$ | `-`
Yes | No | $(n)_k$ | [[permutations#Falling Factorials]]
No | Yes | $\binom{n + k}{k}$ | [[combinations#Stars and Bars]]
No | No | $\binom{n}{k}$ | [[combinations]]
%%ANKI
Basic
What does it mean for order to matter?
Back: We get different outcomes if the same objects are selected in different orders.
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: 1708715147778-->
END%%
%%ANKI
Basic
What does it mean for repeats to be allowed?
Back: The same object can be selected multiple 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: 1708715147781-->
END%%
%%ANKI
Basic
If order matters and repeats are allowed, the number of selections is usually formatted in what way?
Back: $n^k$
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: 1708715147783-->
END%%
%%ANKI
Basic
If order matters and repeats are disallowed, the number of selections is usually formatted in what way?
Back: $(n)_k$ (falling factorial)
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: 1708715147784-->
END%%
%%ANKI
Basic
If order does not matter and repeats are allowed, the number of selections is usually formatted in what way?
Back: $\binom{n + k}{k}$ (stars and bars)
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: 1708715147786-->
END%%
%%ANKI
Basic
If order does not matter and repeats are disallowed, the number of selections is usually formatted in what way?
Back: $\binom{n}{k}$ (combinations)
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: 1708715147787-->
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).

View File

@ -174,6 +174,8 @@ Reference: Oscar Levin, *Discrete Mathematics: An Open Introduction*, 3rd ed., n
<!--ID: 1708366788613-->
END%%
## Falling Factorials
If we generalize to choosing $k \leq n$ elements of $k$ objects, we can calculate the $k$-permutation of $n$. This is denoted as $(n)_k$, sometimes called the **falling factorial**. $$(n)_k = \frac{n!}{(n - k)!}$$
The derivation works by noting that we have $n - 0$ possible ways to pick the first object, $n - 1$ ways to pick the second, up until $n - (k - 1)$ ways to pick the last object.