Talk:McNuggets problem: Difference between revisions

From Rosetta Code
Content added Content deleted
Line 20: Line 20:


It would also get around the use of a trade-marked (TM or ™) term(s) and also a registered (R or ®) trade-mark term, but it seems that Wikipedia skipped around those problems.   &bsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:35, 25 October 2018 (UTC)
It would also get around the use of a trade-marked (TM or ™) term(s) and also a registered (R or ®) trade-mark term, but it seems that Wikipedia skipped around those problems.   &bsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:35, 25 October 2018 (UTC)

==Improve tag on Python entry==
I added an improve tag on the Python entry as it does not look or read like idiomatic Python. To avoid an edit war I will sate my reasons:

# Commented type annotations read like those from a different programming language.
# Use of map/filter over comprehensions.
# Use of trivial functions: fst, id, _not, snd, swap
# Overwriting a builtin name: id
# main() without `if __name__ == "__main__"`
# Shares structure and naming with examples from other languages.

It reads like a translation from another language and RC is about idiomatic code. [[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 07:14, 26 October 2018 (UTC)

Revision as of 07:18, 26 October 2018

draft tasks seem to be born fully-grown lately

Perhaps somebody could comment or add some musings on how old a draft should be before it grows up?     -- Gerard Schildberger (talk) 21:57, 25 October 2018 (UTC)

task name

You beat me to the punch.   I was going to enter a Rosetta Code problem next week which would've been called the Frobenius problem or some such   (I'm currently working on the wording of an unrelated Rosetta Code task).

 The function  Frobenius(a list of some numbers)   returns the largest number for the Frobenius equation:
                       I1*x1  +  ...  +  In*Xn   =   B.   
 At least two integers should be supplied.  If the integers aren't relatively prime,
 the result is infinity and is indicated by a negative one (-1) which is returned.  
 If any of the integers is equal to  1  (unity),  then  0  (zero) is returned.     
 Another way of approaching the description of the Frobenius number is:   given a set of integer-demoniation
 stamps (say,    and  ),  what is the largest value that those stamps can't represent?

This is why this problem is also known as the postage-stamp problem and was a real problem when buying stamps for mailing a package at the post-office which may have a restricted set of stamps, and people wanted/collected the different stamps, not wanting 41 one-cent stamps put on a package or envelope.   (Now-a-days, of course, the post office just produces a digital imprint of the exact decimal postage amount.)   The U.S. Post Office has (or used to) print a unique stamp for every cent denomination up to and including $1.   I don't know how many stamps are still being issued for over a (U.S.) dollar anymore.

I would have added some sets of numbers that have no highest value,   as well as "stamps" that are multiples of another.

I would not have restricted the high limit to   100,   but left that open-ended   (in other words, infinity).

It would also get around the use of a trade-marked (TM or ™) term(s) and also a registered (R or ®) trade-mark term, but it seems that Wikipedia skipped around those problems.   &bsp; -- Gerard Schildberger (talk) 21:35, 25 October 2018 (UTC)