Anyone know the solution
Anton
anton.schattenfeld at gmail.com
Tue Oct 28 21:28:44 EDT 2014
On Monday, October 27, 2014 5:33:17 PM UTC-7, alex23 wrote:
> On 28/10/2014 1:10 AM, em.. at 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".
Can you elaborate why it is an NP-complete problem or maybe a link to description of problem you are referring to?
Thanks.
More information about the Python-list
mailing list