[Tutor] What would you say is the best way to continue learning python

Magnus Lycka magnus@thinkware.se
Mon, 23 Sep 2002 00:15:12 +0200


At 09:50 2002-09-22 +0200, Gregor Lingl wrote:
>Magnus Lycka schrieb:
>
>>8. Write a program that proves that when n is an integer,
>>n > 2, the equation x**n + y**n =3D z**n has no solution in
>>positive integers x,y,z. (x**n is the Python notation for
>>x to the power of n, i.e. 4**3 =3D 4*4*4.)

>2. Moreover this problem has the advantage, that speed of
>execution doesn't play any role. Python would solve it in
>exactly the same time as for instance C.

Never? (Regardless of computer speed you won't find
any such numbers, and regardless of how many you test,
you can't be certain that an untested combination of
the unlimited amount of integers won't satisfy the
equation... But then you assume a brute-force attack.
Maybe there is a smarter way that still involves
computer calculations?)

>3. This assignment is especially rewarding, if you decide not to use
>your computer any more (for anything else) ;-)

In case there is someone who didn't notice what it
was, this problem was discussed in ancient Greece.
A lawyer in Toulouse, France, Pierre de Fermat, made
a margin note in his copy of Diophantos "Arithmetika"
more that 350 years ago, that he had found an elegant
proof for this, but it didn't quite fit in the margin.

A mathematician claimed to have solved it at last, just
a few years ago. His first version turned out to contain
a flaw, but he came back with a new proof, and noone has
found any hole in that. As far as I understand, it's just
a handful of people in the world that are able to
understand it though...

In the previous attempts to solve this problem over
the centuries, a number of important discoveries on
the nature of mathematics have been made, so even if
we don't reach the final goal, there is no reason not
to try... ;)

Donald Knuth included this as an exercise in "The Art of
Computer Programming", grading it in the middle between
a term paper and a research project. It has been more of
a life time project for many generations of mathematicians,
so Knuth was either very optimistic, or slightly playful...


--=20
Magnus Lyck=E5, Thinkware AB
=C4lvans v=E4g 99, SE-907 50 UME=C5
tel: 070-582 80 65, fax: 070-612 80 65
http://www.thinkware.se/  mailto:magnus@thinkware.se