Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8491019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T22:17:40+00:00 2026-06-10T22:17:40+00:00

I am reading up dynamic programming chapter of Introduction to Algorithms by Cormen et

  • 0

I am reading up dynamic programming chapter of Introduction to Algorithms by Cormen et al. I am trying to understand how to characterize the space of subproblems . They gave two examples of dynamic programming . Both these two problems have an input of size n

  1. Rod cutting problem (Cut the rod of size n optimally)
  2. Matrix parenthesization problem .(Parenthesize the matrix product A1 . A2 .A3 …An optimally to get the least number of scalar multiplications)

For the first problem , they choose a subproblem of the form where they make a cut of length k , assuming that the left subproblem resulting from the cut can not be cut any further and the right subproblem can be cut further thereby giving us a single subproblem of size (n-k) .

But for the second problem that choose subproblems of the type Ai…Aj where 1<=i<=j<=n . Why did they choose to keep both ends open for this problem ? Why not close one end and just consider on subproblems of size (n-k)? Why need both i and j here instead of a single k split?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T22:17:41+00:00Added an answer on June 10, 2026 at 10:17 pm

    It is an art. There are many types of dynamic programming problems, and it is not easy to define one way to work out what dimensions of space we want to solve sub-problems for.

    It depends on how the sub-problems interact, and very much on the size of each dimension of space.

    Dynamic programming is a general term describing the caching or memoization of sub-problems to solve larger problems more efficiently. But there are so many different problems that can be solved by dynamic programming in so many different ways, that I cannot explain it all, unless you have a specific dynamic programming problem that you need to solve.

    All that I can suggest is to try when solving a problem is:

    • if you know how to solve one problem, you can use similar techniques for similar problems.
    • try different approaches, and estimate the order of complexity (in time and memory) in terms of input size for each dimension, then given the size of each dimension, see if it executes fast enough, and within memory limits.

    Some algorithms that can be described as dynamic programming, include:

    • shortest path algorithms (Dijkstra, Floyd-Warshall, …)
    • string algorithms (longest common subsequence, Levenshtein distance, …)
    • and much more…
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am reading about Dynamic programming in Cormen etc book on algorithms. following is
I was reading notes on Dynamic programming , and I encountered the following comment.
I am trying to create a dynamic menu by reading an XML file using
I've been reading up on Dynamic Models and have been trying to create one.
here i am trying to generate a dynamic threads by reading xml document for
In my reading on dynamic and static typing, I keep coming up against the
I am reading properties file in the Dynamic web application as follows : try
I was reading about static and dynamic libraries. To explore more I created three
I'm reading an excellent article by Paul White - Dynamic Seeks and Hidden Implicit
I've been reading a few gaming books. And they always prefer to create the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.