Skip to content

Commit

Permalink
group definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
tomli380576 committed Nov 10, 2023
1 parent b650a0f commit c93e1a6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion Lecture Notes/W2 - Linear Programming.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ icon: check-circle
# W2 - Linear Programming


!!!warning
!!!warning Notation
We will use $\bold x$ to indicate a vector, $x_i$ to indicate the element of $\bold x$. The $\leqslant, \geqslant$ comparators are element–wise comparison. $\bold 0$ is the zero vector.
!!!

Expand Down
51 changes: 31 additions & 20 deletions Lecture Notes/W6 - Dynamic Programming Pt 2.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,26 @@ $$

Assuming unit costs $b, h$ are independent of time $t$, we have:

!!!secondary **Prop.** Don’t produce if we have inventory
!!!secondary

##### ****Prop.**** Don’t produce if we have inventory

$$
a_t > 0\implies s_t = 0
$$

If it is optimal to produce during any time period $t$, then the starting inventory is 0
!!!

!!!secondary **Prop.** If we produce, produce enough to cover integer amount of time periods
---

##### ****Prop.**** If we produce, produce enough to cover integer amount of time periods

If it is optimal to produce in stage $t$ (so $a_t > 0$ for some $t$), then it is optimal to produce an amount that exactly covers the demand for $t, t+1, \cdots, t+j$ for some $0\leqslant j\leqslant T-t$.
!!!

!!! **Lemma.** Equivalent optimality equation
!!!

##### ****Lemma.**** Equivalent optimality equation

Using the previous 2 properties, we only need to find the number of time periods $j$ to cover when we produce. If we produce enough to cover $j$ periods, we move to time $t+j+1$.

Expand All @@ -126,7 +131,9 @@ with base cases $v_{T+1} = 0, s_1 = 0$.

### Markov Chain Review

!!!info **Def.** Discrete Time Markov Chain
!!!info

##### ****Def.**** Discrete Time Markov Chain


A discrete, time homogeneous Markov chain on state space $S$ with transition matrix $P$ and initial distribution $\alpha$ is a sequence of random states $X_n\in S$ such that:
Expand All @@ -145,29 +152,20 @@ The elements $p_{ij}$ in $P$ represents:
$$
p_{ij} = \Bbb P(X_{t+1} = j\mid X_t = i)
$$
!!!

!!!secondary **Prop.** $n$ step transition probability

It’s the $i,j$ th entry in $P^n$.

$$
\begin{aligned}
\Bbb P(X_n = j\mid X_0 = i) &= \Bbb P(X_{m+n}= j\mid X_m = i) \\&= P^n_{ij}
\end{aligned}
$$
!!!
---

!!!info **Def.** Communicate
##### ****Def.**** Communicate

2 states $i, j\in S$ communicates if they are accessible from each other.

$$
i\lrarr j \coloneqq i\to j\text{ and }j \to i
$$
!!!

!!!info **Def.** Closed Subset
---

##### ****Def.**** Closed Subset

A subset of state space $T\sub S$ is closed if any of the states in $T$ is ever entered, the chain cannot leave $T$. In terms of transition probability:

Expand All @@ -178,6 +176,19 @@ $$
The entire state space is always closed.
!!!

!!!secondary

##### ****Prop.**** $n$ step transition probability

It’s the $i,j$ th entry in $P^n$.

$$
\begin{aligned}
\Bbb P(X_n = j\mid X_0 = i) &= \Bbb P(X_{m+n}= j\mid X_m = i) \\&= P^n_{ij}
\end{aligned}
$$
!!!


### Markov decision process with finite time

Expand Down Expand Up @@ -264,7 +275,7 @@ $$
$$
!!!

=== [!badge size="l" variant="warning" text="Ex.1"] Stochastic Shortest Paths
=== ****Example.**** Stochastic Shortest Paths

```mermaid
graph LR
Expand Down
12 changes: 7 additions & 5 deletions Lecture Notes/W7 - Convex Optimization.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@ icon: circle

## Definitions

!!!info **Def.** Convex Set
!!!info

##### ****Def.**** Convex Set

A set $S\sub\R^n$ is convex if for all $\bold{x,y}\in S,\lambda\in[0,1]$, the line connecting $\bold{x,y}$ is also in $S$.

$$
\lambda \bold x + (1-\lambda)\bold y \in S
$$

!!!
---

!!!info **Def.** Convex Function
##### ****Def.**** Convex Function

A function $f:\R^n\to \R$ is convex iff the epigraph of $f$ (region above $f$) is convex.

Expand Down Expand Up @@ -97,7 +99,7 @@ f_1(\bold x) = x_1^2 + x_2^2 - 1\\
f_2(\bold x) = e^{x_1} - x_2 - 1\\
$$

<!-- [!embed](https://www.desmos.com/calculator/sskqjyfkbl?embed) -->
[!embed](https://www.desmos.com/calculator/sskqjyfkbl?embed)

We can see that the overlapped region is convex.

Expand Down Expand Up @@ -232,5 +234,5 @@ $$
\sum^p_{j=0}\mu_jh_j(\bold x) = 0\qquad \sum^m_{i=1}f_i(\bold x)\leqslant 0
$$

So there's no constraint on $mu_j$, and we need $\lambda_i\geqslant 0$ for $\sum^m_{i=1}\lambda_if_i(\bold x)\leqslant 0$ to hold.
So there's no constraint on $\mu_j$, and we need $\lambda_i\geqslant 0$ for $\sum^m_{i=1}\lambda_if_i(\bold x)\leqslant 0$ to hold.

0 comments on commit c93e1a6

Please sign in to comment.