[Tutor] Stern-Brocot tree: more fun math
Pijus Virketis
virketis@fas.harvard.edu
Tue, 8 Jan 2002 21:54:32 -0500
This is a multi-part message in MIME format.
------=_NextPart_000_013C_01C1988F.0E29F2E0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
>Then I developed another recursive solution (considering trees to be =
naturally
>recursive data-structures) - may be it's mathematically less =
pretentious, but=20
> it works.
While I would love to be "mathematically pretentious", the iterative =
algorithm I used is from "Concrete Mathematics", so I cannot claim that =
wonderful descriptive for myself... :) Sure enough, Gregor's recursive =
code is cool. The thing is, for some reason I always find it easier to =
think iteratively. Maybe it's time to take a look at Lisp and break this =
barrier ...
>P.S.: In my eyes the lack of class-methods in Python is still=20
>a little bit annoying.
How would they be useful?=20
Cheers,=20
Pijus
------=_NextPart_000_013C_01C1988F.0E29F2E0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2712.300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2><FONT face=3DArial size=3D2>>Then I developed =
another recursive=20
solution (considering trees to be naturally</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>></FONT><FONT face=3DArial =
size=3D2>recursive=20
data-structures) - may be it's mathematically less pretentious, but=20
</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial>> </FONT><FONT face=3DArial =
size=3D2>it=20
works.</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial></FONT></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial>While I would love to be =
"mathematically=20
pretentious", the iterative algorithm I used is from "Concrete =
Mathematics", so=20
I cannot claim that wonderful descriptive for myself... :) Sure enough, =
Gregor's=20
recursive code is cool. The thing is, for some reason I always =
find it=20
easier to think iteratively. Maybe it's time to take a look at Lisp and =
break=20
this barrier ...</FONT></FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2>></FONT><FONT size=3D2>P.S.: In my eyes the lack =
of=20
class-methods in Python is still </FONT></DIV>
<DIV><FONT size=3D2>>a little bit annoying.</FONT></DIV>
<DIV><FONT size=3D2></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial>How would they be useful?=20
</FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial></FONT></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial>Cheers, </FONT></FONT></DIV>
<DIV><FONT size=3D2><FONT face=3DArial></FONT></FONT> </DIV>
<DIV><FONT size=3D2><FONT face=3DArial>Pijus</FONT></DIV>
<DIV><FONT face=3DArial></FONT> </DIV></FONT></BODY></HTML>
------=_NextPart_000_013C_01C1988F.0E29F2E0--