In mathematics, a "bag" is an unordered list. A bag differs from a set in that it can contain the same value more than once. A bag differs from a list in that its elements are not ordered. For example, Bag(1,1,2,3)=Bag(2,1,3,1)≠Bag(1,2,3).