Solve The version of the Euclidean algorithm described above and by Euclid can take many subtraction steps to find the GCD when one of the given numbers is much bigger than the other.. S
Euclid’s algorithm and Bezout’s identity
a Using Euclid’s algorithm to calculate gcd(2021, 1000 + m) and lcm(2021, 1000 + m), where m is the last 3 digits of your student ID
Let’s trace Euclid’s algorithm to calculate gcd(2021;1765) gcd(2021;1765)
lcm(a;b) = = = = 3567065 b Apply above result(s) in to find 5 integer solution pairs (x,y) of this equation:
Due to the form of equation: ax + by = d, so
Once a solution pair (x, y) is found, additional pairs may be generated by , where k is any integer.
Recurrence relation
Solve the recurrence relation an = 8a – 15an−1 n−2 with a0 = 5 and a1 = m, where m is the last 2 digits of your student ID.
Suppose a sequence a , a , a ,… satisfies the recurrence relation0 1 2 an = 8a – 15an−1 n−2 for every integer n 2, with initial conditions a0 = 5 and a = m = 65.1
This sequence sitisfies part of the hypothesis of the single-root theorem because it satisfies a second-order linear homogeneous recurrence relation with constant coefficients(A = 8 and B = –15) To check that it satisfies the second part of the hypothesis, examine the characteristic equation. t 2 – 8t + 15 = 0
By the quadratic formula t = 5, t = 3 [since t 2 – 8t + 15 = (t – 5)*(t – 3)] and so the roots are distinct Thus it follows from the distinct-roots theorem that the sequence is given by the explicit formula. an = C*5 + D*3 n n for each integer n 0 Where C and D are the numbers whose values are determined by the fact that a = 5; 0 a1 = 65 To find C and D, write a = 5 = C + D and a = 65 = 5*C + 3*D0 1
Now substitute C = 25 and D = 20 into formula to conclude that – an = 5 2 + n – 20*3 n for each integer n 0
Set
a Create a set Γ of characters from your case-insensitive non-diacritical full name For example, the set corresponding with “Tôn Đức Thắng” is Δ = {A, C, D, G, H, N, O, T, U}
My full name: “Nguyễn Võ Công Huy”
Γ = {C, E, G, H, N, O, U, V, Y} b Find the union, intersect, non-symmetric difference, and symmetric difference of Γ and Δ, where Γ and Δ are from question 3a.
Relations
Let be a binary relation defined on 2 integers as follow: ℜ
∀ , N (aRb↔� ∈ � |(�.�)) where m is the last 2 digits of your student ID.
Is R reflexive, symetric, anti-symetric, transitive? Prove your answer.
Rewrite the binary relation defined on 2 integers subtituted:
R is not reflexive: To show that R is reflexive, it is necessary to show that
By definition of R, this means that
For every a N , 65|(a.a),∈ which is false because a.a = a and a N such that 65 a As a counterexample, let a 2 ∃ ∈ ∤ 2
R is symmetric: To show that R is symmetric, it is necessary to show that
For every a N, if aRb then bRa∈
By definition of R, this means that
For every a N, if 65|(a.b) then 65|(b.a)∈ which is true because a.b = b.a by the commutative law of multiplication F1(A-1 Epp)Hence R is symmetric.
R is not anti-symmetric: To show that R is anti-symmetric, it is necessary to show that
For every a N, if aRb and bRa then b = a∈
By definition of R, this means that
For every a N, if 65|(a.b) and 65|(b.a) then b = a∈ which is false because 65|(a.b) and 65|(b.a) but a and b can be different As a counterexample, a = 1 and b = 65 then 65|(a.b) and 65|(b.a) but 1 ≠ 65.
Hence R is not anti-symmetric.
R is not transitive: To show that R is transitive, it is necessary to show that
For every a ,b, c N, if a R b and b R c then a R c∈
By definition of R, this means that:
For every a,b,c N, if 65|(a + b) and 65|(b+ c) then 65|(a + c).∈ which is false because a = 42, b = 23, c = 107 then 2|(a + b) and 2|(b+ c) but 65 (a + c).∤Hence R is not transitive.
Multiplicative inversion
a Study and present your knowledge about Extended Euclidean algorithm to compute multiplicative inverses in modular structures.
The version of the Euclidean algorithm described above (and by Euclid) can take many subtraction steps to find the GCD when one of the given numbers is much bigger than the other A more efficient version of the algorithm shortcuts these steps, instead replacing the larger of the two numbers by its remainder when divided by the smaller of the two (with this version, the algorithm stops when reaching a zero remainder) With this improvement, the algorithm never requires more steps than five times the number of digits (base 10) of the smaller integer. b Apply the algorithm to find (m+1) (mod 101) where m is the last 2 digits of your -1 student ID
Let’s trace Euclid’s algorithm to calculate gcd(66,101)
Kruskal’s algorithm
Propose a solution for circuit-checking in Kruskal's algorithm.
This is a graph example to find a solution for circuit-checking in Kruskal’s algorithm as follow:
Step 1: Remove all loops and ParallelEdges (*Note: In case of parallel edges, keep the one which has the least cost associated and remove all others).
Step 2: Create a set of edges and weight, and arrange them in an ascending order of weightage (cost).
Step 3: Add the edge which has the least weightage.
Now we start adding edges to the graph The least cost is 2 and edges involved are B,D and D,T We add them Adding them does not violate spanning tree properties, so we continue to our next edge selection.
Next cost is 3, and associated edges are A,C and C,D We add them again
Next cost in the table is 4, and we observe that adding it will create a circuit in the graph So we ignore it In the process we shall avoid all edges that create a circuit.
We observe that edges with cost 5 and 6 also create circuits We ignore them and move on Now we are left with only one node to be added Between the two least cost edges available 7 and 8, we shall add the edge with cost 7 By add edge S,A we have minimumcos spanning tree.
Eulerian circuit
a Does the following graph have an Eulerian circuit or Eulerian path? Why?
The graph have Eulerian circuit the graph have an Eulerian path that starts and ends on the same vertex (this thing is proven in c) and a necessary conditional for the existence of Eulerian circuit is that all vertives in the graph have an even degree, and stated without proof that connected graphs with all vertives of even degree have an Eulerian circuit The first complete proof of this latter claim was published posthumously in
Thus, the graph don’t have Eulerian path.
Let be a binary relation defined on 2 integers as follow: ℜ
∀ , N (aRb↔ � ∈ � |( �.� )) where m is the last 2 digits of your student ID.
Is R reflexive, symetric, anti-symetric, transitive? Prove your answer.
Rewrite the binary relation defined on 2 integers subtituted:
R is symmetric: To show that R is symmetric, it is necessary to show that
For every a N, if aRb then bRa ∈
By definition of R, this means that
For every a N, if 65|(a.b) then 65|(b.a) ∈ which is true because a.b = b.a by the commutative law of multiplication F1(A-1 Epp)Hence R is symmetric.
R is not anti-symmetric: To show that R is anti-symmetric, it is necessary to show that
For every a N, if aRb and bRa then b = a ∈
By definition of R, this means that
For every a N, if 65|(a.b) and 65|(b.a) then b = a ∈ which is false because 65|(a.b) and 65|(b.a) but a and b can be different As a counterexample, a = 1 and b = 65 then 65|(a.b) and 65|(b.a) but 1 ≠ 65.
Hence R is not anti-symmetric.
R is not transitive: To show that R is transitive, it is necessary to show that
For every a ,b, c N, if a R b and b R c then a R c ∈
By definition of R, this means that:
For every a,b,c N, if 65|(a + b) and 65|(b+ c) then 65|(a + c) ∈ which is false because a = 42, b = 23, c = 107 then 2|(a + b) and 2|(b+ c) but 65 (a + c) ∤ Hence R is not transitive.
Question 5: Multiplicative invertion a Study and present your knowledge about Extended Euclidean algorithm to compute multiplicative inverses in modular structures.
The version of the Euclidean algorithm described above (and by Euclid) can
Let’s trace Euclid’s algorithm to calculate gcd(66,101)
Propose a solution for circuit-checking in Kruskal's algorithm.
Step 1: Remove all loops and ParallelEdges (*Note: In case of parallel edges, keep the one which has the least cost associated and remove all others).
Step 2: Create a set of edges and weight, and arrange them in an ascending order of
Next cost is 3, and associated edges are A,C and C,D We add them again