Something about maths

This problem was posed on FB by an old school friend.

For those with an over stimulated interest in mathematics, riddle me this ….. if I but $10 worth of petrol at $1 per litre I get 10 litres ….. if I buy $10 worth of petrol at $2 per litre I get 5 litres ….. if I buy $10 worth of petrol at $1.50 per litre (as $1.50 is half way between $1 and $2) I should get 7.5 litres ….. but I get 6.66 litres ….. why is it so!?

Mathematics gives us away of looking at the world and abstract problems, often by creating a model with an equation and some assumptions. The equations simply relates what is on the right hand side, normally a computation, to a single value on the left hand side. The LHS is made up of things we call variables, and arithmetic operations are performed to produce a single value.

The above problem looks like a paradox at first until it dawns on you that this is a class of problems described by the equation as y = c/x, where c is the amount of fuel in litres and x is the cost in dollars and y represents the amount per unit by cost. e.g. c=$10 and x=$2 then y = 5 litres per dollar.

The assumption made in the statement of the problem assumes a linear relationship, but the graph of y = 1/x with x>0 shows a curve with the behaviour that as x gets small then y gets big and as x gets big then y gets small, and changes in y happen quickly and not uniformly as x changes uniformly and x=1 gives y=1.

Many will know the frog in boiling water parable. The above is a demonstration of exponential growth for x>1 and unfortunately this does not have nice even spacing for the y values for evenly spaced x values and hence we can’t claim that $10 worth of petrol at $1.50 gives a result evenly divided between petrol costing $1 and $2.

We could make an Integer relationship and force the result e.g. A(x) = {(1, 10), (1.5, 7.5), (2, 5)} and so on, and if we plot these ordered pairs we would see they lie on an imaginary straight line.

Exponential relationships exist everywhere in nature – weather, smoke, economy etc. and commonly we often don’t understand that things may well be speeding up or indeed slowing down, it is probably fair to say our brains tend to shape what we see into something that fits what we know and this is mostly linear. It is why we need to be very careful with claims that appear linear when in fact they are better modeled as exponential.

You will find a very interesting discussion on how it is vital that we understand exponential growth – see Economics and Exponential Growth the point of this article is what has happened in the past may happen 50 times quicker in the future, and the 100 times, then 1000 times i.e. every accelerating or the opposite. Think population growth, carbon entering atmosphere, fish numbers etc.

And a word of caution on models and simulations of these using computers – models are abstractions of reality and exist under assumptions, which may or may not be accurate.

The stock market is an interesting system to consider – by system I mean something that has inputs and outputs, at a simple level we have money to purchase stock as the input and the twin outputs of dividends and capital growth or decay. Today the markets is monitored down to mico-seconds and buy and sell decisions are made as much by decision making software as are made by humans. Caught in the middle of all this it seems to me that it is impossible to draw trends, or those that are drawn are done so on a very much smaller time scale that say a day. Does the market behave in a linear (don’t think so) or exponential manner, probably the latter if you look at the long term chart, but at another level it could be completely random. The only reason we are interested in equations is because they allow use to try and predict things but getting linear and exponential mixed up leads to very poor predictions.

Lets turn to another idea, that of randomness and models. Ants have been studied as they come out of the nest and go to either of two food sources to the left or to the right meeting other ants that are coming back to the nest. It seems that ants to one of three things: go to the food source they have always gone to and never change, randomly choose as they emerge or are influenced to change their mind by a returning ant. I find that fascinating! Consider the most recent election and assume 70% of people vote as they always done, 20% make a random choice and 10% are influenced to change their mind at some point in the time they started thinking about voting and when they tick the box. You can easily model this with what is terms a simple stochastic process and you can run different models making different assumptions about the size of each group – clearly the larger the last group the more you maybe able to influence the result via advertising or some other intervention. The larger the random group the more difficult it becomes to predict, you only need one more vote than your opponent to win.

What I have done here is made a leave of faith that the Ant model is a good one to apply to voters, but when you reflect maybe I am not so mad for doing so – decision processes are open to study, here the voting process does seem to be able to be categorised. For instance we could add those that donkey vote, or those that will vote informal etc. Imagine also if a particular form of advertising was seen to act in an exponential manner i.e. each single day the shift of voters accelerated from one group to another due to FB advertising in a direct sense – this phenomena does in fact seem to exist i.e. phases such as campaign momentum and landside seem to suggest voters can move quickly in time.

My final ramble is about binary arithmetic, and again I find this amazing that something so simple is so, well wonderful. Computers represent stuff as on or off, two states, hence we can use a 1 or 0. How do computers subtract numbers – well by adding complements, this simplifies things in terms of circuits, reduces heat and speeds things up.

1 + complement = 0 this is the result we want. Adding 1 + 1 in binary gives 10 (thing adding 5+7 gives 12), I will not go into bases and place values.

Lets consider we have groups of three 1s and 0s to represent 0 to 8 i.e. (000), (001), (010), (011), (100), (101), (110) and (111) note there are eight groups hence (000) is 0 and (111) is 8.

(000), (001), (010), (011), (100), (101), (110) and (111)

Complement (111), (110), (101), (100), (011), (010), (001) and (000)
add 1 to each (000), (111), (110), (101), (110), (011), (010) and (001)

Now add each pair from the first row to the third row —what do you get, ignore any carry at the end? You get all zeros!

We have our result – value + complement gives ZERO—beautiful.