Ad
  • Custom User Avatar

    same note about a priori dot is in previous kata, most likely it is needed to solve 111000111, and doesn help to resolve the issue

  • Custom User Avatar

    hi. It is still unclear for me, why we should clasify 1001 as '. .' .... we know that '.' is approximately 1. and we see two zeros. if we assume that '-' is approximately 3 (based on what we saw as '.'). two zeros are as close to 1 as to 3. what reasons do I have to say it is '-'

  • Custom User Avatar

    Of course, in real-life conditions (we're trying to kinda simlutate in this kata) NOT every message can be reliably decoded.
    But the test cases for this kata are carefully selected so that they COULD be realiable decoded.

  • Default User Avatar

    I disagree, there still is an issue. In this fuzzy algorithm it doesn't make sense to test for one or two letter messages. And especially the '1001' case is really questionable. In the kata description it says every message can be reliably decoded, but in my opinion that just isn't the case. Of course you can always tailor your code around the test cases, but that is kinda silly.

  • Custom User Avatar

    I'm closing this issue as it seems no longer an issue. :)

  • Custom User Avatar

    In fact, I've found a mistake in your logic. You say: "Dash should be AT LEAST 3 time units long". That's wrong. Dash should be APPROXIMATELY 3 times longer than dot.

  • Custom User Avatar

    The note you missed applies well if you have, say, 10 1-unit tokens (clearly, dots) and 10 3-unit tokens (clearly, dashes) and then you encounter a 2-unit token. Then the note is applied and makes that 2-unit token a dot.

    The same goes to 101 - because all the tokens are of the same length, you have to use the same note to treat them all as dots, not dashes.

    But starting with 1001 we see two different lengths, so we have more information, and that not is not needed.

  • Custom User Avatar

    There's a note in the kata description on this particular issue: "if you have trouble discerning if the particular sequence is a dot or a dash, assume it's a dot".

    Of course, in real life a human receiver would not be able to discern a dot from a dash on such a fuzzy and short message, so those "tiny tests" are not exactly relevant, but their purpose is to tune your algorithm so that it could work consistently.