Files
DTU-Noter/Diskret Mat/Polynomials and the Extended Euclidean Algorithm/Polynomials and the Extended Euclidean Algorithm - Exercises.typ

117 lines
4.9 KiB
Typst
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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 Euclids 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))<deg(f(x))$
]
/ b): Let $D(n)$ be an upper limit for the number of arithmetic operations it takes to execute a division of $f(x)$ by $g(x)$ with a remainder if $deg(f(x)), deg(g(x)) <= n$. By arithmetic operations we mean $+,,· "or" "/"$ of elements from the field, thus $RR$ or $CC$. Argue that $D(n) <= 2n^2$.
#solution()[
Imagine for the upper bound that $deg(f(x))=deg(g(x))=n$.
]
/ c):
/ d):
= Exercise 6.18
As usual with fractions, they can be reduced such that given $p(x)/q(x)$ if you by chance know that there exists a $t(x)$ such that $p(x)=t(x)p_1 (x)$ and $q(x)=t(x)q_1 (x)$, then we have:
$
p(x)/q(x)=(t(x)p_1 (x))/(t(x)q_1 (x)) = (p_1(x))/(q_1(x))
$
If you are just given a rational function $p(x)/q(x)$, describe a course of action to calculate the completely reduced fraction.
#solution()[
Calculate the roots of each of the functions, then divide the two. You would be able to remove all their common roots, and be left with a completely reduced fraction
]
= Exercise 6.19
Let $p(x)$ and $d(x)$ be polynomials both different from zero. Assume that $d(x) = d_1(x)d_2(x)$, where $"gcd"(d_1(x), d_2(x)) = 1$, and assume that $deg(p(x)) < deg(d(x))$. Show that there exists polynomials $p_1(x)$ and $p_2(x)$ such that
$
deg(p_1(x)) < deg(d_1(x)) "and" deg(p_2(x)) < deg(d_2(x))
$
and
$
p(x)/d(x)=(p_1(x))/(d_1(x)) + (p_2(x))/(d_2(x))
$
Tip: First multiply the wanted equation by $d(x)$
#solution()[
$
p(x)=p_1(x)d_2(x) + p_2(x)d_1(x)
$
]