My friend E.R. recently lent me – and encouraged me to peruse – the curious work אמרי בינה, by Rav Yosef Haim of Baghdad. One of its sections, חדוד במלי דעלמא, comprises riddles, brain-teasers and simple mathematical problems, usually with no particular Jewish connection. Here’s Rav Yosef Haim’s version of a great classic:
ויש עוד ששואלין העולם: אחד היה לו זאב ורחל ואגודה של שבלים, והיה הולך בדרך לבדו והיה מכרח לשמר האגדה שלא תאכלנה הרחל, ומשמר את הרחל שלא יאכלנה הזאב, והצרך להעבירם הנהר והמעבר צר שאינו יכול להעבירם אלא אחד אחד, איך יעשה?
אם יעביר הזאב תחלה תשאר האגודה אצל הרחל לבדה ותאכלנה, ואם יעביר הרחל תחלה, איך יעשה אחר כך, אם יעביר הזאב אחריה, הנה כאשר יחזר להביא את האגדה יאכל הזאב את הרחל, כי תשאר לבדה אצלו, ואם יעביר האגדה קדם הזאב, אז כאשר יחזר להביא את הזאב תאכל הרחל את האגדה. כיצד יעשה?1
Click here for the solution (requires Javascript).
This is an ancient and culturally ubiquitous instance of a river-crossing problem. The earliest known version of this particular problem goes back to at least the eighth or ninth century, appearing in the Propositiones ad Acuendos Juvenes (Problems To Sharpen the Young) usually attributed to the great English scholar and teacher Alcuin of York (“the most learned man anywhere to be found”), but occasionally to the Venerable Bede or other scholars:
XVIII. propositio de homine et capra et lupo.
Homo quidam debebat ultra fluvium transferre lupum, capram, et fasciculum cauli. Et non potuit aliam navem invenire, nisi quae duos tantum ex ipsis ferre valebat. Praeceptum itaque ei fuerat ut omnia haec ultra illaesa transire potuit?
18. proposition concerning the man, the she-goat, and the wolf.
A certain man needed to take a wolf, a she-goat and a load of cabbage across a river. However, he could only find a boat which would carry two of these [at a time]. Thus, what rule did he employ so as to get all of them across unharmed?
Click here for the solution.
The phrase “In a similar manner” is an allusion to the previous problem, an early version of what is commonly called the jealous husbands problem:
XVII. propositio de tribus fratribus singulas habentibus sorores.
Tres fratres erant qui singulas sorores habebant, et fluvium transire debebant (erat enim unicuique illorum concupiscentia in sorore proximi sui), qui venientes ad fluvium non invenerunt nisi parvam naviculam, in qua non potuerunt amplius nisi duo ex illis transire. Dicat, qui potest, qualiter fluvium transierunt, ne una quidem earum ex ipsis maculata sit?
17. proposition concerning the men who had unmarried sisters.
There were three men, each having an unmarried sister, who needed to cross a river. Each man was desirous of his friend’s sister. Coming to the river, they found only a small boat in which only two persons could cross at a time. Let him say, he who is able, How did they cross the river, so that none of the sisters were defiled by the men?
Click here for the solution.
This one, too, appears (with jealous husbands instead of protective brothers) in the אמרי בינה, and with a different solution:
עוד שואלים העולם: שלשה אנשים כל אחד אשתו עמו, רוצים לעבור הנהר בספינה אחת ממזרח למערב, והספינה קטנה, אינה יכולה לשאת רק שני בני אדם, ולא יותר, ואלו האנשים כל אחד אינו מאמין להניח אשתו עם חבריו, כיצד יעשו לעבר כלם את הנהר ממזרח למערב?4
Click here for the solution.
Another problem in the אמרי בינה:
שאלה אחת שואלים אותה העולם וכך היא: אדם אחד ראה חבורה של אנשים שאל אותם: כמה אתם? אמרו לו: אם תצרף עמנו בני אדם כמספרנו, וכמספר מחציתנו, וכמספר רביענו, ותצטרף גם אתה עמנו, נשלים מאה. ומדברים אלו ידע כמה היו, ואף על פי שלא מנאם. תאמר איך ידע, וכמה היו?6
Click here for the solution.
This one, too, is in the Propositiones:
XL. propositio de homine et ovibus in monte pascentibus.
Quidam homo vidit de monte oves pascentes, et dixit, utinam haberem tantum, et aliud tantum et medietatem de medietate, et de hac medietate aliam medietatem, atque ego centesimus una cum ipsis ingrederer meam domum. Solvat, qui potest, quot oves vidit ibidem pascentes?
40. proposition concerning a man and [some] sheep grazing on a mountain.
A certain man saw from a mountain some sheep grazing and said, “O that I could have so many, and then just as many more, and then half of half of this [added], and then another half of this half. Then I, as the 100th [member], might head back to my home together with them.” Let him solve, he who can, How many sheep did the man see grazing?
Click here for the solution.
The Propositiones also contains a slight variation on the above:
IV. propositio de homine et equis.
Quidam homo vidit equos pascentes in campo, optavit dicens: Utinam essetis mei, et essetis alii tantum, et medietas medietatis; certe gloriarer super equos c. Discernat, qui vult, quot equos imprimis vidit ille homo pascentes?
4. proposition concerning the man and the horses.
A certain man saw some horses grazing in a field and said longingly: “O that you were mine, and that you were double in number, and then a half of half of this [were added]. Surely, I might boast about 100 horses.” Let him discern, he who wishes, How many horses did the man originally see grazing?
Click here for the solution.
Another pair of similar problems from the אמרי בינה:
עוד שאלה אחרת שואלים העולם, וזו היא: במרחץ נכנסו ארבעים אנשים, מהם יהודים ומהם ישמעאלים, ומהם נוצרים, וכך היה מנהגם ליתן שכר המרחץ, היהודים כל אחד ארבעה אסרין, והנוצרים כל אחד שני אסרין, והישמעאלים כל ארבעה ישמעאלים באסר אחד.
ולעת ערב מנה בעל המרחץ את האסרין ומצא שהם ארבעים, ואז מובן מזה כמה יהודים נכנסו, וכמה ישמעאלים וכמה נוצרים. תאמר אתה כמה היו?8
Click here for the solution.
עוד שואלים: אחד היה לו עשרים דינרים והלך לשוק לקנות בהם חתיכות משי וחתיכות צמר גפן, וקנה חתיכת המשי בארבעה דינרים החתיכה, ושל צמר רחלים בחצי דינר החתיכה, ושל צמר גפן ברביע דינר, והביא לביתו עשרים חתיכות בין הכל, ושואלים: כמה חתיכות לקח מן המשי, וכמה מצמר רחלים, וכמה מצמר גפן?10
Click here for the solution.
Several versions of this basic problem type (solve two simultaneous equations of the form
- ax + by + cz = n
- a + b + c = n
for integer a,b,c, with given x,y,z and n) also appear in the Propositiones:
V. propositio de emptore denariorum.
Dixit quidam emptor:[11] Volo de centum denariis c porcos emere; sic tamen, ut verres x denariis ematur; scrofa autem v denariis; duo vero porcelli denario uno. Dicat, qui intelligit, quot verres, quot scrofae, quotve porcelli esse debeant, ut in neutris numerus nec superabundet, nec minuatur?
5. proposition concerning the buyer and his denarii.
A certain buyer said: “I want to buy 100 pigs with 100 denarii in such a way that a mature boar is bought for 10 denarii; a sow for five denarii; and two small female pigs for one denarius.” Let him say, he who knows, How many boars, sows, and small female pigs should there be so that there are neither too many nor too few of either [pigs or denarii]?
Click here for the solution.
XXXVIII. propositio de quodam emptore in animalibus centum.
Voluit quidam homo emere animalia promiscua c de solidis c, ita ut equus tribus solidis emeretur; bos vero in solido i, et xxiiii oves in sol. i. Dicat, qui valet, quot caballi, vel quot boves, quotve fuerunt oves?
38. proposition concerning a certain purchaser and [his] 100 animals.
A certain man wanted to buy 100 various animals for 100 solidi. He wished to pay three solidi per horse, one solidus per cow, and one solidus per 24 sheep. Let him say, he who can, How many horses, cows and sheep were there?
Click here for the solution.
XXXVIIII. propositio de quodam emptore in oriente.
Quidam homo voluit de c solidis animalia promiscua emere c in oriente; qui jussit famulo suo, ut camelum v solidis acciperet; asinum solido i. xx oves in solido compararet. Dicat, qui vult, quot cameli, vel asini, sive oves in negotio c solidorum fuerunt?
39. proposition concerning a certain purchaser in the east.
A certain man wished to buy 100 assorted animals for 100 solidi in the East. He ordered his servant to pay five solidi per camel, one solidus per ass, and one solidus per 20 sheep. Let him say, he who wishes, How many camels, asses and sheep were obtained for 100 solidi?
Click here for the solution.
I do not know a way to solve this class of problem directly, without some element of trial and error.
- רב יוסף חיים, אמרי בינה (ירושלים תשנו), חדוד במילי דעלמא שאלה י”א, עמוד קצה [↩]
- שם תשובה י”א עמוד רכג [↩]
- From Peter J. Burkholder, HOST: An Electronic Bulletin for the History and Philosophy of Science and Technology, 1, #2 (Spring/Summer; June 1993) – link. Other links to the (Latin) text: here and here. [↩]
- שם שאלה ל”ז עמוד רא [↩]
- שם תשובה ל”ז עמוד רכז [↩]
- שם שאלה ט’ עמוד קצד [↩]
- שם תשובה ט’ עמוד רכב [↩]
- שם שאלה י’ עמוד קצד [↩]
- שם תשובה י’ עמוד רכג [↩]
- שם שאלה ל”ט עמוד רא [↩]
- שם תשובה ל”ט עמוד רכז [↩]
Thanks for all the fun math!
In Louis Jacob’s “Helping With Inquiries” he mentions a couple of brain teasers which R. Aharon Kotler supposedly used to ask prospective bochurim.
> I do not know a way to solve this class of problem directly, without some element of trial and error.
I cannot think of one either. Nor can I think of a direct algebraic way in general to prove if there is exactly one, more than one, or zero solutions that work for given values of x,y,z and n, without some trial and error as you say.
Also, the problem seems to assume that x, y, and z (the numbers of Jews, Christians and Moslems, respectively) are each integers > 0. If zero were permitted, then an alternative solution is 8 Jews, 0 Christians, and 32 Moslems.
I had also considered that; perhaps the phrasing of מהם יהודים ומהם ישמעאלים, ומהם נוצרים is meant to imply that there must be at least two of each.