Talk:Sum to 100: Difference between revisions

yes
(yes)
 
(5 intermediate revisions by 2 users not shown)
Line 21:
::::: 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).   -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 02:56, 1 January 2017 (UTC)
 
==a discussion of the task's requirements and wording==
This (first) section of comments was moved here to the ''talk'' page from the task's requirements.   -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:07, 11 July 2017 (UTC)
 
Note: If you allow/disallow negative first numbers you do get different results. If you allow negative first numbers, which you should according to the specification; then you get at least two targets with the same highest number of solutions: The positive and negative versions of the same target, only the positive one is between 0 to 123456789. The specification assumes there is only one positive target with the maximum number of solutions. It is worth looking for multiple targets with the same number of solutions, just in case there are more. This is especially true if you try the variants with different lists of digits. For example using the digits '987654321' and excluding a negative first number comes up with two distinct targets with the same maximum number of solutions, both of which happen to be positive. If you are playing with the asymetric version with out leading negative numbers of different lists of digits the sums with the highest number of solution may only be negative. In this case it is worth excluding the test to show only positive totals and put up with seeing duplicate +ve and -ve solutions.
 
Robin Murison‎
 
:::::: Added signature of Robin Murison by [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:07, 11 July 2017 (UTC)
 
== extra credit ==
Line 33 ⟶ 41:
 
:: For performance note that it is not necessary to generate the strings to count the solutions. There are 2 * 3 ** (base-2) possible strings. In base 2 the maximum value is 1 the minimum value -1. 0 can not be generated so 66% of values can be represented. The number of possible strings increases exponentially with the base, so to stretch this task for extra credit we could ask what is the %age in base 64, or 60 if we want to be Babylonian, or why not more. I often read that we use base 10 because we have 10 fingers, is there any archeological evidence that the Babylonians were severely deformed? --[[User:Nigel Galloway|Nigel Galloway]] ([[User talk:Nigel Galloway|talk]]) 12:54, 25 February 2017 (UTC)
:::: I know you're kidding, and of course the Babylonians had ten fingers, but the assumption is that they realized base 60 would be an advantageous base and chose it with intention, rather than just going with the number of digits they were born with. I don't know of anyone else who independently adopted base 60, but base 10 was far from universal around the world; the Mayans used base 20, the Hawaiians base 12, some other Pacific Islanders base 4... --[[User:Markjreed|Markjreed]] ([[User talk:Markjreed|talk]]) 00:54, 25 March 2024 (UTC)
:::: Apparently there ''is'' indeed some archeological evidence that nearly all Babylonians had ''twelve'' finger knuckles on the back of each hand, as well as ''five'' digits on the other side. And, albeit less impressively, ancient Mayan skeletons show that both of their hands (also with five digits apiece) were also connected to the rest of them by so-called "wrists"... (IKUAKAT) --[[User:Petelomax|Petelomax]] ([[User talk:Petelomax|talk]]) 04:42, 25 March 2024 (UTC)
 
==complete list of solutions for   '''9'''==
Line 394 ⟶ 404:
sums of 211 219 221 227 229 233 235 239 241 247 277 284 286 287 300 have the minimum number of solutions: 0
</pre>
 
==a discussion of the task's requirements and wording==
This (added) section of superscript comments was moved here to the &nbsp; ''talk'' &nbsp; page from the task's requirements (the task's preamble). &nbsp; I also changed the hard-to-read superscript text to be displayed as "regular" text). &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:12, 11 July 2017 (UTC)
 
:: Note: If you allow/disallow negative first numbers you do get different results. If you allow negative first numbers, which you should according to the specification; then you get at least two targets with the same highest number of solutions: The positive and negative versions of the same target, only the positive one is between 0 to 123456789. The specification assumes there is only one positive target with the maximum number of solutions. It is worth looking for multiple targets with the same number of solutions, just in case there are more. This is especially true if you try the variants with different lists of digits. For example using the digits '987654321' and excluding a negative first number comes up with two distinct targets with the same maximum number of solutions, both of which happen to be positive. If you are playing with the asymetric version with out leading negative numbers of different lists of digits the sums with the highest number of solution may only be negative. In this case it is worth excluding the test to show only positive totals and put up with seeing duplicate +ve and -ve solutions.
 
:: Robin Murison‎
 
::::::: Added signature of &nbsp; ''Robin Murison'' &nbsp; by [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:12, 11 July 2017 (UTC)
 
-----
 
Yes, a minus sign ('''-''') is allowed before the first digit(s) &nbsp; This is specifically allowed from the 2<sup>nd</sup> sentence in the task's preamble, there is no '''if''' about it.
 
There is only one sum (you call it a target) that has a maximum. &nbsp; This wasn't assumed, it was determined by examination of all possible targets (which were non-negative sums), in part, to give programmers &nbsp; ''a priori'' &nbsp; information. &nbsp; The 2<sup>nd</sup> task requirement asks '''the''' sum which has the maximum number of solutions &nbsp; (from zero to infinity --- this excludes negative sums/targets). &nbsp; There is only one correct answer --- but you may assume there will be more than one solution, and if so, the wording will be changed. &nbsp; The task's preamble could've been worded as asking for &nbsp; '''sum(s)'''; &nbsp; it was a word choice that I made when composing the task's requirements.
 
Note that negative sums (targets) are specifically excluded as per the task's description/requirements.
 
It &nbsp; ''is'' &nbsp; worth looking for multiple targets (and indeed, that is a requirement of this task) with the same --- or for that matter --- any number of solutions, this is &nbsp; a &nbsp; purpose of this task.
 
The use of the digit string of '''987654321''' isn't allowed, only the digit string of '''123456789'''.
<br>-- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 19:07, 11 July 2017 (UTC)
7,794

edits