Game Development Reference
In-Depth Information
Figure 4.3
Correspondence can pertain between elements in the same set or elements in different sets.
As the discussion in Chapter 3 emphasized, you can relate any set to any other set
through such operations as union, intersection, or disjunction. In this respect,
then, it becomes evident that you can view some sets as collections of pairs.
As Figure 4.3 illustrates, the relations between elements in the two sets allow you
to see domain-range relations in the bottom set.
When you begin examining how sets of elements can be defined through
relations, you can extend the discussion to include the notion of ordered pairs.
A pair is a set of two items. These items can be elements you take from different
sets. Likewise, when you can use one element in the pair to define the other
element in the pair through a relationship that you can explicitly state, then the
two elements exist as an ordered pair.
Consider a relationship in which the first element in the ordered pair is 1 less
than the second element. You might state this formally using this expression:
( a , b ) j a ΒΌ b 1. Figure 4.4 illustrates the ordered pairs that follow from this
relationship.
Formally defining a relationship and then generating values is one way to create
ordered pairs. Another approach is to begin with a collection of ordered pairs
that you somehow discover, and then search for a way to formally describe how
Search WWH ::




Custom Search