Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Compilers > Re: Prediction ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 16 of 20 Topic 2371 of 2529
Post > Topic >>

Re: Prediction of local code modifications

by Max Hailperin <max@[EMAIL PROTECTED] > Apr 3, 2008 at 10:22 AM

Chris F Clark <cfc@[EMAIL PROTECTED]
> writes:

> Tim Frink <plfriko@[EMAIL PROTECTED]
> writes:
>
>> I'm not sure if dynamic programming is an approach that I can apply to
>> my problem. ...

> ... dynamic programming is often a backtracking approach, ...
> visiting the tree of all possible choices in an organized
> fa****on.  Now, as I recall (and I haven't done any significant dynamic
> programming recently), there usually is a method to prune unfruitful
> subtree explorations, i.e. a way to determine if changing the value of
> some value cannot possibly lead to a better solution than the one that
> has already been calculated, but that may or may not be a required
> feature of the method.
>
> It is worth noting, that because of the required backtracking, dynamic
> programming solutions usually grow exponentially with input problem
> size.  That is, if your problem adds one more binary decision to the
> previous problem, the new problem takes roughly twice as long to
> solve, because you have doubled the size of tree you have to explore
> to find the correct solution.

I don't want to sound like there is something wrong with making a good
faith effort to be helpful -- that all any of us can do, myself
included.  However, in this particular case, perhaps help from someone
who regularly works with dynamic programming would be more useful.  In
particular, dynamic programming does not entail a backtracking search
through an exponential space of possibilities.  Instead, it takes
advantage of the fact that though subproblems interact, they do so in
a restricted way.  When considering whether to put item number N into
the knapsack, all that matters is the total weight and value of the
items from 1 through N-1 that were selected -- not the specific
choices that were made.  As a result, it isn't necessary to actually
trace out all 2^N possibilities of what to include and what to
exclude.  Instead, the problem can be solved in quadratic time.  I
sent Tim an outline for such an algorithm by private email.  -max
 




 20 Posts in Topic:
Prediction of local code modifications
Tim Frink <plfriko@[EM  2008-03-27 14:30:25 
Re: Prediction of local code modifications
glen herrmannsfeldt <g  2008-03-28 02:44:26 
Re: Prediction of local code modifications
"preston.briggs@[EMA  2008-03-28 14:26:42 
Re: Prediction of local code modifications
Max Hailperin <max@[EM  2008-03-28 19:40:17 
Re: Prediction of local code modifications
glen herrmannsfeldt <g  2008-03-29 11:33:00 
Re: Prediction of local code modifications
"preston.briggs@[EMA  2008-03-29 23:35:53 
Re: Prediction of local code modifications
Tim Frink <plfriko@[EM  2008-04-01 09:23:23 
Re: Prediction of local code modifications
"preston.briggs@[EMA  2008-04-01 23:01:46 
Re: Prediction of local code modifications
Max Hailperin <max@[EM  2008-04-02 07:42:57 
Re: Prediction of local code modifications
Tim Frink <plfriko@[EM  2008-04-03 21:22:40 
Re: Prediction of local code modifications
George Neuner <gneuner  2008-04-04 18:23:56 
Re: Prediction of local code modifications
Tim Frink <plfriko@[EM  2008-04-08 21:06:19 
Re: Prediction of local code modifications
gneuner <gneuner@[EMAI  2008-04-19 20:42:21 
Re: Prediction of local code modifications
Chris F Clark <cfc@[EM  2008-04-02 11:24:17 
Re: Prediction of local code modifications
glen herrmannsfeldt <g  2008-04-03 00:02:21 
Re: Prediction of local code modifications
Max Hailperin <max@[EM  2008-04-03 10:22:36 
Re: Prediction of local code modifications
Chris F Clark <cfc@[EM  2008-04-04 20:13:17 
Re: Prediction of local code modifications
Matthias Blume <find@[  2008-04-04 00:21:38 
Re: Prediction of local code modifications
Chris F Clark <cfc@[EM  2008-04-05 09:43:16 
Re: Prediction of local code modifications
Mayan Moudgill <mayan@  2008-04-05 21:35:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 8:13:41 CDT 2008.