View Single Post
  #12  
Old 08-28-2007, 10:32 PM
KUJustin KUJustin is offline
Senior Member
 
Join Date: Mar 2004
Posts: 1,616
Default Re: A Math Problem (NP Complete?)

Ok, I'm trying to meet people halfway, but you've got to read the problem.

Getting the highest cal/$ is where I started my solution from. The problem with that is the goal is to maximize calories, not cal/$. I'm pretty sure my solution is a viable approximation, though m_the0ry's example is a situation in which it would probably have a pretty significant error. Though if we're working with thousands of items and choosing 10 that effect should be reduced.
Reply With Quote