Tikalon Header Blog Logo

A Grammar of Cooking

January 23, 2023

In 1985, Nobel Physics Laureate, Richard Feynman (1918-1988), published his autobiography, Surely You're Joking, Mr. Feynman![1] This book, written in collaboration with Ralph Leighton (b. 1949), son of physicist, Robert B. Leighton (1919-1997), recalls the humorous incident that inspired the book's title. As a new Princeton University graduate student, Feynman was invited to a tea party at the home of the Dean. When he entered, he was asked by the Dean's wife whether he would prefer cream or lemon in his tea. Scientists are not as socially adept as other professionals, and he had never before been invited to a tea. He asked for both.

Cover of 1985 paperback edition of Surely You're Joking, Mr. Feynman!

Cover of my copy of the 1985 paperback edition of "Surely You're Joking, Mr. Feynman!"

Feynman developed a reputation as a safe-cracker while working at Los Alamos on the Manhattan Project. His facility in opening safes was based on experiment and observation.

After World War II, he expanded his safecracking ability by social engineering. He engaged in friendly conversations with a locksmith in charge of maintaining the Los Alamos safes and mechanical calculators.

One important piece of information that he learned was that safes were shipped with a default combination that was sometimes not changed. It's like someone on the Internet using "password" or "12345" as their password.

Feynman easily found the 20% of safes for which the default combination was not changed.

(Click for larger image.)

Lemon juice will curdle milk and cream, and the curdling is more rapid at high temperatures, as in hot tea. My maternal grandmother's house was a very short distance from my high school, and I would often visit her after school. At times, I would have tea there with lemon and honey; and, once, I added some milk. I could claim that this is an example of great minds thinking alike, but it's likely an example of the fallacy of the undistributed middle.

One solace I had during social distancing caused by the COVID-19 pandemic was watching cooking programs on television. I had viewed a few before then, notably Lidia'a Kitchen, but I was amazed at how many cooking programs I found. My wife is our resident chef, she creates some amazing gluten-free meals for me, and my prior cooking experience had been only barbecue, pancakes, and the occasional fried egg. However, my culinary knowledge suddenly expanded to the point at which I could successfully modify recipes without disaster. This shouldn't be surprising, since cooking is not unlike doing a synthesis in a chemical laboratory - Just mind the reagents, their proportions, and the temperature.

Although some aspects of culinary science, such as sous vide, have been overblown in importance, there is much essential science in cooking. Foremost is the idea that cooking acts as a means of predigesting food, since the heat breaks down the cells of meat and plants to release their nutrients. The heat also acts as a means of killing pathogens.

Yeast is used as a leavening agent in baking with the yeast bacteria releasing carbon dioxide to expand dough. In cases for which a yeasty taste should be avoided, as in cakes, the alternative is reactions that release carbon dioxide upon heating. These chemical leavening agents include baking powder and baking soda (sodium bicarbonate). For baking soda, the reaction is
2NaHCO3 -> Na2CO3 + H2O + CO2

The Maillard reaction, named after French chemist, Louis Camille Maillard (1878-1936), is another significant chemical reaction exploited in cooking. In 1912, Maillard discovered this reaction that browns food rapidly at temperatures about 28-330 °F) (140 to 165 °C). This chemical reaction between amino acids and sugars imparts flavor to toasted bread, roasted marshmallows, cookies, breads and seared steaks. The Maillard reaction is accelerated in an alkaline environment, so lye is applied to pretzels. The mechanism for the Maillard reaction was discovered by U.S. Department of Agriculture chemist, John Hodge (1914-1996), in the early 1950s, many decades after Maillard's observation.[2]

Crunchy Pretzel (Willis Lam)

Pretzels are my favorite Maillard reaction product, and they are now available as a gluten-free food.

April 26th was declared "National Pretzel Day" in 2002 by Pennsylvania governor, Ed Rendell (b. 1944).

The United States per capita pretzel consumption is a considerable two pounds per year, but the estimated per capita rate for Philadelphia, Pennsylvania, is more than ten pounds per year. My personal consumption is about that of a Philadelphian.

(Wikimedia Commons image by Willis Lam)

Cooking recipes have evolved along with humans, and an organizing principle in the study of evolution is taxonomy in which cladograms are created to describe phylogenetic trees. These trees show the evolutionary relationships among members based upon similarities and differences in characteristics. A recent arXiv paper by Ganesh Bagler of the Department of Computational Biology of the Indraprastha Institute of Information Technology Delhi (IIIT, New Delhi, India), incorporates similar tree diagrams in the construction of a grammar of cooking.[3] The paper introduces a fundamental cooking unit, the cubit (culinary bit).[3]

The cubits represent the descriptive words of the fundamental parts of a recipe description, and these culinary words are joined together to create sentences in a recipe. There's an analogy between words being grammatically joined to form sentences and cubits being joined to form a recipe. There are five types of cubits, as follow: I cubits (ingredients), P cubits (processing), U cubits (utensils), Q cubits (quantities and units), and F cubits (forms). Short lists of examples of each type of cubit are shown in the following tables, as extracted from the supplementary information of ref. 3, in itself extracted from ref. 5.[3-5]

Table I. A few ingredients from the complete list of 18,599 ingredients. These are I cubits.

salt onion butter water
garlic clove olive oil sugar egg
tomato black pepper garlic milk
pepper salt pepper cumin vegetable oil
cinnamon parsley lemon juice cilantro
ginger carrot soy sauce flour
parmesan cheese purpose flour cream oregano
beef green onion oil potato
basil brown sugar lime juice extra virgin olive
chicken broth chicken breast lemon white sugar

Table II. A few processing actions. These are P cubits.

add heat cook stir
place mix cover remove
serve boil simmer bake
stirring sprinkle cool preheat
cut combine drain pour
set season beat spread
transfer whisk smooth top
blend refrigerate put fry
melt fold reduce dry
slice coat cream chop

Table III. A few utensils. These are U cubits.

bowl pan oven skillet
pot saucepan cup dish
sheet processor fork knife
plate tablespoon mixer container
spatula spoon cooker whisk
board microwave platter sieve
boiler jar casserole masher
skewer frypan cutter strainer
stockpot ladle shaker crockpot
peeler crock tray blender

Table IV. A few quantities and units. These are Q cubits.

cup teaspoon tablespoon ounce
can lb package clove
pinch slice gm pound
bunch dash pods jar
stalks ml quart sprig
halved piece inch pint
box bag bottle loaf
packet drop envelope kg
sheet fluid ounce leaves head
cubes carton gallon stick

Table V. A few of the 1299 forms. These are F cubits.

chopped ground minced sliced
diced grated cut shredded
crushed dried sour beaten
cooked divided drained melted
softened unsalted crumbled uncooked
cubed sweet peeled peeled/chopped
toasted ground lean granulated peeled cut
peeled/sliced seeded/chopped skinless/boneless quartered
low fat mixed rinsed drained canned
boiling boneless unsweetened drained/rinsed

Although it's not addressed in the arXiv paper, having recipes broken down into cubits would allow an easy transformation of two recipes into another. As an example, with apologies to mathematicians for usurping their real number symbol, if you like Chicken Tikka Masala (ℝ1) and you want to create a variant recipe for Sweet Potato Tikka Masala ℝ3 using a recipe (ℝ2) for boiled or steamed cubes of sweet potatoes, you can create the new recipe using a transformation function,

3 = T(ℝ1, ℝ2)

The function T would be non-commutative; otherwise, you might get boiled chicken and have chicken soup instead.


  1. Richard P. Feynman and Ralph Leighton , "Surely You’re Joking, Mr. Feynman!": Adventures of a Curious Character, W. W. Norton & Company; Reissue edition (February 6, 2018), 400 pp., ISBN 978-0393355628 (via Amazon).
  2. J. E. Hodge, "Dehydrated Foods, Chemistry of Browning Reactions in Model Systems," J. Agric. Food Chem., vol. 1, no. 15 (October 1, 1953), pp. 928-943, https://doi.org/10.1021/jf60015a004. The American Chemical Society is notoriously stingy with its assets; so, this 1953 article is paywalled.
  3. Ganesh Bagler, "A generative grammar of cooking," arXiv, October 12, 2022, https://doi.org/10.48550/arXiv.2211.09059.
  4. Devansh Batra, Nirav Diwan, Utkarsh Upadhyay, Jushaan Singh Kalra, Tript Sharma, Aman Kumar Sharma, Dheeraj Khanna, Jaspreet Singh Marwah, Srilakshmi Kalathil, Navjot Singh, Rudraksh Tuwani, and Ganesh Bagler, "RecipeDB: A resource for exploring recipes," Database (Oxford) 2020 (Nov 25, 2020), pp. 1-10, doi: 10.1093/database/baaa077. Supplimentary information available as a zip file here.
  5. RecipeDB - A resource for exploring recipes, released under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Linked Keywords: Nobel Physics Laureate; Richard Feynman (1918-1988); publishing; published; autobiography; Surely You're Joking, Mr. Feynman!; book; collaboration; Ralph Leighton (b. 1949); son; physicist; Robert B. Leighton (1919-1997); humor; humorous; artistic inspiration; inspired; title (publishing); Princeton University; postgraduate education; graduate student; tea party; home; Dean (education); wife; cream; lemon; tea; scientist; society; socially adept; professional; book cover; paperback; edition (book); reputation; safe-cracking; safe-cracker; Project Y; Los Alamos; Manhattan Project; safe; experiment; observation in science; World War II; social engineering (security); conversation; lock (device); locksmith; mechanical calculator; information; transport; shipped; default; Internet; password; lemon juice; curdling; curdle; milk; cream; temperature; grandparent; maternal grandmother; distance; high school; honey; great minds thinking alike; fallacy of the undistributed middle; consolation; solace; social distancing; COVID-19 pandemic; cooking; television program; Lidia'a Kitchen; chef; gluten-free; barbecue; pancake; frying; fried; egg (food); culinary arts; knowledge; recipe; disaster; chemical synthesis; chemistry; chemical; laboratory; reagent; [roportionality (mathematics); proportion; science; sous vide; idea; digestion; predigesting; food; cell (biology); meat; plant; nutrient; sterilization (microbiology); killing pathogens; baker's yeast; leavening agent; baking; bacteria; carbon dioxide; dough; sense; taste; cake; chemical reaction; baking powder; baking soda (sodium bicarbonate); sodium carbonate; Na2CO3; water; H2O; CO2; Maillard reaction; France; French; chemist; Louis Camille Maillard (1878-1936); Fahrenheit; °F; Celsius; °C; amino acid; sugar; flavor; toast (food); toasted bread; roasted marshmallow; cookie; bread; searing; seared; steak; alkalinity; alkaline environment; lye; pretzel; discovery (observation); discovered; United States Department of Agriculture; John Hodge (1914-1996); 1950s; decade; pretzel; food industry; product; gluten-free; Pennsylvania; governor; Ed Rendell (b. 1944); United States; per capita; consumer; consumption; pound (mass); year; approximation; estimate; Philadelphia, Pennsylvania; Wikimedia Commons; Willis Lam; evolution; evolved; human; research; study; evolutionary taxonomy; cladogram; phylogenetic tree; characteristic; arXiv; scientific literature; paper; Ganesh Bagler; computational biology; Indraprastha Institute of Information Technology Delhi (IIIT, New Delhi, India); grammar; word; sentence (linguistics); analogy; ingredient; food processing; food preparation utensil; measurement; quantity; unit; form; combining; transformation; apology (act); mathematician; usurp; usurping; real number; mathematical symbol; Chicken Tikka Masala; boiling; boiled; steaming; steamed; cube; sweet potato; function (mathematics); commutative property; non-commutative; chicken as food; chicken soup.