Compare commits

...

2 Commits

Author SHA1 Message Date
336ee081c6
feat: w1 st2334 notes 2025-08-18 12:22:53 +08:00
204afd8bab
feat: w1 notes 2025-08-17 00:15:22 +08:00
7 changed files with 82 additions and 1 deletions

3
.gitmodules vendored
View File

@ -4,3 +4,6 @@
[submodule "cs4212/hw1-hellocaml-yadunut"]
path = cs4212/hw1-hellocaml-yadunut
url = https://github.com/cs4212/hw1-hellocaml-yadunut
[submodule "cs4212/week-02-x86lite"]
path = cs4212/week-02-x86lite
url = https://github.com/cs4212/week-02-x86lite

Binary file not shown.

View File

@ -30,3 +30,15 @@
- $L_1 dot L_2 = L_1L_2 = {x y : x in L_1, y in L_2}$
- $L^* = {x_1x_2...x_n : x_1, x_2, ... x_n in L, n in NN}$
- $L^+ = {x_1x_2...x_n : x_1, x_2, ... x_n in L, n gt.eq 1}$
=== Proof Structure
==== Set A = Set B
1. Show $A subset.eq B$
- Take *arbitrary* element $x in A$
- Use definition of A to show $x in B$
- Therefore, $A subset.eq B$
2. Show $B subset.eq A$
- Take *arbitrary* element $x in B$
- Use definition of B to show $x in A$
- Therefore, $B subset.eq A$
3. Since $A subset.eq B$ and $B subset.eq A$, $A = B$

@ -1 +1 @@
Subproject commit a976b25ebb1434189ba15627bab1720fb345f518
Subproject commit a152b7a34c9b2038b1588a3e28a5d156d41db0bf

@ -0,0 +1 @@
Subproject commit 4d81e478221715bf176adefc647f8b668d4ff4dc

BIN
st2334/main.pdf Normal file

Binary file not shown.

65
st2334/main.typ Normal file
View File

@ -0,0 +1,65 @@
#import "@preview/ilm:1.4.1": *
// #show: ilm.with(
// title: [],
// author: "Yadunand Prem",
// table-of-contents: none,
// )
#set text(lang: "en", font: ("SF Pro Display"))
#set heading(numbering: "1.")
#show raw: set text(font: "SF Mono")
= Reference
- Sample Space ($S$): Set of all possible outcomes of an experiment
- Can vary depending on the problem of interest
- Sample Point: Outcome of sample Space (Element)
- Event: Subset of sample space (Set)
== Set Operations
- $A union B = {x : x in A "or" x in B}$
- $A inter B = {x : x in A "and" x in B}$
- $A' = {x : x in S "and" x in.not A}$
- $limits(union.big)^n_(i=1) A_i = A_1 union A_2 union ... union A_n = {x: x in A_1 "or" " ... or" x in A_n}$
- Mutually exclusive / disjoint - $A inter B = emptyset$
- Contained - All in A are also elements in B, A is contained in B, $A subset B$ or $B supset A$
- Equivalent - $A subset B$ and $B subset A$, then $A = B$
== Set Operations
- $A inter A' = emptyset$
- $A inter emptyset = emptyset$
- $A union A' = S$
- $(A')' = A$
- $A union (B inter C) = (A union B) inter (A union C)$
- $A inter (B union C) = (A inter B) union (A inter C)$
- $A union B = A union (B inter A')$
- $A = (A inter B) union (A inter B')$
- $(A_1 union A_2 union ... union A_n)' = A_1^' inter A_2^' inter ... inter A_n^'$
- $(A_1 inter A_2 inter ... inter A_n)' = A_1^' union A_2^' union ... union A_n^'$
== Counting Methods
- Multiplication Principle - $r$ different experiments to be performed sequentially. Then there are $n_1n_2...n_r$ possible outcomes for $r$ experiments
- Addition Principle - experiment can be performed by $k$ different procedures. Suppose ways under different procedures *do not overlap*. Then total is $n_1 + ... + n_k$
- *Permutation* is selection of $r$ objects out of $n$. Order is taken into consideration.
$ P^n_r = n! / (n-r)! = n(n-1)(n-2)...(n-(r-1)) $ (When $r = n, P^n_n = n!$)
- *Combination* is selection of $r$ objects out of $n$, without regard for order.
$ vec(n, r) = n!/(r!(n-r!)) = vec(n, n-r) $
- Intuition: In terms of permutation, no of ways to choose and arrange $r$ objects out fo $n$ is $P_r^n$
- This can be also done by the following:
- Select $r$ objects out of $n$ without regard to order: $vec(n, r)$ ways
- For each combination, permute its $r$ objects: $P^r_r$ ways
- For each combination, permute its $r$ objects: $P^r_r$ ways
- $vec(n, r) times P^r_r = P^n_r$
== Probability
- Probability is chance or how likely a certain event may occur. Let $A$ be an event in an experiment. $P(A)$ is to quantify how likely $A$ may occur.
=== Axioms
Probability, $P(dot)$ is a function on the collection of events in the sample space satisfying:
- For any event $A$, $0 lt.eq P(A) lt.eq 1$
- For the sample space $P(S) = 1$
- For any 2 mutually exclusive event $A$ and $B$, that is $A inter B = emptyset$, $P(A union B) = P(A) + P(B)$
- $P(emptyset) = 0$
- $P(A') = 1-P(A)$
- $P(A) = P(A inter B) + P(A inter B')$
- $P(A union B) = P(A) + P(B) - P(A inter B)$
- $A subset B$, then $P(A) lt.eq P(B)$