To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 5008
5007  |  5009
Subject: 
RE: Would-be hacker queries. (fwd)
Newsgroups: 
lugnet.robotics
Date: 
Wed, 12 May 1999 02:38:46 GMT
Original-From: 
Jim Choate <ravage@EINSTEIN.ssz.com[stopspammers]>
Viewed: 
836 times
  
----- Forwarded message from Joel Shafer -----

Date: Tue, 11 May 1999 11:53:27 -0500
From: Joel Shafer <joel@connect.net>
Subject: RE: Would-be hacker queries.

It's too bad that recursion pays the price of stack usage.  Recursion is
almost always a more elegant solution and is more easily maintained.  But
as it is, recursion should only be used when you know that the worst case
scenario won't overflow the stack.  This usually implies knowing something
about the data that you are processing, and of course this isn't good
practice because data can and does change.

----- End of forwarded message from Joel Shafer -----

Recursion doesn't require a stack, it does require a place to store your
intermediate results.

Recursion usualy provides a shorter description (usualy mathematical) for
the problem. The trade off is that you generaly have to save lots(!) of
intermediate states. Since the n'th state relies on the result of n-1 this
should surprise nobody.

Generaly if you can describe a problem using recursion (and not everything
can be so described) then you can also demonstrate the number of steps it
will take to get there, before you even start. The only place this usualy
can't be said is if one works the recursion from 0/1 to the upper limit
instead of downward (ie n > 1 and in n!).

Knowing the data set intimitely generaly buys one nothing using recursion.
Why? Because there usualy isn't one with recursion, that's the whole point
of the approach, it builds its data as it executes. It's knowing the
algorithm that buys you something.

    ____________________________________________________________________

       Three step plan: 1. Take over world. 2. Get lot's of cookies.
                        3. Eat the cookies.

                                                    Anonymous

       The Armadillo Group       ,::////;::-.          James Choate
       Austin, Tx               /:'///// ``::>/|/      ravage@ssz.com
       www.ssz.com            .',  ||||    `/( e\      512-451-7087
                           -====~~mm-'`-```-mm --'-
    --------------------------------------------------------------------
--
Did you check the web site first?: http://www.crynwr.com/lego-robotics



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR