<<

1. The Euclidean . The is used to find GCD(a, b), the greatest common of two positive integers a, b ∈ N, and can be used to find m, n ∈ Z so that:

GCD(a, b) = ma + nb.

In particular, if p is a prime, GCD(a, p) = 1, so writing 1 = ma + np we −1 find that in the field Zp (of residues mod(p)) we have: (¯a) =m ¯ . ¯ Example. Find the of 11 in Z37. The euclidean algorithm gives:

37 = 3 × 11 + 4, 11 = 2 × 4 + 3, 4 = 3 + 1.

Thus:

1 = 4 − 3 = 37 − 3 × 11 − [11 − 2 × (37 − 3 × 11)] = 3 × 37 − 10 × 11,

¯ −1 ¯ ¯ or m = −10, n = 3. Thus (11) = −10 = 27 in Z37. ¯ −1 Problem 1. Find (4) in the field Z31. 2. Long . Suppose x ∈ [0, 1) has an eventually periodic representation: x = 0.m1m2 . . . mN d1d2 . . . dT . Then:

N+T N 10 x − m1 . . . mN d1 . . . dT = 10 x − m1 . . . mN = 0.d1 . . . dT .

Hence:

N T 10 (10 − 1)x = m1 . . . mN d1 . . . dT − m1 . . . mN := m ∈ N, or: m d . . . d x = (x = 1 T if the expansion is periodic). 10N (10T − 1) 10T − 1

In other words: any real number (in [0, 1)) with an eventually periodic decimal expansion is rational, and can be written in the form m/q, where q is a difference of powers of 10. (Or, considering base 2 expansions, with q a difference of powers of two.)

1 And yet any has an eventually periodic decimal expan- sion! This can be established by considering . Consider x = p/q with p, q ∈ N, p < q. We have (interpreting the long division algorithm):

10p = d1q + r1, 10r1 = d2q + r2, 10r2 = d3q + r3,...

p and this gives the decimal expansion: q = 0.d1d2d3 .... The of takes values in the finite set {0, 1, . . . , q − 1}, so eventually a has to be repeated, and after that the whole sequence of digits in the decimal expansion repeats. Thus the expansion is eventually periodic, with period T ≤ q − 1 (if a remainder is zero, this means the expansion is finite, so either eventually 0’s or eventually 9’s, depending on which one you choose.) 2 Example. (seen in class) 7 = 0.285714. This is gotten from long division: 20 = 2×7+6, 60 = 8×7+4, 40 = 5×7+5, 50 = 7×7+1, 10 = 1×7+3, 30 = 4×7+2.

This implies: 2 285714 = , hence 7 divides 106 − 1 = 999, 999. 7 106 − 1

2 2 We can get the binary expansion easily if we observe that 7 = 23−1 : it is periodic with period 3. Since 2 written in base 2 is 10, we have: 2 ( ) = 0.010. 7 base 2 Problem 2. (i) Use the eventually periodic expansion of 5/7 to write it in the form m/q, where q is a difference of powers of 10. (ii) Write down the binary expansion of 5/7. √ Problem√ 3. Find the multiplicative inverse of x = −3 + 5 7 in the field Q( 7). Problem 4. Consider two arbitrary of degree 2 and integer coefficients:

2 2 p(x) = a0 + a1x + a2x , q(x) = b0 + b1x + b2x , aj, bj ∈ Z. Show that if their product p(x)q(x) (of degree 4) is the zero (that is, has all its coefficients 0), then at least one of p(x), q(x) is the zero polynomial. (Hint: Show that a0b0 = 0 and a2b2 = 0. This gives four cases to consider).

2 This problem shows that the fact that the ring Z[x] is an integral domain (i.e., has no zero ) has a non-trivial proof.

Recall that a commutative ring R is an integral domain if: (∀x, x¯ ∈ R)xx¯ = 0 → (x = 0 ∨ x¯ = 0). A commutative ring is a field if every non-zero element has a multiplicative inverse: (∀x ∈ R)x 6= 0 → (∃x0 ∈ R)xx0 = 1. Problem 5. Show that any field is an integral domain.

3