Well, Albyn Jones gave a great solution to my challenge that found the best
reading schedule.
My original thought was that doing an exhaustive search would take too much
time, but Albyn showed that there are ways to do it efficiently.
My approach (as mentioned before) was to use optim with
-Original Message-
From: Albyn Jones [mailto:jo...@reed.edu]
Sent: Tuesday, January 12, 2010 5:31 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] optimization challenge
Greg
Nice problem: I wasted my whole day on it :-)
I was explaining my plan for a solution to a colleague
) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.s...@imail.org
801.408.8111
-Original Message-
From: Albyn Jones [mailto:jo...@reed.edu]
Sent: Tuesday, January 12, 2010 5:31 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] optimization
-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Albyn Jones
Sent: Wednesday, January 13, 2010 1:19 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] optimization challenge
The key idea is that you are building a matrix that contains the
solutions to smaller
Jones
Sent: Wednesday, January 13, 2010 1:19 PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] optimization challenge
The key idea is that you are building a matrix that contains the
solutions to smaller problems which are sub-problems of the big
problem. The first row of the matrix
PM
To: Greg Snow
Cc: r-help@r-project.org
Subject: Re: [R] optimization challenge
The key idea is that you are building a matrix that contains the
solutions to smaller problems which are sub-problems of the big
problem. The first row of the matrix SSQ contains the solution
I have a challenge that I want to share with the group.
This is not homework (but I may assign it as such if I teach the appropriate
class again) and I have found one solution, so don't need anything urgent.
This is more for fun to see if others can find a better solution than I did.
The
Greg
Nice problem: I wasted my whole day on it :-)
I was explaining my plan for a solution to a colleague who is a
computer scientist, he pointed out that I was trying to re-invent the
wheel known as dynamic programming. here is my code, apparently it is
called bottom up dynamic programming.
8 matches
Mail list logo