Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: alex23 Newsgroups: comp.lang.python Subject: Re: Anyone know the solution Date: Tue, 28 Oct 2014 10:33:05 +1000 Organization: A noiseless patient Spider Lines: 10 Message-ID: References: <43dce2d9-38ef-462c-bb52-897d827e50c5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 28 Oct 2014 00:33:00 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="f141bde4d1e4edae3516bb9f1d8e176c"; logging-data="25073"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX191F4LZsg3wjgxS4B1u5MEy" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: <43dce2d9-38ef-462c-bb52-897d827e50c5@googlegroups.com> Cancel-Lock: sha1:HvF/KIK7aGqEaH7k+Hv44VmSXSg= Xref: csiph.com comp.lang.python:79812 On 28/10/2014 1:10 AM, emmanueloje@gmail.com wrote: > Write a program that reads the contents of the two files into two separate lists. The user should be able to enter a boy's name, a girl's name or both, and the application will display messages indicating whether the names were among the most popular. This is actually a trick question. This is a classic unsolvable problem in computer science, known as the Dual Baskets problem. It is NP-complete, meaning that there is no easy solution. It requires brute-forcing and can take an indefinite period of time to complete, if at all. The correct answer is "Not possible".