from typing import List
from typing import Tuple


def merge_intervals(intervals: List[Tuple[int, int]]) -> List[Tuple[int, int]]:
    """
    Given a set of intervals, eliminate any overlaps and find the minimal set of intervals represented.
    :param intervals: a list of intervals, represented as tuples (a,b)
    :return: the reduced list of intervals

    >>> merge_intervals([(1, 3), (5, 8), (4, 10), (20, 25)])
    [(1, 3), (4, 10), (20, 25)]
    """
    reduced_intervals = []

    for interval in sorted(intervals):
        if len(reduced_intervals) == 0:
            reduced_intervals.append(interval)
        else:
            (interval_a, interval_b) = interval
            (prev_interval_a, prev_interval_b) = reduced_intervals[-1]

            # We have overlapping intervals, or possibly interval is contained in prev_interval
            if interval_a <= prev_interval_b:
                reduced_intervals.pop()
                reduced_intervals.append((prev_interval_a, max(interval_b, prev_interval_b)))
            else:
                reduced_intervals.append(interval)
    return reduced_intervals