Proving the Subset Sum Divisible by n

  • Thread starter daniel_i_l
  • Start date
  • Tags
    Sum
In summary, the conversation discusses the proof that for any set of n numbers, there exists a subset whose sum is divisible by n. This result applies to both sets and multisets, and it can be proven by considering the sums of the first k numbers for k = 1,...,n and their remainders mod n. If two different sums have the same remainder, then their difference is divisible by n.
  • #1
daniel_i_l
Gold Member
868
0
Prove that for every set of n numbers has a subset whose sum is divisible by n. I found this result very interesting. It's also fun to prove!
 
Mathematics news on Phys.org
  • #2
Must these numbers be in sequence? Like {4,5,6,7,8}, or could it be any set like {1,10}?

EDIT: Never mind...that was a silly question.
 
  • #3
can this subset be 1 number? or does it have to be summable?
 
  • #4
Both the set and subset can be any not emty set. But I forgot to mention that numbers can repeat themselves so that in this case {1,1,2,2,4} is a "set" of 5 numbers and to answer ices's question, {1} is a subset of it.
 
  • #5
No, that is NOT a "set" of 5 numbers! {1,1,2, 2,4}= {1, 2, 4} is a set of 3 numbers!
If you mean something else do not use the word "set".
 
  • #6
HallsofIvy said:
No, that is NOT a "set" of 5 numbers! {1,1,2, 2,4}= {1, 2, 4} is a set of 3 numbers!
If you mean something else do not use the word "set".

The result holds for sets. daniel_i_l's point was surely that the result naturally extends to multisets.
 
  • #7
work mod n. given n numbers, (integers), if we sum the first k of them, for k = 1,...,n, and we get n different numbers mod n, then one of them is congruent to n. done.if on the other hand two different sums have the same sum mod n , then subtracting them, gives a sum congr'uent to zero mod n. done again.
 

FAQ: Proving the Subset Sum Divisible by n

What is the Subset Sum problem?

The Subset Sum problem is a mathematical problem that involves finding a subset of a set of integers that adds up to a given target value. It is a well-known problem in computer science and has applications in cryptography and data compression.

What does it mean for a Subset Sum to be divisible by n?

A Subset Sum is divisible by n if the sum of the numbers in the subset is evenly divisible by n. In other words, the sum of the subset can be divided by n without any remainder.

Why is proving the Subset Sum Divisible by n important?

Proving that a Subset Sum is divisible by n is important because it allows us to verify the correctness of algorithms that solve the Subset Sum problem. It also has practical applications in fields such as cryptography, where proving the divisibility of a subset can be used to ensure the security of data.

What is the most efficient way to prove the Subset Sum Divisible by n?

The most efficient way to prove the Subset Sum Divisible by n is to use the modulus operator (%). This operator returns the remainder when one number is divided by another. If the remainder is 0, then the subset sum is divisible by n.

Can the Subset Sum Divisible by n be proven for all values of n?

No, the Subset Sum Divisible by n cannot be proven for all values of n. Each value of n would require a specific proof, and some values of n may not have a known proof at this time. However, there are general techniques and algorithms that can be used to prove the Subset Sum Divisible by n for many values of n.

Similar threads

Replies
3
Views
2K
Replies
1
Views
2K
Replies
8
Views
2K
Replies
4
Views
1K
Replies
9
Views
9K
Replies
2
Views
2K
Replies
3
Views
3K
Back
Top