Archive for the ‘Uncategorized’ Category

This weekend I attended beCamp, “Charlottesville’s version of the BarCamp unconference phenomenon”. Basically a tech meetup with talks, talking outside of talks, food, and drinks. All around, a good time. This was my first beCamp, but I enjoyed it, and will probably try to go to others in the future.

The way the camp goes, you show up Friday night and people stand up and say things they could talk about, if there’s interest. And then people put marks about if they’d attend or whatever, and a schedule of talks for Saturday comes together. When I signed up for the camp a week beforehand, my intention was to spend some free time during the week preparing a talk about R. Didn’t happen, but I stood up Friday and said I could maybe say a few words about it anyway. I got a few ‘Learn’ checkmarks, indicating a little interest. Lucky for all involved, though, I didn’t get officially scheduled to talk. Of course, I didn’t know that until I showed up Saturday, having spent about 2 hours that morning trying to throw something together, just in case. I can’t say I was too disappointed with not having to talk, though it could have been fun. At lunch, there was about an hour of “lightning talks”, just 5 minute talks. While I was sitting there, I figured that would actually be a good amount for me. Just as the line of talkers for that was starting to wind down, and I was thinking about joining it, a handful more queued up. Those talks used all the remaining time, so I was, again, off the hook.

But, hey, I’ve got this venue, I can talk about stuff whenever I want, right? So here’s some notes about R I was just about prepared to mumble about Saturday.

According to the webpage, “R is a free software environment for statistical computing and graphics.” It’s something like an open source clone of the S software for stats processing. The language has some sort of interesting aspects to it, and also some things that really get me sometimes. R has some good built-in “call for help” utilities, making it sort of easy to pick up and do fairly interesting things fairly quickly. Perhaps one of the best things is the huge collection of freely available libraries. I’ll try to talk about some or all of these things, showing by example and not being too formal (me, informal?), but hopefully still fairly close to correct (or, at least, usably incorrect). Folks wishing for more can certainly jump to the official introduction. John D. Cook has some good notes about picking up R if you know some programming (I’m assuming you do), and I also found “The R Inferno” [pdf] informative.

Right, so lets look at some code. I always feel, with a language like R, you don’t start off with “Hello World”, but with calculations. Because it’s just so novel to have a calculator:

Those lines with the arrow in front are the input lines, where you type, and the other lines are the output. Anyway, pretty exciting, no?

I should mention that you can reproduce this, or other examples, by running R from the command line, or using R-specific editors (or emacs add-ons). I’ve been using RStudio recently, and, while it’s got its issues, it’s got some nice features too. Worth a check-out.

Ok, so R does the normal hello world too, and has if-statements (imagine!) and for loops (how are you not using it already!?). The ‘:’ operator is pretty helpful for making ranges, as the example shows:

Here’s an example of writing our own function. Pretty straightforward… note that ‘<-‘ is the assignment operator (‘=’ would also work here, but I think ‘<-‘ is more R-ey). There’s another assignment operator, ‘<<-‘, which, I think, is a little bit of a bad habit to use. It’s along the lines of making the thing on the left a global variable, but I’d rather not get too much into that sort of thing (i.e., things I don’t understand at all, instead of things I can at least pretend a little about). I seem to recall reading somewhere the R using lexical scoping rules. If you know what that means, good for you. I think it applies here, because if we didn’t assign to fact, then the call to fact at the end of the function would fail. Oh, and note you can return things in R with return(), but more typically results get returned by just having them be the last line of the function (in my (limited) experience).

There’s a few ways to iterate over a bunch of things and apply a function to each object in turn (i.e., “map”). A simple way is with sapply. In the following example, we use sapply to get the factorial of the values 0 to 4, then plot the results with lines connecting the values. We add a title to the plot, and re-plot the points. Note that we pass 0:4 in to specify the x-coordinates of the values; R indexes from 1 by default (I don’t hold R personally responsible for this, since they’re trying to be S-compatible, but still). Anyway, example (run it yourself for the picture):

Plotting can get just about as complicated and involved as you’d like. So now’s probably a good place to introduce R’s help system. If you want to find out more about a command, just use ‘?':

> ?plot

There’s another help operator, ‘??’, I’ll use later. (I think I actually saw there’s a third, ‘???’, but I haven’t used it). Another cool thing about R is that you can look at the source for functions. Just type the function without the parentheses:

Ok, only so informative, since it passes work off with that .Internal call, but the principle is there.

I want to do one more function example, because it shows sort of a fun thing you can do. Most functions allow you to define default values for arguments. R lets you define the value in terms of passed in values. When you call the function, you can pass in values by naming the arguments, so you don’t have to worry about order. And, when you do, you can actually cheat and use initial substrings of the argument names. An example is in order:

(that example is based on something I read in a blog post, but I can’t find the link… it was talking about the things I said in the last paragraph, and did an example of converting polar to cartesian coordinates, if memory serves…) (Update 20111004 – found it).

One of the really fun things about R is “vectorized” operations (terminology taken from the R Inferno, mentioned above… could be standard-ish though, I dunno). In particular, the usual arithmetic operations are applied componentwise to vectors (and typing ‘2’ is a vector of length one, for example). Shorter vectors are recycled. There’s lots of ways to make vectors, ‘:’ was used above, c() is easy, as is seq(). Anyway, here’s an example:

Fitting lines to data sounds like a statsy thing to do, and R is for stats, so let’s do that. Let’s take the nums we made above and use them as offsets from the line y=5x. Then we’ll fit a line to that data, and it’s slope should be pretty close to 5. Note that ‘.’ isn’t special in R like it is in many other languages, so it’s typically used to separate words in variable names (although, it can be used in formulas, see later). Sort of the equivalent to other languages’ ‘.’ is ‘$’, exemplified below.

I’ll leave it for the curious to sort out why the intercept is 6ish. Of course, if you’re running this at home, you’ll get different numbers, owing to the random sampling. Anyway, we should probably plot the thing and make sure it seems ok:

> plot(1:100, sloped.nums)
> abline(sloped.line, col="RED")

Looks fine to me. Of course, it’d probably be cool to try something with actual data. If you’ve got a csv sitting around, R is quite good at reading them in. If you don’t have a csv sitting around, I found some census data, and it seems R will open csvs across the wire (which is kinda hot).

Each of these headers is a name we can use to index into the census object. It’s technically a “data frame”, one of the types in R. That means it’s basically a (not-necessarily-numeric) matrix (as you might expect from a csv table), each column has the same number of entries, and within a column, all of the entries are the same type (no mixing strings with numbers). The names are the column names, and you can use the ‘$’ operator to get at any particular column.

The last line of output indicates that census$NAME is a “factor”, one of the types in R. Basically a list of values all taken from a set. I don’t want to say too much about it. While I’m at it, though, we might as well talk about indexing into R objects. It’s one of the cool things about R. Let’s grab that NAME column, and convert it to strings:

Like I said, census is basically a table. You can pull out rectangular bits of it easily, as the example below shows. And it’s easy enough to generalize that a little, and start pulling out whatever bits you want. If you leave one of the coordinates in the ‘[]’ empty, it means “everything”. So census[,] is the same as census (for some definition of “same as”).

Right, we’re supposed to be doing statsy things. We should be actually playing with the data… Let’s pick out some easy bit. Let’s play with the “POPESTIMATE2009″, “BIRTHS2009″, and “DEATHS2009″ values for just the states.

To get an idea how the variables relate to each other, you can plot each of them against each of the others quickly, with pairs():

> pairs(some.data)

We fit a line to data earlier, and can expand on that here. Let’s model the population estimate given the births and deaths. I’m not trying to display some dazzling insight into the data, just show how easy it is in R to do this sort of thing.

If you don’t have your own data, by the way, R comes with some, and many libraries bring in their own, for examples. Just poking around a little (here’s to tab completion), I found, for example, that R comes with a data frame with state-by-state arrest counts by crime (USArrests</code). I mentioned earlier that '?' is good for getting help on a command. If you want to find a command to use, use '??'. This frequently returns lists of packages that you can poke at. One of the great things about R is that many of the libraries you can install come with 'vignettes', providing a little tutorial on some of the tools in the package. R makes it very easy to install packages (install.packages()).

I’m sort of running out of steam for the evening, so think I may wrap this up. I had sort of envisioned talking about a couple of fun packages. Guess I’ll save that for another post (this has gotten long anyway), and try to do some cool examples, with prettier pictures.

So according to the title, I should be telling you about , as a functor of manifolds and . That’s perhaps a bit ambitious. I’ll only be thinking about , a disjoint union of closed disks, and I’ll actually fix . And instead of letting range over any manifolds, it’ll just be , ranging over real vector spaces.

By taking derivatives at centers, we obtain a homotopy equivalence from to something I’ll maybe denote . This is componentwise affine (linear followed by translation) maps whose restriction to -balls around the 0s is an embedding. I may use , and write . And I’ll actually send everything to spectra, instead of topological spaces, via .

So really I’ll be talking about

as a functor of . I’ll be lazy and write it , having fixed an and to give .

Useful Cases

The first useful case is when (i.e., ). Then embeddings are just configuration spaces, . I’ve talked before about a homotopy limit model in this case, but let me remind you about it.

The category I have in mind is something I’ll denote . Objects will be non-trivial partitions of , and I’ll probably denote them , perhaps writing . Non-trivial means that some equivalence class is larger than a singleton. I’ll write if is finer than , meaning that whenever , then .

The functor I want is something I’ll denote and call “non-locally constant” maps. So is the set (space) of maps such that there is an where . Equivalently, maps which don’t factor through .

Depending on which order you make your poset go, is contravariant, and you can show

The second useful case is when (i.e., ). Then the space of embeddings is homotopy equivalent to the space of injective linear maps. You can obtain a homotopy limit model in this case that looks strikingly similar to the previous case. Namely, you set up a category of “linear” partitions (equivalent to modding out by a linear subspace), and take the holim of the non-locally constant maps functor, as before.

I like to think of both cases as being holims over categories of kernels, and the non-locally constant maps of some kernel are maps that are known to fail to be not-injective for some particular reason. Embeddings fail to be not-injective for every reason.

But there’s another model I want to use in what follows. My category will be denoted , and objects in the category will be vector spaces with non-zero linear maps . Morphisms from to will be surjective linear maps with . You might think of the objects as an abstract partition () with a map to , which then determines a partition of , by taking the image.

The functor out of this category is something I’ll still denote . On an object it gives all non-constant affine maps . Arone has shown

Product Structure

The space of embeddings we are considering splits, as

We know a homotopy limit model of each piece of the splitting, and might hope to combine them into a homotopy limit model for the product. This can, in fact, be done, using the following:

Lemma: If , , then

Here denotes the join. For categories, is , obtained by adding a new initial object to each of and , taking the product, and removing the initial object of the result.

Proof (Sketch): Consider the case . The idea is to line up the squares:

and

Both of which are homotopy pullbacks. The equivalence of the lower-right corners follows because join is similar enough to smash, which plays nicely with .

So, anyway, applying this lemma and perhaps cleaning things up with some homotopy equivalences, we obtain an equivalence

Objects in the category consist of a partition along with, for , linear . To tidy up a little bit, I’ll denote this category , for join. The functor takes an object as above and returns the set of componentwise affine maps such that either (a) the map is non-constant on some component, (b) when restricted to the image of , the map is non-locally constant with respect to .

There you have it, a homotopy limit description for the embedding functor.

But not a particularly nice one. If we had an embedding , then we’d have map . It’d be really swell if this map was modelled by a map of the categories we are taking homotopy limits over. But that’s not going to happen. What can go wrong? Non-trivial partitions of , when sensibly composed with the map to , may become trivial, and thus not part of the category. This is, essentially, because several components of might map to a single component of . If has two components, and one, say, where do you send the object consisting of the non-trivial paired with some 0 vector spaces?

A More Natural Model

We sort of need to expand the category we take the homotopy limit over, and make it a more natural construction. We actually have an indication on how to do this from the discussion, above, in the case of linear injective maps from a single component. Perhaps we can find a proper notion of “abstract partition”, pair such a beast with a map to , sensibly define non-locally constant, and get what we want. Let’s see how it goes…

An affine space is, loosely, a vector space that forgot where its 0 was. There is, up to isomorphism, one of any given dimension, just like for vector spaces; I’ll denote the one of dimension by , say. That should be enough of a description for now.

Let me define a Complete Affine Partition (CAP), , to be a partition of a disjoint union of affine spaces, such that equivalence classes contain components. That is, everybody that’s in the same component is in the same equivalence class. Given a , I’ll denote by the underlying component-wise affine space. The data that determines a is: a finite set (the set of components), a partition of , and a dimension function, (non-negative integers). With this information, is .

By a refinement from to , denoted , I will mean an affine map so that the “affine closure” of the partition is coarser than . I don’t want to spend too much time talking about the affine closure operation, on partitions of a component-wise affine space. If and have a single component, a refinement is just a surjective affine map (recall before we had surjective linear maps in ). If and have dimension function 0, so basically and (partition of possibly distinct finite sets), a refinement just means .

We’re now ready to define a category, which I’ll denote . The objects will be pairs of: a CAP, , along with a non-locally constant affine (subsequently denoted ). A morphism from to will be a refinement such that . This should look familiar to the construction.

The functor I’ll consider still deserves to be called , and it takes to the set of non-locally constant affine maps . We’d really like to be able to say

It seems sensible to try to do so by showing that

since , and we know the homotopy limit over has the right homotopy type. This is our goal.

Semi-direct Product Structure

I’ll use the semi-direct product notation for the Grothendieck construction, as follows. Recall that for a category , and a functor , the Grothendieck construction is a category, which I’ll denote , whose objects are pairs where . Morphisms to are morphisms such that . Of course, my functors are all contravariant as defined, so you have to mess about getting your arrows right. Best done in private.

I claim that can be written as a Grothendieck construction. Actually, it can in a few ways. The obvious way is to set to be the category of CAPs , paired with refinements. The functor you need is then . You find that .

But there’s another way to slice it. Let be the category of CAPs , along with functions . Now the functor you need is not all non-locally constant maps to , but only those that are lifts of . You might denote this set . I’m tired of all the notation, so let me let denote this non-locally constant lifts functor. We have, then .

While I’m simplifying notation, let me also write for . Notice that it is actually a functor from , and thus from .

Let’s return to the category again. It has the same structure. In fact, we just need to pick out of the subcategory of CAPs whose set of components is , and where is the identity on . Calling this subcategory , we have .

Summarizing all the notation, our goal is to show that

The first thing I’d like to do is use twisted arrow categories to re-write things, so perhaps I should tell you about these categories first. If is a category, the twisted arrow category, has objects the morphisms of . Morphisms from to are commuting squares

If and are contravariant functors from , one can check that is a covariant functor from . I’ll denote it . One can show that

Using this, we’re hoping to show

Proof Outline

We’ve got . Between them lies a category I’ll denote , consisting of arrows with , . Morphisms are “twisted” commuting squares, as they should be, as part of the twisted arrow category. One can reduce the holim over to one over , and from there to one over .

To reduce from to , one can show that for all , the over-category is contractible. In fact, this result seems to rely very little on our particular and , and doesn’t depend on the functors, , , or .

For the reduction from to , one shows that for all , we have

Essentially this shows that , as a functor from , is equivalent to the right Kan extension of it’s restriction to a functor from . And the homotopy limit of a right Kan extension is equivalent to the homotopy limit of the restricted functor.

It is in this second reduction, to , that we rely on information about our categories and functors (, in particular). Pick your object . You can quickly reduce the crazy over-category above to just . Now remember is a CAP with a function to . I’ll denote it . If this function is locally constant (all objects within an equivalence class get sent to the same point), then you sort of replace with an object obtained by taking affine and direct sums of it’s components. The result is an object of , but from the perspective of , the two objects give equivalent spaces of lifts. Alternatively, if is non-locally constant, then every lift is non-locally constant, and so .

This all works out to be useful in the whole proof. But I’ll maybe save all that for another day.

Welcome to the Carnival of Mathematics! Finding that the 60th is apparently the “diamond anniversary,” I was reminded of the symmetry in the Buckyball, which has the shape of a truncated icosahedron. You can make pretty nice ones using modular origami:

Before getting to this month’s links, allow me a diversion to talk about some geometry I learned a little of this month.

There are 6!=720 ways to order the letters A, B, E, I, L, and S. If we declare that two orderings are the same if one is obtained from the other by cyclic permutation (for example, ABEILS and ILSABE are the same), there are 6!/6=5!=120 combinations. If we also declare that a word and it’s reverse are the same (ABEILS = SLIEBA), we have arrived at 6!/(6*2)=60 combinations.

Pick any 6 distinct points on a circle (or any conic section). Choose any of the points as a starting point, and draw a line to any of the other points. Then draw a line to one of the remaining 4 points. Continue until all of the points have been hit, and then draw a line back to your starting point. How many different pictures can you make in this process? 60, again, because you could label the points A, B, E, I, L, S, and then pictures correspond to words from the previous calculation.

Each picture you draw is a figure with six edges. These six edges can be put into three set of pairs, where two edges are paired if they are “opposite.” In the process of drawing the lines, above, the line opposite the very first line is the fourth line you draw. Similarly, the second and fifth form a pair, and then the third and sixth.

Now, if you extend all of the lines, each pair of opposite edges will determine a point of intersection (or infinity… maybe try another setup for your original points :)). So each picture you draw determines 3 points in the plane (or infinity). When he was only 16, Pascalshowed that these three points are always colinear.

So, given 6 points on a conic, the process outlined above determines 60 lines, called Pascal Lines. Mathworld has more on Pascal Lines, for the inquisitive, so it’s probably about time to direct you over there and get on to this month’s blog posts!

2) At approximately halfway through the month, Wednesday the 18th was determined to be the 150th birthday of the Riemann Hypothesis. Plus Magazine and Math In The News both had articles.

3) Riemann’s zeta function, the lead character in his hypothesis, is connected to primes by Euler’s product formula. If you are interested in the distribution of the primes, Matt Springer at Built on Facts has a post about the function Li(x), as part of his running Sunday Function series. If natural number primes aren’t exciting enough for you, Rich Beveridge at Where The Arts Meet The Sciences has a post for you on Gaussian Primes.

If you prefer unsolved puzzles, Bill the Lizard has recently written posts about the Collatz Conjecture and the Perfect Cuboid Problem. Alternatively, for some behind-the-scenes on the notoriously difficult Putnam exam (and yet more puzzles), head over to Izabella’s post at The Accidental Mathematician.

5) It’ll take a while to get to the 3435th Carnival of Math, so I think I’m not stepping on too many toes if I point you at Mike Croucher’s quick post at Walking Randomly and Dan MacKinnon’s slightly longer post at mathrecreation that talk about what makes 3435 interesting.

30) Dave Richeson at Division By Zero reports on a case of mistaken identity in Legendre Who?

60) Finally, Samuel at ACME Science discusses the fractured state of the current mathematics community, noting that Mathematics Really is Discrete. This post was closely followed by Abstruse Goose’s Landscape.

I apologize for any omissions or errors.

Suppose is an irrational in the interval , and fix a positive integer . Let’s see what I can say about rational approximations to whose denominator is no bigger than .

First of all, lies in one of the intervals , where . Since is irrational, it won’t be an endpoint of such an interval, nor will it be the midpoint. Which is to say, it is closer to one end than the other. More explicitly, we can say that for some .

Instead of requiring the denominator of a rational approximation to actually be , what if we just ask that it be no bigger than ? Then we’re asking how well rationals in the -th Farey sequence, , approximate .

Instead of thinking about , let’s multiply everything by , and so look at (we’ll divide by that again soon enough). So now we’re not asking about rational approximations, as such, but asking about pairs of integers, and with , so that is “pretty close” to the integer .

Let’s re-phrase once more. Consider all of the multiples of . All of these are irrationals, but could now be bigger than 1 (our original was less than 1). I don’t want to think about things bigger than 1, so let me trim all of these multiples down to just the “fractional part”. Which is to say, I’ll now think about all of the values (the “floor” notation picks out the “greatest integer less than”), which are all irrationals in the interval . Now for each I have an integer , and let me denote this integer by . You might note that is always less than .

So now I am thinking about the irrational values in the interval . I’ll think about them in comparison to the rational points , like I did before. Following Rademacher (as most of my content has been and will be), we distinguish two cases.

Suppose some falls in the interval . Then , and so (since ).

If is free of our points, then by the pidgeon-hole principle, some interval contains two values, say and (arrange notation so that , forcing also ). Then , which we re-arrange to say that . Letting and , we have , which we again re-write, as in case (1), to say that .

We have, therefore, improved the “order” of our approximation. To begin with, we said that rational approximations could be found with . I think of this as a “order 1″ approximation, since the denominator of the error is a linear function of the denominator of the rational approximation. We have now improved this so that , which I would therefore call an “order 2″ approximation. If you are a little more careful with your inequalities, you can improve the bound to (an error that I think I’ll probably end up mentioning again tomorrow), basically for the same reason there is a coefficient of 2 in the order 1 approximation, I guess.

I should probably be a little (a lot) more careful in what I am saying with the above. I chose an irrational and an integer , and said that an “order 2″ rational approximation could be found. The stronger claim is that, in fact, infinitely many order 2 rational approximations can be found, if you let increase. Suppose your first order 2 approximation gives you , when you have bounded the denominator by . Find a new so that . Then go through the process above, using as the new bound on the denominator. When you find with that process, then you’ve found a new rational approximation (since it is closer to then was) that is still order 2 (since that’s what the process does for you).

So, can order 2 be improved on? Can you find order 3, or higher? It turns out, “no”, in general (and the golden ratio is an example). You can improve the coefficient of 2 in the order 2 approximation to , but that’s apparently the best you can do, in general. There’s more than can be said along these lines. The Roth-Liouville irrationality measure might be fun to talk about (it earned Roth a Fields medal, so it must be ok), as would continued fractions. I’m not sure how much these are related to my stated goal of understanding the link between Farey sequences and the Riemann hypothesis, so for now, perhaps I’ll leave them alone.

For some reason, I thought it might be fun to make a visualization about rational approximations using . Here is a picture of the rationals in , as a subset of :

Here’s a graph of the function taking to “the rational in closest to “:

Today, and other scattered times in the past, I’ve been trying to come to grips with a proof concerning homotopy limits. Suppose and that for every . Suppose that is a (covariant) functor from to, say, spaces. Then the lemma I’ve been thinking about is that , and in fact the natural map from right to left gives the equivalence.

I’ve been studying Bousfield and Kan‘s proof a little, and trying to make it look like something I can think about. Their goes to simplicial sets, or so, and they have some assumption about it taking values in the collection of fibrant objects. I’m going to ignore that, because in Top all spaces are fibrant (right?), and because ignoring hypotheses can never lead you astray (right?).

So anyway, I thought I’d share something like an outline of a proof. I’ll write = where there probably should be instead. And that likely won’t be the worst of my transgressions.

Consider the bi-complex (I guess it’s a bi-cosimplicial space, or so) where

where the represent objects of , the come from , and arrows lie where they should (in particular, between primed elements, the arrows are in ). I’m going to get tired of that indexing, so I’ll let represent a chain of the form , and similarly is . In fact, I’m not going to put the subscripts, as the subscript on a will always be , and similarly for the primes. If I write , I mean that . So I can write

letting the ambiguation begin (or was that earlier?).

Next, let’s start thinking about what some homotopy limits are. I should probably be calling things Tot’s, for totalization, but my understanding is that they’re basically holim. Finally, “\holim” is not a built-in latex command. For convenience, I’m going to just write “lim”.

means below.

Ok, so, fix a . In what follows, denotes the mapping space, and represents the -th layer in the simplicial nerve of a category . The geometric realization of is denoted . Compute:

Finally, our assumption that these arrow categories are contractible lets us write this as simply . Which means that

.

That’s nice. Let’s do the homotopy limit the other way, fixing to begin.

Now , which almost looks close to what we’ve got above. To see that they are equivalent, notice that the arrow category has the initial object . This means that

We conclude that

Finally, apply Fubini’s theorem for homotopy limits, and conclude that

Now, to translate to the situation when my categories are internal categories in Top…

We decided to split the reading of chapter 10 into two weeks (chapter 9 here, in case you missed it). It’s a longish chapter, and I really like continued fractions (though I’m not particularly sure why, they’re just fun) and some of the other readers thought it might be worth it to spend more time reading it carefully.

Our first meeting covered the first few sections, which only involved basic definitions, and the theorem that every real number has an essentially unique continued fraction expansion, and the expansion is finite if and only if the number is rational. Eric stated that he was unimpressed so far, and didn’t see what I was so fascinated by. None of us seemed to have any questions about the reading, so I gave a glimpse of things to come (relation of periodic continued fractions to quadratics, and rational approximations). I also mentioned that there are some interesting tie-ins to the “modular group” (), Farey sequences, and Ford circles (which have come up before). Eric has been reading about hypergeometric series, and said there are some interesting formulas there related to continued fractions. He also asked if there was some relation to surreal numbers, because continued fractions approximate numbers from the left and right, alternatingly.

We picked up, the second week, in section 10.10 “A lemma”, defining an equivalence relation on reals. The relation works out to be that two numbers are equivalent if the tail of their continued fractions are the same. Chris corrected a misinterpretation Eric brought up, about canonical representatives of equivalence classes. I had wondered if the equivalence meant that, in terms of periodic continued fractions representing “quadratic” numbers, two numbers and would always be equivalent. In fact, I thought I had decided they were. But an example in the book shows that this is not the case ( while , dots representing the repeating part). Eric pointed out that two points were related if there are in the orbit of the modular group acting on as a subset of , acting as linear fractional transformations.

We spent a little while talking about periodic continued fractions, how the two directions of the proof that they are equivalent to “quadratics” go. I think the proof that any quadratic has a periodic continued fraction is fascinating. It gives no indication how long the period will be, or when it will start.

Next I mentioned that there’s a convenient algorithm for finding the continued fraction for a “quadratic surd”, and that I intend to post some python code here implementing it (and other fun functions for playing with continued fractions). While it’s essentially the normal algorithm, taking floors and then reciprocals, there’s some convenience in having quadratics around, because you can “rationalize the numerator” and sorts of things. Not mentioned in the text, but stated at both Wikipedia and Mathworld (links below), is that Lagrange showed that the continued fraction for has a period smaller than , that the period begins after a single non-repeating term, and that the last term in the period is twice (the first term of the continued fraction). All of these things are true of the examples given in the text. And, while finding links… holy crap! the repeating part, besides the last numeral, is palindromic! Is there no end to the fascination!?

Our next main focus was on approximation by convergents. Chris pointed out how remarkable the final theorem is, that any time a fraction is sufficiently close to a number (in terms of it’s denominator), it is automatically a convergent. I mentioned one thing I read about in Rademacher’s “Higher Mathematics from an Elementary Point of View” (which I love), which was that the existence of infinitely many such that (corollary of theorem 183) can be interpreted as saying that a vertical line at passes through infinitely many Ford circles.

I then tried to explain the difference between Theorems 181 and Theorems 182, and point out that there are two reasonable definitions of “closest rational approximation”. I had read about these in Khinchin’s “Continued Fractions” (which I also love). I bumbled it a bit, but believe I was saying true things throughout. Basically, the story goes… convergents are best rational approximations in the stronger sense (thm 182), and mediants of successive convergents are best rational approximations in the weaker sense (thm 181). In fact, choose an irrational (for convenience) , and let denote the operation “mediant”. For any , define , and then iteratively . The last of these mediants that is on the same side of as will be . Continued fractions rock.

It’s really best to think about these lemmas with an actual continued fraction example. I, personally, used , and looked at the mediants , between the first and second convergent.

We finished with me trying to explain something that I thought was quite surprising. Let denote the closest rational to , with denominator (let’s not require the fraction in reduced terms). I was quite surprised, honestly (and convinced Eric he should be too), that for a chosen , the sequence of such rationals will not be successively better approximations to . Having had the chance to go through an example with Eric, and then a few hours to mull it over, I’ve since realized this it not particularly surprising at all. Suppose lies in . Half of these will be better approximated by 1/3 than 1/4.

So, anyway, I guess that’s all I have to say about continued fractions by now. Perhaps Eric will show us sometime about fun relationships between hypergeometric series and continued fractions. If you haven’t already stopped reading this post to go find all sorts of other interesting things to read about continued fractions, either online or in Rademacher’s or Khinchin’s books, you can now.

Continuing on, we talked about “The Representation of Numbers by Decimals” this week. I thought the first few sections were fun, in the precision and care used to prove things like “Rational numbers have repeating decimals, and vice versa”.

Chris and I both, apparently, took a minute to digest the example that 29310478561 is divisible by 7, at the end of section 9.5. I feel like in my first year of undergrad I learned about this, or perhaps a similar, test for division by 7. I thought that instead of taking the sum of digits (like you would for mod 3 or mod 9), or alternating sum (for mod 11), you could take some sort of weighted sum of the digits, where the weights depended on for various . Looking around online while writing this post, it seems I was (mis-)remembering the method of Pascal, listed on this page at Mathworld. This Mathworld page mentions several other tests, which look interesting. My search turned up another as well, over at God Plays Dice.

I like the section on “Integers with missing digits” (section 9.9), because I like to show my calculus students that the sum of the reciprocals of such numbers is a convergent series (even though, writing out the first several terms, it looks like you haven’t thrown out many terms from the harmonic series). This is known as the Kempner Series, which I first learned about in the book Gamma, by Havil.

We concluded with a little discussion on normal numbers, the last few sections of the chapter. It seems we all ran out of steam while reading this chapter, so we didn’t get through the proofs in these sections. But the ideas are interesting, and the results are fun. According to Wikipedia, there is a conjecture that all irrational algebraic numbers are normal, even though there is no known proof that any particular irrational algebraic number is normal. I remain a little confused about the definition of normal, actually. “We say that is normal in the scale of if all of the numbers are simply normal in all of the scales “. I think the idea with multiplying by these powers and changing the scale is that you are looking at longer and longer digit sequences, instead of just single digits (which would be simply normal). I was a little unclear about why you need to multiply by all of those powers of , but I guess if you don’t then you won’t ever get any digits (in the scale ) greater than , perhaps?

Update 20090515: I completely forgot to mention another thing we talked about, and I had promised the group I’d link to. Section 9.9, on “Integers with missing digits” begins with the line “There is a familiar paradox” and a footnote that reads “Relevant in controversies about telephone directories”. I wasn’t exactly sure what this controvery was, but we decided probably it was the fact that the probability of picking a random number out of the telephone book, and having it not contain a 9 (say) is fairly small. At first, I had thought maybe the controversy the footnote was hinting at might be related to Benford’s Law, which I also remembered was just recently in the news (slashdot).

Picking up where we left off last week, we finished chapter 8 today. Most of the time was spent trying to trace through the proofs of the various statements, so I won’t go into too much detail here about that. Many of the proofs had the same flavor, cleverly grouping terms in a polynomial, or setting corresponding coefficients equal in two different representations of a polynomial.

When I had first read the chapter, I didn’t pay too close attention to some of the later sections, for example the section on Leudesdorf’s Theorem (generalizing Wolstenholme’s), and the “Further consequences of Bauer’s Theorem“. However, during our meeting we worked through most of Leudesdorf’s theorem, and we were able to gain some appreciation for the various cases (specifically, why they arise).

One of the theorems in the sections we kinda glossed over was the following (Theorem 131 in the book): If is prime, and , then the numerator of is divisible by . I noted that this is a partial sum for (Wikipedia, Mathworld). Eric wondered if perhaps they were thinking about this sum as a generalization of this function to some finite field, but the modulus of didn’t fit that entirely. Eric also reminded us that closed forms for can be found, while closed forms for are not known.

About

Sumidiot (aka Nick Hamblet) got tired of the lack of math support on Blogger, and forked his blog there. Since then, new math content has shown up here, while teaching (and miscellany) have remained at the other site.