[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[no subject]
- <!--x-content-type: text/plain -->
- <!--x-date: Wed Dec 15 13:14:54 2004 -->
- <!--x-from-r13: fevnq ng hno.rqh (Oqvgln Eevavinfna) -->
- <!--x-message-id: Pine.LNX.4.44.0412151206200.19702-[email protected] -->
- <!--x-reference: [email protected] --> "http://www.w3.org/TR/html4/loose.dtd">
- <!--x-subject: To: Jerry Yu... Re: [ale] 2 Perl questions ? -->
- <h1>to: Jerry Yu... Re: [ale] 2 Perl questions ?</h1>
- <li><em>date</em>: Wed Dec 15 13:14:54 2004</li>
- <li><em>from</em>: sriad at uab.edu (Aditya Srinivasan)</li>
- <li><em>in-reply-to</em>: <<a href="msg00545.html">[email protected]</a>></li>
- <li><em>subject</em>: To: Jerry Yu... Re: [ale] 2 Perl questions ?</li>
- <title>to: Jerry Yu... Re: [ale] 2 Perl questions ?</title>
> On Wed, Dec 15, 2004 at 11:02:22AM -0600, Aditya Srinivasan wrote:
> > The algorithm to separate files into groups <=650 sounds non trivial.
> >
> > 1.List files and sizes
> > 2.Sort
> > 3.Pick appropriate combinations from the list (The hard part ??)
> >
> > Is anyone aware of an algorithm which analyzes this sort of problem and
> > solves it ?
>
> Yes. It's been a while since my CS algorithms course, but I believe
> this is known as the knapsack problem. I think the general knapsack
> problem is NP complete, but it can be partitioned in such a way that you
> could solve this particular problem using dynamic programming.
>
> A quick google search turns up this page, which might provide some
> useful pointers:
>
> <a rel="nofollow" href="http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK4/NODE145.HTM">http://www2.toki.or.id/book/AlgDesignManual/BOOK/BOOK4/NODE145.HTM</a>
Its been a while for me too which is why it interests me :)
<a rel="nofollow" href="http://www.nist.gov/dads/HTML/knapsackProblem.html">http://www.nist.gov/dads/HTML/knapsackProblem.html</a>
******************************************************************
Definition: Given items of different values and volumes, find the most
valuable set of items that fit in a knapsack of fixed volume.
******************************************************************
They seem similar but I believe this problem is slightly different. I
can't immediately see a way to generalize it as a knapsack problem.
--
Thanks,
sriad
</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00545" href="msg00545.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
<ul><li><em>From:</em> jasonday at worldnet.att.net (Jason Day)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00545.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00547.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00545.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00549.html">To: Jerry Yu... Re: [ale] 2 Perl questions ?</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00546"><strong>Date</strong></a></li>
<li><a href="threads.html#00546"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>
<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>