kotlin icon indicating copy to clipboard operation
kotlin copied to clipboard

Description of Luhn problem is confusing

Open blueglyph opened this issue 5 years ago • 2 comments

The main criterion is: "If the sum is evenly divisible by 10, then the number is valid."

It should be: "If the sum is divisible by 10, then the number is valid."

My first solution failed because I was verifying that sum%20 == 0, and I was wondering why "091" was supposed to be a valid number. I had some doubts about the "evenly divisible by 10" formulation, and a reference on the Luhn algorithm confirmed the problem.

=> Using ambiguous words in problem descriptions is dangerous, "evenly" means in even shares, but may also mean in a paired manner (even as opposite of odd) - two, four, ... shares of 10's (at least in my Oxford dictionary). The first example further supports that interpretation, unfortunately. That was obviously not the intent, and although the interpretation is arguable, the word "evenly" is simply not necessary in this case: I would remove it to avoid any possible confusion.

blueglyph avatar Jun 05 '19 20:06 blueglyph

Thanks, @blueglyph !

dector avatar Nov 11 '19 21:11 dector

According to https://en.wiktionary.org/wiki/evenly_divisible and https://math.stackexchange.com/questions/58555/what-is-meant-by-evenly-divisible it's common English so at least not wrong.

As it is on the other hand indeed unnecessary, it could be removed to help non-native speakers.

I would suggest to reassign this bug to "problem-descriptions". If the master description is changed then all language tracks and not only Kotlin's will update their descriptions automatically.

lathspell avatar Jan 28 '20 22:01 lathspell