def usefulness_minus_target(k, n_cols, n_tuples, target_usefulness=5,
    epsilon=0.1):
    """Usefulness function.
    Lemma 4.8 Page 16

    Parameters
    ----------
    k : int
        Max number of degree in Bayesian networks construction
    n_cols : int
        Number of attributes in dataset.
    n_tuples : int
        Number of tuples in dataset.
    target_usefulness : int or float
    epsilon : float
        Parameter of differential privacy.
    """
    if k == n_cols:
        usefulness = target_usefulness
    else:
        usefulness = n_tuples * epsilon / ((n_cols - k) * 2 ** (k + 2))
    return usefulness - target_usefulness
