| Project Name | Duration (in months) | cost (in $1,000) |
|---|---|---|
| P001 | 15 | 315 |
| P002 | 10 | 215 |
| P003 | 50 | 1,015 |
| P004 | 25 | 515 |
| P005 | 10 | 215 |
| P006 | 25 | 515 |
| P007 | 15 | 315 |
Did you notice that there is a simple relationship between project duration and cost? If we look at the
table, we find that
In general, A compact description of the data, that gives the values of some of the fields in terms of the others, is called a function.
A variable y is a function of x if a relation between x and y produces exactly one value of y for each value of x. In other words, a function "maps" one type of value to another. In the above example, project durations are mapped to costs.
Usually a letter is assigned to the function name. We can say that C(d) is the cost of a software project of duration d, and the formula is
The set of all possible values that are allowed as inputs to the function is called the domain of the function and the set of all the values that are allowed as outputs is called the range of the function. In the project cost table, durations are the domain; they are measured in months between 0 and 50. Costs are the range; they are measured in multiples of $1,000 and vary between $215 and $1,015. For more details on the domain and range of the functions, please refer to Domains and Ranges station.