Anonymous asked in Science & MathematicsMathematics · 4 years ago

The following message was coded using c = 17x + 3. How to decode the message?

Q V E B A A X K Z K N J D K C E X Q I Z V.

A = 1, B = 2, . . . , Y = 25, and Z = 0.

Please show me how to decode this message. Where does c = 17x + 3 come to play? Thanks


Also, how do I find the decoding function of c = 17x+3? Thanks.

1 Answer

  • 4 years ago
    Favorite Answer

    You have left out an important part of the coding formula, the modulus! Notice that you only have 26 defined values for "x" (whole numbers from 0 to 25), and you also have only those same 26 possible values for "c". This implies that your domain is not all integers, but integers modulus 26:

        c = (17x + 3) mod 26 = 17x+3 - 26k, where "k" is the integer which makes 0 ≤ c < 26.

    Then the decoding procedure is just the inverse:

        x = (17⁻¹·(c - 3)) mod 26

    where 17⁻¹ is the inverse "mod 26", that is any integer for which

        (17⁻¹)·(17) mod 26 = 1.

    This inverse is easily found with the "Euclidean Algorithm" which gives the greatest common divisor of two numbers as a linear combination of those numbers. Since the greatest common divisor of 17 and 26 is 1, that algorithm gives:

        17A + 26B = 1 where that "A" is the desired 17⁻¹ mod 26.

    Then start calculating: x = A(c-3) mod 26.

    A spreadsheet is nice to do the actual computation.

    Put your coded message in row 1, place in cell A2 the following formula

    (replacing the first "A" with the 17⁻¹ mod 26 number from above):

        =char(64+mod(A*(code(A$1)-64 - 3),26))

    and fill right.

    (Actually, that will put "@" in place of "Z" - but I think the correct decoding has no "Z" - see below.)

    ***BUT***, you will get nonsense! It appears that the message was actually coded using c=17x-6. I also think that someone made a copy error (missed coding one character). I suspect the coded message should actually have been:

    Q V E B A A X K Z K N J J K C E X Q I Z V

    If you don t know the Euclidean algorithm, check the source below. With the correct coding formula:

        c = 17x - 6 mod 26

    the decoding should not be a hard day's (or night's) work!

    • Login to reply the answers
Still have questions? Get your answers by asking now.