Comic and critic Natalie Haynes attempts to find the algorithm to determine the perfect joke.
Data structures exercise a tight grip on financial trading, but algorithms are now breaking out into virtually all spheres of human activity - from politics to household cleaning. Both university students and schoolchildren are being encouraged to learn computer programming to stand a chance in the brave new algo-world.
Natalie traces the Western World's increasing reliance on big data and ponders how its analysis could transform comedy, including a University of Edinburgh research project on unsupervised computer joke generation.
Along her mathematical journey, Natalie charts some of the chaotic muddles that algorithms have led us into, from security scares to retail problems, such as the offensive computer generated T-Shirts available recently on Amazon.
Natalie explores how these complex computer programmes are being used to determine not just stock prices but espionage tactics, film scripts, architecture and online dating. She glimpses the future of algorithms and the effect they may have on the things we buy, the partners we choose and the politicians we elect.
A Just Radio production for BBC Radio 4.