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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:59:06+00:00 2026-05-27T23:59:06+00:00

I am reading about NP completeness from the algorithm design book of tardos, In

  • 0

I am reading about NP completeness from the algorithm design book of tardos, In the section of proving subset sum is NP complete, it is written that –
The algorithm developed for subset sum has running time of O(nW). If an instance of 100 numbers is given, each of which is 100 bits long then the input is only 100 * 100 = 10000 digits, but W is roughly 2^100.
I dont understand this claim, why is W 2^100 ? what is the effect of base on this problem, I mean if we change it to some other base x, would W be x^100 ? what if we change it into unary base ?
thanks.

  • 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-27T23:59:06+00:00Added an answer on May 27, 2026 at 11:59 pm

    To understand this you need to think about how the running time of the algorithm changes as the size of the numbers in the problem set grows. I’m assuming that your textbook describes the usual dynamic programming attack on subset sum. That algorithm’s run time grows linearly with the width of the problem set. (The problem set width is the sum of the positive numbers in the set minus the sum of the negative numbers.) This width grows exponentially as you increase the size of the numbers in the set. For example, if you use 101 bit numbers instead of 100 bit numbers, the width of the problem set doubles. Move to 102 bit numbers and the problem set width doubles again. And since the algorithm’s run time grows linearly with the problem set width, that run time doubles each time as well. This doubling is exponential growth in run time as the input size grows linearly, so this is not a polynomial-time algorithm.

    If the numbers were written in a different base > 1, then yes, you would see exponential growth of the problem width in that base. For example, in base 10 adding another digit makes the problem width ten times larger. If you switch to unary, you lose the exponential growth in the problem set size, but instead the input size for any given problem is exponentially larger than it would be in bases > 1, so you gain nothing.

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

Sidebar

Related Questions

I'm currently reading about algorithmic analysis and I read that a certain algorithm (weighted
In reading about design patterns I read that the advantage of strategy over template
Reading about Delphi's Exit statement (see here for instance), I cannot ignore that writing
When reading about pipes in Advanced Programming in the UNIX Environment, I noticed that
While reading some papers about the Turing completeness of recurrent neural nets (for example:
When reading about and playing with Rails last year, one of the tools that
After reading about CCR : http://www.infoq.com/news/2008/12/CCR I get the impression that it does pretty
After reading about the System.Diagnostics.Contracts.Contract static class that has been influenced by the awesomeness
After reading about Erlang's lighweight processes I was pretty much sure that they were
I keep reading about C99 and C++11 and all these totally sweet things that

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.