Allen Knutson's other class

Monday, May 19, 2008

Answers to HW #5

Given a natural number n and a prime p, let np denote the power to which p appears in the unique factorization of n. So n = product of {pnp : p prime}, where most of the factors are p0 = 1.

1. Write down necessary and sufficient conditions on the exponents {bp, cp} for b|c to be true.

A. For every p, bp should be less than or equal to cp. (I'm only writing out the English because I don't know how to produce the symbol in HTML.)

2. Give a formula for gcd(b,c)p in terms of bp, cp.

A. gcd(b,c)p = min(bp, cp), the minimum of the two.

3. Prove that gcd is associative, in that gcd(a,gcd(b,c)) = gcd(gcd(a,b),c).

A. Either way, the exponent on p is min(ap, bp, cp).

4. Let d be a common divisor of b,c. Show that gcd(b/d, c/d) | gcd(b,c).

A. Looking at just the p-exponents, we know dp is less than or equal to bp, cp. Then the statement is that for all p,
min(bp - dp, cp - dp) is less-or-equal min(bp, cp).
This is true; indeed, the difference is dp.
So the better statement was
gcd(b/d, c/d) * d = gcd(b,c).

5. The continued fractions expansion of a positive irrational real number r is
r = n1 + 1/(n2 + 1/(n3 + 1/...
where each ni is a positive natural number.
OOPS possibly n1=0, but the others are definitely positive.
If r is rational, one can do the same thing, but the expansion terminates.

a. Show that "the" continued fractions expansion exists uniquely for any rational r.
(Actually this holds for real r too, but one needs to study convergence properly to make sense of that statement, and we haven't and won't.)

First we address existence. Let r = n/d, for "numerator" and "denominator".

Proof by induction on d (which is at least 1).
If d=1, then r = n, so take n1 = n and that's the complete expansion.
If d > 1, let n1 be the greatest integer < r.
So r = n1 + (n - d*n1)/r, where the new numerator is in (0,r).
By induction, the fraction r/(n - d*n1) has a finite continued fractions expansion.
(Here we crucially used n - d*n1 < r to justify the invocation of induction.)
Sticking it into r = n1 + 1 / r/(n - d*n1), we get a c.f.exp. of r.

Now uniqueness, also done by induction on d.
If d=1, then r = n is the only c.f.exp., because having another term will spoil integrality.
Now assume d>1.
If r = n1 + 1/(n2 + 1/(n3 + 1/... = m1 + 1/(m2 + 1/(m3 + 1/...,
then the greatest integers less-or-equal to these three equal numbers must be the same.
For the second and third, said greatest integers are n1, m1.
Subtract those off, invert both sides, and you have an equality between two c.f.expansions of a rational with smaller denominator than you started (as in the previous proof).
So by the same induction, these two expansions must be equal.

b. Optional: Compute it for the square root of 5.

A. Playing around with a calculator, it is easy to see that the first few ni are 2,4,4,4,4... which suggests that one is stuck in a loop. Proving that involves a little bit of algebra with sqrt(5).

c. Compute it for 140/49.

140/49 = 2 + 1/(42/49)

49/42 = 1 + 1/(42/7)

42/7 = 6

so 140/49 = 2 + 1/(1 + 1/6).

d. Explain the relation to the Euclidean algorithm (computing gcd(m,n) vs. expansion of m/n).

A. They're really "the same".
At each step of the Euclidean algorithm, one must compute the remainder after division of m by n. If one instead wrote down the multiple of n being subtracted,the sequence of such multiples is exactly the sequence of ni.
The sneaky thing is that to compute the continued fractions expansion of m/n, it is not important that m,n are in lowest terms. If one never simplifies them during the computationg of the c.f.exp., the last denominator one meets is gcd(m,n). For example, gcd(140,49)=7 in the one above.

Labels:

0 Comments:

Post a Comment

<< Home