def full_colour(problem):
    """
    Update the problem by setting the cells that can be inferred from the 
    onstraint that each row and column must have the same number of cells of
    each colour.

    The cells dictionary is directly updated. Returns True if any changes have
    been made, False otherwise.
    """
    changes = False
    size = problem['size']
    cells_same_colour = size // 2
    cells = problem['variables']

    # See if each row already has all the required cells of one colour
    for row in range(size):
        reds = sum(1 for col in range(size) if cells[(row, col)] == 'r')
        blues = sum(1 for col in range(size) if cells[(row, col)] == 'b')
        if reds == blues == cells_same_colour:
            continue  # Nothing to do here, all cells set
        if reds == cells_same_colour:
            new_colour = 'b'  # All reds set, use blue to update this row
        elif blues == cells_same_colour:
            new_colour = 'r'  # All blues set, red blue to update this row
        else:
            continue  # The required number is not reached by either colour
        for col in range(size):  # Update unset cells with new colour
            if len(cells[(row, col)]) > 1:
                cells[(row, col)] = new_colour
                changes = True

    # See if each column already has all the required cells of one colour
    for col in range(size):
        reds = sum(1 for row in range(size) if cells[(row, col)] == 'r')
        blues = sum(1 for row in range(size) if cells[(row, col)] == 'b')
        if reds == blues == cells_same_colour:
            continue  # Nothing to do here, all cells set
        if reds == cells_same_colour:
            new_colour = 'b'  # All reds set, use blue to update this row
        elif blues == cells_same_colour:
            new_colour = 'r'  # All blues set, red blue to update this row
        else:
            continue  # The required number is not reached by either colour
        for row in range(size):  # Update unset cells with new colour
            if len(cells[(row, col)]) > 1:
                cells[(row, col)] = new_colour
                changes = True
    return changes