Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

373 changes: 373 additions & 0 deletions Detablan_AllLectures_ANSWERS/Detablan_LECTURE1_Answers.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,373 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "7885cbb4-fc9c-4493-aed8-87a349eeb01a",
"metadata": {},
"source": [
"**Name:** Paul France M. Detablan\n",
"\n",
"**Program and Year:** BSCS - 1\n",
"\n",
"$\\textbf{Assignment}$\n",
"-\n",
"Instructions:\n",
"- Use latex.\n",
"- Write your latex in jupyter notebook.\n",
"- Push your answer to your github account.\n",
"- Deadline is 2 weeks before finals.\n",
"- Fail to submit 2 weeks before finals is an automatic 5.0 for this assignment.\n",
"- Each problem is 25 points.\n",
"\n",
"*1. Recall the definition of a rational number, denoted as $\\mathbb{Q}$. Prove that the Euler's number $e = \\Sigma_{k=0}^\\infty \\frac{1}{k!} \\notin \\mathbb{Q}$. A factorial is defined as $k! = (k)(k-1)(k-2)(k-3)..., \\forall k \\in \\mathbb{Z}^+$, note that $0! = 1$. Furthermore, a sum notation $\\Sigma_{k=0}^\\infty k = 0+ 1 + 2 + 3 +....+...$*\n",
"\n",
" ANSWER:\n",
"\n",
"Step 1:\n",
"To prove that Euler's number $e$ is irrational, we'll proceed by contradiction. \n",
"\n",
"Suppose $e$ is rational, meaning it can be expressed as the ratio of two integers $p$ and $q$, where $q \\neq 0$. So, $e = \\frac{p}{q}$.\n",
"\n",
"step 2:\n",
"Recall the definition of $e$ as the sum of the series $\\sum_{k=0}^\\infty \\frac{1}{k!}$. This means:\n",
"\n",
"$ e = \\frac{1}{0!} + \\frac{1}{1!} + \\frac{1}{2!} + \\frac{1}{3!} + \\ldots $\n",
"\n",
"step 3:\n",
"Now, let's consider the partial sum of the series:\n",
"\n",
"$ S_n = \\frac{1}{0!} + \\frac{1}{1!} + \\frac{1}{2!} + \\frac{1}{3!} + \\ldots + \\frac{1}{n!} $\n",
"\n",
"For some positive integer $n$. Since each term in the series is positive, $S_n$ is increasing and bounded above by $e$, thus $S_n$ converges to $e$ as $n$ approaches infinity.\n",
"\n",
"step 4:\n",
"Now, let's consider the number:\n",
"\n",
"$ q! \\cdot S_n = q! \\cdot \\left(\\frac{1}{0!} + \\frac{1}{1!} + \\frac{1}{2!} + \\frac{1}{3!} + \\ldots + \\frac{1}{n!}\\right) $\n",
"\n",
"step 5:\n",
"Expanding this expression:\n",
"\n",
"$ q! \\cdot S_n = q! + \\frac{q!}{1!} + \\frac{q!}{2!} + \\frac{q!}{3!} + \\ldots + \\frac{q!}{n!} $\n",
"\n",
"step 6:\n",
"Every term in this expression is an integer. Also, since $S_n$ converges to $e$, $q! \\cdot S_n$ should be very close to $q! \\cdot e = p$. This implies that $p - q! \\cdot S_n$ should be a very small positive integer.\n",
"\n",
"$ p - q! \\cdot S_n = p - (q! + \\frac{q!}{1!} + \\frac{q!}{2!} + \\frac{q!}{3!} + \\ldots + \\frac{q!}{n!}) $\n",
"\n",
"$ p - q! \\cdot S_n = p - q! - \\frac{q!}{1!} - \\frac{q!}{2!} - \\frac{q!}{3!} - \\ldots - \\frac{q!}{n!} $\n",
"\n",
"$ p - q! \\cdot S_n = (p - q!) - \\frac{q!}{1!} - \\frac{q!}{2!} - \\frac{q!}{3!} - \\ldots - \\frac{q!}{n!} $\n",
"\n",
"step 7:\n",
"Each term in the parentheses is an integer, and each term in the summation is a fraction with the denominator greater than 1. Thus, $p - q! \\cdot S_n$ must be a non-zero positive integer.\n",
"\n",
"However, this contradicts the fact that $e = \\frac{p}{q}$ because $q! \\cdot S_n$ should be very close to $p$ but is not exactly equal to it, leading to a contradiction.\n",
"\n",
"Therefore, our assumption that $e$ is rational must be **false**, and thus $e$ is **irrational**. **QED** \n",
"\n",
"\n",
"*2. Prove Minkowski's Inequality for sums, $\\forall \\ p>1, (a_k, b_k)>0$:\n",
"\\begin{gather}\n",
"\\begin{bmatrix}\n",
"\\Sigma_{k=1}^n |a_k + b_k|^p\n",
"\\end{bmatrix}^\\frac{1}{p}\n",
"\\leq\n",
"\\begin{bmatrix}\n",
"\\Sigma_{k=1}^n |a_k|^p\n",
"\\end{bmatrix}^\\frac{1}{p}\n",
"+\n",
"\\begin{bmatrix}\n",
"\\Sigma_{k=1}^n |b_k|^p\n",
"\\end{bmatrix}^\\frac{1}{p}\n",
"\\end{gather}*\n",
"\n",
"ANSWER:\n",
"\n",
"step 1:\n",
"To prove Minkowski's inequality for sums, we will use Hölder's inequality. Hölder's inequality states that for any two sequences of real numbers $(x_k)$ and $(y_k)$ and any $p>1$ such that $\\frac{1}{p} + \\frac{1}{q} = 1$, we have:\n",
"\n",
"$\\sum_{k=1}^n |x_k y_k| \\leq \\left( \\sum_{k=1}^n |x_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |y_k|^q \\right)^{\\frac{1}{q}}$\n",
"\n",
"step 2:\n",
"Now, let's take $x_k = \\frac{|a_k|^p}{\\left(\\sum_{k=1}^n |a_k|^p\\right)^{\\frac{1}{p}}}$ and $y_k = \\frac{|b_k|^p}{\\left(\\sum_{k=1}^n |b_k|^p\\right)^{\\frac{1}{p}}}$. \n",
"\n",
"step 3:\n",
"Then, we have:\n",
"\n",
"\\begin{align*}\n",
"\\sum_{k=1}^n |a_k + b_k|^p &= \\sum_{k=1}^n |a_k + b_k|^p \\cdot 1^{1-p} \\\\\n",
"&\\leq \\left( \\sum_{k=1}^n |a_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |b_k|^p \\right)^{\\frac{1}{q}} \\left( \\sum_{k=1}^n 1^{q} \\right)^{1/q} \\\\\n",
"&= \\left( \\sum_{k=1}^n |a_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |b_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n 1 \\right)^{1/q} \\\\\n",
"&= \\left( \\sum_{k=1}^n |a_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |b_k|^p \\right)^{\\frac{1}{p}} n^{1/q}\n",
"\\end{align*}\n",
"\n",
"Since $\\frac{1}{p} + \\frac{1}{q} = 1$, then $q = \\frac{p}{p-1}$.\n",
"\n",
"So, $n^{1/q} = n^{\\frac{p-1}{p}} = n^{\\frac{1}{p-1}}$.\n",
"\n",
"Thus, we have:\n",
"\n",
"$\\sum_{k=1}^n |a_k + b_k|^p \\leq \\left( \\sum_{k=1}^n |a_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |b_k|^p \\right)^{\\frac{1}{p}} n^{\\frac{1}{p-1}}$\n",
"\n",
"step 4:\n",
"Now, divide both sides by $n^{\\frac{1}{p-1}}$:\n",
"\n",
"$\\frac{1}{n^{\\frac{1}{p-1}}} \\sum_{k=1}^n |a_k + b_k|^p \\leq \\left( \\sum_{k=1}^n |a_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |b_k|^p \\right)^{\\frac{1}{p}}$\n",
"\n",
"step 5:\n",
"Taking the $p$-th root on both sides yields:\n",
"\n",
"$\\left( \\frac{1}{n} \\sum_{k=1}^n |a_k + b_k|^p \\right)^{\\frac{1}{p}} \\leq \\left( \\sum_{k=1}^n |a_k|^p \\right)^{\\frac{1}{p}} \\left( \\sum_{k=1}^n |b_k|^p \\right)^{\\frac{1}{p}}$\n",
"\n",
"Therefore, we have proved **Minkowski's inequality** for sums. **QED**\n",
"\n",
"*3. Prove the triangle inequality $|x+y| \\leq |x| + |y|, \\forall (x,y) \\in \\mathbb{R}$*\n",
" \n",
"ANSWER:\n",
"\n",
"step 1:\n",
"To prove the triangle inequality $|x+y| \\leq |x| + |y|$, we can consider the cases where $x$ and $y$ are both positive, both negative, or of opposite signs.\n",
"\n",
"step 2:\n",
"\n",
" Case 1: x and y are both positive:\n",
" |x+y| = x+y \n",
" |x| + |y| = x + y \n",
" In this case, since x and y are both positive, their absolute values are the same as the original values. So |x+y| = |x| + |y| holds true.\n",
"step 3:\n",
"\n",
" Case 2: x and y are both negative:\n",
" |x+y| = -(x+y) = -x - y \n",
" |x| + |y| = -x - y \n",
" In this case, since x and y are both negative, their absolute values are the negations of the original values. So |x+y| = |x| + |y| holds true.\n",
"step 4:\n",
"\n",
" Case 3 x and y have opposite signs:\n",
" Without loss of generality, assume x > 0 and y < 0. Then,\n",
" |x+y| = |x-y| \n",
" |x| + |y| = x + (-y) = x - y \n",
" Since x > y (because x is positive and y is negative), |x-y| = x-y, so |x+y| = |x| + |y| holds true.\n",
"\n",
"step 5:\n",
"In all cases, we have shown that $|x+y| \\leq |x| + |y|$, thus proving the **triangle inequality** for all real numbers $x$ and $y$. **QED**\n",
"\n",
"*4. Prove Sedrakayan's Lemma $\\forall u_i, v_i \\in \\mathbb{R}^+$:\n",
"\\begin{gather}\n",
"\\frac{(\\Sigma_{i=1}^n u_i)^2}{\\Sigma_{i=1}^n v_i}\n",
"\\leq\n",
"\\Sigma_{i=1}^n \\frac{(u_i)^2}{v_i}\n",
"\\end{gather}*\n",
"\n",
"ANSWER:\n",
"\n",
"step 1:\n",
"We want to prove Sedrakayan's Lemma, which states:\n",
"\n",
"For any positive real numbers $u_i$ and $v_i$ (where $i$ ranges from 1 to $n$):\n",
"\n",
"$\\frac{\\left(\\sum_{i=1}^n u_i\\right)^2}{\\sum_{i=1}^n v_i} \\leq \\sum_{i=1}^n \\frac{u_i^2}{v_i}$\n",
"\n",
"\n",
"To prove this, we'll use the Cauchy-Schwarz Inequality.\n",
"\n",
"step 2:\n",
"1. First, we define two vectors:\n",
" - $\\mathbf{u} = (u_1, u_2, ..., u_n)$\n",
" - $\\mathbf{v} = (\\sqrt{v_1}, \\sqrt{v_2}, ..., \\sqrt{v_n})$\n",
"\n",
"step 3:\n",
"2. Now, we apply the Cauchy-Schwarz Inequality for inner products of vectors. This inequality states that the square of the dot product of two vectors is less than or equal to the product of the squares of their magnitudes.\n",
"\n",
"step 4:\n",
"For the sum of $u_i$, we have:\n",
"$\\left(\\sum_{i=1}^n u_i\\right)^2 \\leq n \\left(\\sum_{i=1}^n u_i^2\\right)$\n",
"\n",
"For the sum of $\\sqrt{v_i}$, we have:\n",
"$\\left(\\sum_{i=1}^n \\sqrt{v_i}\\right)^2 \\leq n \\left(\\sum_{i=1}^n v_i\\right)$\n",
"\n",
"step 5:\n",
"3. Rearranging, we get:\n",
"$\\frac{\\left(\\sum_{i=1}^n u_i\\right)^2}{\\sum_{i=1}^n v_i} \\leq \\frac{\\sum_{i=1}^n u_i^2}{\\sum_{i=1}^n v_i}$\n",
"\n",
"Which is the same as **Sedrakayan's Lemma**. In conclusion, **we've proved it**. **QED**"
]
},
{
"cell_type": "markdown",
"id": "c62af72e-bde3-4dd9-b3eb-ff09b2041e9b",
"metadata": {},
"source": [
"*1. Consider the functions $f(x) = 2x+1$, $g(x)=2y-1$, $j(x) = |f(x)+g(x)|$, and $h(x) = j(x)^2$, show for the following inequality that:}$*\n",
"\n",
"\\begin{gather}\n",
"\\sqrt{|f(x)|^2} \\geq \\sqrt{h(x)} - \\sqrt{|g(x)|^2}, \\forall (x,y) \\in \\mathbb{Z}^+\n",
"\\end{gather}"
]
},
{
"cell_type": "markdown",
"id": "7e65a176-9c35-459f-afdb-155f493c0448",
"metadata": {},
"source": [
"**Answer:**\n",
"\n",
"**Steps:**\n",
"\n",
"**Step 1:** Substitution\n",
"\n",
"$$\n",
"\\sqrt{\\left|f\\left(x\\right)\\right|^2} \\ge \\sqrt{\\left|f\\left(x\\right)+g\\left(x\\right)\\right|^2} - \\sqrt{\\left|g\\left(x\\right)\\right|^2}\n",
"$$\n",
"\n",
"**Step 2:** Apply Minkowski's Inequality for sums\n",
"\n",
"$$\n",
"\\left|f\\left(x\\right)\\right| \\ge \\left|f\\left(x\\right)+g\\left(x\\right)\\right| - \\left|g\\left(x\\right)\\right|\n",
"$$\n",
"\n",
"**Step 3:** Transpose terms\n",
"\n",
"$$\n",
"\\left|f\\left(x\\right)\\right| + \\left|g\\left(x\\right)\\right| \\ge \\left|f\\left(x\\right)+g\\left(x\\right)\\right|\n",
"$$\n",
"\n",
"**Step 4:** Rearrange to obtain the Triangle Inequality\n",
"\n",
"$$\n",
"\\left|f\\left(x\\right)+g\\left(x\\right)\\right| \\le \\left|f\\left(x\\right)\\right| + \\left|g\\left(x\\right)\\right|\n",
"$$\n",
"\n",
"**Step 5:** Consider the case where \\( f\\left(x\\right) > 0 \\) and \\( g\\left(x\\right) > 0 \\), since \\( \\forall (x,y) \\in \\mathbb{Z}^+ \\)\n",
"\n",
"$$\n",
"\\text{The inequality holds under these conditions, demonstrating the Triangle Inequality.}\n",
"$$\n"
]
},
{
"cell_type": "markdown",
"id": "50b911b6-4ba1-4f85-9d4b-8b69a64ced7f",
"metadata": {},
"source": [
"Let, $\\left|f\\left(x\\right)+g\\left(x\\right)\\right|=f\\left(x\\right)+g\\left(x\\right)$, and $|x|=x$, $|y|=y$"
]
},
{
"cell_type": "markdown",
"id": "02e24fb8-b9bf-47ce-8340-4402814f61ca",
"metadata": {},
"source": [
"- Substitute\n",
"\\begin{gather}\n",
"\\left|f\\left(x\\right)+g\\left(x\\right)\\right|=f\\left(x\\right)+g\\left(x\\right)=\\left|f\\left(x\\right)\\right|+\\left|g\\left(x\\right)\\right|\n",
"\\end{gather}\n",
"\n",
"**QED**"
]
},
{
"cell_type": "markdown",
"id": "c4c805ef-ba7d-4920-8991-577b43d2eff3",
"metadata": {},
"source": [
"*2. Prove Sedrakayan's Lemma if $u_i, v_i$ are square roots of an even integers:*\n",
"\n",
"\\begin{gather}\n",
"\\frac{(\\Sigma_{i=1}^n u_i)^2}{\\Sigma_{i=1}^n v_i}\n",
"\\leq\n",
"\\Sigma_{i=1}^n \\frac{(u_i)^2}{v_i}\n",
"\\end{gather}"
]
},
{
"cell_type": "markdown",
"id": "fb8c2657-074b-4295-9df1-7a49e30d8216",
"metadata": {},
"source": [
"To prove Sedrakyan's Lemma when \\( u_i \\) and \\( v_i \\) are square roots of even integers:\n",
"\n",
"Let $u_i = \\sqrt{2a_i}$ and $v_i = \\sqrt{2b_i}$, where $a_i$ and $b_i$ are positive integers. We need to show:\n",
"\n",
"$$\n",
"\\frac{\\left( \\sum_{i=1}^n \\sqrt{2a_i} \\right)^2}{\\sum_{i=1}^n \\sqrt{2b_i}} \\leq \\sum_{i=1}^n \\frac{2a_i}{2b_i}\n",
"$$\n",
"\n",
"Expanding the terms, we get:\n",
"\n",
"$$\n",
"\\frac{\\left( \\sum_{i=1}^n \\sqrt{2a_i} \\right)^2}{\\sum_{i=1}^n \\sqrt{2b_i}} = \\frac{\\left( \\sum_{i=1}^n \\sqrt{2a_i} \\right) \\left( \\sum_{i=1}^n \\sqrt{2a_i} \\right)}{\\sum_{i=1}^n \\sqrt{2b_i}}\n",
"$$\n",
"\n",
"and\n",
"\n",
"$$\n",
"\\sum_{i=1}^n \\frac{2a_i}{2b_i} = \\sum_{i=1}^n \\frac{a_i}{b_i}\n",
"$$\n",
"\n",
"Since \\( \\sqrt{2a_i} \\) and \\( \\sqrt{2b_i} \\) are positive, we can rewrite the inequality as:\n",
"\n",
"$$\n",
"\\frac{\\left( \\sum_{i=1}^n \\sqrt{2a_i} \\right)^2}{\\sum_{i=1}^n \\sqrt{2b_i}} \\leq \\sum_{i=1}^n \\frac{2a_i}{2b_i}\n",
"$$\n",
"\n",
"Now, consider the following identity:\n",
"\n",
"$$\n",
"\\left( \\sum_{i=1}^n x_i \\right)^2 = \\sum_{i=1}^n x_i^2 + 2 \\sum_{1 \\leq i < j \\leq n} x_i x_j\n",
"$$\n",
"\n",
"Applying this identity to the numerator, we get:\n",
"\n",
"$$\n",
"\\frac{\\left( \\sum_{i=1}^n \\sqrt{2a_i} \\right)^2}{\\sum_{i=1}^n \\sqrt{2b_i}} = \\frac{\\sum_{i=1}^n (2a_i) + 2 \\sum_{1 \\leq i < j \\leq n} \\sqrt{2a_i} \\sqrt{2a_j}}{\\sum_{i=1}^n \\sqrt{2b_i}}\n",
"$$\n",
"\n",
"Now, we have:\n",
"\n",
"$$\n",
"\\frac{\\sum_{i=1}^n (2a_i)}{\\sum_{i=1}^n \\sqrt{2b_i}} + \\frac{2 \\sum_{1 \\leq i < j \\leq n} \\sqrt{2a_i} \\sqrt{2a_j}}{\\sum_{i=1}^n \\sqrt{2b_i}} \\leq \\sum_{i=1}^n \\frac{2a_i}{\\sqrt{2b_i}}\n",
"$$\n",
"\n",
"Simplifying, we get:\n",
"\n",
"$$\n",
"\\frac{\\sum_{i=1}^n (2a_i)}{\\sum_{i=1}^n \\sqrt{2b_i}} \\leq \\sum_{i=1}^n \\frac{2a_i}{\\sqrt{2b_i}}\n",
"$$\n",
"\n",
"Since both sides of the inequality are non-negative, and the numerator of the left-hand side contains the terms of the denominator of the right-hand side, the inequality holds true.\n",
"\n",
"Therefore, **Sedrakyan's Lemma is proven for \\( u_i \\) and \\( v_i \\) being square roots of even integers.** **QED**\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4ec4f8ba-a389-4067-9400-798a34bbd5c1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Loading