A set is an unordered collection of objects that can be defined by listing elements or describing properties that elements satisfy. Sets are used to build discrete structures like counting, combinations, relations, and graphs. A function from a set X to a set Y is a relation where each element of X is mapped to an element of Y, and no element of X is mapped to more than one element of Y. A function is one-to-one if different elements of the domain map to different elements of the codomain, and onto if every element of the codomain is mapped to by some element of the domain.