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 5954285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:56:56+00:00 2026-05-22T17:56:56+00:00

When I have a problem with optimal substructur and no subproblem shares subsubproblems then

  • 0

When I have a problem with optimal substructur and no subproblem shares subsubproblems then I can use a divide and conquer algorithm to solve it?

But when the subproblem shares subsubproblems (overlapping subproblems) then I can use dynamic programming to solve the problem?

Is this correct?

And how is greedy algorithms similar to dynamic programming?

  • 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-05-22T17:56:57+00:00Added an answer on May 22, 2026 at 5:56 pm

    When I have a problem with optimal
    substructur and no subproblem shares
    subsubproblems then I can use a divide
    and conquer algorithm to solve it?

    Yes, as long as you can find an optimal algorithm for each kind of subproblem.

    But when the subproblem shares
    subsubproblems (overlapping
    subproblems) then I can use dynamic
    programming to solve the problem?

    Is this correct?

    Yes. Dynamic programming is basically a special case of the family of Divide & Conquer algorithms, where all subproblems are the same.

    And how is greedy algorithms similar
    to dynamic programming?

    They’re different.
    Dynamic programming gives you the optimal solution.
    A Greedy algorithm usually give a good/fair solution in a small amount of time but it doesn’t assure to reach the optimum.

    It is, let’s say, similar because it usually divides the solution construction in several stages in which it takes choices that are locally optimal. But if stages are not optimal substructures of the original problem, then normally it doesn’t lead to the best solution.

    EDIT:

    As pointed out by @rrenaud, there are some greedy algorithms that have been proven to be optimal (e.g. Dijkstra, Kruskal, Prim etc.).
    So, to be more correct, the main difference between greedy and dynamic programming is that the former is not exhaustive on the space of solutions while the latter is.
    In fact greedy algorithms are short-sighted on that space, and each choice made during solution construction is never reconsidered.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can anyone help me find an optimal Dynamic programming algorithm for this problem On
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
I'm wondering if there is an optimal solution for this problem: I have a
I know it's not optimal, but I have to work with it, a page
So I have to solve the knapsack problem for class. So far, I've come
This is possibly a problem with possibly no optimal solution. Suppose I have a
What would be the optimal solution for the following problem? I have original_string =
I have a bit of a problem with the algorithm proposed as homework by
I have problem in some JavaScript that I am writing where the Switch statement
I have problem with return statment >.< I want to store all magazine names

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.