[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LOGO-L> pirate problem



At 14:48 11-10-98 +0100, you wrote:
>ok, here is a maathematicians solution.
>
[snap]
>
>to pirate.sol :set :maxload
>output max.elements (filter [(last ?) < 1 + :maxload] ~
>	funtable all.subsets :treasures "sum) [last ?]
>end
>
[snap]

Congratulation

First crew already had taken their chests of gold and they are on their way
to Vienna. (My God, how will they reach Vienna on ship?)
By the way. It should be :set instead of :treasures in procedure pirate.sol
- isn't it?

I like Your program. It finds all the solutions and seems to be very
fundamental. But when I put on a beach 10 chests 20Pst each, it was 9 long
seconds to find all 252 subsets which fit exactly to 100Pst. Needless to say
- all solutions were the same.
I'm not sure, what would this program do if 100 boxes 1Pst each are given.
I'm afraid it will look for the answer very long. In the meantime some less
mathematician pirates would take all the treasure and run away.

Best regards
Andrzej B.
Lodz, Poland


---------------------------------------------------------------
Please post messages to the Logo forum to logo-l@gsn.org.  Mail
questions about the list administration to logofdn@gsn.org.  To
unsubscribe send    unsubscribe logo-l    to majordomo@gsn.org.



Global SchoolNet Foundation - Linking Kids Around the World!
Copyright GSN - All Rights Reserved - Comments & Questions
Visit GSN's Global Schoolhouse for more exciting learning resources!
Search our Site - Home