[Tutor] What would you say is the best way to continue learning
python
Gregor Lingl
glingl@aon.at
Mon, 23 Sep 2002 12:56:07 +0200
Magnus Lycka schrieb:
> 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 = 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 = 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?)
Maybe you are right. But certainly you could find this only
I you were an expert in Fermat'sTheorem-topics. (And see your
own remark below).
There is another famous computer aided proof of a
problem that resisted all efforts to proof it "by hand" for a long
time: the so called four color -problem. See for instance:
http://www.math.gatech.edu/~thomas/FC/fourcolor.html
Yet this proof consists of the exhaustive
search of a finite (albeit *very* large) set of "cases" -
would you call it some sort of "intelligent brute force"?.
What I wanted to point out: you cannot prove by computer
that something is *impossible* for an infinite set of data
unless you know, that it can be reduced to finite set
of cases.
To expect this to be done by a student just beginning to
program was recently described as a proof of D. Knuth's
somewhat weird sense of humour.
>
>> 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.
See also:
http://www-gap.dcs.st-and.ac.uk/~history/HistTopics/Fermat's_last_theorem.html
>
> A mathematician
Andrew Wiles
> 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...
>
>
Regards, Gregor