From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9dfc10efb95ba130 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!bloom-beacon.mit.edu!171.64.64.130.MISMATCH!usenet.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newsgate.cuhk.edu.hk!news.netfront.net!not-for-mail From: Wilson Newsgroups: comp.lang.ada Subject: Re: Inefficient algorithms Date: Sat, 11 Sep 2010 21:04:29 -0400 Organization: Netfront http://www.netfront.net/ Message-ID: References: <1f6f73cd-f5ff-4408-a1d7-c9ca7dfa70ee@m35g2000prn.googlegroups.com> NNTP-Posting-Host: 68.253.225.108 Mime-Version: 1.0 Content-Type: text/plain; format=flowed; delsp=yes; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Trace: adenine.netfront.net 1284253654 7113 68.253.225.108 (12 Sep 2010 01:07:34 GMT) X-Complaints-To: news@netfront.net NNTP-Posting-Date: Sun, 12 Sep 2010 01:07:34 +0000 (UTC) To: stefan-lucks@see-the.signature User-Agent: Opera Mail/9.51 (Win32) Xref: g2news1.google.com comp.lang.ada:14018 Date: 2010-09-11T21:04:29-04:00 List-Id: I'm not sure if this is what you are looking for or not. How about printing out all permutations of the first n integers? The algorithm is in many texts along with an explanation. See, for example: http://en.wikipedia.org/wiki/Permutation I'm also don't know which 2**n algorithm is simplest to write or understand, but there are literally thousands of problems that meet this criteria. By the way, none of these problems are strictly speaking "inefficient". Instead, they are just "computationally tedious"(My term)! (I am taking inefficient to mean that a faster algorithm exits.) In many of these problems (such as printing all the permutations) a faster algorithm is impossible. On the other hand, NP-Complete problems such as the binary problem discussed in some of the other posts have no known faster solution; i.e., a faster solution might exist, but we have no proof. Good luck which ever way you choose to go. --- news://freenews.netfront.net/ - complaints: news@netfront.net ---