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

  • SEARCH
  • Home
  • 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 7561957
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:17:36+00:00 2026-05-30T13:17:36+00:00

I have difficuities understanding why 0/1 knapsack using dynamic programming is not polynomial time

  • 0

I have difficuities understanding why 0/1 knapsack using dynamic programming is not polynomial time solvable. Similar question had been asked here. Why is the knapsack problem pseudo-polynomial?. Someone gave explanation, but I still don’t get why should we consider the binary representation for the weight input. How about n, if it’s considered in binary representation, can I say it’s exponentional to number of the items? Similarly, for any other polynomial time algorithms I can claim them having exponentional time complexity, because every input are represented in binary digits in computer. I know I were wrong. Can someone point out why in a easy understanding way? Thanks in advance.

  • 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-30T13:17:38+00:00Added an answer on May 30, 2026 at 1:17 pm

    A very simple way of thinking about it is that if you double the limit, the size of the input only increases by one bit (since the limit is part of the input), while the run time is doubled. That is clearly exponential behavior with respect to the input size.

    However, while doubling the number of items also doubles the run time, it also doubles the size of the input items, so that part of the relationship between input size and run time is only linear.

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

Sidebar

Related Questions

I have been using Java for a long time, and for quite some time
I am reading the book: Intel Threading Building Blocks. I often have difficulties understanding
I have some difficulties for using Ruby block, passing in a method. As in
I am having difficulties how to construct my question, but if I have to
Have just started using Google Chrome , and noticed in parts of our site,
Have you guys had any experiences (positive or negative) by placing your source code/solution
I have the following regex in a C# program, and have difficulties understanding it:
I'm having difficulties understanding bzr init-repo . I have 3 projects that I want
I have some difficulties with json deserialization using GSon and I hope somebody can
I have difficulties understanding how NSAutoReleasePool works. 1) Does NSAutoReleasePool keep track of each

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.