def prepare_table(table):
    """Make the table 'symmetric' where the lower left part of the matrix is
       the reverse probability
    """
    n = len(table)
    for i, row in enumerate(table):
        assert len(row) == n
        for j, el in enumerate(row):
            if i == j:
                table[i][i] = 0.0
            elif i > j:
                table[i][j] = 1 - table[j][i]
    return table
