def min_coins(coins, total):
    """ Computes the minimum number of coins which sum up to total.

    Params:
        coins: list of non-negative integers representing the values of the coins.
        total: int, in fact it has to be a non-negative integer.

    Returns
        tuple: (min_num_coins, picked_coins)
            min_num_coins: int, the min number of coins
            picked_coins: list, which coins are used which sum up to total.
    """
    # Initialize A[i] - the number of coins needed to sum up to value i.
    # B[i] the coin chosen which yealds the min number of other coins to reach i.
    A = [float('inf')] * (total + 1)
    A[0] = 0
    B = [None] * (total + 1)

    # Compute subproblems.
    for intermediary_total in range(1, total+1):
        for coin in coins:
            if coin > intermediary_total:
                continue
            if A[intermediary_total] > A[intermediary_total - coin] + 1:
                A[intermediary_total] = A[intermediary_total - coin] + 1
                B[intermediary_total] = coin

    min_num_coins = A[total]

    # Pick the last coin picked.
    picked_coins = []
    i = total
    while i >= 0:
        coin = B[i]
        if coin == None:
            break
        picked_coins.append(coin)
        i -= coin

    return (min_num_coins, picked_coins)