Game Development Reference
In-Depth Information
1.4.1 Summation and Product Notation
Summation notation is a shorthand way to write the sum of a list of things.
It's sort of like a mathematical for loop. Let's look at an example:
6
Summation notation
a i = a 1 + a 2 + a 3 + a 4 + a 5 + a 6 .
i=1
The variable i is known as the index variable. The expressions above and
below the summation symbol tell us how many times to execute our “loop”
and what values to use for i during each iteration. In this case, i will
count from 1 to 6. To “execute” our loop, we iterate the index through
all the values specified by the control conditions. For each iteration, we
evaluate the expression on the right-hand side of the summation notation
(substituting the appropriate value for the index variable), and add this to
our sum.
Summation notation is also known as sigma notation because that cool-
looking symbol that looks like an E is the capital version of the Greek letter
sigma.
A similar notation is used when we are taking the product of a series of
values, only we use the symbol Π, which is the capital version of the letter
π:
n
a i = a 1 × a 2 × × a n−1 × a n .
Product notation
i=1
1.4.2 Interval Notation
Several times in this topic, we refer to a subset of the real number line using
interval notation. The notation [a,b] means, “the portion of the number
line from a to b.” Or, more formally, we could read [a,b] as “all numbers x
such that a ≤ x ≤ b.” Notice that this is a closed interval, meaning that the
endpoints a and b are included in the interval. An open interval is one in
which the endpoints are excluded. It is denoted using parentheses instead
of square brackets: (a,b). This interval contains all x such that a < x < b.
Sometimes a closed interval is called inclusive and an open interval called
exclusive.
Occasionally, we encounter half-open intervals, which include one end-
point but exclude the other. These are denoted with a lopsided 5 notation
such as [a,b) or (a,b], with the square bracket being placed next to the
endpoint that is included. By convention, if an endpoint is infinite, we con-
sider that end to be open. For example, the set of all nonnegative numbers
is [0,∞).
5 And confusing to the delimiter matching feature of your text editor.
Search WWH ::




Custom Search