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 18 of 20 Topic 2371 of 2508
Post > Topic >>

Re: Prediction of local code modifications

by Matthias Blume <find@[EMAIL PROTECTED] > Apr 4, 2008 at 12:21 AM

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

> Thus, dynamic programming is often a backtracking approach, you pick a
> solution for each of the problems in some order (often a greedy
> algorithm is used to come up with the initial solution) and compute
> the final score.  Then, you revisit the items in the opposite order
> you originally picked them and try a different value for each one,
> until you have the best result.  It is useful to think of the choices
> as a tree, where each choice made constrains the other subsequent
> choices (i.e. when you put one block in a regions of memory, you are
> then constrained not to put another block in that same memory), and
> you are 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.

I think you are confusing dynamic programming with branch-and-bound
methods.  (What you are describing sounds more like branch-and-bound.)

Dynamic programming works for problems where there is extensive
overlap between sub-problems, i.e., where the number of unique
sub-problems is much smaller than the size of the naive search tree.
(In other words, a naive search would visit many sub-problems over and
over again.)  One can turn such a naive search into an efficient one
by caching the results for sub-problems that have already been solved
in a table.  A more efficient way of doing the same thing is to fill
this table bottom-up -- and that is what dynamic programming does.

> It is worth noting, that because of the required backtracking,
> dynamic programming solutions usually grow exponentially with input
> problem size.

No, they don't.  Dynamic programming problems run in time that is
roughly O(p times s) where p is the number of unique sub-problems and
where s is the "size" of each sub-problem, i.e., the time required to
solve it given the solutions to its own sub-problems.  For many
typical problems, dynamic programming yields polynomial-time
algorithms.

Branch-and-bound, on the other hand, does usually result in worst-case
exponential-time algorithms.

Matthias
 




 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 Sun Sep 7 7:09:48 CDT 2008.