Talk:Sum to 100

Revision as of 00:18, 5 January 2017 by rosettacode>Gerard Schildberger (→‎extra credit: moved the complete list of solutions of "9" from the "page" area.)

A 'sum' that can be shown but not expressed ?

Not sure that I have understood your third request. Something that can be 'shown' but not 'expressed' ? Sounds appeallingly ineffable and mysterious, but perhaps not entirely clear ...

Judging by your undo of my first suggestion, I guess that you are not simply looking for the first or lowest-valued integer than can't be expressed as a sum constructed in this way, but then I don't actually have any idea of what you are asking for. Perhaps some kind of example or concretisation might clarify ? Hout (talk) 01:42, 1 January 2017 (UTC)

See the REXX's output to help understand what is required.   I have changed the word   first   to   lowest   which is much clearer to what was intended   (I knew what I meant, but it was somewhat unclear in this context).   (Note that negative sums/integers are possible, these sums are just negative "versions" of the positive sums, so the requirement was worded to avoid looking for negative results.)   Since the sums are integers (as there is no way to get a non-integer sum from additions and/or subtractions of decimal digits or whole numbers).   I used the word "expressed" as it isn't necessary to have the expression "shown".   The word "shown" (to me) seems to indicate to display, not necessarily to express (in this case, mathematically).   To answer your question, yes, it is possible.   Showing something doesn't mean that it is being expressed   (in the sense that it is being understood).   I believe it boils down to word choices.   I was trying for a concise wording of the requirement without being unnecessarily wordy (or obtuse).   It's a fine art.   -- Gerard Schildberger (talk) 02:04, 1 January 2017 (UTC)
I've also added a trailing phrase to the 3rd requirement that (I think) fits in more to what you originally addressed.   -- Gerard Schildberger (talk) 02:09, 1 January 2017 (UTC)
Would it be consistent with your meaning to replace the word 'sum' with 'integer' ? Also if you are looking for the lowest integer that is inexpressible in these terms, perhaps it would be helpful to give an example of a higher integer of this kind, and demonstrate/explain its inexpressibility within this system ? Hout (talk) 02:16, 1 January 2017 (UTC)
I used the word sum because it was already used in the task's preamble and the word was also defined (in context).   Introducing another word (integer) would, I think, just belabor the effort to have another version of the sum word.   The next number   (after 211)   that can't be expressed within the rules is   219.   Another example of a sum that can't be expressed is   5791.   I'm not sure how to demonstrate/explain its inexpressibility other than to show (display)   all   the possible mathematical expressions that don't (can't) express the   5791   sum.   This would be somewhat of a strange proof (and voluminous), but not unheard of.   -- Gerard Schildberger (talk) 02:29, 1 January 2017 (UTC)
FWIW my experience as a reader is that using the word 'sum' at that point certainly proved confusing at first reading, and even now feels distractingly odd. 211 is certainly a number – a member of the set of integers – but the point you are making about it seems to be precisely that it is not a sum (the result of an addition) within this system. Hout (talk) 02:38, 1 January 2017 (UTC)
I'm not saying that 211 isn't an integer or a number --- just that it (the sum of 211) can't be expressed mathematically in the context of the rules for this puzzle as stated in the task's preamble.   211 is a sum (in particular, the lowest sum) of the set of sums that can't be expressed within the rules.   -- Gerard Schildberger (talk) 02:56, 1 January 2017 (UTC)
PS on the issue of an example; an existence proof would be fine – you could just give an example of a number like 5791, say that it can't be expressed by a sum that is restricted to these permutations of digits and signs, and ask for code that finds the lowest positive integer that shares this property. Hout (talk) 02:46, 1 January 2017 (UTC)
That seems overly wordy just to ask for the lowest positive sum that can't be expressed (within the rules).   In particular, the requirement was expressly worded to find   that   sum.   However, I will add an example (i.e.:   such as 5074).   -- Gerard Schildberger (talk) 02:56, 1 January 2017 (UTC)


extra credit

I had initially thought to add an extra credit solution for the   largest   sum   (except for the obvious   123456789).   I'm not sure it would be a worthwhile (optional) requirement, it could be pretty CPU intensive.   -- Gerard Schildberger (talk) 04:21, 1 January 2017 (UTC)

complete list of solutions for   9

For those that are interested (or need a sanity check), the 46 solutions (for the sum of 9) are:

solution:  9  ◄───►  -1+2+3+4+5+6+7-8-9
solution:  9  ◄───►  -1+2+3-4+5-6-7+8+9
solution:  9  ◄───►  -1+2+3-4-5+6+7-8+9
solution:  9  ◄───►  -1+2+3-45+67-8-9
solution:  9  ◄───►  -1+2+34+56+7-89
solution:  9  ◄───►  -1+2-3+4+5-6+7-8+9
solution:  9  ◄───►  -1+2-3+4-5+6+7+8-9
solution:  9  ◄───►  -1+23+4+5+67-89
solution:  9  ◄───►  -1+23+4-5-6-7-8+9
solution:  9  ◄───►  -1+23-4+5-6-7+8-9
solution:  9  ◄───►  -1+23-4-5+6+7-8-9
solution:  9  ◄───►  -1-2+3+4+5+6-7-8+9
solution:  9  ◄───►  -1-2+3+4+5-6+7+8-9
solution:  9  ◄───►  -1-2+3-4-5-6+7+8+9
solution:  9  ◄───►  -1-2+3-4-56+78-9
solution:  9  ◄───►  -1-2-3+4-5+6-7+8+9
solution:  9  ◄───►  -1-2-3+45-6-7-8-9
solution:  9  ◄───►  -1-2-3-4+5+6+7-8+9
solution:  9  ◄───►  -1-2-34+56+7-8-9
solution:  9  ◄───►  -1-23+45-6-7-8+9
solution:  9  ◄───►  -12+3-45-6+78-9
solution:  9  ◄───►  -12+34+5+6-7-8-9
solution:  9  ◄───►  -12+34+56-78+9
solution:  9  ◄───►  -12-34+5+67-8-9
solution:  9  ◄───►  1+2+3+4-5-6-7+8+9
solution:  9  ◄───►  1+2+3-4+5-6+7-8+9
solution:  9  ◄───►  1+2+3-4-5+6+7+8-9
solution:  9  ◄───►  1+2-3+4+5+6-7-8+9
solution:  9  ◄───►  1+2-3+4+5-6+7+8-9
solution:  9  ◄───►  1+2-3-4-5-6+7+8+9
solution:  9  ◄───►  1+2-3-4-56+78-9
solution:  9  ◄───►  1+2-34-56+7+89
solution:  9  ◄───►  1+23+4-5-6-7+8-9
solution:  9  ◄───►  1+23-4+5-6+7-8-9
solution:  9  ◄───►  1+23-45+6+7+8+9
solution:  9  ◄───►  1-2+3+4+5+6-7+8-9
solution:  9  ◄───►  1-2+3-4-5+6-7+8+9
solution:  9  ◄───►  1-2-3+4+5-6-7+8+9
solution:  9  ◄───►  1-2-3+4-5+6+7-8+9
solution:  9  ◄───►  1-2-3-4+5+6+7+8-9
solution:  9  ◄───►  1-2-3-4-5-67+89
solution:  9  ◄───►  1-23+4+5-67+89
solution:  9  ◄───►  1-23+45-6-7+8-9
solution:  9  ◄───►  1-23-4+5+6+7+8+9
solution:  9  ◄───►  1-23-45-6-7+89
solution:  9  ◄───►  12-34-56+78+9
       46 solutions found for 9
Return to "Sum to 100" page.