Parabolas I

My kids and I are working on a series of videos about parabolas. Here’s the first installment.

Video | Posted on by | Tagged , , , | Leave a comment

Silver Maple Leaf Ecology

Silver Maple Leaf Ecology

More wintry weather for us tonight and tomorrow. While we wait for new spring leaves, here are some more leaves from my yard last fall.

1. Tar spot looks like tar on the leaf, but is caused by a fungus, Rhytisma acerinum. This is an endophytic fungus: it lives inside of the cells of the leaves that it feeds on, without really causing much damage. See this paper

2. Don’t maples have a nice star shape? Japanese maples are particularly nice, but of our native American maples, I really like the shape of these silver maple. Check out this highly mathy article on leaf shapes.

3. I’m not sure what has caused these spots on the stems. (Remember from an earlier post that these stems are called petioles.) At the spot on the right there appears to be an incision in the leaf, perhaps made by an insect for deposition of it’s eggs?

Image | Posted on by | Tagged , , , | Leave a comment

Abby’s Puzzles


My ten-year-old daughter asked me for help doing a mathematical STEM-fair project. We had a lot of funny doing the project together. Here is a brief description of what we did.

We decided on the following question: “How many decominoes can be filled in (tiled) with a pair of pentominoes in more than one way?”

There are 12 pentominoes. I had Abby figure out the number of pairs of pentominoes. She reasoned that since you have 12 choices for the first pentomino in a pair, and 11 choices for the second (but switching first and second you’ve counted each pair twice) there are 12×11/2 = 66 pairs. There are 4,655 decominoes. So we had 66 x 4,655 = 307,230 trials (trying each pair against each decomino). Abby wasn’t going to be able to do this by hand. Instead I taught her the Python she would need to program our computer to do it.

We couldn’t find an explicit list of all 4,655 decominoes anywhere, so the first order of business was to write a program to generate those. Actually, before that we had two prerequisites to understand. First I had to introduce her to the very basics of programming: what is a variable and how do they work? What are loops? How do they work? How about lists? Functions? There was some frustration on both our parts, but we got it hammered out. Second we had to decide how we would represent polyominoes in the computer and how we could manipulate them. I had already done some Python projects with polyominoes, and was representing polyominoes as lists of cartesian coordinates of each square. Abby understood the representation immediately, saying “oh! It’s like a coordinate grid!” I had Abby figure out (and write functions for) how to flip and rotate polyominoes.

Abby largely wrote the code to generate the decominoes herself*. Here is a snippet:

def poly_change(n_ominoes):

    n_plus1_ominoes = []
    for p in n_ominoes:
        for square in find_adjacent(p):
            new_t = p + [square]
            new_t = slide_to_zero(new_t)
            if is_not_in(new_t, n_plus1_ominoes):

    for p in n_plus1_ominoes:
        print p
    print len(n_plus1_ominoes)
    return n_plus1_ominoes

Here’s how she bootstrapped from tetrominoes to decominoes. I suggested using a for-loop, but she preferred this way:

S1 = [(0, 0), (0, 1), (0, 2)]
B1 = [(0,0), (0,1), (1,0)]
trominoes   = [B1,S1]
tetrominoes = poly_change(trominoes)
pentominoes = poly_change(tetrominoes)
hexominoes  = poly_change(pentominoes)
septominoes = poly_change(hexominoes)
octominoes  = poly_change(septominoes)
nonominoes  = poly_change(octominoes)
decominoes  = poly_change(nonominoes)

At each step from n-ominoes to (n+1)-ominoes she ran the code and checked that the number of polyominoes found by her program was the same as what we could find reported online.

We stole code for finding all tilings of a given shape (our decominoes) with a given set of tiles (our pairs of pentominoes). I had also written some wrapper code for it previously. Here’s (a bit of a simplification of) the main loop Abby wrote to do each of her trials:

for d in decominoes:
    for pop in combinations(Pentominoes, 2):
        tile_pair(d, pop)

Of the 307,230 trials only 3,486 (about 1%) had any tilings at all. Of those 3,486 trials that could be tiled, only 41 (again, about 1%) could be tiled in more than one way. Each of those 41 could be tiled in exactly two ways (none could be tiled in three or more ways). Of the 41, 39 had a reflection symmetry (and this symmetry was what caused there to be two tilings). Here’s an example of one of those 39:


The other two trials that could be tiled in two ways, but have no symmetry are the ones that I think are most interesting. These two are shown at the top of the post. Here they are again:


I call them Abby’s puzzles, thinking of them as a board to fill in with a pair of pieces. We had tons of fun! I hope that Abby continues learning math and programming.

*I had written find_adjacent() and fancy_print_board() for a previous project. is_not_in() took some thinking, but again, it was largely Abby who did it.

Posted in computers | Tagged , , , , , , , , , , , , | 11 Comments


I decided to make some stellations.

Video | Posted on by | Tagged , , , , , | 2 Comments

Sweetgum Leaf Ecology

Sweetgum Leaf Ecology

These are sweetgum (Liquidambar styraciflua) leaves. They are quite common here in the Eastern US and give us some very nice Fall color.

1. These tufts of hairs are called domatia, which means little houses. As far as biologists can tell their only purpose is to provide shelter for mites. Think about that: the tree grows little homes for other living creatures! The thought is that the mites sheltered by the domatia are beneficial to the sweetgum tree in that they eat herbivores or fungi that would attack its leaves. The whole story may be much more complex. (See this study of avocado domatia for example.) Do the domatia perhaps harbor harmful mites as well as beneficial ones? In any case, domatia on leaves fascinate me.

2. Chloroplasts appear to still be alive and well in at least this portion of the leaf. Chloroplasts are awesome. (The main reason I’m pointing this out is that my kids insisted that I draw an arrow to the green portion of the leaf.)

3. You may know that yellows, browns, and oranges are present in the leaf during the summer, but are masked by the green chlorophyl. This is not the case for purples and reds, which are pigments produced in the leaf (see fall color on Wikipedia where there is also a nice discussion of possible benefits to the tree of fall coloration.)

4. The patterns of veins in the leaves is called venation. Note that, as highlighted in the blow-up, the leaf veins do not spread as what mathematicians and computer scientists call a “tree” but form many small loops.

Here are some more sweetgum leaves from my wood lot:


Image | Posted on by | Tagged , , , , , , , , , , , , , , , , | 1 Comment

Loop Puzzle 8

Loop Puzzle 8

Here’s a fun one. Well…at least I think it’s fun. Maybe it will just give you a headache 😛

Image | Posted on by | Tagged , , , , , , | Leave a comment

Chestnut Oak Leaf Ecology

Chestnut Oak Leaf Ecology

I believe, but I’m not totally sure that I have Chestnut Oak (Quercus prinus) and Swamp Chestnut Oak (Quercus michauxii) growing in my backyard. The two leaves on the left I think are Swamp Chestnut Oak. The leaf on the right (which is showing it’s underside, whereas the others are showing their uppers) I think is Chestnut Oak. I’m not the only one to confuse the two: confusion of the two species mentioned on Wikipedia.

1. These closely related species have wavy leaf margins. Why? I have no idea.

2. Two of these leaves have what appear to be galls. What are galls? They are abnormal growths on plants. They come in a huge variety of shapes and sizes (see this gallery of galls). Many (including these ones it appears) are caused by insects depositing eggs in the plant. Somehow the local plant tissue is reprogrammed to grow the gall. The gall provides the young insect with food and shelter. Does the plant get anything in return? I’m not sure.

3. It appears that the gall on the lower leaf has a leaf mine emerging from it. In other words, it looks like the young insect (or maybe it was a mite) emerged from the gall and tunneled through the leaf, eating as it went. In the enlargement I’ve highlighted the path of the mine from the gall to the place where the insect mined in a little loop.

Check out this Q&A about galls and leaf mines.

4. My kids insisted that I show this gall detail, and for good reason! It is very intricately marked with light and dark squiggles. What could cause this? Does the marking serve a purpose? What mathematical models describe the marking?

5. Some leaf feeders skeletonize the leaf. They leave behind only the veins. These patches of skeletonization probably happened on the living leaf. Once leaves die and start to decay on the forest floor, they often undergo more skeletonization.

6. Some leaf-feeders eat holes in the leaf. Birds often find insects to feed on by looking for leaf damage, or maybe even by looking for the shadows of damaged leaves (thence finding the damaged leaves themselves and finally the invertebrate doing the damage).

Image | Posted on by | Tagged , , , , , , , , , , , , , , | Leave a comment