• + 6 comments

    I want to provide a hint for people who are still trying to wrap their head around the problem. One advanced book that is on topic is, "Combinatorial Algorithms", by Kreher and Stinson.

    My breakthrough happened when I printed out a few tables. Given a function that converts decibinary to its decimal value, the 1 digit numbers have their obvious decimal values. I recommend printing tables of decibinary numbers in groups of 10, then you will start seeing a pattern.

    In python, this might look like,

    >>> [ db_value(x) for x in range(0,10) ]
    [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
    >>> [ db_value(x) for x in range(10,20) ]
    [2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
    >>> [ db_value(x) for x in range(20,30) ]
    [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]
    >>> [ db_value(x) for x in range(90,100) ]
    [18, 19, 20, 21, 22, 23, 24, 25, 26, 27]
    >>> [ db_value(x) for x in range(100,110) ]
    [4, 5, 6, 7, 8, 9, 10, 11, 12, 13]