This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Given a set A = {2,3,5,....}
decide if every possible combination with repeated usage of set A makes the following true. Where sum(A) ≠sum(D)
, where D = every possible combination with repeated usage.
Edit: D must contain at least 2 multiplicities of an element. For example {2,2,3,5,6...}
Edit: A must consist of ONLY distinct numbers > 1. No repeated elements in A
I think this a special case of subset sum and partitioning, but we're allowed to use elements more than once.
Here's an example where the output would be FALSE
When A = {2,4}
, and the counter-result is {2,2,2}
. Notice that {2 2 2} = {2 4}
, as they both sum up to 6.
Since sum(S) = sum(D)
, the expression sum(A) ≠sum(D
is not true thus the output is FALSE
Subreddit
Post Details
- Posted
- 9 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/AskComputer...