forked from world-class/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cheatsheets for CM1020 Discrete Mathemathics (world-class#22)
* init dm personal dir * add set theory file * add set builder notation * add section on powersets * add section on set operations * generate PDF for set theory * add chapter on universal set, compelement and laws * add laws and identities of sets * add section on partition set * generate pdf for universal set, complement and laws doc * fix typo * rename src file * fix typo, generate PDFs * update README, reference PDFs * add functions doc * add function info pic to functions doc * expand injective, surjective and bijective functions * add section on composition * section on inverses * add section on injective/bijective/surjective proofs * add section on exponential and logarithmic functions * expand section on floor or ceiling, convert phi to emptyset * restruct floor and ceiling section * update PDFs * fix typo, update PDF * reference Propositional Logic in README * rename title * adjust sentence * track postulates of boolean algebra chapter * add basic theorems to boolean algebra * update README * add section on boolean functions * generate pdf for boolean algebra * start logic gates chapter * add circuits to logic gates * update README, generate pdf for logic gates * update pdf for boolean algebra * update logic gates pdf * add simplification of circuits to logic gates * adjust widh of pictures * fix typo * formatting * update boolean algebra pdf * change Proof ref * add graph chapter, track assets * expand walks, paths and other concepts * expand concepts * update transitive closure graph * update section levels * expand degree sequence of graphs section * track new assets * adjust width of pictures in graph chapter * expand graph chapter, create PDF * update README * create graph subdir for assets * start chapter on graph isomorphism * todo on dijkstra's algorithm * create PDF for graph isomorphism * update README * add chapter on trees * add section on spanning trees * add section on rooted trees * update README * add section on binary search trees * generate PDF for Trees * add chapter on Relations * update README * expand Matrix and Graph sections on Relations chapter * add second graph example * add section on properties * add section on transitivity * generate PDF for relations * add chapter on equivalence relations & classes * add section on partial and total order * expand Relation cheatsheet with more notes * update README, generate PDFs for Relations and Equivalences * update README * init Basics of Counting * add chapter on binomial coefficients * update README * generate PDF for binomial coefficients * update README, remove TODOs * regenerate all PDFs * fix typo in README
- Loading branch information
Showing
82 changed files
with
2,119 additions
and
0 deletions.
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
level-4/discrete-mathematics/student-notes/fabio-lama/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# About | ||
|
||
Listed here is a collection of cheatsheet by topic. Those cheatsheets do not | ||
explain the topics in depth, but rather serve as quick lookup documents. | ||
Therefore, the course material provided by the lecturer should still be studied | ||
and understood. Not everything that is tested at the mid-terms or final exams is | ||
covered and the Author does not guarantee that the cheatsheets are free of | ||
errors. | ||
|
||
* [Set Theory](./cheatsheet_set_theory.pdf) | ||
* [Universal Set, Complement and Laws](./cheatsheet_universal_set_complement_laws.pdf) | ||
* [Functions](./cheatsheet_functions.pdf) | ||
* [Propositional & First-order Logic](/level-4/fundamentals-of-computer-science/student-notes/fabio-lama/cheatsheet_propositional_logic.pdf) | ||
* (covered in the Authors _Fundamentals of Computer Science_ module notes) | ||
* [Postulates of Boolean Algebra](./cheatsheet_postulates_boolean_algebra.pdf) | ||
* [Logic Gates](./cheatsheet_logic_gates.pdf) | ||
* [Proofs](/level-4/fundamentals-of-computer-science/student-notes/fabio-lama/cheatsheet_proofs.pdf) | ||
* (covered in the Authors _Fundamentals of Computer Science_ module notes) | ||
* [Graph Theory](./cheatsheet_graphs.pdf) | ||
* [Graph Theory: Isomorphism](./cheatsheet_graphs_isomorphism.pdf) | ||
* [Trees](./cheatsheet_trees.pdf) | ||
* [Relations](./cheatsheet_relations.pdf) | ||
* [Equivalence Relations & Classes](./cheatsheet_equivalence.pdf) | ||
* [Combinatorics](/level-4/computational-mathematics/student-notes/fabio-lama/cheatsheet_probability_combinatorics.pdf) | ||
* (covered in the Authors _Computational Mathematics_ module notes) | ||
* [Binomial Coefficients & Identities](./cheatsheet_binomial_coefficients.pdf) | ||
|
||
# Building | ||
|
||
_NOTE_: This step is only necessary if you chose to modify the base documents. | ||
|
||
The base documents are written in [AsciiDoc](https://asciidoc.org/) and can be | ||
found in the `src/` directory. | ||
|
||
The following dependencies must be installed (Ubuntu): | ||
|
||
```console | ||
$ apt install -y ruby-dev wkhtmltopdf | ||
$ gem install asciidoctor | ||
$ chmod +x build.sh | ||
``` | ||
|
||
To build the documents (PDF version): | ||
|
||
```console | ||
$ ./build.sh pdf | ||
``` | ||
|
||
Optionally, for the HTML version: | ||
|
||
```console | ||
$ ./build.sh html | ||
``` | ||
|
||
and for the PNG version: | ||
|
||
```console | ||
$ ./build.sh png | ||
``` | ||
|
||
The generated output can be deleted with `./build.sh clean`. | ||
|
||
# Disclaimer | ||
|
||
The Presented Documents ("cheatsheets") by the Author ("Fabio Lama") are | ||
summaries of specific topics. The term "cheatsheet" implies that the Presented | ||
Documents are intended to be used as learning aids or as references for | ||
practicing and does not imply that the Presented Documents should be used for | ||
inappropriate practices during exams such as cheating or other offenses. | ||
|
||
The Presented Documents are heavily based on the learning material provided by | ||
the University of London, respectively the VLeBooks Collection database in the | ||
Online Library and the material provided on the Coursera platform. | ||
|
||
The Presented Documents may incorporate direct or indirect definitions, | ||
examples, descriptions, graphs, sentences and/or other content used in those | ||
provided materials. **At no point does the Author present the work or ideas | ||
incorporated in the Presented Documents as their own.** |
77 changes: 77 additions & 0 deletions
77
level-4/discrete-mathematics/student-notes/fabio-lama/build.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
#!/bin/bash | ||
|
||
# Because `make` sucks. | ||
|
||
gen_html() { | ||
# Remove suffix and prefix | ||
FILE=$1 | ||
OUT=${FILE%.adoc} | ||
HTML_OUT="cheatsheet_${OUT}.html" | ||
|
||
asciidoctor $FILE -o ${HTML_OUT} | ||
} | ||
|
||
# Change directory to src/ in order to have images included correctly. | ||
cd "$(dirname "$0")/src/" | ||
|
||
case $1 in | ||
html) | ||
for FILE in *.adoc | ||
do | ||
# Generate HTML file. | ||
gen_html ${FILE} | ||
done | ||
|
||
# Move up from src/ | ||
mv *.html ../ | ||
;; | ||
pdf) | ||
for FILE in *.adoc | ||
do | ||
# Generate HTML file. | ||
gen_html ${FILE} | ||
|
||
# Convert HTML to PDF. | ||
PDF_OUT="cheatsheet_${OUT}.pdf" | ||
wkhtmltopdf \ | ||
--enable-local-file-access \ | ||
--javascript-delay 2000\ | ||
$HTML_OUT $PDF_OUT | ||
done | ||
|
||
# Move up from src/ | ||
mv *.pdf ../ | ||
|
||
# Cleanup temporarily generated HTML files. | ||
rm *.html > /dev/null 2>&1 | ||
;; | ||
png | img) | ||
for FILE in *.adoc | ||
do | ||
# Generate HTML file. | ||
gen_html ${FILE} | ||
|
||
# Convert HTML to PNG. | ||
IMG_OUT="cheatsheet_${OUT}.png" | ||
wkhtmltopdf \ | ||
--enable-local-file-access \ | ||
--javascript-delay 2000\ | ||
$HTML_OUT $IMG_OUT | ||
done | ||
|
||
# Move up from src/ | ||
mv *.png ../ | ||
|
||
# Cleanup temporarily generated HTML files. | ||
rm *.html > /dev/null 2>&1 | ||
;; | ||
clean) | ||
rm *.html > /dev/null 2>&1 | ||
rm *.png > /dev/null 2>&1 | ||
rm ../*.html > /dev/null 2>&1 | ||
rm ../*.png > /dev/null 2>&1 | ||
;; | ||
*) | ||
echo "Unrecognized command" | ||
;; | ||
esac |
Binary file added
BIN
+796 KB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_binomial_coefficients.pdf
Binary file not shown.
Binary file added
BIN
+580 KB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_equivalence.pdf
Binary file not shown.
Binary file added
BIN
+2.09 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_functions.pdf
Binary file not shown.
Binary file added
BIN
+3.76 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_graphs.pdf
Binary file not shown.
Binary file added
BIN
+1.17 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_graphs_isomorphism.pdf
Binary file not shown.
Binary file added
BIN
+1.33 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_logic_gates.pdf
Binary file not shown.
Binary file added
BIN
+1.13 MB
...4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_postulates_boolean_algebra.pdf
Binary file not shown.
Binary file added
BIN
+2.14 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_relations.pdf
Binary file not shown.
Binary file added
BIN
+2.51 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_set_theory.pdf
Binary file not shown.
Binary file added
BIN
+3.53 MB
level-4/discrete-mathematics/student-notes/fabio-lama/cheatsheet_trees.pdf
Binary file not shown.
Binary file added
BIN
+1.11 MB
...iscrete-mathematics/student-notes/fabio-lama/cheatsheet_universal_set_complement_laws.pdf
Binary file not shown.
Binary file added
BIN
+52.3 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/circuit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+46.1 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/full_adder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+57.3 KB
...crete-mathematics/student-notes/fabio-lama/src/assets/graphs/adjacency_list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+73.6 KB
...ete-mathematics/student-notes/fabio-lama/src/assets/graphs/adjacency_matrix.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+78.2 KB
...ete-mathematics/student-notes/fabio-lama/src/assets/graphs/bipartite_graphs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+143 KB
...mathematics/student-notes/fabio-lama/src/assets/graphs/degree_in_out_vertex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+63.7 KB
...rete-mathematics/student-notes/fabio-lama/src/assets/graphs/degree_sequence.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+38.7 KB
...screte-mathematics/student-notes/fabio-lama/src/assets/graphs/degree_vertex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+45.4 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/graphs/edge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+58.1 KB
...screte-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_circuit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+92.2 KB
...crete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_complete.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+75.9 KB
...thematics/student-notes/fabio-lama/src/assets/graphs/graph_complete_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44.1 KB
...e-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_connectivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+113 KB
...discrete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_cycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+91.1 KB
...ete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_euler_path.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+216 KB
...rete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_example_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+152 KB
...rete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_example_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+146 KB
...rete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_example_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+55.4 KB
...hematics/student-notes/fabio-lama/src/assets/graphs/graph_hamiltonian_cycle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+109 KB
...mathematics/student-notes/fabio-lama/src/assets/graphs/graph_regular_cycles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+48.2 KB
...matics/student-notes/fabio-lama/src/assets/graphs/graph_strong_connectivity.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+61.3 KB
...discrete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_trail.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+136 KB
...ematics/student-notes/fabio-lama/src/assets/graphs/graph_transitive_closure.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+122 KB
.../discrete-mathematics/student-notes/fabio-lama/src/assets/graphs/graph_walk.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+102 KB
...te-mathematics/student-notes/fabio-lama/src/assets/graphs/isomorphic_graphs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+29.1 KB
...matics/student-notes/fabio-lama/src/assets/graphs/isomorphic_graphs_example.png
Oops, something went wrong.
Binary file added
BIN
+62.1 KB
...crete-mathematics/student-notes/fabio-lama/src/assets/graphs/regular_graphs.png
Oops, something went wrong.
Binary file added
BIN
+69.1 KB
...thematics/student-notes/fabio-lama/src/assets/graphs/regular_graphs_example.png
Oops, something went wrong.
Binary file added
BIN
+42.3 KB
...screte-mathematics/student-notes/fabio-lama/src/assets/graphs/simple_graphs.png
Oops, something went wrong.
Binary file added
BIN
+31.9 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/graphs/vertex.png
Oops, something went wrong.
Binary file added
BIN
+13.4 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/half_adder.png
Oops, something went wrong.
Binary file added
BIN
+114 KB
...ematics/student-notes/fabio-lama/src/assets/injective_surjective_bijective.jpeg
Oops, something went wrong.
Binary file added
BIN
+47.4 KB
...hematics/student-notes/fabio-lama/src/assets/injective_surjective_bijective.png
Oops, something went wrong.
Binary file added
BIN
+326 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/logic_gates.jpg
Oops, something went wrong.
Binary file added
BIN
+126 KB
...4/discrete-mathematics/student-notes/fabio-lama/src/assets/pascals_triangle.png
Oops, something went wrong.
Binary file added
BIN
+46.9 KB
...4/discrete-mathematics/student-notes/fabio-lama/src/assets/relation_digraph.png
Oops, something went wrong.
Binary file added
BIN
+43.9 KB
...discrete-mathematics/student-notes/fabio-lama/src/assets/relation_digraph_2.png
Oops, something went wrong.
Binary file added
BIN
+13.1 MB
...l-4/discrete-mathematics/student-notes/fabio-lama/src/assets/set_operations.png
Oops, something went wrong.
Binary file added
BIN
+44.6 KB
...screte-mathematics/student-notes/fabio-lama/src/assets/trees/acyclic_graphs.png
Oops, something went wrong.
Binary file added
BIN
+43.9 KB
...-mathematics/student-notes/fabio-lama/src/assets/trees/acyclic_graphs_trees.png
Oops, something went wrong.
Binary file added
BIN
+53.1 KB
...thematics/student-notes/fabio-lama/src/assets/trees/binary_search_example_1.png
Oops, something went wrong.
Binary file added
BIN
+52.9 KB
...thematics/student-notes/fabio-lama/src/assets/trees/binary_search_example_2.png
Oops, something went wrong.
Binary file added
BIN
+52.2 KB
...thematics/student-notes/fabio-lama/src/assets/trees/binary_search_example_3.png
Oops, something went wrong.
Binary file added
BIN
+52.6 KB
...thematics/student-notes/fabio-lama/src/assets/trees/binary_search_example_4.png
Oops, something went wrong.
Binary file added
BIN
+53.2 KB
...thematics/student-notes/fabio-lama/src/assets/trees/binary_search_example_5.png
Oops, something went wrong.
Binary file added
BIN
+57.6 KB
.../discrete-mathematics/student-notes/fabio-lama/src/assets/trees/binary_tree.png
Oops, something went wrong.
Binary file added
BIN
+52.6 KB
...iscrete-mathematics/student-notes/fabio-lama/src/assets/trees/directed_tree.png
Oops, something went wrong.
Binary file added
BIN
+61.8 KB
level-4/discrete-mathematics/student-notes/fabio-lama/src/assets/trees/forest.png
Oops, something went wrong.
Binary file added
BIN
+68.7 KB
...te-mathematics/student-notes/fabio-lama/src/assets/trees/isomorphic_example.png
Oops, something went wrong.
Binary file added
BIN
+86.5 KB
...rete-mathematics/student-notes/fabio-lama/src/assets/trees/isomorphic_trees.png
Oops, something went wrong.
Binary file added
BIN
+128 KB
...4/discrete-mathematics/student-notes/fabio-lama/src/assets/trees/m_ary_tree.png
Oops, something went wrong.
Binary file added
BIN
+72.4 KB
...ete-mathematics/student-notes/fabio-lama/src/assets/trees/minimum_cost_tree.png
Oops, something went wrong.
Binary file added
BIN
+121 KB
...discrete-mathematics/student-notes/fabio-lama/src/assets/trees/regular_tree.png
Oops, something went wrong.
Binary file added
BIN
+36.4 KB
.../discrete-mathematics/student-notes/fabio-lama/src/assets/trees/rooted_tree.png
Oops, something went wrong.
Binary file added
BIN
+73.6 KB
...screte-mathematics/student-notes/fabio-lama/src/assets/trees/spanning_trees.png
Oops, something went wrong.
Binary file added
BIN
+159 KB
...iscrete-mathematics/student-notes/fabio-lama/src/assets/trees/special_trees.png
Oops, something went wrong.
Binary file added
BIN
+65.8 KB
...4/discrete-mathematics/student-notes/fabio-lama/src/assets/trees/sub_graphs.png
Oops, something went wrong.
Binary file added
BIN
+157 KB
...rete-mathematics/student-notes/fabio-lama/src/assets/trees/terminology_tree.png
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
...-4/discrete-mathematics/student-notes/fabio-lama/src/binomial_coefficients.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
= Cheatsheet - Binomial Coefficients & Identities | ||
Fabio Lama <fabio[email protected]> | ||
:description: Module: CM1020- Discrete Mathematics, started 25. October 2022 | ||
:doctype: article | ||
:sectnums: 4 | ||
:stem: | ||
|
||
== Binomial Theorem | ||
|
||
An expression consisting of two terms, connected by a stem:[+] or stem:[-] sign, | ||
is called a **binomial expression**. As we increase the power of binomials, | ||
expanding them becomes more and more complicated: | ||
|
||
[stem] | ||
++++ | ||
(x+y)^1 = x + y\ | ||
(x+y)^2 = x^2 + 2xy + y^2\ | ||
(x+y)^3 = x^3 + 3x^2y + 3xy^2 + y^3\ | ||
... | ||
++++ | ||
|
||
The **binomial theorem** helps us to simplify this expansion. Let stem:[x] and | ||
stem:[y] be variables, and stem:[n] a non-negative integer. The expansion of | ||
stem:[(x+y)^n] can be formalized as: | ||
|
||
[stem] | ||
++++ | ||
(x+y)^n = sum_(k=0)^n ((n),(k)) x^k y^(n-k) | ||
++++ | ||
|
||
The **binomial coefficients** are the coefficients in the binomial theorem and | ||
denoted as: | ||
|
||
[stem] | ||
++++ | ||
((n),(k)) = (n!)/(k!(n-k)!) | ||
++++ | ||
|
||
Here we say **"n choose k"**. | ||
|
||
For example: | ||
|
||
> What is the coefficient of stem:[x^8 y^7] in the expansion of stem:[(3x | ||
-y)^15]. | ||
|
||
We can view the expression as stem:[(3x+ (-y))^15]. By the binomial theorem: | ||
|
||
[stem] | ||
++++ | ||
(3x+ (-y))^15 = sum_(k=0)^15 ((15),(k)) (3x)^k (-y)^(15-k) | ||
++++ | ||
|
||
The coefficient of stem:[x^8 y^7] in the expansion is obtained when stem:[k=8]: | ||
|
||
[stem] | ||
++++ | ||
((15),(8)) (3)^8 (-1)^7 = -3^8 (15!)/(8!7!) | ||
++++ | ||
|
||
=== Pascal's Identity | ||
|
||
If stem:[n] and stem:[k] are integers with stem:[n >= k >= 1], then: | ||
|
||
[stem] | ||
++++ | ||
((n),(k)) + ((n),(k-1)) = ((n+1),(k)) | ||
++++ | ||
|
||
=== Pascal's Triangle | ||
|
||
**Pascals' triangle** is a number triangle with numbers arranged in staggered rows | ||
such that **stem:[a_(n,r)] is the binomial coefficient stem:[((n),(r))]**. | ||
|
||
image::./assets/pascals_triangle.png[align=center, width=600] |
61 changes: 61 additions & 0 deletions
61
level-4/discrete-mathematics/student-notes/fabio-lama/src/equivalence.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
= Cheatsheet - Equivalence Relations & Classes | ||
Fabio Lama <fabio[email protected]> | ||
:description: Module: CM1020- Discrete Mathematics, started 25. October 2022 | ||
:doctype: article | ||
:sectnums: 4 | ||
:stem: | ||
|
||
NOTE: You should read the cheatsheet on _Relations_, too. | ||
|
||
== Definitions | ||
|
||
=== Equivalence Relation | ||
|
||
Let stem:[R] be a relation of elements on set stem:[S]. stem:[R] is an | ||
**equivalence relation** if and only if stem:[R] is **reflexive**, **symmetric** | ||
and **transitive**. | ||
|
||
=== Equivalence Classes | ||
|
||
Let stem:[R] be an **equivalence relation** on a set stem:[S]. Then, the | ||
**equivalence class** of stem:[a in S] is the **subset** of stem:[S] containing | ||
all the **elements related** to stem:[a] through stem:[R]: | ||
|
||
[stem] | ||
++++ | ||
[a] = {x: x in S " and " xRa} | ||
++++ | ||
|
||
For example: | ||
|
||
[stem] | ||
++++ | ||
S = {1, 2, 3, 4, 5}\ | ||
R = {(a, b) in S^2 | a - b " is an even number" } | ||
++++ | ||
|
||
The set stem:[R] has two equivalence classes: | ||
|
||
[stem] | ||
++++ | ||
[1] = [3] = [5] = {1, 3, 5}\ | ||
[2] = [4] = {2, 4} | ||
++++ | ||
|
||
== Partial & Total Order | ||
|
||
Let stem:[R] be a relation on elements in a set stem:[S]. stem:[R] is a | ||
**partial order** if and only if stem:[R] is **reflexive**, **anti-symmetric** | ||
and **transitive**. | ||
|
||
Additionally, stem:[R] is a **total** order if and only if: | ||
|
||
* stem:[R] is a **partial order**. | ||
* stem:[AA (a, b) in S] we have **either** stem:[aRb] **or** stem:[bRa]. | ||
|
||
For example, the following relation is a total order: | ||
|
||
[stem] | ||
++++ | ||
R = {(a, b) in ZZ^2 | a <= b} | ||
++++ |
Oops, something went wrong.