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 meth

Re: [R] optimization challenge

2010-01-13 Thread Albyn Jones
ngandhealth/People/Faculty_personal_pages/Varadhan.h > > tml<http://www.jhsph.edu/agingandhealth/People/Faculty_personal_pages/Varadhan.h%0Atml> > > > > > > > > > > ---- > >

Re: [R] optimization challenge

2010-01-13 Thread Aaron Mackey
- > > > > -Original Message- > From: r-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-he

Re: [R] optimization challenge

2010-01-13 Thread Ravi Varadhan
sage- From: r-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 soluti

Re: [R] optimization challenge

2010-01-13 Thread Albyn Jones
0 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 who is a

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

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".

[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 chall