#import("@local/dtu-template:0.5.1"):* #show: dtu-note.with( course: "01017", course-name: "Discrete Mathematics", title: "Polynomials and the Extended Euclidean Algorithm - Exercises", date: datetime(year: 2025, month: 12, day: 4), author: "Rasmus Rosendahl-Kaa", semester: "Fall 2025" ) = Exercise 6.16 Let $p(x) = sum^n_(k=0) c_k x^k$ be a polynomial if the coefficients $c_0, dots , c_n$ are all integers where $c_0 eq.not 0$ as well as $c_n eq.not 0$. Let $QQ$ denominate the set of rational number, meaning fractions with integers in the numerator and the denominator. Then the following theorem is true: If $a/b in QQ$ with $"gcd"(a,b) = 1$, and if $p(a/b)=0$, then it is true that $a | c_0$ and $b | c_n$. / a): Show by the help of the above that the polynomial $p(x)=x^2-2$ does not have any rational roots. #solution()[ For $a | c_0$ and $b | c_n$ to be true, $a = 1,2$ and $b = 1$. If $p(x)$ has integer roots, they would divide $c_0 "and" c_n$ Here, we already have the only numbers that can divide $c_0 "and" c_n$. But neither $P(2/1) "nor" P(1/1)$ equals 0, so that must mean $p(x)$ does not have any rational roots. Only $a=b=1$ would have $"gcd"(a,b)=1$, but $p(1/1)$ still doesn't equal 0, so that must mean that $p(x)$ doesn't have rational roots. ] / b): Conclude that $sqrt(2) in.not QQ$ #solution()[ $p(x)$ has roots: $-sqrt(2)$ and $sqrt(2)$. Because we have what values $a,b$ ($a=b=1$) could be in $p(x)$, we can see that $1/1 in QQ$, $"gcd"(1,1)=1$, and that $a | c_0$ and $b | c_n$. But since we know that $sqrt(2)$ and $-sqrt(2)$ are roots, this means $p(sqrt(2))=p(-sqrt(2))=0$. But since we have that $1/1 eq.not sqrt(2)$, we can conclude that $sqrt(2) in.not QQ$. ] / c): Conclude in a similar fashion that $sqrt(5) in.not QQ$ #solution()[ We can observe a similar equation: $p(x)=x^2-5$. We can also observe that for the given theorem, then $a=b=1$ are the only value that they could have. But for similar reasons as before, $1/1 eq.not sqrt(5)$, so $sqrt(5) in.not QQ$. ] / d): Is it possible that $sqrt(5) − sqrt(2) ∈ QQ$? We actually do not know that yet. Show that $sqrt(5) - sqrt(2)$ is a root of the polynomial $q(x) = x^4 − 14x^2 + 9$. Show that$sqrt(5) - sqrt(2) in.not QQ$. #solution()[ $ p(sqrt(5)-sqrt(2)) = (sqrt(5)-sqrt(2))^4 - 14 dot (sqrt(5)-sqrt(2))^2 + 9\ $ $ (sqrt(5)-sqrt(2)) dot (sqrt(5)-sqrt(2)) &= sqrt(5)^2+sqrt(2)^2-2 dot sqrt(5) dot sqrt(2)\ &=5+2-2 dot sqrt(10) = 7 - 2 sqrt(10) $ $ p(sqrt(5)-sqrt(2)) &= (7 - 2 sqrt(10)) dot (7 - 2 sqrt(10)) - 14 dot (7 - 2 sqrt(10)) + 9\ &= 49 + 4 sqrt(10)^2 - 28 sqrt(10) - 14 dot 7 + 28 sqrt(10) + 9\ &= 49+40-14 dot 7+9\ &=98 - 98 = 0 $ $sqrt(5)-sqrt(2)$ is a root. The only $a,b$ we can have are $a=b=1$. 1 is not a root: $ q(1)=1^4-14+9 = -4 $ Therefore $sqrt(5)-sqrt(2) in.not QQ$ ] / e): (Extra, not in the curriculum) Prove the theorem in the beginning of the exercise. (Tip: Consider $p(a/b) = 0$ and multiply by the common denominator, such that all terms are integers. Thereafter use modulus arithmetic.) = Exercise 6.17 We will examine the execution time of Euclid’s algorithm / a): Prove as function of $deg(f(x))$ and $deg(g(x))$, how many iteration Euclid's algorithm uses at most, when it is executed on $f(x)$ and $g(x)$. #solution()[ Because we in the Euclidean Algorithm have that $deg(R_i) < deg(R_(i-1))$ aka the degree must always go down, and also have that $deg(R_1) < deg(M)$. Then the Euclidean Algorithm must use at most $deg(g(x))$ iterations, where $deg(g(x))