def min2(a, b):
    """ returns the minimum element between given a and b;
        note: this is slightly more efficient than using standard Python min function
    """
    if a <= b:
        return a
    return b
