dynamic programming on a tree
- From: "tenida@xxxxxxxxx" <tenida@xxxxxxxxx>
- Date: 29 Jan 2006 11:39:34 -0800
I have a binary tree. So there is a unique path from root to each
leaf in the tree.
Each leaf L also has a number associated with it, A(L). In addition
user inputs an interval [a,b].
Now, I have to assign weights w_i (positive reals) to all nodes
including leafs such that product of weights from root to a leaf j
equals A(j).
But, I want to assign weights such that the total number of weights
that are outside a specified interval [a,b] is minimized. That means,
I want to keep the values of the weights in that interval.
I want to formulate a dynamic programming. Any ideas ? Is it possible
to have a dynamic program for this problem ?
.
- Follow-Ups:
- Re: dynamic programming on a tree
- From: Paul E. Black
- Re: dynamic programming on a tree
- Prev by Date: Re: multiple-string matching & regular expressions
- Next by Date: Math Books For Sale
- Previous by thread: Generalization of Modular Arithmetic
- Next by thread: Re: dynamic programming on a tree
- Index(es):
Relevant Pages
|