|
|
2. “Taxi fare” - understanding relation
|
The approach suggested in this unit involves starting with a relation. A relation is like a mapping between one set of values to another to a one-to-one way.
For example, you might have a set of taxi fares like this:
Distance (kms)
|
Fare ($)
|
3
| 5.40
|
25
| 23.00
|
7
| 8.60
|
15
| 15.00
|
The pairs (3,6.40), (25, 23.00), (7,8.60) and (15,15.00) are a relation.
Suppose you want to find out how the taxi driver calculates their fares then you want to know the rule that connects the first and second numbers in each pair. This approach is a lot more fun than being told the rule is f = 0.8d + 3 and given a few examples to calculate.
Along the way, learners have to apply their number sense in trying out rules that might work.
|
|
|
|