All participants of the IOI 2019 received A Book of Tasty Algorithms (with foreword by Donald E. Knuth) as a gift. The Grand Chef of Tasty Algorithms himself introduced this special IOI edition of a book of marvelous algorithms, refined over centuries by best masters from Azerbaijan. Prof. Knuth is currently Professor Emeritus of The Art of Computer Programming at Stanford University.

On 19 September 2019, we have received wonderful news from Prof. Donald Knuth, who has got the copy of A Book of Tasty Algorithms along with messages from IOI 2019 participants:
 

"The books arrived today, and I'm overjoyed to see that they were very attractively printed indeed.
I was also quite touched (and "flabbergasted"!) by the one-of-a-kind thank-you sheet that was inscribed by so many participants of IOI2019. Wow!
My wife – who is a designer – was also appreciative of the outstanding cover design, and the IOI logo."


Read below Prof. Knuth’s foreword with further comments and take up the challenge of developing 'cuisine à la informatique' with METAFOOD app. You can download the original text from http://cs.stanford.edu/~knuth/azerbaijan.pdf.


FOREWORD

Thought depends absolutely on the stomach.

– VOLTAIRE, letter to d’Alembert (1770)

 

This special IOI edition of a book about Azerbaijani cuisine is aptly titled A Book of Tasty Algorithms, because of the profound connections between culinary arts and computer science.

 

Of course we know that our browsers use “cookies” and “menus.” And there’s an organization called CodeChef, which features monthly Code-Off contests. But the relation between computer science and food actually extends to the very core of our discipline, since we are fundamentally concerned with the systematic study of processes. Long before computer science was invented, anonymous chefs discovered many of its basic principles: step-by-step sequences of instructions; conditional execution; loops; randomization; parallelism; lazy evaluation; late binding; crowd sourcing; etc.

 

Thank goodness for toasting, roasting, poaching, basting, braising, broiling, brewing, baking, kneading, and for the ability to communicate those techniques from generation to generation!

 

Azerbaijan’s savory delicacies cannot help but bring delight to your eyes and your spirits, as well as to your bellies, whether you are a carnivore or an herbivore. The following little puzzle might serve as an appetizer that helps you to explore them:

 

I

S

H

U

Y

U

D

L

U

N

T

E

R

N

C

G

A

S

T

I

O

E

B

O

Z

B

A

S

H

N

O

A

H

L

O

V

I

F

L

N

Y

M

Y

M

P

Y

A

O

I

E

T

K

A

I

D

H

G

I

U

N

E

L

R

N

I

I

K

H

A

S

H

I

L

S

D

R

A

G

P

A

R

C

H

A

Y

I

Z

B

A

S

T

H

O

N

R

R

G

V

R

L

F

N

N

M

L

I

S

G

O

I

B

A

T

U

G

V

A

J

B

A

V

V

A

D

S

L

M

A

B

A

B

A

Y

A

G

K

O

L

R

H

A

Y

R

R

S

U

M

S

D

N

E

I

L

K

T

M

U

O

E

M

G

R

A

Y

I

B

A

A

P

A

T

G

G

K

Y

L

U

M

M

H

A

P

D

Y

U

S

H

B

A

R

A

V

L

J

K

B

E

H

M

E

Z

I

A

H

A

M

O

O

A

C

Y

I

T

E

B

R

E

H

S

S

A

G

D

N

S

 

How many of the foods described in this book can you find in this matrix of letters? There are three dozen names altogether, each of which appears in one of the eight ways – reading either forward or backward or upward or downward, or diagonally in any direction. (The leftover letters will also say something.)

 

Centuries of experimentation have shown that these tasty algorithms will output combinations of nature’s ingredients that are unusually delicious and nutritious. But it’s also clear that many more dishes remain to be discovered, because only a minuscule fraction of the possibilities have ever been tried. The number of food stuffs is bounded, but the number of ways to combine and prepare them is exponential. Even if we limit ourselves to polynomial time, we’ll never be able to explore more than a tiny part of this vast territory.

For example, did you know that fresh blueberries and avocados, wrapped in won-ton skins, are quite delicious? By simply combining three ingredients, chosen at random from three different aisles of your local grocery store, chances are good that you’ll be the first to discover something worth sharing.

 

When I cook for myself, I often enjoy using the “Venn diagram method,” with which I can taste all subsets of a given set of flavours, For instance, I might put fresh eggs, garlic, mint, and peas into a skillet in such a way that each of the 15 nonempty combinations takes up about 1/15th of the total area Then, if I refrain from stirring, I’ll be able to eat my lunch directly out of the pan, savouring each of the possibilities in isolation.

 

Biochemists have been introducing revolutionary new gustatory experiences known as molecular gastronomy. Do computer scientists have anything similar to offer to the world, something that might deserve the name cuisine à la informatique? I think we do: We can potentially enrich gastronomy by incorporating what we’ve learned about parameters.

 

Indeed, I’ve been wishing for an app that my wife and I could use daily, called perhaps METAFOOD. This app would know exactly what ingredients we currently have in our pantry and refrigerator, as well as what kinds of preparation equipment we own. We’d ask METAFOOD to suggest a (possibly random) menu based on what’s on hand and the amount of time available. Once we’ve agreed on the goal, METAFOOD would tell us what to do first, what to do next, etc. It would watch our progress – changing course, if necessary, like the navigation system in an automobile. Naturally, we’d be communicating with METAFOOD via microphone and camera, not by touchscreen because our hands would usually be covered with gooey stuff. Afterwards METAFOOD would help plan a shopping list, etc.

 

Could it be true that the great medieval computer scientist and polymath Al Samwal came to live in Azerbaijan during the 12th century because he relished the local cuisine? We’ll never know for sure. But it’s a plausible hypothesis, based on the contents of the present book. Bon appétit!

 

 

Donald E. Knuth

Stanford, California