For the second problem:
Click here to view the secret text
×
You're right when you notice that x^2 - y^2 = z^2 if and only if (x-y)(x+y) = z. You could rewrite this as ab = z with a = x-y and b = x+y. So the pairs (x,y) of solutions correspond exactly to pairs of numbers (a,b) with ab = z and b+a even (you then have x = (a+b)/2, y = (b-a)/2). So for example, with z = 192 = 2^6*3, you'll have the following solution set:
(a,b): (6, 32) (12, 16) (24, 8) (48, 4) (96, 2)
(x,y): (19, 15) (14, 2) (16, 8) (26, 22) (49, 47)
Since factoring numbers is generally considered a hard problem, I don't think there's any quicker way to do it.
For the third problem:
Click here to view the secret text
×
Matrices have something called a "characteristic equation". In general, this is the equation det(A-xI)=0 (where det stands for determinant, I is the identity matrix and x is just a variable). In the case of a 2x2 matrix M =
(a b)
(c d)
the equation is (a-x)(d-x) - bc = 0, or x^2 -(a+d)x + (ad-bc)=0, a standard quadratic polynomial. The roots of this polynomial are called the eigenvalues of the matrix. If I actually write out the roots using the quadratic formula it'll be a mess, but let's say you have specific values for a, b, c, and d, so you can pretty easily use the quadratic formula, and get two roots, say Y and Z.
Now here's the magic part. Solve for the constants j and k in the following 2 equations:
Y^n = j + kY
Z^n = j + kZ
Once you get these, then you'll have a formula for M^n, which will be:
M^n = jI + kM, with I =
(1 0)
(0 1)
So for your example of
(1 1)
(1 0), we have characteristic equation
x^2 - x - 1 = 0.
Using the quadratic formula gives (1 +- sqrt(1 + 4))/2, so we can set
Y = (1+sqrt(5))/2, Z = (1-sqrt(5))/2
Now we solve the system of linear equations for j and k, namely
j = kY - Y^n, giving
Z^n = kY - Y^n + kZ, so
k = -(Y^n+Z^n)/(Y+Z), and
j = -Y(Y^n+Z^n)/(Y+Z) - Y^n
This gives the final formula
M^n = (-Y(Y^n+Z^n)/(Y+Z) - Y^n)I + (-(Y^n+Z^n)/(Y+Z))M
where Y = (1+sqrt(5))/2 and Z = (1-sqrt(5))/2.
Whew! Hope that helps. As you can see, there *is* a way to get exponentiation formulas for any 2x2 matrix, but unless you're raising it to a really high power, it might be easier just to do it by hand.
Hope that helps!
____________________________
Yes, I very rarely post. But I DO keep coming back to check the forum.
[Last edited by MartianInvader at 03-31-2007 09:04 PM]