How often do you use the mathematics you learned at school to solve a concrete problem, at home or at work?
A year ago I was sitting in a room with nine other programmers, each working alone on unrelated projects, when one of them asked ‘Who is good at maths?’
At the time I was spending my lunch breaks factorising quadratic equations or integrating functions with the (possibly misguided) ambition of completely revising my A-level mathematics, but still, I bravely waited for more information before coming out of hiding.
‘For the game I am designing, I need new players to be randomly assigned to one of four categories of roles, in such a way that I end up with a specific proportion of each’, he added.
This was greeted by a long silence, during which my relief that this sounded like a problem I could tackle was replaced by a mounting anxiety that unless someone else spoke up I would feel compelled to. Finally someone ventured a suggestion: ‘Why don’t you ask ChatGPT?’
This was more than I could bear, so I interrupted: ‘OK, what proportions of each role do you want?’
The game programmer got up and walked over to me: ‘The most select category are the wizards. For every wizard, there should be two bladesmiths, four merchants and eight roamers. The function I am calling asks for the probability of each category being assigned, and the total of the probabilities must be equal to one.’
How would you solve this? You can read my solution in my next post.