Here is a function written in Python. It is used to randomly choose at least one from a list.
import random
import math
def choose_at_least_one(list_items):
chosen_items = [i for i in list_items if random.random() <= (1/len(list_items))]
if len(chosen_items) == 0:
return choose_at_least_one(list_items)
else:
return chosen_items