Madison Invited Visit

Back in April, I was invited to give two talks at UW-Madison. Here was my itinerary and here is the abstract of my technical talk: Robust and Efficient Routing in Wireless Mesh Networks. It was great visit! I got to see a lot of the campus and some of the town, including the capital building.

Leave a Comment

Quoted about the Library Renovations

I got quoted a few times in an article about the Vanderbilt Library renovations. Here’s the link:

Leave a Comment

Color Uniformization

Rarely does a photo reflect the amazing diversity of colors present in the RGB color space. For instance this one has an abundance of green and blue:
Where is the yellow? the red? the pink? Here it is:
In the second picture, I’ve altered the color of each pixel so that the colors are uniformly distributed in the RGB space. I wrote the program in the Perl programming language because I was curious how the adjusted pictures would look.

Every color that can be displayed by your screen is in the image, and that the amount of the colors are all proportional. This applies on all scales. For example with general terms like “red” and “blue”, there is the same amount of red as blue, if red and blue get the same volume in the color cube. On a smaller scale, consider fushcia and radioactive green: These two colors appear in equal quantities, (provide those two colors actually are equally represented in the cube).

Every pixel in the entire image is different from every other. Each pixel color in the image is equally spaced from the nearest pixels to it (by color, not by position).

Of course, there is more than one way to do this. We could have simply replaced the whole image with any preselected one which was color-uniform. We could have even used a simple rainbow picture without any structure.

To make it interesting, the program attempts to make as little change as possible to each pixel. The pixels don’t move, they just adjust their shading. Or sometimes they change a lot, if there is a big shortage of a color.

Sometimes a photo has a good mix of colors to begin with. Then the program’s job is easy. A few small modifications are enough to give each missing color a spot in the frame. More often, there are some pretty big gaps. Most of the pictures I’ve looked at are missing magenta, hot pink and lime green. That means the program has to change some existing pixels to those colors. It will change the ones that are already close to the target color to keep the geometry of the picture as intact as possible.

Once in a while you get a picture that is missing almost everything


Everything the program needs can be found in the picture, although it may be well hidden. Some patches of this muddy water are slightly darker than others. Some have more blue or more green. These slight tendencies can be exaggerated until the color cube is filled in.


Here are a few more examples. This is all generated by a simple-minded program which doesn’t know anything about the picture content. I didn’t do any pre- or post-processing.

Another way to think of it is as follows: Every one of the pictures with a resolution of 1632 x 1224 (which is most of them) uses exactly the same pixels, rearranged in different ways.




Comments (2)

Crock Pot Cooking

Since we got our new crock pot this year, we’ve made 11 dishes with it.  We always make a lot of food, so it lasts for several days.  It’s very easy to use: we simply chop and mix our ingredients and let them cook all day.  It’s great to come back from work at the end of the day to a home-cooked meal that you didn’t labor over.

We often start with an online recipe, then ignore the suggested quantities and put in enough ingredients to fill the (7-quart?) crock pot.  Here are some of our concoctions:

Chicken with Collard Greens

Sausage with Vegetables


Chicken with Potatoes and Carrots


French Onion Soup


Salmon Chowder


Lentils with Mushrooms and Vegetables


Chicken with Celery


Santa Fe Chicken


Chicken with Sweet Potatoes


Shrimp with Mung Beans


Chicken with Peppers


Comments (1)

Grand Canyon

Natalie and I have returned from our wonderful trip to the Grand Canyon and we can’t wait to go back! Click here if you want more pictures.

We flew to Phoenix and drove our rental car to the Grand Canyon area.  Anyone can camp in the Kaibab National Forest for free, so we parked the car right off the highway and hiked in on Forest Service road 306 for 1/4 mile (the minimum allowed).  The road was covered with snow and mud and we saw a stuck pickup truck off in the distance from where we pitched our tent.  The first night, we gathered up snow in our cooking pot and made mashed potatoes with bits of beef jerky. 


Later that night, the apparent owners of the pickup came back in another truck and it got stuck too.  The following day as we hiked back to the highway we saw the second truck had the logo of the Grand Canyon airport, which was just up the road.  3 inches of snow had fallen that night, so we cleared off our car and drove the last few miles to the Grand Canyon.

It turned rainy and misty as we descended into the canyon. Here we are in the Supai layer.

We passed a half-dozen people that day, more than we saw on the next 4 days put together. Here’s a view from the Boucher trail towards White’s Butte.
White's Butte
Notice the distinctive pale meadow on White’s Butte. We camped there rather than continue in the dark. The following morning, I climbed it at sunrise.


We headed down to Boucher creek and found a delightful little beach with stones of all colors. Here we are drying our sleeping bags:

After I walked down Boucher creek to the river, we headed over to slate canyon. The clouds gathered and shed some light sprinkles, foreshadowing the following day.

All Tuesday morning, it was cloudly, turning into a downpour with fierce winds in the afternoon. The tent stakes pulled out of the mud a few times and a lot of our gear got wet. Allowing time for things to dry off, we didn’t get on the road until 4 or so in the afternoon. I took a sidehike down slate canyon but gave up at a waterfall I couldn’t bypass. I suppose it would have been possible to cut around it, but it was already starting to drizzle by then.

Here is picture from Tuesday morning our tent, a tiny blue dot in the lower left. The red mountain in the background is Mencius temple and the yellow mesa in front of it is Scylla Butte.
As we headed out of slate canyon, we thought we might like to camp on the saddle of Scylla Butte, but it was too windy, so we proceeded to agate canyon. That night, we slept out on the Tonto platform with a nice river view.

Here we are Wednesday morning:

It turned cloudy and sprinkled a little as we finished our route to agate canyon (no running water, but pools), continued to sapphire canyon (running water) and returned to slate (lots of water). The naming pattern continues turquoise, jasper, jade, ruby, emerald, and quartz. See why this section of the park is called “The Gems”?.  We camped almost right in front of Scylla Butte this time.

Thursday was completely clear. We found out later that the rim had a blizzard during the first half of the week, which helps explain why we hadn’t seen any other people since Monday morning when we passed a tamarisk eradication coordinator going the other way. As we made our way back to Boucher, we finally saw some other human life: a team of tamarisk eradicators led by the man we met on Monday. That night we camped near the beach. Here’s a long view of our campsite:
The tent is in there, but it only gets about 4 pixels.

Friday, we decided we hadn’t seen a enough of slate, so we left our tent and walked the 9 mile roundtrip in the desert heat.
We napped until later in the afternoon and headed over to Hermit Creek camp, making this a 16 mile day. We got into Hermit creek right at dusk and for the first time, had a share a camp with two other parties. It felt like standing room only.

Saturday, we hiked out. As on the way in, the trail seemed to be clogged with people, mostly dayhikers.

More pictures can be found here.

Special thanks to Mom and Dad and Matt and Nat for providing us with so much gear! And Natalie’s parents for our long underwear.

Comments (9)


For the first 4 nights of the trip, we stayed in Volos, a major port city where I attended a workshop on Information Theory. The following day, we took a bus to Kalambaka.

Natalie and I spent two days in Kalambaka hiking on Meteora, which might be the most amazing natural landform I’ve ever seen. Kalambaka is small town nestled up against some gigantic rock protrusions. Several of the rocks are topped with ancient (but still active) monasteries.

It’s a striking view and in fact one of the monasteries was used in the James Bond film, “For Your Eyes Only.” Here is a picture Natalie took of that monastery with me in it


I can’t overstate how awesome Meteora was. I love mountains, views and nature. And I got it, for example, here is a mountainside meadow
and the city of Kalambaka seen from an outcropping

This was one of the best hikes of my life. Other pictures can be found here.

Leave a Comment

Building a Picnic Table

Someone writes

Jonathan and/or [redacted],

I’ve got a basic geometry question for either of you, that I need a little help with…

I am working on making a picnic table with [redacted] and we wanted to design our own legs for the table which are angled and cross. I have been able to work out all relationships between heights, lengths, widths, angles. etc. and now have two equations with two unknowns that will allow me to solve for the correct angle at which to cut the wood for the legs. Unfortunately I have forgotten how to solve basic cos, sin, and tan when variables are involved. The two equations are (all units are in inches, not that it matters):

$\displaystyle \textrm{sin} (\alpha)$ $\textstyle =$ $\displaystyle \frac{5.5}{x}$ (1)
$\displaystyle \textrm{tan} (\alpha)$ $\textstyle =$ $\displaystyle \frac{29}{35.5-x}$ (2)

How do I solve for $x$ and $\alpha$? Also, what is the answer 🙂



\begin{eqnarray*}\textrm{tan} (\alpha) & = & \frac{\textrm{sin} (\alpha)}{\text......rac{\textrm{sin} (\alpha)}{\sqrt{1 - \textrm{sin}^{2} (\alpha)}}\end{eqnarray*}

we have

$\displaystyle \frac{29}{35.5-x}$ $\textstyle =$ $\displaystyle \frac{\frac{5.5}{x}}{\sqrt{1 - \left(\frac{5.5}{x}\right)^{2}}}$ (3)

Simplifying and solving by computer algebra, we get

\begin{eqnarray*}\frac{3243}{841} x^2 + \frac{8591}{841} x - \frac{1017005}{3364} & = & 0\end{eqnarray*}


\begin{eqnarray*}x & = & \frac{ \pm 1276\sqrt{2071} - 8591}{6486}\end{eqnarray*}

Only the positive choice is a root of Eqns. (1) and (2), giving

\begin{eqnarray*}x & = &7.62835577107986... \\\alpha & = & 0.805235953662952... \\& = & 46.1366216570791... \textrm{(degrees)}\end{eqnarray*}

Comments (2)

AFCEA Fellowship Award Ceremony

From the fellowship awarding ceremony this morning. From the left: me, AFCEA Director of Scholarships and Awards Norma Corrales, my advisor Yuan Xue, EECS department chair Dan Fleetwood and Dean of Engineering Kenneth Galloway. Dean of Research George Cook was present, but not pictured.


Update: the Vanderbilt School of Engineering has published an article.

Comments (3)

Submarine Parking Only

We got a lot of rain this week. On the way home from the office, I saw some firehoses leading out of a parking garage. On one end they were spewing water into a sewer drain. I went to see what was on the other end. This is what I found.
I’m not an auto or insurance expert, but I’d say some of these might need a lot of work.

Update: I returned two days later and found out the water had been a half-foot or so higher than shown in the pictures.  I deduced this from the high water marks on the green van, which was still parked there (ominously).

Leave a Comment

The Biggest Box Fedex Will Take

My friend Megan Goering asks what is the largest volume box you can send through Fedex given that length + twice the width + twice the height must be less than 165 inches. It might seem odd to care about only the volume instead of the dimensions, but it makes sense if you’re shipping walnuts, balloons or bows for Christmas presents. Anything pourable, that is.

Here’s my solution. Say that the dimensions are $x$, $y$ and $z$. Then we can write the problem as

\begin{eqnarray*}\textrm{max } & & xyz \\\textrm{subject to} & &x + 2y + 2z \le 165 \\& & x,y,z \ge 0 \\\end{eqnarray*}

First, observe that if $x + 2y + 2z < 165$, then the product $xyz$ can be increased by increasing any one of the dimensions. Therefore, the maximum will occur when $x + 2y + 2z = 165$. Thus, we can eliminate $z$ because

$\displaystyle z$ $\textstyle =$ $\displaystyle \frac{165 - 2y -x}{2}$ (1)

Here is the problem

\begin{eqnarray*}\textrm{max } & & xy\left(\frac{165 - 2y -x}{2} \right)\\\textrm{subject to} & &x + 2y \le 165 \\& & x,y \ge 0 \\\end{eqnarray*}

The constraints impose that the maximum be achieved in a triangular area with one vertex at the origin and the other two each on one of the $x$ and $y$ axes. Notice that if we use a point $(x,y)$ on the border of this triangular region, the product $xyz$ will be equal to 0, so this is clearly not the maximum. Therefore, the maximum occurs on the inside of the triangle. This is important, because it means that the maximum is some sort of “bump” which means the problem can be solved directly with calculus.

We want to maximize $xy\left(\frac{165 - 2y -x}{2} \right)$. The choice of $x$ and $y$ that achieves the maximum is unaffected by multiplying that product by a positive constant, so use this opportunity to get rid of the $\frac{1}{2}$. Let $f = xy(165 - 2y -x)$. Then

\begin{eqnarray*}f & = & 165xy - 2xy^{2} -x^{2}y \\\frac{\partial f}{\partial...... -2xy \\\frac{\partial f}{\partial y} & = & 165x - 4xy -x^{2}\end{eqnarray*}

Thus, in order for the maximum to be achieved, we need both derivatives to be equal to 0. Thus, we need

\begin{eqnarray*}165y - 2y^{2} -2xy & = & 0 \\165x - 4xy -x^{2} & = & 0\end{eqnarray*}

Which is, conveniently enough, two equations in two variables, so we can probably solve this. First simplify as

\begin{eqnarray*}165 - 2y -2x & = & 0 \\165 - 4y -x & = & 0\end{eqnarray*}

Then as

\begin{eqnarray*}2y + 2x & = & 165 \\4y + x & = & 165\end{eqnarray*}

And finally

\begin{eqnarray*}x & = & 55 \\y & = & \frac{55}{2}\end{eqnarray*}

and we get

\begin{eqnarray*}z & = & \frac{55}{2}\end{eqnarray*}

from Equation (1).

Thus the maximum volume you can send using this Fedex rule is $55 \times \frac{55}{2} \times \frac{55}{2} = \frac{166375}{4}$ cubic inches, or about 24 cubic feet. This many walnuts weighs over 300 kg, so presumably the problem was motivated by something lighter.

Comments (1)

Older Posts »