Summer Project 2018 : Intro

  • A lot of people have been asking me what I’m going to be doing this summer, and I have been very vague, for the excellent reason that until today, I didn’t know either. I’ve been spouting buzzwords like functional programming and nlp and machine learning in every direction.
  • I will be working with Prof Siddhartha Gadgil from the IISc Math Department.
  • The overarching idea is to take mathematics as it is done today and rest it on the foundation of homotopy type theory (which is more scalable, so this is not as crazy as trying to do the same with set theory). This requires several steps:
  • Step 1: Convert mathematics as written in papers to something controlled.
  • Step 2: Translate the controlled language to HoTT
  • Step 2 requires a lot of knowledge of homotopy type theory, so I’ll be working on step 1
  • Step 1 has two parts
    • Step 1A : Parse latex source (the typesetting languge math papers are written in – you thought they’re written in English?) and convert it into a dependency tree, which is mostly the same words, but tagged with their part of speech, and what other words they refer to.
      • Fortunately there exist parsers, such as the StanfordParser, which can mostly do this for us. As Mohan Ganesalingam pointed out, mathematics is a lot easier to parse than english in general. There will be issues, of course, especially with latex formulae, but we’ll figure things out. (I hope.)
    • Step 1B : Convert the dependency tree to the Controlled Language (Gadgil calls it the Naproche-like CNL, but naproche looks like English, while this stuff sure doesn’t, so I prefer to just call it Controlled Language
      • The plan is to do this via a recursive functorial framework in Scala
      • The framework exists, but not most of the translation rules, so my job will be to come up with these rules.
  • So now I have to quickly learn a bunch of skills
    • How to program in Scala
        • How to run stuff, build packages etc
        • Understand what functors and monads are.


    • How to use Github (I’m really embarrassed I don’t know this yet)
    • How to parse English
    • How to identify and describe patterns in mathematical argument.
  • And I’ve gotta read two PhD theses.

Indian Logic

Epistemic Status: Spitballing about deep philosophical questions

A couple weeks ago, at a frisbee tournament, a teammate of mine called Deepak told me about his studies in Indian logic, by which he meant a certain style of philosophical argument in the Upanishads.

Indian logic, [he said] had syllogisms, but was not completely deductive, in that you could not have a syllogism that was practically false, but logically valid. (As in: All men have five legs. Socrates is a man. Therefore Socrates has five legs.)

There has to be an inductive part, that is based on an empirical observation of the world. The example he gave was:

Where there is smoke there is fire, as we see in a kitchen. There is smoke on the hill. Therefore there is fire on the hill.

Now this syllogism is true (valid? – I’m not sure there was a distinction) and accurately describes the physical world, until somebody comes up with an empirical example of there being smoke without fire, at which point it becomes false.

The way he put it was, you *have* to accept this, unless you can come up with a counterexample.

This reminded me of stuff I was thinking about at ESPR, the question of dealing with arguments you can’t (in the moment, at any rate) logically refute. I could always resort to epistemic learned helplessness, but that’s boring and means I never get to change my mind.

In the conversation, though, the first thing that came to my mind was, to quote my friend Andrew, “That’s bullshit!” . More precisely, “My prior on logical or empirical arguments of the kind you are making being undone by later findings is pretty damn high.”

Then Deepak pointed out that this is pretty much how science works. We do believe the current paradigm, until such time as it is overthrown. So now I’m not sure. There should be a way of distinguishing the two cases (when you should believe and when you shouldn’t), and I can vaguely sense it, but I’m not sure. Plausibility? Our intuitions get worse and worse the further we move from direct experience. (eg, quantum mechanics) Track record? What actions and consequences are implied for us ? That seems a little…. how do you say… biased. Meta level considerations? What somebody else stands to gain based on persuading you?

How do you figure out what is true?

A Perfect Moment

December 2048, a city in the Northern Hemisphere

“Eeek! You’re bleeding, Jonathan!” she said, tottering into the living room, fumbling the door shut against the chill and gloom.

No No NO there was blood dripping down both his wrists. The knife was still quivering gently, stuck in the wood of the rocking chair’s bottom.

“You promised,” she muttered, bandaging the limp wrists and spraying on the Liquid Band-Aid, “that you wouldn’t off yourself when I wasn’t around.”

Two well-deserved slaps had brought him round soon enough.

“I’m sorry, Rashi,” said Jonathan, eyelids half closed. He tried to shrug and gave up, wedged shrunken into the chair.

“I was…. Honestly, what else was I to do…”

Rashi looked into the distance. The winter gale hissed at the dark window, then abruptly died down.

“Yeah, I know,” she said, heavily. “I go out for my first walk in ages, wearing the thick plastic raincoat, my feet are blue with the chill and Mrs Simla trills at me — ‘What darling weather it is, my dear!’ I wanted to claw her face off, the bitch.”

“Was she wearing a disco?” asked Jonathan, still slumped in his chair, like always.

“Of course. That’s what I meant, Jon. Claw her face off, eww,” said Rashi, falling into her chair, also facing the door, next to her husband’s.

Almost involuntarily, her eyes flicked over to the two dusty disco masks on the table, shoved against the wall, nearly covered by the piles of scorched-looking paper flung there after Jonathan’s abortive attempt to interest himself in charcoal sketching. She had long given up trying to find a hobby for herself. Hobbies in the general population were all but replaced by the disco version, better in almost every aspect.

The name came from “like having your own private discotheque”, a breathless sentence in one of the earliest reviews of the virtual reality tech. Disco masks weren’t virtual reality, not quite. You could still move around in the real world, but your perceptions were altered. A biting wind might feel like a cooling breeze, the silence of the city was replaced by whatever music the software thought you liked best at the moment, and the thin, sharp electrodes in the innermost layer, touching the skin of your face, told the circuitry what kind of surroundings your neurons wanted to feel. It never itched, of course. Soon you’d stop noticing it ever existed. The most important effect, of course, was that you couldn’t feel bored or depressed. Something new popped up in front of you every thirty seconds if necessary, and your dopamine levels were carefully adjusted by the electrodes.

They were banned in orbit, where every sense needed to be on high alert. On Earth, however, they were perfectly legal and almost universally worn. Why wouldn’t you? After all, people who had taken off and damaged their discos in remote areas had ‘succumbed to ennui’, as the monthly obit newsflash put it.

Without disco, what was there to do?  There were no jobs to have on Earth, not that anyone wanted one. A hobby? One got bored, of course. She pictured Maz, dear son, walking in, a year from now, to two slowly decomposing bodies in identical rocking chairs and red wrists…She shuddered. But Jonathan had already tried to kill himself twice. She herself wobbled frantically on the edge of that precipice. Could they endure that long?

“Stop looking at those things,” said Jonathan, vaguely circling his finger in the direction of the table. He had drawn circles, and far more exotic shapes, as a Pre-Millennium artist, before disco made everyone into a critic who found their own scribbles the most fantastic art in the universe. Now his work lay scrunched on the table. Nobody cared. They could all do better themselves.

“It’s a year before Maz gets back from his asteroid mission,” said Rashi. “I know they have the regen medicine, but still, what if a pirate miner gets a lucky shot into his brain? I warned him never to take off that ridiculous helmet of his. But he likes the danger. What did he say last time? ‘the adrenaline rush of chasing matter thieves halfway across geosync orbit’ ? But does it have to be him? Can’t somebody else keep the economy running?”

Rashi tossed her raincoat vaguely at the table. It hit the floor with a slight squelch. She collapsed back into the chair, her old bones tired from the short walk, plodding through the mud.

“You know, Jon, I could manage when Mrs Simla at least didn’t wear disco and I could talk to her sometimes. Now…. there’s nothing to do at all… If you’d gone out for that walk, I might have been the one playing with the knife.”

“So what do you want to do? Give up? Say goodbye to the real world, only somewhat less permanently than I tried, and put on a disco? Live in a castle in the air?”

“It’s a lot better than life down here.”

“Pah. You’re right about that. I don’t have a single friend left who wouldn’t smile at me beatifically. If they saw me at all.”

“At least they’re smiling. When was the last time you smiled?”

“You think those fake smiles count? Mrs Simla thought it was her birthday again last week. Said to thank you for the beautiful cake. She grinned happily at me while I told her you haven’t baked in years.”

“So if it’s not connected to something in the real world it’s not meaningful? What about happy dreams?”

“The smile on your face when you wake up counts. Not the ones before. It’s only a dream if you can wake up from it. Otherwise it’s a nightmare.”

“I don’t know, Jon. I know it’s addictive. I know the joy isn’t real. But it’s been a while since I’ve experienced real joy. I think I might have forgotten how to tell the difference.”

“If- no, no when Maz comes back you’ll tell the difference all right. If you’re awake and alert to see him walk through that door.”

“That’s the only reason I haven’t used that knife. But Jon, that’s a year away. Dunno if I can hold out for a year- without disco.”

“And when he comes home to see us grinning and staring past his face like zombies?”

“We would take it off then!” said Rashi, sitting up straight.

“What, like Salvator, that guy on the flash who dropped his disco overboard while on a ship and decided the only true excitement in life was swimming with the sharkies?”

“Oh no, it’s really juggling with the knifies, of course,” snapped Rashi.

Jonathan inhaled and said nothing.

It started to drizzle. Small raindrops rolled lethargically down the window pane and pooled on the icy frame.

The rocking-chair creaked as Jonathan sat up with effort.

“Gimme that disco.”

“I swear to you, Rashi, the minute Maz walks through that door, that thing is off my face and in the bin.”

Rashi picked up the discos, shuffled over, pecked Jonathan on the cheek and passed him a disco mask.

“Ready, darling? One year. And then we won’t use it, ever again.”

She slipped hers on.

Aaaaaah. Mrs Simla was right. It really was darling weather. The window opened and a perfect summer breeze swirled around the room. Rashi wriggled her toes with delight. Maz didn’t know what he was missing. Anyway, it was time to think about that superb tapestry on the wall. When had she gotten so good at embroidery?

Perhaps she would start again. Why had she ever dropped it? Such fun…..




…..Rashi was playing chess against Magnus Carlson, world champion since 2036. And losing. Or so he thought. She smirked, tapping a rook against her teeth. Tap. Taptap. A bit boring, playing Carlsen. She’d be world champion next, of course. Tap. Taptap. Tappity-tap tap tappitytap tap tap. Wait. Tap taptap tappitytap?

Carlson disappeared. Something stirred at the back of Rashi’s mind. I know that sound….

Yes! That’s Maz! Mazmazmaz! Maz is back! She ripped the odd plastic off her face and spun out of her chair. Across the room was a door. Almost tripping over her feet she yanked it open. Maz stood, silhouetted in the bright sunlight.

Rashi sighed, joy soaking into her bones deeper than ever before. Maz is here.

Maz, alive-and-safe Maz, fell into her arms. The perfect summer breeze gently swirled the door shut.

A Carrot of Some Consequence

A short skit

Cast of Characters
Arpita woman about 50 years old .
Ranjan man about 50 years old . Husband of Arpita
Nikhil: boy about 14; Son of Ranjan and Arpita
Sanket: boy about 17. Brother of Nikhil
Kenneth: man about 35. Driver of jeep

A fairly busy highway in an Indian town. About 4pm in the afternoon.

The family is in a car. ARPITA is driving. RANJAN is sitting in the front seat
balancing an artistically arranged tower of vegetables carved into geometric shapes.
At the top is a carrot with some decorative slits and at the bottom is a watermelon.
NIKHIL and SANKET are sitting in the back. Both are looking at their mobile

RANJAN I hope one of you remembered to close the gate. It’s not far, but anything
can happen…
SANKET (listless) Remind me again why we are going to this place… I’m going for
a movie with Vishal at six.
ARPITA You know how much Dada enjoys entering these vegetable-carving
(To RANJAN, who is struggling to connect his mobile to the radio)
Honey, watch the carrot.
SANKET And why are WE going to this place?
(gestures to himself and Nikhil)
ARPITA Sanket! It’s important we do things together as a family.
SANKET (Sneezes) Bleh.
RANJAN (keeps his phone in his pocket, turns around)
Nikhil, stop fooling around with that, especially in a moving car. You’ll
spoil your eyes.
I don’t know why we gave him that phone in the first place.
NIKHIL I’m reading theoretical physics on Quora. It’s educational.
SANKET (reads over his shoulder)
What allows Flash to go faster than the speed of light? (smirks) Very
RANJAN If you’re that bored, why don’t we sing a song? That’s always good fun on
a car trip.
SANKET (sneezes, looks happy)
Soddy, I hab a cold. (exaggerated sick voice)
RANJAN Every time some excuse. Do you remember our picnics, Arpita? How we
used to sing all the way there and back…
NIKHIL It’s no use trying to get Sanku to do anything. (Starts to rap)
RANJAN Ay! I said sing, not talk fast!
NIKHIL (Looks out of the window)
Hey! There’s a dog on the roof of that jeep.
SANKET What? Where? That’s not safe!
Can I have a dog?
ARPITA We’ve been over this before. Waste of money, our flat is too small and no
one is there to look after it. Can you take my sunglasses out of the
glovebox? It’s too bright.
NIKHIL I would look after it.
RANJAN Like you promised to look after your studies without help?
SANKET Yeah, him looking after a dog would be an animal rights violation.
ARPITA You’re hardly any better, SANKET. Don’t be mean.
SANKET (sniffily) I would do all the work… But still…
NIKHIL (contemptuously) Like you ever lift a finger for anything!
RANJAN (looking out of the window)
Oh, I see it! There’s a portable kennel on that jeep. It’s for sale. But I don’t
see a dog.
(Gets distracted by billboard. )
RANJAN Look at that! Mopeds, mopeds mopeds. When I was 16 I walked
everywhere. Now look at that Arpita they’re advertising mopeds for kids
Sanket’s age.
SANKET (drawls) What, you want me to walk everywhere? Or sit inside and read
some book all day like Nikhil.
NIKHIL Hey! What’s so bad about that? All you do at home is sleep! I don’t think
there’s anything that can make you run.
(pretends to consider deeply)
Maybe… If there was an asteroid about to hit Earth and you were in the
ARPITA Or if Shaila calls him.
RANJAN Who’s Shaila?
ARPITA Our new neighbour’s daughter. Wears torn jeans.
ARPITA So nothing. All I’m saying is, perhaps it’s time you started applying a little
energy to life. At least make your bed in the morning. I’m so tired of
telling you.
RANJAN That’s very true, Aru. Forget the bed, I used to wake up at 4 to make my
tiffin. These kids have no initiative. Never do anything on their own.
NIKHIL (wounded) I wanted to make my own tiffin but Ma said I don’t have any
understanding of what nutritious means.
ARPITA Enough now. We’re almost there.
RANJAN (sees another billboard)
Can you believe it?! Look at that one!
(ARPITA turns to look at the hoarding RANJAN is pointing out.)
NIKHIL Watch out! The dog!
(ARPITA slams on the brakes)
(A horrible squealing noise and then a pop)
(Ranjan is fussing over his vegetable carving, making sure it’s okay)
SANKET You ran over that poor dog! You killed it! Are you insane? We should do
RANJAN Calm down Sanket. At least it wasn’t a person. I hope my bumper is okay.
SANKET Why the hell should I calm down? And all you can think about is your
NIKHIL (phone in hand) Should I call emergency? (shakes his head as he realizes
they won’t respond)
(Jeep stops, KENNETH comes out, walks to car)
ARPITA (upset) Oh dear. I hope the man doesn’t make a fuss.
NIKHIL It’s okay mama, It’s not your fault.
RANJAN I’m sorry I distracted you.
SANKET We should all go apologize to him.
(RANJAN, NIKHIL and SANKET get out of the car, RANJAN still carrying
his vegetable carving)
KENNETH (with a kind of embarrassed smile). I think you ran over Kenny. He must
have gotten loose.
RANJAN We are extremely sorry. Is there anything I can do?
SANKET (cuts in) I am so terribly sorry about this.
NIKHIL (examining something caught in tyre)
Hey! It’s made of plastic.
SANKET What? Oh, thank God.
KENNETH Yeah that’s Kenny, mascot of Kenneth’s Kennels. I’m Kenneth by the
way pleased to meet you. I blow him up and tie him to the jeep. Its good
advertising. As for what you can do… I’m really hungry.
(sees the vegetable carving, grabs the carrot from the top, takes a big bite,
nods and waves it at RANJAN)
Keep it, I guess we’re even.
(RANJAN stares at plate in shock )
NIKHIL (grinning) Kenny is cool! I’m going to clean him up and hang him in my
ARPITA (smiling) You got your dog. Happy now?
NIKHIL Yes! I mean, Kenny’s just inflatable, but he only cost a carrot.
(RANJAN looks anguished. NIKHIL gives him a reassuring hug.)
KENNETH (finishes eating carrot)
(chattily) Thanks for the carrot. I’m off to display my kennel at the dog
(turns to walk away)
SANKET (immediately) Wow, can I come?
KENNETH Um, sure I guess.
SANKET Have fun looking at vegetables!
(SANKET runs off)
NIKHIL Whoa, I didn’t know he could run like that.
RANJAN But… my carv…. He’s gone!


How much kale is consumed in Africa?

“How much kale was consumed in Africa in the past year?”, was another SPARC 2016 application question. Buoyed by my ability to survive poisoned cookies, I decided to take a crack at it.


I used three different methods to estimate that the amount of brassica oleracea var. Acephala eaten by human beings in Africa in the past year was one to two megatonnes (10^9 kilograms). I am fairly sure that the amount eaten was between zero and eight megatonnes (MT).


Getting data on kale consumption in Africa was like trying to eat cabbage soup with one chopstick. Like the soup, the numbers I came up with must be seasoned with large pinches of salt.

Anyway, let’s get started! I’m going to break the question into its components and explain how I resolved each one.

“How much / kale / was consumed / in Africa / in the past year?”

  • How much
    • I decided to answer in megatonnes (10^9 kilograms) because SI units are cool, and I don’t have enough significant digits for a smaller one.
  • kale
    • This is the tricky one. Acording to Wikipedia and Plant Resources of Tropical Africa 2: Vegetables [1] , Kale is defined as brassica oleracea var. acephala, which is to say, it is a cultivar of cabbage that doesn’t form a head, but remains as flattish leaves.
    • Ethiopian kale, also called African kale, is brassica carinata, a different species, so I didn’t count it.
    • Rape kale, brassica napus, is also a different species. Not counted.
    • Sukuma wiki, on the other hand, a staple vegetable in eastern Africa, is variously described as ‘kale’, ‘colewort’, ‘very similar to kale’ and ‘not to be confused with kale’. I chose to count it because it is undoubtedly an non-headed variety of brassica oleracea. Also, Merriam Webster defines colewort as kale. (Wikipedia just redirects colewort to brassica oleracea.)
  • Was consumed
    • I interpreted consumed to mean eaten by humans. See method sections for issues this caused.
  • In Africa
    • Fortunately, Africa is an island, so no border issues. I love the Suez canal.
  • In the past year
    • I decided to estimate for calendar year 2015 instead, since one year is exactly enough time to even out any seasonal variation, and all my data is sufficiently ancient that it makes very little difference.


I used three different methods to calculate kale consumption. This section will outline each method and the issues that cropped up with each.

Method 1: Food and Agriculture Organisation Production Data

  •  1. Get FAO Production data.[2]
    • Unfortunately, FAO reports ‘Cabbages and other brassicas’ together.
    • Also, the last year I could get data for was 2012. After that FAO switched to a new site,, which I couldn’t get anything out of. Even Wikipedia uses 2012 data for its featured article on Cabbage, which made me feel a little better.
  •  2. Add up tonnages from primarily kale-producing countries.
    • Figuring out which these were was very hard. In the end I decided to pull them out of my hat.
    • Vegetables says
      • [Leaf cabbage] types with tall plants grown for repeated leaf pickings are popular everywhere in East and Southern Africa but less common in central Africa and rare in West Africa.

    • I assumed Kenya, Tanzania, Rwanda, Malawi, and the Dem.Rep. of Congo were the countries where brassica meant kale.  I also added 0.3x the South Africa figure since kale is commonly grown there too, although the major crop is cabbage [3]. Other countries in East and South Africa were blanks in the dataset.
    • I ignored the rest of Africa, hoping the errors would partially cancel, Fermi style.
  • 3. Extrapolate 2015 figure from 2010, 2011, and 2012 data.
    • The figures did not show any linear trend, or any trend I could eyeball, so I just went with a close round number.
  • 4. Adjust for:
    • Kale exported from Africa (insignificant compared to other errors)
    • Kale eaten by livestock (insignificant)
    • Kale used as biofuel (this is mostly Ethiopian kale, so never mind)
    • Spoilage losses. According to Lenne & Ward (2010) [4]
      • Post-harvest losses in both countries, [Kenya and Tanzania] can be as high as 50% depending on the vegetable, weather conditions and distance from markets (Global Horticultural Assessment, 2005). More than 90% of national vegetable production is available for domestic consumption as fresh produce.

      • I shall assume that, on average, 75% of kale production is actually consumed.
    • Kale not reported in data. If FAO data doesn’t include subsistence farming kale which never makes it to market, that throws my hopes of using it as an upper bound right out the window. I couldn’t find a satisfactory answer to this question, but  Lowder et. al. (2014) [5] says
      • The FAO’s theoretical definition of an agricultural holding is “an economic unit of agricultural production under single management comprising all livestock kept and all land used wholly or partly for agricultural production purposes, without regard to title, legal form, or size. Single management may be exercised by an individual or household, jointly by two or more individuals or households, by a clan or tribe, or by a juridical person such as a corporation, cooperative or government agency’’ (FAO, 2005). FAO encourages countries to use an operational definition based on this theoretical definition when carrying out their agricultural census.

      • I hope this means they do include kale people eat from their own fields.
    • Let’s take a final correction factor from production to consumption of 75%.
  • 5. Check for mistakes. Is my answer in the right units? Does my answer make sense?


Method 2: Cultivated Area x Yield

  • 1. Find Area under Kale cultivation.
    • The only non-FAO pan-Africa source I could find was Vegetables [1] which says
      • The total area planted [ in Africa] may amount to over 100,000 hectares but no precise data are known. A conservative estimation for the area planted with leaf cabbage [in Zimbabwe] is 2500 ha for commercial crops and 2500 ha for subsistence crops, as most rural households grow leaf cabbage for family use.

    • FAO brassica data for Zimbabwe is 35 hectares, which differs by two whole orders of magnitude. Not a good sign.
  • 2. Find Yield. I can’t use FAO yields, because those are calculated, not independently measured.
    • Vegetables [1] says
      • Average yield is 20t/ha for a once-over harvest and estimated yield is 50t/ha from 10 pickings in 6 months

    • South Africa has the highest cabbage yield in the world at 64 tonnes/hectare/year[6]
    • Let’s take 30 tonnes / hectare/year as our estimate. We take 20t/ha and 100t/ha as upper and lower bounds.
  • 3. Multiply yield per hectare per year by area under kale cultivation.
    • Kale is not native to Africa, so I shall assume there isn’t much uncultivated wild kale for people to eat.
  • 4. Adjust from production to consumption, the same way as method 1. Multiply by 75 percent.
  • 5. Check for mistakes.


Method 3 Calorie Counting

  • 1. Find data on vegetable consumption per capita in Africa. Actually the other way around, I found this data first, then thought of this method.
    • According to Grubben[7] and Shackleton[8], average vegetable consumption in sub-Saharan Africa is 100-150 gm per day. This is significantly lower than WHO recommendations of 400 grams of fruit and veggies a day, which seems about right.
    • Food Production and Consumption Trends in Sub-Saharan Africa [9] gives vegetable consumption in kilocalories per person per day as roughly 35 (when extrapolated to 2015).
    • Kale provides 50  kcal per 100 gram serving, so 500 kcal/kg.
  • 2. Assume a population which gets all its vegetable calories from kale.
    • Mariga et al. [10] say that
      • Foeken and Owuor (2008) reported that nearly every household of the low-income dwellers of Nakuru, Kenya, survived on B. oleracea var. Acephala.

    • I shall take the sum of the current populations of Kenya and Tanzania. Naturally, not every person in these countries eats no other vegetables, but hopefully they will cancel out the many kale eaters outside Kenya and Tanzania.
  • 3. Multiply everything together to get a final answer in megatonnes of kale per year
  • 4. Check for mistakes.



Method 1: Food and Agriculture Organisation Production Data

Country Crop Production in tonnes Production in tonnes Production in tonnes
Democratic Republic of the Congo Cabbages and other brassicas 26000 F 26867 Im 27500 F
Kenya Cabbages and other brassicas 784876 599625 684000
Malawi Cabbages and other brassicas 87357 Im 77012 Im 78500 F
Rwanda Cabbages and other brassicas 133120 Im 117355 Im 120000 F
Zimbabwe Cabbages and other brassicas 460 Im 406 Im 450 F
South Africa adjusted 39936 35206.5 36000
United Republic of Tanzania Cabbages and other brassicas 45000 F 39671 Im 42000 F
Total 2010 1116749 2011 896142.5 2012 988450

F means FAO estimate. Im = FAO data based on imputation methodology

Since there doesn’t appear to be much of a trend, I may as well round it off to 1 megatonne.

Adding together all the twenty-five countries in the FAO dataset, not just these seven, gives us an upper bound of 3 megatonnes.

Adjusting for 25% losses gives .75 MT and 2.25 MT.


Method 2: Cultivated Area x Yield

Area(hectares) Yield (t/ha) Product in tonnes Adjusted
100000 30 3000000 0.75 2.25 MT Estimate
20 2000000 0.75 1.5 MT Lower bound
100 10000000 0.75 7.5 MT Upper bound


Method 3: Calorie Counting

1 kg kale/500 kcals
* 35 kcal/person/day
* 365 days/year
* 93,063,000 people (Kenya+Tanzania)
* 1 megatonne/ 1000,000,000 kgs
equals 2.37 MT of kale consumed a year



Whew! That was fun, but quite tiring. Now to discuss my confidence in each method. In short:

Method 1: Unreliable
Method 2: Highly unreliable
Method 3: Okay, I admit it. I just did this one for the fun of a xkcd What-If? style dimensional analysis.

Method 1

Why I’m confident: This is FAO data, the most official source there is.
Why I’m unconfident: Counting all brassicas together is a major source of error. My kale estimate could be off by about 50%. If the FAO doesn’t count subsistence farming properly, the true production could easily be twice or thrice my estimate. I was rather disturbed by the fact that Nigeria and Uganda were nowhere to be seen in the FAO dataset. Also the figure for Zimbabwe is suspiciously low, barely 450 tonnes.

Method 2

Why I’m confident: The book is talking about kale specifically.
Why I’m unconfident: It’s so different from the FAO data!

Method 3

Why I’m confident: Here I directly find consumption, not production, which removes many sources of error.
Why I’m unconfident: This is a Fermi estimate, with all the hand-waviness that implies. I assumed pretty much everything for the population. I could easily have taken just Kenya, or all the kale producing countries, or anything. I really should have taken Uganda, but I didn’t because of its absence from the FAO data.

My three estimates were .0.75 MT, 2.25 MT and 2.4 MT. I estimate their relative validity as 55%, 40% and 5%. Averaging using the above weights gives us:

Estimate Weightage MT
Method 1 0.75 0.55 0.4125
Method 2 2.25 0.4 0.9
Method 3 2.37 0.05 0.1185
Total 1 1.431

Phew! After all that, we get 1.4 MT.

I don’t think we can use two significant figures, so I’ll call that a final answer of 1-2 megatonnes of kale consumed in Africa in the past year.

I estimate a 50% chance that the true value lies within that range.

For an upper bound, we can use the optimistic 7.5 megatonnes we got using the second method.

I estimate a 95% chance that the amount of kale consumed was less than 8 megatonnes.



[1] Mvere and van der Werff, 2004. Brassica Oleracea L. In: Grubben & Denton (Editors) Plant Resources of Tropical Africa 2: Vegetables. PROTA Foundation.

[2] FAO Crop Production Dataset at Search Parameters: Africa-Cabbage and other brassicas-2010, 2011, 2012-Production, Area under Cultivation.

[3] Mandiriza-Mukwirimba Quenton Kritzinger and Theresa Aveling. A survey of brassica vegetable smallholder farmers in the Gauteng and Limpopo provinces of South Africa  Journal of Agriculture and Rural Development in the Tropics and Subtropics Vol. 117 No. 1 (2016) 35–44.

[4] Improving the efficiency of domestic vegetable marketing systems in East Africa: Constraints and opportunities. J.M. Lenné and A.F. Ward Outlook on AGRICULTURE Vol 39, No 1, 2010, pp 31–40.

[5] Lowder, S.K., Skoet, J. and Singh, S. 2014. What do we really know about the number and distribution of farms and family farms worldwide? Background paper for The State of Food and Agriculture 2014. ESA Working Paper No. 14-02. Rome, FAO.

[6] Vegetables I: Asteraceae, Brassicaceae, Chenopodicaceae, and Cucurbitaceae edited by Jaime Prohens-Tomás, Fernando Nuez.

[7] Grubben, G., W. Klaver, and Non-Womdim R. Vegetables to combat the hidden hunger in Africa  (2014) In Chronica Horticulturae Volume 54 Issue 1 Pagination 24 – 32.

[8] African Indigenous Vegetables in Urban Agriculture edited by Charlie M. Shackleton, Margaret W. Pasquini, Axel W. Drescher.

[9] Food Production and Consumption Trends in Sub-Saharan Africa: Prospects for the Transformation of the Agricultural Sector Nicolas Depetris Chauvin, Francis Mulangu and Guido Porto.

[10] Mariga, I. K., Mativha, L. & Maposa, D. (2012). Nutritional assessment of a traditional local vegetable (Brassica oleracea var. acephala). Journal of Medicinal Plants Research, 6, 784–789. (I couldn’t access Foeken and Owuor’s original paper because it was behind a paywall)

Poisoned Cookies

Here’s an interesting puzzle which was part of the application for SPARC 2016. (Applications are now closed)

Suppose you have 240 cookie jars, one of which has been poisoned, so all the cookies in it are poisonous.

You also have 5 grey pigeons, each of which is immune to the poison, but has an interesting property: if it eats even a tiny crumb from a poison cookie, it will turn white at exactly 9am the following day, and stay white forever. The pigeons also have hearty appetites, and will immediately eat anything you put in front of them (which could include mixtures from multiple jars).

It is currently 8am, and you’re hosting a huge party at 10am the day after tomorrow (50 hours from now). You’d like to serve out as many cookie jars as possible while knowing, with certainty, that they are non-poisonous.

How many cookie jars is that, and how do you know? To get full credit, you should state the maximum, explain a strategy that achieves the maximum, and then explain why the strategy is optimal. (Partial solutions that establish a large number of safe cookie jars but not the maximum will also be considered. Solutions that make erroneous arguments will be penalized, so it is better to submit a correct partial solution than an incorrect full solution.)

Think about it before you read on. This post will contain:

My Kinda Elementary but Long-winded Solution
Samyak’s Streamlined Solution
Multinomial Digression

Continue reading