Re: [R] optimization challenge

2010-01-28 Thread Greg Snow
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

Re: [R] optimization challenge

2010-01-13 Thread Greg Snow
-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

Re: [R] optimization challenge

2010-01-13 Thread Albyn Jones
) 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

Re: [R] optimization challenge

2010-01-13 Thread Ravi Varadhan
-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

Re: [R] optimization challenge

2010-01-13 Thread Aaron Mackey
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

Re: [R] optimization challenge

2010-01-13 Thread Albyn Jones
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

[R] optimization challenge

2010-01-12 Thread Greg Snow
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

Re: [R] optimization challenge

2010-01-12 Thread Albyn Jones
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.