The Principle of Induction
Building Block Law: The number 1 N is the basic building block for all positive integers. In other
words, every positive integer n N is a sum of 1s:
n = 1 + . + 1.
n
This property leads to the following principle.
Principle of M
>
Problem 5(a) : The list of data points consisting of primes:
>
(1)
Problem 5(b) : Using Maple's interpolation function interp:
>
(2)
(2)
>
(3)
(3)
Note that MAPLE does not sort the terms in increading or decreasing powers of t.
This can be done by using
Algebraic Methods
Algebra: the word was derived from the title of AlKhwarizmis book (written in Baghdad ca. 820 A.D.),
Hisab al-jabr wal-muqabala which means (roughly)
Calculation by restoration and reduction.
book was later called Al-Khwarizmis Algebra.
>
Problem 5 : The card deal problem
First solution: using the linalg package
>
(a) Defining the matrix A.
First define B = 13A:
>
(1)
>
Problem 7(b) : Find the constituent matrices of A.
For this, we need the eigenvalues of A, which we can find by using t
>
Problem 6 : The Jordan Canonical Form
First solution: using the linalg package
>
(a) Defining the matrix J, A and B
>
(1)
>
(2)
>
(3)
(b) : The Jordan canonical form of the matrices A and B:
>
(4)
Thus, J_A = diag(J(-2,1), J(2,4), J(2,2) and J_B = diag(
Math 211
Assignment 13 - Solutions
[2]
1. In oder to apply the Gram-Schmidt method, we rst observe that here the L2 -inner product of xi and xj
is given by
1
(xi xj ) =
1
i+j+1
1
i+j+1 x
xi+j dx =
1
1
2
i+j+1
1 (1)i+j+1 =
1
i+j+1
=
if i + j is even,
if i
Math 211
Assignment 3 - Solutions
1. Let x denote the number of children and y the number of adults that attended. Then we have 375x+900y =
16500. The Euclidean algorithm yields
900 = 2 375 + 150
375 = 2 150 + 75
150 = 2 75
so gcd(900, 375) = 75. Since 75
Length of Space Curve
Suppose that C is a curve in space represented
by r(t) = f (t) i + g(t) j + h(t) k, or the parametric
equations x = f (t), y = g(t), z = h(t), a t b,
where f , g and h are continuous functions on the
interval [a, b].
If the curve C i
Linear Approximations
Let f be a function of two variables x and y dened in a neighborhood of (a, b). The linear function
L(x, y) = f (a, b) + fx (a, b)(x a) + fy (a, b)(y b)
is called the linearization of f at (a, b) and the
approximation
f (x, y) f (a,
>
Problem 4: The RSA encription method
>
(a) Program to encode a given message m using pulic key (n,e) :
>
(1)
Notes: 1) Recall that the command "Power(m,e) mod n" is MAPLE's implementation of the
power-mod algorithm which we learned in class. If had you
>
First solution: using the linalg package
>
Problem 6(a) : The matrix A and the vector y:
>
(1)
(1)
>
(2)
>
(3)
(3)
Problem 6(b) : Calculate the matrices B = (A^tA)^(-1) , C = A^ty and w = BC:
>
(4)
(4)
>
(5)
>
(6)
(6)
>
(7)
(7)
Problem 6(c): Compare you
>
Problem 4(a): Use the igcdex command (extended gcd) to solve:
1234567x + 5474970y = gcd(1234567, 5475970) :
>
127
(1)
(1)
Thus, the gcd of 1234567 and 5474970 is 127 and (x,y) = (3601, -812) is a solution of the above
equation. Check this:
>
127
(2)
(2)
The Greatest Common Divisor
Denition: a) An integer d is called a common divisor
of two integers m and n if d|m and d|n.
b) The greatest common divisor (gcd) of m and n is
the largest among the common divisors of m and n.
Notation: d = gcd(m, n). (Note: d
The Euclidean Algorithm
Historical Remarks: 1) Algorithm = description of
a (nite) procedure (usually: suitable for programming). The word algorithm was derived from
the name of the 9th century mathematician AlKhwarizmi.
2) Euclid lived in Alexandria (Egy
Number Systems
N = cfw_1, 2, 3, . . . - the set of natural numbers
Z = cfw_. . . , 3, 2, 1, 0, 1, 2, 3, . . .
the set of integers (Z: Zahl (German) = number)
Q the set of rational numbers (fractions) - Q: quotients
Examples: 1 , 329 , 1 = 1 , . . .
2
29
Divisibility
Denition: Let m, n be integers (short: m, n Z).
Then m divides n (notation: m|n) if
n = m k, for some k Z.
We then also say that m is a divisor of n.
n
Thus: m|n if and only if k = m Z.
Properties of Divisibility (for future use):
D1 (Transit
>
Problem 6(a) : Using the command isolve(.) to solve a linear Diophantine equation:
>
(1)
(1)
Thus, MAPLE states that the general solution of this equation is
x = 31 + 73z, y = 30 + 71z, where z is an integer.
In Question 3(a) of Assignment 2 we arrived
>
Problem 6(a) : Using Maple's power mod command:
>
1799
Thus, MAPLE found that rem(1234^123456789, 5555) = 1799.
If we try to compute this in the naive way, then we get an overflow error:
>
Error, cannot reallocate memory (old_size=2992 new_size=
1620370
>
First solution: using the linalg package
>
Problem 7(a) : Defining the matrix A and evaluating f(A):
>
(1)
(1)
The polynomial f:
>
(2)
(2)
The matrix polynomial f(A):
>
(3)
Problem 7(b) : Diagonalizing A by finding eigenvectors of A:
>
(4)
Thus, the eig
>
Problem 6: Compute gcd's of numbers:
(i) gcd(12345, 54321):
>
3
(1)
3
(2)
Thus, the gcd of 12345 and 54321 is 3.
(ii) gcd(213141516171, 262524232221):
>
Thus, gcd(213141516171, 262524232221) = 3.
Problem 7: Constructing lists.
(a) The list L of length 1
>
1. Some anti-derivatives:
>
(1)
(1)
>
(2)
2. Compute the Fourier-cosine coefficients for the given g:
>
>
(3)
(3)
>
(4)
(4)
Thus, the best approxiation (with 4 terms) is:
>
(5)
3. Plot the giviven g and the computed g0:
>
>
>
Note that the parabola y =
Lagrange Multipliers
Let S be a surface in space represented by the
equation g(x, y, z) = 0, where g is a dierentiable
function of three variables x, y, and z. Let f be a
dierentiable function dened in a neighborhood of
S. We wish to nd the maximum or min