In cybernetics, the term variety denotes the total number of distinguishable elements of a set, most often the set of states, inputs, or outputs of a finite-state machine or transformation, or the binary logarithm of the same quantity. Variety is used in cybernetics as an information theory that is easily related to deterministic finite automata, and less formally as a conceptual tool for thinking about organization, regulation, and stability. It is an early theory of complexity in automata, complex systems, and operations research.
The term "variety" was introduced by W. Ross Ashby to extend his analysis of machines to their set of possible behaviors. Ashby says:
The word variety, in relation to a set of distinguishable elements, will be used to mean either (i) the number of distinct elements, or (ii) the logarithm to the base 2 of the number, the context indicating the sense used.
In the second case, variety is measured in bits. For example, a machine with states has a variety of four states or two bits. The variety of a sequence or multiset is the number of distinct symbols in it. For example, the sequence has a variety of four. As a measure of uncertainty, variety is directly related to information: .
Since the number of distinguishable elements depends on both the observer and the set, "the observer and his powers of discrimination may have to be specified if the variety is to be well defined". Gordon Pask distinguished between the variety of the chosen reference frame and the variety of the system the observer builds up within the reference frame. The reference frame consists of a state space and the set of measurements available to the observer, which have total variety , where is the number of states in the state space. The system the observer builds up begins with the full variety , which is reduced as the observer loses uncertainty about the state by learning to predict the system. If the observer can perceive the system as a deterministic machine in the given reference frame, observation may reduce the variety to zero as the machine becomes completely predictable.