<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: A Programme  works out all the possible answers? in Mathcad</title>
    <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152390#M59941</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just mean positive integers it's trivial:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="72483" class="jive-image" alt="ten.PNG" src="https://community.ptc.com/legacyfs/online/72483_ten.PNG" /&gt;&lt;/P&gt;&lt;P&gt;or have I misunderstood what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 May 2014 11:26:45 GMT</pubDate>
    <dc:creator>AlanStevens</dc:creator>
    <dc:date>2014-05-08T11:26:45Z</dc:date>
    <item>
      <title>A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152389#M59940</link>
      <description>Hi,I need some ideas on how to do the following:I have two variables a and b, the sum of a &amp;amp; b is 10. I would like Mathcad to work out all the possibilities that give me a+b=10, and a keep in mind I would like them to be integers.Thank you</description>
      <pubDate>Thu, 03 May 2018 16:15:53 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152389#M59940</guid>
      <dc:creator>h_nas</dc:creator>
      <dc:date>2018-05-03T16:15:53Z</dc:date>
    </item>
    <item>
      <title>Re: A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152390#M59941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you just mean positive integers it's trivial:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="72483" class="jive-image" alt="ten.PNG" src="https://community.ptc.com/legacyfs/online/72483_ten.PNG" /&gt;&lt;/P&gt;&lt;P&gt;or have I misunderstood what you are looking for?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 11:26:45 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152390#M59941</guid>
      <dc:creator>AlanStevens</dc:creator>
      <dc:date>2014-05-08T11:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152391#M59942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you placing bounds on a and b? Integers, fine. Positive? Or are negative values allowed? Count "0" as an integer?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 11:29:14 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152391#M59942</guid>
      <dc:creator>Fred_Kohlhepp</dc:creator>
      <dc:date>2014-05-08T11:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152392#M59943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What if I have a, b, c, d and e?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 11:38:11 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152392#M59943</guid>
      <dc:creator>h_nas</dc:creator>
      <dc:date>2014-05-08T11:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152393#M59944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here's a brute force and ignorance method, again assuming positive integers only.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="72484" class="jive-image" alt="ten2.PNG" src="https://community.ptc.com/legacyfs/online/72484_ten2.PNG" /&gt;&lt;/P&gt;&lt;P&gt;Alan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 12:09:43 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152393#M59944</guid>
      <dc:creator>AlanStevens</dc:creator>
      <dc:date>2014-05-08T12:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152394#M59945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you, The brute force is working:)&lt;/P&gt;&lt;P&gt;Just for the fun of it, insteade of 9 use 99!&lt;/P&gt;&lt;P&gt;I am using Mathcad Prime and still runing around without result!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 12:34:58 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152394#M59945</guid>
      <dc:creator>h_nas</dc:creator>
      <dc:date>2014-05-08T12:34:58Z</dc:date>
    </item>
    <item>
      <title>Re: A Programme  works out all the possible answers?</title>
      <link>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152395#M59946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;HinndNaser wrote:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, The brute force is working:)&lt;/P&gt;&lt;P&gt;Just for the fun of it, insteade of 9 use 99!&lt;/P&gt;&lt;P&gt;I am using Mathcad Prime and still runing around without result!&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;It sure will be hard to find 99 numbers in the range of 1 to 9 which sum up to 10 &lt;IMG src="https://community.ptc.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why not post the real problem you are working on? But whatever its is, Mathcad provides no clever algorithms to deal with integers, diophantic equations or number theory in general. So brute force seems to be a quick and dirty option, but with a lot of values to deal with and probably a wider range per variable, its not an option still anymore as it will take more time than you are willing and able to spend. So the problem might be solveable by an approach unique to that specific problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you are interested in a way to write a routine with an arbitrary number of variables on not a static number of nested for loops, take a look at the routine I posted here: &lt;A _jive_internal="true" class="loading" href="https://www.ptcusercommunity.com/message/199660#199660" title="http://communities.ptc.com/message/199660#199660"&gt;http://communities.ptc.com/message/199660#199660&lt;/A&gt;&lt;/P&gt;&lt;P&gt;The routine sure could be modified to solve tasks as your with a variable number of arguments, arbitrary function s (not only summation of all arguments) and a target value (like th 10 in your example).&lt;/P&gt;&lt;P&gt;But it will very soon get too slow to be helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may also be interested in this thread: &lt;A _jive_internal="true" class="loading" href="https://www.ptcusercommunity.com/message/194291#194291" title="http://communities.ptc.com/message/194291#194291"&gt;http://communities.ptc.com/message/194291#194291&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 May 2014 16:38:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/Mathcad/A-Programme-works-out-all-the-possible-answers/m-p/152395#M59946</guid>
      <dc:creator>Werner_E</dc:creator>
      <dc:date>2014-05-08T16:38:26Z</dc:date>
    </item>
  </channel>
</rss>

