def trajectory_importance_max_min(states_importance):
    """ computes the importance of the trajectory, according to max-min approach: delta(max state, min state) """
    max, min = float("-inf"), float("inf")
    for i in range(len(states_importance)):
        state_importance = states_importance[i]
        if state_importance < min:
            min = state_importance
        if state_importance > max:
            max = state_importance
    return max - min