Path: csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.024 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'cases.': 0.09; 'recursion': 0.09; 'pm,': 0.11; 'wrote:': 0.14; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'algorithm': 0.16; 'code.': 0.18; 'subject:list': 0.22; 'header :In-Reply-To:1': 0.22; 'cases': 0.25; 'message-id:@gmail.com': 0.30; 'pattern': 0.31; 'to:addr:python-list': 0.32; 'implemented': 0.33; 'received:192': 0.34; 'header:User-Agent:1': 0.35; 'received:192.168': 0.37; 'received:org': 0.38; 'to:addr:python.org': 0.39; "it's": 0.40; 'header:Received:5': 0.40; 'yourself': 0.66; 'inductive': 0.84 X-Virus-Scanned: amavisd-new at torriefamily.org Date: Sun, 08 May 2011 21:31:35 -0600 From: Michael Torrie User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: python-list@python.org Subject: Re: checking if a list is empty References: <9hYwp.5805$xo2.3333@newsfe07.iad> <4dc502c7$0$29991$c3e8da3$5496439d@news.astraweb.com> <4dc6a39a$0$29991$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 9 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1304911910 news.xs4all.nl 81483 [::ffff:82.94.164.166]:43853 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4972 On 05/08/2011 05:36 PM, Dan Stromberg wrote: > Just what is an inductive algorithm? >From what I can remember, it's just an implementation of a proof essentially. Any algorithm that can be inductively proven can be implemented with recursion and specific base cases. In other words you program just like you'd do the proof. First you deal with the base cases and then you can call yourself for F(n) and F(n-1). The inductive proof provides the pattern for the code.