Subsequence that Sums Up to Half the Total Sum

Click For Summary

Discussion Overview

The discussion revolves around the problem of finding a subsequence within a finite sequence of numbers that sums to half the total sum of the sequence. This problem is related to concepts in algorithm design and combinatorial optimization, with references to electoral scenarios and the knapsack problem.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant expresses uncertainty about the possibility of a tie in presidential elections and seeks an efficient algorithm for finding a subsequence that sums to half the total sum.
  • Another participant suggests that the problem is akin to the knapsack problem and mentions the large number of combinations involved, implying that a brute force method may not be necessary.
  • A third participant provides a specific electoral scenario that could lead to a tie, citing a statistical source that estimates the probability of such an event.
  • Another participant references the partition problem and suggests that it can be approached using dynamic programming techniques.

Areas of Agreement / Disagreement

Participants have not reached a consensus on the most efficient algorithm for the problem, and multiple approaches and perspectives are presented without resolution.

Contextual Notes

There are assumptions regarding the nature of the sequence and the total sum, as well as the implications of the electoral scenario discussed. The relationship between the subsequence problem and known problems like the knapsack and partition problems is noted but not fully explored.

TCAZN
Messages
1
Reaction score
0
Hi all,

I was just looking at the U.S. electoral map, and I was wondering if there could possibly be a tie in presidential elections (the answer is probably no). I tried to think of an efficient algorithm to answer this question, but due to my limited intelligence and imagination, all I could think of is the brute force method. I guess in this particular problem, efficiency probably does not matter since the number of states definitely doesn't follow any kind of Moore's Law.

Anyways, I was just wondering if anyone knows an efficient algorithm for the following problem:

Given a finite sequence $$a_1, a_2, \dots a_n,$$ determine whether there is a sub-sequence $$a_{i_1}, a_{i_2}, \dots a_{i_k}$$ such that $$\sum_{j=1}^{k} a_{i_j} = \frac{1}{2} \sum_{j=1}^{n}a_j$$.
 
Technology news on Phys.org
Google for "knapsack problem"

In this case, there are 2^51 combinations of states and only 500 or so possible values,
so it's almost certain some combination has half the votes. (unless the total number of votes is odd)
Just select states at random with a coin flip and you'll get it within a few thousand tries.
 
According to the New York Times’ FiveThirtyEight blog, one possible scenario to give each candidate 269 electoral votes would be if President Obama wins the following:

Washington, D.C.
California
Oregon
Washington
Hawaii
New Mexico
Minnesota
Michigan
Illinois
Wisconsin
Ohio
Pennsylvania
Maryland
Delaware
New Jersey
New York
Connecticut
Massachusetts
Rhode Island
New Hampshire
Vermont
Maine

Under that scenario, Gov. Romney would win all other states, including battleground states like Florida, Iowa, Virginia, Colorado and Nevada. The FiveThirtyEight blog pegs the chance of a tie occurring at 1.3%.

Source: http://foxnewsinsider.com/2012/10/24/what-happens-if-the-presidential-election-ends-in-a-tie/
 
Last edited by a moderator:
Look up the partition problem. It seems that it can be solved with dynamic programming.
 

Similar threads

Replies
4
Views
1K
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 27 ·
Replies
27
Views
6K
  • · Replies 13 ·
Replies
13
Views
4K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K