V
V
Volodymyr Palamar2022-02-22 15:59:43
Character encoding
Volodymyr Palamar, 2022-02-22 15:59:43

How to learn the checksum algorithm without many examples?

Hello, there are several codes of this format. By a
475314 / 2021

simple observation, I realized that the last digit (4) is the digit to check.
The documents issued in a row differed by the penultimate digit +1

. If 20 (21) is added in front of the code and the EAN-8 algorithm is used, then the code is sometimes (mostly) converge cases, and if not, then simply increase 21 by 22 or 22 by 23 and it works. But I would like to be sure, because it concerns that this is just an accident

* I have ± 5 examples of such codes (

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2022-02-22
@wataru

In general, no way. We need as many examples as possible. There you can already speculate on some of them and check on the rest. 5 examples is probably not enough. There is a possibility that there is something standard. Then you need to go through the algorithms until it converges on all examples, but even here there may be a possibility of an error - it’s just that several algorithms work on your examples and you chose the wrong one that actually exists.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question