Subsequence that Sums Up to Half the Total Sum

Click For Summary
SUMMARY

The discussion centers on the problem of determining whether a subsequence of a given finite sequence can sum to half of the total sum of the sequence. The problem is likened to the knapsack problem and suggests that dynamic programming may provide an efficient solution. The user notes that brute force methods are inefficient due to the exponential number of combinations, particularly with 2^51 combinations in the context of U.S. electoral votes. The FiveThirtyEight blog estimates a 1.3% chance of a tie in presidential elections, highlighting the relevance of this algorithmic approach.

PREREQUISITES
  • Understanding of subsequences and their properties
  • Familiarity with the knapsack problem
  • Knowledge of dynamic programming techniques
  • Basic concepts of combinatorial algorithms
NEXT STEPS
  • Research dynamic programming solutions for the partition problem
  • Explore the knapsack problem and its variations
  • Learn about combinatorial optimization techniques
  • Investigate algorithms for generating subsequences efficiently
USEFUL FOR

Mathematicians, computer scientists, algorithm developers, and anyone interested in optimization problems and their applications in real-world scenarios such as electoral systems.

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.
 
We have many threads on AI, which are mostly AI/LLM, e.g,. ChatGPT, Claude, etc. It is important to draw a distinction between AI/LLM and AI/ML/DL, where ML - Machine Learning and DL = Deep Learning. AI is a broad technology; the AI/ML/DL is being developed to handle large data sets, and even seemingly disparate datasets to rapidly evaluated the data and determine the quantitative relationships in order to understand what those relationships (about the variaboles) mean. At the Harvard &...

Similar threads

Replies
4
Views
1K
Replies
2
Views
2K
Replies
3
Views
1K
  • · 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