Ad
  • Default User Avatar

    You're not alone =)

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar
    1. It seems that now all the fans of light mode are satisfied. =)
    2. The table is preloaded as int[] - it is convenient, I did the same way in my solution.
  • Default User Avatar

    In few words(very simplistic):

    1 step: we take original GP (l=18) increase it with LT from MP (l=9), then apply XOR with original MP (l=9) and finally have new MP (discarding: l=18-1 = 17)
    2 step: we take original GP (l=18) increase it with LT from new MP (l=17), then apply XOR with new MP (l=17) and again have new MP (discarding: l=18-1 = 17)

    if after XOR we have 2 zero lead terms, then have to discard them both and jump over next step (!):
    3 step: we take original GP (l=18) increase it with LT from new MP (l=17), then apply XOR with new MP (l=17) and again have new MP (discarding: l=18-2 = 16)
    4 step: skip
    5 step: we take original GP...

    GP - generator polynomial, length = 18
    LT - leading term of message polynomial
    MP - message polynomial, length = 9 at first step, and 17 at every other step

  • Default User Avatar

    I suffered a little searching for errors, but finally decided. A few suggestions and comments:

    1. In the dark theme, the log works as it should, but in the light theme (which I am using) the colors are inverted, so the QRcode picture in log does not look as it should. You have to do something about it.
    2. At first I thought that all areas that are not related to the message being encoded should be simply ignored. I was wrong. As a result, I had to create an additional method getBlankQRcode(), which makes a template based on your example.
    3. The tables for translation had to be written manually. Although you have written that they are preloaded, but I have not figured out all the possibilities yet =)
    4. The link to "Show polynomial division steps" is very valuable. Without it, I would not have figured it out. You described everything well, but this link is a great addition.

    Basically, I wasted a lot of time on "Very rarely it can happen that ...." =))

    Thanks for the great kata!

  • Default User Avatar

    Sorry, I have 2 stupid questions =)

    First we had message polynomial with length 9.
    Then we get through first step (lead term was 64) and our new message polynomial became 17 length. But here is written that "this is our new message polynomial, it has become smaller".

    So first question is why it has become smaller if length = 9 >>> length = 17.

    The second one is: which term will be the lead term at second step of our example? 168 (from new message polynomial) or 36 (from original MP)?

  • Default User Avatar
  • Default User Avatar

    I like it. All solutions sorting elements first are not efficient, i think.
    What's the point of sort all elements first in for example a million elements array if unique element at it's beginning.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Default User Avatar

    It's great. Almost pure math =) "Almost" because of "integer division" =)

  • Default User Avatar

    It's great. Almost pure math =)

  • Default User Avatar

    JavaScript only.... Sad.

  • Default User Avatar

    Yesterday I finished your kata with reading from the QRcode. That was interesting. I wrote a class bypassing a part of QRcode with a message. Think this class will help me, just need to be slightly modified in accordance with the conditions. Definitely, I will try soon.