def get_prefix_repr(prefix, activities):
    """
    Gets the numeric representation (as vector) of a prefix

    Parameters
    -------------
    prefix
        Prefix
    activities
        Activities

    Returns
    -------------
    prefix_repr
        Representation of a prefix
    """
    this_pref_repr = [0] * len(activities)
    for act in prefix:
        i = activities.index(act)
        this_pref_repr[i] = this_pref_repr[i] + 1
    return tuple(this_pref_repr)