Functions & Optimization
13. Functions
Function type
Read:
is a function from set to set .
- : domain
- : codomain
Example:
may mean:
maps every path to its integer length.
Mapping notation
Read:
Map to .
Together:
Function composition
Read from right to left:
- apply ;
- then apply .
14. Piecewise definitions
A function can have different definitions in different cases:
Read:
- when ;
- when .
The function:
can also be written:
15. Indicator functions
or:
means:
Example:
Read:
Count all ants occupying room ; that count must be at most one.
Indicator functions are common in:
- algorithms;
- probability;
- combinatorics;
- integer programming;
- graph optimization.
16. Common optimization form
A mathematical optimization problem often looks like:
Terminology:
- : decision variable;
- : objective function;
- : constraint;
- : feasible domain;
- feasible solution: a value satisfying every constraint;
- optimal solution: a feasible value producing the best objective.
Compact form:
17. Reading a Lem-in optimization formula
Consider:
Left-hand side
means:
Completion time obtained with path family .
Outer minimum
means:
Choose the best allocation.
Constraints below the minimum
means every is a nonnegative integer.
means all ants are assigned.
Inner maximum
means:
Among paths receiving at least one ant, find the one that finishes last.
Path completion expression
means:
- : time for the first ant;
- : additional turns for the remaining ants.
Full translation
The completion time is the smallest possible finishing time of the slowest used path, considering every valid way to distribute all ants among the paths.
18. Reading the capacity formula
Translation by component
Candidate completion turn must be a natural number.
Number of ants path can deliver by turn .
Add this capacity for every compatible path.
There must be enough total capacity for all ants.
Choose the earliest deadline satisfying the condition.
Full translation
is the earliest integer turn at which the combined capacity of the compatible paths is sufficient to deliver all ants.