# Monthly Archives: December 2012

cooking

## Cold Brew Coffee

The Hungarian mathematician Alfréd Rényi once said, “A mathematician is a device for turning coffee into theorems.” Usually tea is my hot caffeinated beverage of choice, but lately I’ve been craving coffee. Perhaps this is due to the frigid temperatures in my apartment.

Yesterday I decided to start an experiment with cold brew coffee. I’ve been seeing a lot of cold brew for sale lately, and apparently a lot of coffee connoisseurs are excited about it. In the cold brew process, coffee grounds are steeped for an extended period of time at room-temperature. At lower temperatures, many of the less-soluable chemicals in regular coffee don’t dissolve, so the cold brew has a different flavor profile.

For my first attempt at cold brew, I used a 1:10 ratio of coarsely ground coffee to water: 100g of coarsely ground coffee in 1 liter of water. I let the mixture sit in my chilly (55 degree) apartment for almost 24 hours before filtering it through a coffee filter and bottling it. The result was about 750ml of concentrated coffee – just enough to fill an empty liquor bottle.

To serve the coffee, I mixed about equal parts cold brew (gently heated), boiling water and scalded milk. The result was what I thought to be a fairly faithful representation of café au lait, but the flavor is definitely smoother, less acidic and a bit nuttier. Overall, I’d consider the experiment a success and I look forward to trying other drinks with my cold brew. I may consider making it more concentrated next time so that I can use more boiling water. That way I won’t need to heat the cold brew at all to get a suitably hot beverage.

## RIP Richard Crandall

I just learned that a professor of mine from Reed, Richard Crandall, passed away today. I didn’t know Professor Crandall well, but his course on scientific computation was formative for me. Like Crandall’s own research, the course material was wide-ranging, covering such topics as approximation of mathematical constants, computational number theory, disease models, and computer graphics. The course was at once inspiring and empowering. Crandall made it clear that interesting problems can be solved by anyone with determination and a modest amount of technical knowhow. With Professor Crandall’s passing, a piece of Olde Reed died today. He will be sorely missed! You can read a bit more about Richard Crandall here (photo taken from Reed magazine).

## Humans are Streaming Algorithms

I liked this quotation from Muthukrishnan’s book on data streams:

As human beings, we perceive each instant of our life through an array of sensory observations (visual, aural, nervous, etc). However, over the course of our life, we manage to abstract and store only part of the observations, and function adequately even if we can not recall every detail of each instant of our lives. We are biological data stream processing machines.

Way to tie the study of theoretical computer science to understanding the human condition!

## Richard Feynman: The Messenger Series

While I’m posting educational videos this morning, I might as well post one of my favorite lectures series of all time: Richard Feynman’s Messenger Series, given at Cornell University in 1964. I consider Feynman to be one of the greatest expositors of science of all time. He had an uncanny ability to distill concepts of physics to their essence and highlight the conceptual simplicity of highly technical ideas. Additionally, he is a very charismatic speaker and his lectures are a pleasure to watch.

## Ramanujan: Letters from an Indian Clerk

There are few more compelling, mysterious, and ultimately tragic stories in mathematics than that of Srinivasa Ramanujan. He was mathematical prodigy from Madras, India. With very little formal training, he came up with results that continue to baffle the mathematical community. 25 years ago (in honor for the 100th anniversary of his birth) the BBC produced a documentary about his life and mathematical legacy. Now that video is on youtube:

computing

I previously posted about a trick that I used to get frequently updated files to be mirrored on my website. However, I’ve come to realize that my method was needlessly circuitous. It turns out that Apache (the HTTP server that I and most of the internet use) support symbolic links!

All of my essays, reviews, etc. are on my server, but I don’t want my source files to be public. However, I want to share the PDFs of finished works to be available on my website. Symbolic links allow me to specify a particular file in a private directory, and make only that file available for all to see on my site. The syntax to generate a symbolic link is

ln -s /path/to/private/directory/file.pdf /path/to/public/directory/file.pdf

Once the link is made, we need to to set up Apache to follow the link. To do this, find the configuration file called httpd.conf and add the following lines to the file:

<Directory />
AllowOverride None
</Directory>

After updating the configuration file, restart Apache. For me, the command is

sudo /ect/init.d/apache2 restart

At this point, the symbolic link will likely still not work. The problem that I ran into was that the parent directories of the private directory containing the file I wanted to make public didn’t have their permissions set properly. The permissions must allow “others” to execute the directories. The permissions can be modified using

sudo chmod o+x /path/to/directory

With that done, file.pdf is available on my website. Best of all, any changes that I make to my private copy are automatically reflected on the website. And I don’t need to rely on 3rd party software.

## Azuma’s Inequality and Concentration

Azuma’s inequality is a useful result concerning martingales. A (discrete-time) martingale is a stochastic process $$X_0, X_1, \ldots$$ which satisfies

$$\mathbf{E}(|X_i|) < \infty$$

for all $$i$$, and

$$\mathbf{E}(X_{n+1} | X_1, \ldots, X_n) = X_n.$$

Roughly speaking, martingales corresponding to fair betting games: if $$X_n$$ is my fortune after $$n$$ rounds of a game, my expected fortune after playing the $$(n+1)$$-st round is equal to my fortune before playing that round.

Azuma’s inequality applies to martingales in which the differences $$|X_{n+1} – X_n|$$ are bounded. Specifically, suppose

$$|X_{i+1} – X_i| \leq c_i$$

for some constants $$c_i$$ for $$i = 1, 2, \ldots, m$$. Define $$C = \sum_{i = 1}^m c_i$$. Then Azuma’s inequality states that

$$\mathbf{P}(X_m – X_0 > \lambda) < e^{- \lambda^2 / C}.$$

That is, the martingale $$X_1, X_2, \ldots, X_m$$ is tightly concentrated around its expectation.

I just posted an essay which gives some applications of Azuma’s inequality to combinatorics and theoretical computer science, which is available here. Azuma’s inequality is an example of the concentration of measure phenomenon, which has rich applications in combinatorics, probability theory and Banach space theory. This book gives a very thorough survey of the phenomenon, although it approaches the subject from a very geometric/measure theoretic standpoint. A more condensed (and perhaps user-friendly) overview is available on Terence Tao’s blog.

## Math 32AH Final Review Problems

I am almost finished writing up solutions to the practice problems for Math 32AH (available here). I will update the file as I finish the write-up.

teaching

## Math 32A Final Review

I just uploaded a review for the final exam for Math 32A (multivariable differential calculus) which is available here. If you find typos or think that some portion needs clarification, please let me know in the comments below. The review sheet contains an overview of the topics covered in the course, as well as many examples worked out in full detail.

cooking

## CSA Box

For the last year or so, Alivia and I have been somewhat regularly getting community supported agriculture (CSA) boxes from the South Central Farmers’ Cooperative. Here is this week’s bounty:

I really enjoy getting the CSA boxes for a variety of reasons. First, the quality of the produce tends to be fantastic. Everything is organically grown, and most of it is grown in LA (the coop’s original farm is at 41st and Alameda in South Central). I like the idea of supporting urban farming. Also, at \$20 for a box, it tends to be a great deal.

Getting the CSA box does present some challenges though. The boxes tend to contain a lot of fresh vegetables for two people to eat in just one week. So when we get a box, we have to do a little bit of strategizing to avoid spoilage. Also, we don’t get to choose what vegetables come in the boxes–they contain whatever produce is ready for harvest. Especially when we first started getting the boxes, I was unfamiliar with some of the vegetables and had to do so research to figure out how to cook them. For the most part, I’ve really enjoyed experimenting with the novel produce. The CSA introduced me to kohlrabi which has become one of my favorite vegetables.

This week’s box contained:

• 2 heads of Romain lettuce