dynamic-programming
Branch and bound implementation
I\'ve been working on this problem, and I can get some results, but I\'m having trouble implementing the branch and bound method here.[详细]
2023-02-16 06:51 分类:问答how to find the number of distinct subsequences of a string?
Here is another spoj problem that asks how to find the number of distinct subsequences of a string ? For example,[详细]
2023-02-14 05:32 分类:问答Longest common subsequence of 3+ strings
I am trying to find the longest common subsequence of 3 or more strings. The Wikipedia article has a great description of how to do this for 2 strings, but I\'m a little unsure of how to extend this t[详细]
2023-02-12 08:22 分类:问答How to find the shortest simple path in a Tree in a linear time?
Here is a problem from Algorithms book by Vazirani The input to this problem is a tree T with integer weights on the edges. The weight开发者_StackOverflow中文版s may be negative,[详细]
2023-02-10 06:11 分类:问答How are Dynamic Programming algorithms implemented in idiomatic Haskell?
Haskell and other functional programming languages are built around the pr开发者_JS百科emise of not maintaining state.I\'m still new to how functional programming works and concepts in it, so I was wo[详细]
2023-02-09 22:04 分类:问答Knapsack 0-1 path reconstruction (which items to take) [duplicate]
This question already has answers here: 开发者_开发技巧 How to find which elements are in the bag, using Knapsack Algorithm [and not only the bag's value]?[详细]
2023-02-09 20:44 分类:问答How to find increasing subsequence of numbers with maximum sum?
How to 开发者_开发问答find increasing subsequence of numbers with maximum sum. I find O(N^2) but I want to know O(N log N).[详细]
2023-02-09 06:41 分类:问答Finding a "generalized diagonal" in a binary matrix
A \"generalized diagonal\" in a NXN matrix is a selection of N cells, such that: Exactly one cell is selected from each row and from each column[详细]
2023-02-08 12:20 分类:问答3-PARTITION problem
here is another dynamic programming question (Vazirani ch6) Consider the following 3-PARTITION problem. Given integers a1...an, we[详细]
2023-02-06 15:36 分类:问答Algorithm for the allocation of work with dynamic programming
The problem is this: Need to perform n jobs, each characterized by a gain {v1, v2,. . . , vn}, a time required for its implementation{t1, t2,. . . , tn} and a deadline for its implementation {d1, d2[详细]
2023-02-06 09:33 分类:问答