From c93e1a6f220f86ae43690b395584ce2281c9fa07 Mon Sep 17 00:00:00 2001 From: Zhongning Li <60045212+tomli380576@users.noreply.github.com> Date: Thu, 9 Nov 2023 17:00:04 -0800 Subject: [PATCH] group definitions --- Lecture Notes/W2 - Linear Programming.md | 2 +- .../W6 - Dynamic Programming Pt 2.md | 51 +++++++++++-------- Lecture Notes/W7 - Convex Optimization.md | 12 +++-- 3 files changed, 39 insertions(+), 26 deletions(-) diff --git a/Lecture Notes/W2 - Linear Programming.md b/Lecture Notes/W2 - Linear Programming.md index a33180c..fe7971b 100644 --- a/Lecture Notes/W2 - Linear Programming.md +++ b/Lecture Notes/W2 - Linear Programming.md @@ -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. !!! diff --git a/Lecture Notes/W6 - Dynamic Programming Pt 2.md b/Lecture Notes/W6 - Dynamic Programming Pt 2.md index e330d16..88c38d7 100644 --- a/Lecture Notes/W6 - Dynamic Programming Pt 2.md +++ b/Lecture Notes/W6 - Dynamic Programming Pt 2.md @@ -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$. @@ -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: @@ -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: @@ -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 @@ -264,7 +275,7 @@ $$ $$ !!! -=== [!badge size="l" variant="warning" text="Ex.1"] Stochastic Shortest Paths +=== ****Example.**** Stochastic Shortest Paths ```mermaid graph LR diff --git a/Lecture Notes/W7 - Convex Optimization.md b/Lecture Notes/W7 - Convex Optimization.md index 1206919..df08ac5 100644 --- a/Lecture Notes/W7 - Convex Optimization.md +++ b/Lecture Notes/W7 - Convex Optimization.md @@ -6,7 +6,9 @@ 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$. @@ -14,9 +16,9 @@ $$ \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. @@ -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) We can see that the overlapped region is convex. @@ -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.