Wednesday, April 15, 2009

Books I am reading right now

Fiction:

0a. Anathem, by Neal Stephenson. I finished this one, but I am including it because I liked it so much. Not that Neal needs much advertising.

0b. The Algebraist, by Iain Banks. Fantastic cover, at least the US paperback. I finished this while in South Africa too, but it was one of my favorites this year.

1. The Sacred Book of the Werewolf, by Victor Pelevin. Trippy, odd, hard to describe - but good.

2. Wizard of the Crow, by Ngugi Wa'Thiong'O. Sort of like 100 Years of Solitude in Africa.

3. Victory of Eagles, by Naomi Novik. Good series.

4. Turn Coat, by Jim Butcher. I think I have read everything by him, he doesn't disappoint.

Non-fiction (I am leaving out a lot of math and bio books):

1. Imagining India, by Nandan M. Nilekani. Very good book about modern India, where its going and how it got there.

2. The Manga Guide To Statistics, by Shin Takahashi. Surprisingly good. The Manga Guide to Databases is also pretty good.

Curves of Pursuit

When I visited Stellenbosch University in February, I noticed the math department had some nice posters on various mathematical topics that I thought could be implemented in Sage. The only one I did was "Curves of Pursuit", in which one has n points in a regular n-gon, and each point chases the next. The solutions are prettier when discrete time steps are taken. You can see the code at

http://wiki.sagemath.org/interact/graphics#CurvesofPursuit

Tuesday, April 14, 2009

Protein of the Day #17: mTOR

mTOR (mammalian target of rapamycin) does a whole lot of things, as the attempted pathway image below shows (from Wikipedia, which I am not ashamed to link to for biochemistry). My interest in it comes from its role in energy balance, particularly in synthesizing information in the hypothalamus. Since I am primarily focused on mammalian hibernation, the fact that mTOR is a serine-threonine kinase is intriguing - its known that transcription and protein translation are shut down during mammalian torpor bouts so the control mechanisms are likely to involve post-translational protein modifications such as phosphorylation. Perhaps mTOR is involved in these mechanisms.

Monday, April 13, 2009

5-body woes

I've been working for the last few weeks with Anders Jensen, Eduardo Leandro, Gareth Roberts, John Little, Manuele Santoprete, and Alain Albouy on some celestial mechanics problems. While I was in Goettingen, Anders and I tried hard to get some results on central configurations in the five-body problem. Unfortunately, we hit one very, very nasty special case in our finiteness proof, which has me musing over a couple of big polynomials that start out looking like this:




Ouch!

Sunday, April 12, 2009

Back from CA and Goettingen

Blog's not dead yet...just took a 2 month hiatus. I started feeling guilty about not posting, which doesn't make much sense since its my own blog and it has very few regular readers - even fewer now!

Since my wife now has a much nicer camera for her work, I can bring her small one with me on trips. Its too bad I didn't have it in South Africa, but at least I had it in Goettingen last week where I could take a few pictures of the famous goose girl:

Thursday, February 19, 2009

Carl Witty does Sage on the G1


"the entire compile took 20943 minutes of real time (about
14.5 days)"


This is just heroic, borderline legendary: compiling Sage on the Android G1. There is nothing to be done but read the post from sage-devel and see the picture.

I have compiled and run Sage 3.2.3 on my T-Mobile G1 cell phone, and
large portions of it actually work.

300 files had failing doctests; this means that all doctests passed in
864 files. A lot of the failing doctests are with pexpect (maxima,
gap, etc.); I don't know why these fail. When I try simple things
with gap and maxima, they do work. Many more tests fail due to
timeouts; the 300-second timeout is far too short for the G1.
(Doctesting any file with doctests takes >50 seconds; doctesting a
file with no doctests takes >4 seconds. The entire doctest run took
270724 seconds, or a little over 3 days.)

Unfortunately, it's far too slow to be useful for anything (just
starting Sage takes about a minute, if there's enough free memory; but
since Android likes to keep the memory full all the time, there never
is enough free memory, and it takes much longer to start). So I don't
plan to do anything further with the project.

Of course, the sensible way to do this is to find some nice fast
computer and set up a cross-compiler. I didn't do this the sensible
way; I actually did the build on the cell phone. And of course, the
build would stop every once in a while due to a bug, which I would
then patch around. So, adding up the 14 chunks of compilation
involved, the entire compile took 20943 minutes of real time (about
14.5 days) and 9438 minutes (about 6.5 days) of CPU time. You'll note
that the CPU time adds up to less than half of the real time; most of
the rest of the time was spent swapping. The G1 has about 100MB of
RAM; I set up a swap file on my micro-SD card, to allow the build to
proceed at all. On several files, the compiler uses more than 300MB.
While compiling those files, the CPU is typically less than 1% active;
I'm pretty sure that there were files that took more than a day to
compile. The phone was essentially unusable for smartphone activities
(web browsing, etc.) while the build was running. In fact, the whole
smartphone UI crashed and restarted on a fairly regular basis during
the build (I'm guessing it has some sort of watchdog timer and reboots
itself if it detects that some operation is taking an unreasonably
long time), but the build just continued anyway (running inside a
screen session).

The ATLAS tuning process took about 3.2 days (with almost as much CPU
time as real time; that didn't swap much). Skimming through the logs,
I see reports of numbers like 3 to 6 MFLOPs.

The build was performed inside a Debian armel testing chroot; it's
pretty nice being able to run real Debian on my cell phone.
(Everything works; I can ssh in and out, etc., although when it's on
the cell phone network, inbound connections are problematic because
it's behind a NAT.)

To make the whole project even more pointless, since the phone is
running real Debian (inside the chroot), I can probably just wait a
few weeks or months for Tim Abbott to get all the portability issues
fixed in the sagemath Debian package, and then install Sage on the
phone with apt-get.

Here's the processor:

cwitty@localhost:/tmp$ cat /proc/cpuinfo
Processor : ARMv6-compatible processor rev 2 (v6l)
BogoMIPS : 383.38
Features : swp half thumb fastmult edsp java
CPU implementer : 0x41
CPU architecture: 6TEJ
CPU variant : 0x1
CPU part : 0xb36
CPU revision : 2
Cache type : write-back
Cache clean : cp15 c7 ops
Cache lockdown : format C
Cache format : Harvard
I size : 32768
I assoc : 4
I line length : 32
I sets : 256
D size : 32768
D assoc : 4
D line length : 32
D sets : 256

Hardware : trout
Revision : 0080
Serial : 0000000000000000

Carl

Sunday, January 25, 2009

Live from Cape Town

I arrived at AIMS (the African Institute for Mathematical Sciences) yesterday. Its a great place, right on the Muizenberg beach near Cape Town - quite a thrill after being in Duluth this time of year.

I have volunteered to teach a short course on bioinformatics algorithms here, using biopython and Sage as the computational platform. It will be very interesting to see how it goes over. I am using the Plasmodium species which cause malaria as a source of examples and projects.

Below is a satellite picture of the cape peninsula and a view of Muizenberg that includes the main AIMS building.


Thursday, January 22, 2009

Integral Apollonian Packings with Sage

At the national math meetings this year I heard about some really interesting and fun work on integral Apollonian circle packings. The AMS has a nice introductory article about them. I couldn't resist trying to compute and draw some in Sage. Carl Witty greatly improved the speed of my first attempt, so what follows can be considered joint work of ours. (Sage can compute nicer PDF output of these, but blogger doesn't embed PDFs.)



def kfun(k1,k2,k3,k4):
"""
The Descartes formula for the curvature of an inverted tangent circle.
"""
return 2*k1+2*k2+2*k3-k4

def circfun(c1,c2,c3,c4):
"""
Computes the inversion of circle 4 in the first three circles.
"""
newk = kfun(c1[3],c2[3],c3[3],c4[3])
newx = (2*c1[0]*c1[3]+2*c2[0]*c2[3]+2*c3[0]*c3[3]-c4[0]*c4[3])/newk
newy = (2*c1[1]*c1[3]+2*c2[1]*c2[3]+2*c3[1]*c3[3]-c4[1]*c4[3])/newk
if newk > 0:
newr = 1/newk
elif newk < 0:
newr = -1/newk
else:
newr = Infinity
return [newx, newy, newr, newk]

def mcircle(circdata, label = False, thick = 1/10):
"""
Draws a circle from the data. label = True
"""
if label==True and circdata[3] > 0 and circdata[2] > 1/2000:
lab = text(str(circdata[3]),(circdata[0],circdata[1]), fontsize = \
500*(circdata[2])^(.95), vertical_alignment = 'center', horizontal_alignment \
= 'center', rgbcolor = (0,0,0))
else:
lab = Graphics()
circ = circle((circdata[0],circdata[1]), circdata[2], rgbcolor = (0,0,0), \
thickness = thick)
return circ+lab

def add_circs(c1, c2, c3, c4, cutoff = 300):
"""
Find the inversion of c4 through c1,c2,c3. Add the result to circlist,
then (if the result is big enough) recurse.
"""
newcirc = circfun(c1, c2, c3, c4)
if newcirc[3] < cutoff:
circlist.append(newcirc)
add_circs(newcirc, c1, c2, c3)
add_circs(newcirc, c2, c3, c1)
add_circs(newcirc, c3, c1, c2)

zst1 = [0,0,1/2,-2]
zst2 = [1/6,0,1/3,3]
zst3 = [-1/3,0,1/6,6]
zst4 = [-3/14,2/7,1/7,7]

circlist = [zst1,zst2,zst3,zst4]
add_circs(zst1,zst2,zst3,zst4)
add_circs(zst2,zst3,zst4,zst1)
add_circs(zst3,zst4,zst1,zst2)
add_circs(zst4,zst1,zst2,zst3)

sum([mcircle(q, label = True, thick = 1/2) for q in \
circlist]).save('./Apollonian3.png',axes = False, figsize = [12,12], xmin = \
-1/2, xmax = 1/2, ymin = -1/2, ymax = 1/2)

Protein of the Day #16: Maltase (plus a beer recipe)

I just bottled a batch of my Chocolate Cake Stout, which is:

  • 1 lb of Simpon's roasted barley
  • 1 lb of crisp amber malt
  • 6 lbs gold malt syrup (from Northern Brewer)
  • 1 oz Yakima Magnum hops (13.5 % Alpha acid)
  • Safale S-04 yeast
  • 8 oz Dutch process cocoa (from Penzey's Spices)
  • 1 lb lactose sugar
  • 1 whole vanilla bean (also from Penzey's).

Good stuff.





Maltase (alpha-D-glucosidase) is a crucial enzyme in beer making, and its regulation in response to other sugars is important to understand if you really want to grok brewing. Maltose is a disaccharide of two units of glucose; in most organisms it needs to be broken down to glucose before being used in other biochemical processes. The presence of glucose inhibits the production of maltase and maltose transporter proteins, so the glucose in a wort has to be mostly used up before the yeast will switch to consuming the maltose.

Tuesday, January 6, 2009

Sage at the joint math meetings

Live from DC, we're halfway throught the joint mathematics meetings. This is the second year that Sage has had a booth in the exhibit hall.

Our location is not as good as last year's, but we are still getting a good amount of foot traffic - enough to occupy most of the people here most of the time. David Harvey, David Joyner, Robert Miller and I have been manning it most of time. Jason Grout helped out this afternoon quite a bit. I may be forgetting some folks because I'm a little frazzled.

The word of mouth about Sage is increasing, many people stopping by have tried it or at least heard about it. I think its very encouraging for the future. Several people expressed interest in how to become developers.

We had an MAA panel session today on open-source software in the undergraduate curriculum. Four speakers, two of which (David Joyner and Robert Miller) talked about Sage (others on R and WeBWork).

Overall, so far the booth has been another success in raising awareness and enthusiasm for Sage. Talking to different people has made me enthused about all sorts of development projects, enough to keep me busy for at least the next year...

Thursday, December 18, 2008

Protein of the Day #15: Adropin

Recently in Cell Metabolism there was a very interesting article on the newly characterized peptide Adropin. Adropin seems quite important in regulating the balance between sugar and lipid use as fuels; its one of several promising avenues to understanding and treating diabetes that have come out in the last year or two. The peptide is cleaved from the product of the gene Enho (energy homoestasis associated). Its extremely well conserved in mammals - for most species the amino acid sequence is 100% identical (a few ungulates have 1 amino acid difference). Here is a picture of the conservation from UCSC's genome browser:

Monday, December 15, 2008

Coloring book reject

The image below is a Groebner fan that is just too complicated to put in the coloring book, buts I think its pretty impressive:



The ideal generating this is from what I call the "super three-vortex problem", the equations for the central configurations of a 1/r^2 potential:



I am mainly interested in the nonzero solutions of this system. To get at those, we can saturate the ideal - or in practical terms we can introduce a new variable, w, and add the equation w*s12*s13*s23 - 1 = 0 to the ideal. The 3D Groebner fan of the resulting system can be seen here.

Thursday, December 4, 2008

A mathematical coloring book

I've been working on a mathematical coloring book, with the pictures created using Sage. It still needs some work but I've put a preliminary version up at lulu.com. (I am not making any money on it, the cost is what lulu.com charges to print it.) I have also made the download freely available. I would appreciate feedback, especially from people with kids who try it out.

Saturday, November 29, 2008

Protein of the Day #14: XP_001352106

The genome of the malaria-causing Plasmodium falciparum is bizarre in a number of ways - the most striking feature being the extremely high (over 80%) A+T content. Looking on the protein level, there seem to be many proteins with long asparagine inserts. These asparagine inserts must serve some sort of purpose but it is unclear what it is. They do tend to confuse sequence-alignment and similarity searches, which is one reason so many of the proteins remain uncharacterized.
An extreme case of this is XP_001352106, which has a run of 83 asparagines in a row. It does have some similarity to a subunit of cyclin kinase but not enough to be very confident about its identity.

Sunday, November 23, 2008

Symmetric Venn Diagram

This was the start of a small industry of making symmetric Venn diagrams, which Branko Grunbaum found in 1975. I have been working on making a mathematical coloring book (first edition should be - needs to be - done by the holidays, so more details on that soon). I've been trying to making some symmetric Venn diagrams for it, this is a by-product of my first attempts:

Wednesday, November 19, 2008

Protein of the Day #13: ATP synthase, beta chain

One of my students is doing a comparative genomics study of Plasmodium falciparum (with an ultimate goal of developing better alignment algorithms for organisms with extreme genomes), and I was curious about what the most conserved protein is relative to a model organism such as yeast. Turns out its ATP synthase; not too surprising but one might guess some other things too. The wikipedia entry is pretty good, although perhaps not as good as it could be. It does have a nice cartoon of the structure:

Monday, November 17, 2008

Protein of the Day #12: V1rf3

V1rf3 vomeronasal 1 receptor, F3, as its called in mice, appears well-conserved in a variety of mammals, as shown below (sometimes under slightly different names). The vomeronasal system is distinct from the usual olfactory system for smelling, and can be sensitive to very different compounds. In mice the vomeronasal system is important for pheromones. It remains unclear whether humans have any sort of functional vomeronasal at all; my guess is that most of us do not, but perhaps a few people still do.

Friday, November 14, 2008

Permutohedron mirrors

The image below is from a viewpoint in a mirror-faced 3D permutohedron (truncated cuboctahedron). It should link to a larger (1920x1200) version. This image was produced with Sage (using the Tachyon raytracer and some new code for polytopes that I've been working on).

Thursday, November 13, 2008

Slices of the 600-cell

Over the last 6 months or so I've been doing some work on visualizing polytopes, Groebner fans, and other geometric/algebraic objects. I gave a presentation last week about some of that, which forced me to finish up some projects. One of those was a movie of the 600-cell being sliced by 3-planes.

Monday, October 27, 2008

Protein of the Day #11: cystathionine gamma-lyase (CTH)

In a recent article in Science, Yang et al found that cystathionine gamma-lyase can produce hydrogen sulfide gas in mice, and that this seems to help control blood pressure. Since I'm interested in mammalian hibernation, this made me wonder about connections with another Science article from 2005 which showed that a torpor-like state of lowered body temperature can be induced in mice by a particular level of H2S exposure. This protein is very well conserved; below is an alignment with the mouse version with some mammals and the chicken. Normally it is involved in cysteine metabolism and presumably does not create H2S; there are some splice variants and perhaps the variants are important in this respect.