np-complete


Effect of number base when proving NP completeness of numerical problems


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.
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.

Related Links

Given a graph with n vertices and m edges, does it contain a simple cycle of length ⌈n/2⌉?
NP-complete or NP-hard?
Why using linear integer programming (ILP) though it is NP-Complete?
Prove NP-Completeness of generating 2 shortest routes over given edge grouping constraints?
Reduction to Clique prob
Approximation Algorithm between two NP compete problems
Is it possible to find the probability to a solution of NP-complete problems?
Knapsack for each weight having multiple values - Is it possible to solve?
Reduction from Maximum independent set to Dominating set to prove the Dominating set is NP-complete
How I can prove that 2-CNF is not NP-complete?
When NP complete becomes NP hard
Can it be proven no polynomial algorithm exists for an NP-Complete prob.?
Effect of number base when proving NP completeness of numerical problems
How to reduce 3COLOR to 3SAT?
proof NP-complete
Proof that Dominating Set is NP-Complete

Categories

HOME
vbscript
react-virtualized
sd-card
rsyslog
jira
paw-app
dxl
installshield
blueprintjs
ojdbc
constraint-programming
virtualization
gorm
google-cloud-ml
spring-tool-suite
commonmark
leiningen
jsprit
opentracing
ghc
ef-migrations
undefined
django-cms
viewport
ml
errorlevel
p-value
bootstrap-duallistbox
nhapi
fluentvalidation
facebook-apps
media-queries
bosh
exuberant-ctags
karaf
gtrendsr
subset-sum
mapdb
sequential
bower-install
lto
ibpy
heightmap
reactive-cocoa-5
.net-4.6.2
hibernate-tools
darcs
word-vba-mac
android-fonts
adxstudio-portals
autorest
bstr
holder.js
freedesktop.org
spim
lib.web.mvc
jmeter-maven-plugin
tarjans-algorithm
microbenchmark
splash
graph-drawing
jsapi
device-orientation
bigbluebutton
facebook-graph-api-v2.4
website-monitoring
tween
tt-news
applescript-objc
xcode-6.2
sgen
transcoding
oracle-warehouse-builder
html5-notifications
file-locking
eventual-consistency
chronoforms
seed
limejs
jelly
robotics-studio
delphi-6
dice
jquery-ui-layout
libc++
javax.script
floating
ext3
user-friendly
spec#

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App