Equal Sub Set Sum Problem.how many ways we can choose 3 and more consecutive number from set of N numbersSet of ten distinct two-digit natural numbersDivide set of numbers into twosub sets with equal totalsDetermine the number of subsets of $1,2,3,4,…,50$ whose sum of elements is larger than or equal to $638$.Sum of absolute difference between each pair of element in a setSum of combinations of setsA homework problem about set theoryBritish Maths Olympiad (BMO) 2003 Round 1 Question 4 what is wrong with this approach, can it be fixed?How many labeled trees are there if there're $4$ leaves that are set?Is there a cleverer way to find the largest Sidon set in 1,…,N?
How does a dynamic QR code work?
Is it "common practice in Fourier transform spectroscopy to multiply the measured interferogram by an apodizing function"? If so, why?
How to coordinate airplane tickets?
What historical events would have to change in order to make 19th century "steampunk" technology possible?
Forgetting the musical notes while performing in concert
Sums of two squares in arithmetic progressions
How could sorcerers who are able to produce/manipulate almost all forms of energy communicate over large distances?
Spam email "via" my domain, but SPF record exists
Can a virus destroy the BIOS of a modern computer?
Why were 5.25" floppy drives cheaper than 8"?
Is it possible to create a QR code using text?
What is the opposite of "eschatology"?
What exactly is ineptocracy?
Are British MPs missing the point, with these 'Indicative Votes'?
Obtaining database information and values in extended properties
Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?
Rotate ASCII Art by 45 Degrees
Why was Sir Cadogan fired?
Unlock My Phone! February 2018
How could indestructible materials be used in power generation?
OP Amp not amplifying audio signal
files created then deleted at every second in tmp directory
GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?
Should I tell management that I intend to leave due to bad software development practices?
Equal Sub Set Sum Problem.
how many ways we can choose 3 and more consecutive number from set of N numbersSet of ten distinct two-digit natural numbersDivide set of numbers into twosub sets with equal totalsDetermine the number of subsets of $1,2,3,4,…,50$ whose sum of elements is larger than or equal to $638$.Sum of absolute difference between each pair of element in a setSum of combinations of setsA homework problem about set theoryBritish Maths Olympiad (BMO) 2003 Round 1 Question 4 what is wrong with this approach, can it be fixed?How many labeled trees are there if there're $4$ leaves that are set?Is there a cleverer way to find the largest Sidon set in 1,…,N?
$begingroup$
I am trying to solve the equal subset sum problem , where we have to tell if its possible to generate to disjoint subsets whose (non-zero) sum is equal and you don't have to consider all the elements. The numbers will be unique and in the range of 1-99.
I used a recursive approach of considering each element to be part of first/second/neither set. I am looking to optimize the code.
The second approach is to generate all possible sums and if any sum occurs more than once it would return true. The problem with the second approach is I am not able to prove that the sum generated is from disjoint sets.
Consider sets A = 1,2,3,4 and B = 9,1. The sum of both the sets is 10 and they are disjoint. Is it safe to say that if we have a set of non disjoint sets whose sum is equal, can be converted into two disjoint sets of equal sum by removing the common elements. If not can somebody give me a counter example . Like in this case we will have 2,3,4 and 9.
combinatorics
$endgroup$
add a comment |
$begingroup$
I am trying to solve the equal subset sum problem , where we have to tell if its possible to generate to disjoint subsets whose (non-zero) sum is equal and you don't have to consider all the elements. The numbers will be unique and in the range of 1-99.
I used a recursive approach of considering each element to be part of first/second/neither set. I am looking to optimize the code.
The second approach is to generate all possible sums and if any sum occurs more than once it would return true. The problem with the second approach is I am not able to prove that the sum generated is from disjoint sets.
Consider sets A = 1,2,3,4 and B = 9,1. The sum of both the sets is 10 and they are disjoint. Is it safe to say that if we have a set of non disjoint sets whose sum is equal, can be converted into two disjoint sets of equal sum by removing the common elements. If not can somebody give me a counter example . Like in this case we will have 2,3,4 and 9.
combinatorics
$endgroup$
1
$begingroup$
It is quite safe to say that!
$endgroup$
– Mike Earnest
Mar 28 at 16:03
add a comment |
$begingroup$
I am trying to solve the equal subset sum problem , where we have to tell if its possible to generate to disjoint subsets whose (non-zero) sum is equal and you don't have to consider all the elements. The numbers will be unique and in the range of 1-99.
I used a recursive approach of considering each element to be part of first/second/neither set. I am looking to optimize the code.
The second approach is to generate all possible sums and if any sum occurs more than once it would return true. The problem with the second approach is I am not able to prove that the sum generated is from disjoint sets.
Consider sets A = 1,2,3,4 and B = 9,1. The sum of both the sets is 10 and they are disjoint. Is it safe to say that if we have a set of non disjoint sets whose sum is equal, can be converted into two disjoint sets of equal sum by removing the common elements. If not can somebody give me a counter example . Like in this case we will have 2,3,4 and 9.
combinatorics
$endgroup$
I am trying to solve the equal subset sum problem , where we have to tell if its possible to generate to disjoint subsets whose (non-zero) sum is equal and you don't have to consider all the elements. The numbers will be unique and in the range of 1-99.
I used a recursive approach of considering each element to be part of first/second/neither set. I am looking to optimize the code.
The second approach is to generate all possible sums and if any sum occurs more than once it would return true. The problem with the second approach is I am not able to prove that the sum generated is from disjoint sets.
Consider sets A = 1,2,3,4 and B = 9,1. The sum of both the sets is 10 and they are disjoint. Is it safe to say that if we have a set of non disjoint sets whose sum is equal, can be converted into two disjoint sets of equal sum by removing the common elements. If not can somebody give me a counter example . Like in this case we will have 2,3,4 and 9.
combinatorics
combinatorics
edited Mar 28 at 17:03
Andrés E. Caicedo
65.8k8160252
65.8k8160252
asked Mar 28 at 14:31
Syam KumarSyam Kumar
388
388
1
$begingroup$
It is quite safe to say that!
$endgroup$
– Mike Earnest
Mar 28 at 16:03
add a comment |
1
$begingroup$
It is quite safe to say that!
$endgroup$
– Mike Earnest
Mar 28 at 16:03
1
1
$begingroup$
It is quite safe to say that!
$endgroup$
– Mike Earnest
Mar 28 at 16:03
$begingroup$
It is quite safe to say that!
$endgroup$
– Mike Earnest
Mar 28 at 16:03
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
Ok, first of all: If you don't have to use all numbers, may I suggest to take $A = B = emptyset$?
Next: We can write
$$sum_x in A x = sum_x in A cap B x + sum_x in A backslash B x$$ and the same for $B$. This should already finish the proof as long as $A neq B$ (if they are equal you will get the empty set mentioned above).
$endgroup$
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
add a comment |
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "69"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3165962%2fequal-sub-set-sum-problem%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
Ok, first of all: If you don't have to use all numbers, may I suggest to take $A = B = emptyset$?
Next: We can write
$$sum_x in A x = sum_x in A cap B x + sum_x in A backslash B x$$ and the same for $B$. This should already finish the proof as long as $A neq B$ (if they are equal you will get the empty set mentioned above).
$endgroup$
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
add a comment |
$begingroup$
Ok, first of all: If you don't have to use all numbers, may I suggest to take $A = B = emptyset$?
Next: We can write
$$sum_x in A x = sum_x in A cap B x + sum_x in A backslash B x$$ and the same for $B$. This should already finish the proof as long as $A neq B$ (if they are equal you will get the empty set mentioned above).
$endgroup$
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
add a comment |
$begingroup$
Ok, first of all: If you don't have to use all numbers, may I suggest to take $A = B = emptyset$?
Next: We can write
$$sum_x in A x = sum_x in A cap B x + sum_x in A backslash B x$$ and the same for $B$. This should already finish the proof as long as $A neq B$ (if they are equal you will get the empty set mentioned above).
$endgroup$
Ok, first of all: If you don't have to use all numbers, may I suggest to take $A = B = emptyset$?
Next: We can write
$$sum_x in A x = sum_x in A cap B x + sum_x in A backslash B x$$ and the same for $B$. This should already finish the proof as long as $A neq B$ (if they are equal you will get the empty set mentioned above).
answered Mar 28 at 14:34
DirkDirk
4,478219
4,478219
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
add a comment |
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
Updated the question. I need non-zero sum.
$endgroup$
– Syam Kumar
Mar 28 at 14:38
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
$begingroup$
My answer still holds. As soon as you have two different sets $A,B$, you can cut out the intersection while still keeping the same sum, using the formula above. This sum will then be over a non-empty set and therefore positive, as you only consider positive numbers.
$endgroup$
– Dirk
Mar 28 at 14:52
add a comment |
Thanks for contributing an answer to Mathematics Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3165962%2fequal-sub-set-sum-problem%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
$begingroup$
It is quite safe to say that!
$endgroup$
– Mike Earnest
Mar 28 at 16:03