From 3f78015c6dba6b4686d9e9cdf800a57218a4cac0 Mon Sep 17 00:00:00 2001 From: Zheyuan Wu <60459821+Trance-0@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:28:03 -0600 Subject: [PATCH] update page structures --- pages/CSE347/Exam_reviews/CSE347_E2.md | 54 ++++++++++++++++++++++++++ pages/CSE347/_meta.js | 5 ++- pages/CSE442T/_meta.js | 5 ++- pages/Math4111/Math4111_L1.md | 4 +- pages/Math4111/_meta.js | 5 ++- pages/Math4111/{index.mdx => index.md} | 0 pages/Math429/_meta.js | 5 ++- 7 files changed, 68 insertions(+), 10 deletions(-) create mode 100644 pages/CSE347/Exam_reviews/CSE347_E2.md rename pages/Math4111/{index.mdx => index.md} (100%) diff --git a/pages/CSE347/Exam_reviews/CSE347_E2.md b/pages/CSE347/Exam_reviews/CSE347_E2.md new file mode 100644 index 0000000..ba4d7d2 --- /dev/null +++ b/pages/CSE347/Exam_reviews/CSE347_E2.md @@ -0,0 +1,54 @@ +# Exam 2 Review + +## Reductions + +We say that a problem $A$ reduces to a problem $B$ if there is a **polynomial time** reduction function $f$ such that for all $x$, $x \in A \iff f(x) \in B$. + +To prove a reduction, we need to show that the reduction function $f$: + +1. runs in polynomial time +2. $x \in A \iff f(x) \in B$. + +### Useful results from reductions + +1. $B$ is at least as hard as $A$ if $A \leq B$. +2. If we can solve $B$ in polynomial time, then we can solve $A$ in polynomial time. +3. If we want to solve problem $A$, and we already know an efficient algorithm for $B$, then we can use the reduction $A \leq B$ to solve $A$ efficiently. +4. If we want to show that $B$ is NP-hard, we can do this by showing that $A \leq B$ for some known NP-hard problem $A$. + +$P$ is the class of problems that can be solved in polynomial time. $NP$ is the class of problems that can be verified in polynomial time. + +We know that $P \subseteq NP$. + +### NP-complete problems + +A problem is NP-complete if it is in $NP$ and it is also NP-hard. + +#### NP + +A problem is in $NP$ if + +1. there is a polynomial size certificate for the problem, and +2. there is a polynomial time verifier for the problem that takes the certificate and checks whether it is a valid solution. + +#### NP-hard + +A problem is NP-hard if every instance of $NP$ hard problem can be reduced to it in polynomial time. + +List of known NP-hard problems: + +1. 3-SAT (or SAT) +2. Independent Set +3. Vertex Cover +4. 3-coloring +5. Hamiltonian Cycle +6. Hamiltonian Path + +## Approximation Algorithms + +## Randomized Algorithms + +## Online Algorithms + + + diff --git a/pages/CSE347/_meta.js b/pages/CSE347/_meta.js index ef2ee9d..cf64ff0 100644 --- a/pages/CSE347/_meta.js +++ b/pages/CSE347/_meta.js @@ -1,6 +1,7 @@ export default { - index: { - display: 'hidden' + index: "Course Description", + "---":{ + type: 'separator' }, Exam_reviews: "Exam reviews", CSE347_L1: "Lecture 1", diff --git a/pages/CSE442T/_meta.js b/pages/CSE442T/_meta.js index 3b0c90a..8bab2a3 100644 --- a/pages/CSE442T/_meta.js +++ b/pages/CSE442T/_meta.js @@ -1,6 +1,7 @@ export default { - index: { - display: 'hidden' + index: "Course Description", + "---":{ + type: 'separator' }, Exam_reviews: "Exam reviews", CSE442T_L1: "Lecture 1", diff --git a/pages/Math4111/Math4111_L1.md b/pages/Math4111/Math4111_L1.md index 552cba6..c5c24a5 100644 --- a/pages/Math4111/Math4111_L1.md +++ b/pages/Math4111/Math4111_L1.md @@ -1,8 +1,8 @@ # Lecture 1 -## Introduction +## Introduction -Reading is not recommended before class, it;s hard. +Reading is not recommended before class, it's hard. ## Chapter 1: The real number and complex number systems diff --git a/pages/Math4111/_meta.js b/pages/Math4111/_meta.js index bc371f6..0924e21 100644 --- a/pages/Math4111/_meta.js +++ b/pages/Math4111/_meta.js @@ -1,6 +1,7 @@ export default { - index: { - display: 'hidden' + index: "Course Description", + "---":{ + type: 'separator' }, Exam_reviews: "Exam reviews", Math4111_L1: "Lecture 1", diff --git a/pages/Math4111/index.mdx b/pages/Math4111/index.md similarity index 100% rename from pages/Math4111/index.mdx rename to pages/Math4111/index.md diff --git a/pages/Math429/_meta.js b/pages/Math429/_meta.js index ebe89c4..b988539 100644 --- a/pages/Math429/_meta.js +++ b/pages/Math429/_meta.js @@ -1,6 +1,7 @@ export default { - index: { - display: 'hidden' + index: "Course Description", + "---":{ + type: 'separator' }, Math429_L1: "Lecture 1", Math429_L2: "Lecture 2",