Operators

Part 2 of 8 · Previous: Basics · Index · Next: Functions

7. Sums and products

Summation

means:

The bottom gives the initial index:

The top gives the final index:

Example:

Constraint example:

Read:

The ants assigned to all paths add up to .

Product

means:

Example:


8. Minimum and maximum

Minimum

returns the smallest value.

Maximum

returns the largest value.

Minimum over a domain

Read:

The smallest value of among all valid .

Example:

Constraints under an operator

Read:

Minimize , considering only nonnegative integer values whose sum is .

Important

The material below is not being minimized. It defines the allowed choices.


9. min versus argmin

These are different.

Minimum value

returns the smallest value of .

Argument attaining the minimum

returns the value of that produces the minimum.

Example:

Then:

while:

So:

  • min answers: What is the best score?
  • argmin answers: Which solution gives the best score?

Example:

is the optimal number of turns.

is the best path family.

The star often means optimal.


10. Ceiling and floor

SymbolNameMeaning
FloorGreatest integer not larger than
CeilingSmallest integer not smaller than

Examples:

In scheduling, ceiling appears when a fractional result must become a whole number of turns:

If the fraction is , the solution needs 6 turns:


11. Absolute value, cardinality, and norm

The same vertical bars can mean different things.

Absolute value

For a number:

means its distance from zero.

Set cardinality

For a set:

means the number of elements in .

If:

then:

Vector norm

For a vector:

means its length or magnitude.

For a two-dimensional Euclidean vector:


12. Parentheses and brackets

NotationCommon purpose
Grouping
Function application
Closed interval
Open interval
Includes , excludes
Set
Tuple or inner product

Intervals

means:

means:

means: