Can the Subset Sum Problem Be Solved in Polynomial Time?

  • Thread starter Thread starter RagingHadron
  • Start date Start date
AI Thread Summary
The discussion revolves around the subset-sum problem, specifically whether a subset of the set {-2, -3, 15, 14, 7, -10} can sum to zero. It highlights that no polynomial-time algorithm is known for this problem, only exponential-time algorithms, which require (2^n)-1 tries. The conversation touches on the relationship between the existence of a polynomial-time algorithm and the P=NP question. A participant attempts to formulate a polynomial-time algorithm but initially presents a flawed mathematical expression. Clarification is provided that a subset is a set itself and cannot equal a number, emphasizing the correct interpretation of the problem as seeking a non-empty subset whose sum is zero. Ultimately, the participant recognizes their mistake in the approach.
RagingHadron
Messages
18
Reaction score
0
So I really know very little about the subject but from the little I could gather online...
Consider the subset problem on wikipedia. Does a subset of {−2, −3, 15, 14, 7, −10} equal zero? It shows the work for you and then says that no algorithm to find it in polynomial time is known, only in exponential (with (2^n)-1 tries) It says that an algorithm can only exist in polynomial time if P=NP. So now, can we not set (2^n)-1=n^x so that the algorithm in polynomial time is n^((log((2^n)-1)+2i∏c)/(log(n)) where c∈Z, Z being the set of integers. Does that make any sense?
 
Technology news on Phys.org
RagingHadron said:
So I really know very little about the subject but from the little I could gather online...
Consider the subset problem on wikipedia.
http://en.wikipedia.org/wiki/Subset-sum_problem
RagingHadron said:
Does a subset of {−2, −3, 15, 14, 7, −10} equal zero?
As you have written this, it doesn't make sense. Each subset of some other set is itself a set, and a set is not equal to a number. The actual description is "is there a non-empty subset whose sum is zero?"
RagingHadron said:
It shows the work for you and then says that no algorithm to find it in polynomial time is known, only in exponential (with (2^n)-1 tries) It says that an algorithm can only exist in polynomial time if P=NP. So now, can we not set (2^n)-1=n^x so that the algorithm in polynomial time is n^((log((2^n)-1)+2i∏c)/(log(n)) where c∈Z, Z being the set of integers. Does that make any sense?
 
Mark44 said:
The actual description is "is there a non-empty subset whose sum is zero?"

Yeah that's what I meant. But what was wrong with the rest of it?
 
Which wikipedia article were you reading? I provided a link to the one I thought you were referring to, but I don't see in that one some of what you're talking about.
 
It was in the p versus np problem page specifically, http://en.m.wikipedia.org/wiki/P_versus_NP_problem here. It's in the third paragraph. But was the work that I did correct/incorrect? I'm sure that there's a flaw in my approach to the problem somewhere seeing as it's so simple...
 
Never mind, I saw what my flaw was.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
What percentage of programmers have learned to touch type? Have you? Do you think it's important, not just for programming, but for more-than-casual computer users generally? ChatGPT didn't have much on it ("Research indicates that less than 20% of people can touch type fluently, with many relying on the hunt-and-peck method for typing ."). 'Hunt-and-peck method' made me smile. It added, "For programmers, touch typing is a valuable skill that can enhance speed, accuracy, and focus. While...
I had a Microsoft Technical interview this past Friday, the question I was asked was this : How do you find the middle value for a dataset that is too big to fit in RAM? I was not able to figure this out during the interview, but I have been look in this all weekend and I read something online that said it can be done at O(N) using something called the counting sort histogram algorithm ( I did not learn that in my advanced data structures and algorithms class). I have watched some youtube...

Similar threads

Back
Top