<rss xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">
  <channel>
    <title>MaplePrimes - answers and comments on Question, recursive procedures with 2 variables</title>
    <link>http://www.mapleprimes.com/questions/90070-Recursive-Procedures-With-2-Variables</link>
    <language>en-us</language>
    <copyright>2026 Maplesoft, A Division of Waterloo Maple Inc.</copyright>
    <generator>Maplesoft Document System</generator>
    <lastBuildDate>Wed, 10 Jun 2026 12:31:18 GMT</lastBuildDate>
    <pubDate>Wed, 10 Jun 2026 12:31:18 GMT</pubDate>
    <itunes:subtitle />
    <itunes:summary />
    <description>The latest answers and comments added to the Question, recursive procedures with 2 variables</description>
    <image>
      <url>http://www.mapleprimes.com/images/mapleprimeswhite.jpg</url>
      <title>MaplePrimes - answers and comments on Question, recursive procedures with 2 variables</title>
      <link>http://www.mapleprimes.com/questions/90070-Recursive-Procedures-With-2-Variables</link>
    </image>
    <item>
      <title>clarify</title>
      <link>http://www.mapleprimes.com/questions/90070-Recursive-Procedures-With-2-Variables?ref=Feed:MaplePrimes:recursive procedures with 2 variables:Comments#answer90093</link>
      <itunes:summary>&lt;p&gt;Probably (i.e. you are missing something).&amp;nbsp; More exactly, we are missing something, the procedure.&amp;nbsp; From the snippet you gave, I'd code it as&lt;/p&gt;
&lt;pre&gt;
f := proc(a::nonnegint,b::nonnegint)
option cache;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp;&amp;nbsp; a=0 or b=0 then 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f(a-1,b) + f(a,b-1)
&amp;nbsp;&amp;nbsp;&amp;nbsp; end if;
end proc:
&lt;/pre&gt;</itunes:summary>
      <description>&lt;p&gt;Probably (i.e. you are missing something).&amp;nbsp; More exactly, we are missing something, the procedure.&amp;nbsp; From the snippet you gave, I'd code it as&lt;/p&gt;
&lt;pre&gt;
f := proc(a::nonnegint,b::nonnegint)
option cache;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp;&amp;nbsp; a=0 or b=0 then 1;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; f(a-1,b) + f(a,b-1)
&amp;nbsp;&amp;nbsp;&amp;nbsp; end if;
end proc:
&lt;/pre&gt;</description>
      <guid>90093</guid>
      <pubDate>Sun, 03 Jan 2010 02:09:48 Z</pubDate>
      <itunes:author>Joe Riel</itunes:author>
      <author>Joe Riel</author>
    </item>
    <item>
      <title>recursive procedures with two variables.</title>
      <link>http://www.mapleprimes.com/questions/90070-Recursive-Procedures-With-2-Variables?ref=Feed:MaplePrimes:recursive procedures with 2 variables:Comments#comment90094</link>
      <itunes:summary>&lt;p&gt;Joe,&lt;/p&gt;
&lt;p&gt;Thanks! What you suggested works perfectly. I don't have a feeling for the difference&lt;/p&gt;
&lt;p&gt;between the use of 'remember' versus 'cache' in recursive procedures.&lt;/p&gt;
&lt;p&gt;Ron Graham&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;Joe,&lt;/p&gt;
&lt;p&gt;Thanks! What you suggested works perfectly. I don't have a feeling for the difference&lt;/p&gt;
&lt;p&gt;between the use of 'remember' versus 'cache' in recursive procedures.&lt;/p&gt;
&lt;p&gt;Ron Graham&lt;/p&gt;</description>
      <guid>90094</guid>
      <pubDate>Sun, 03 Jan 2010 02:39:53 Z</pubDate>
    </item>
    <item>
      <title>option cache</title>
      <link>http://www.mapleprimes.com/questions/90070-Recursive-Procedures-With-2-Variables?ref=Feed:MaplePrimes:recursive procedures with 2 variables:Comments#comment90095</link>
      <itunes:summary>&lt;p&gt;They are very similar.&amp;nbsp; The significant difference is that a cache table has a maximum size, while a remember table can continue to grow.&amp;nbsp; When a cache table is filled, older entries may be replaced with newer ones.&amp;nbsp; You can specify the size of a cache table in the option statement, see ?option,cache.&amp;nbsp; If the size of the cache table were a problem, in the example, you could reduce the required space by sorting the arguments in the recursive call (the function is symmetric).&lt;/p&gt;</itunes:summary>
      <description>&lt;p&gt;They are very similar.&amp;nbsp; The significant difference is that a cache table has a maximum size, while a remember table can continue to grow.&amp;nbsp; When a cache table is filled, older entries may be replaced with newer ones.&amp;nbsp; You can specify the size of a cache table in the option statement, see ?option,cache.&amp;nbsp; If the size of the cache table were a problem, in the example, you could reduce the required space by sorting the arguments in the recursive call (the function is symmetric).&lt;/p&gt;</description>
      <guid>90095</guid>
      <pubDate>Sun, 03 Jan 2010 12:02:17 Z</pubDate>
      <itunes:author>Joe Riel</itunes:author>
      <author>Joe Riel</author>
    </item>
  </channel>
</rss>