In one of the rare occasions when the mathematician Muhammad ibn Mūsā al-Khwārizmī travelled abroad from his homeland, the caravan he was joining made a stop at the ancient city of Samarkand. Upon being informed of his arrival, the King, who was a learned man and knew of the scientific reputation of the traveller, quickly summoned al-Khwārizmī to his palace and made him his guest for the night. After dinner both men engaged in conversation about scientifical subjects. Impressed by the erudition of al-Khwārizmī, the King then decided to confide the mathematician a problem that was troubling him for long.
"Muhammad ibn Mūsā al-Khwārizmī, as you see I hold the deepest reverence for science, and this devotion led me to the decision of ruling my kingdom according to the teachings of Philosophy. To that purpose, I gathered over the years a Council of Philosophers formed by some of the most learned men on the Earth. When I have some difficult decision to make, I summon the Council and ask them for advice. And here my problems begin: to whichever question I pose to the philosophers, each of them provides me with a different answer, and it is not uncommon that they begin quarreling among themselves about the subject, and I end up a little upset and without answers to my problem."
"I considered establishing some kind of rule by which to determine the conclusion to questions posed to the Council, like for instance taking the opinion held by the most philosophers, but I fear that such a rule could lead to contradictory judgements over time. While I undertand that each philosopher, taken in isolation, posseses a consistent view of the world and his tenets match that view, it is not clear how to combine all the different doctrines into a global set of precepts that can assist my heavy duties as the ruler of the country."
"I see that your skills in the ways of Mathematics are second to none, and a mathematical problem I have indeed. Would you help the King to find the Rule that will determine the outcome of questions posed to the Council of Philosophers? The compensation for your work would be in accordance with your mathematical eminence and my royal munificence" concluded the King, leaning back and slowly rubbing his jewellery-loaded hands.