Monday, February 23, 2015

Conic Sections in Play-Doh

Here's an idea for illustrating all the different shapes you can get out of conic sections: get some Play-Doh, roll it out into a cone shape (the "conic" part) -- and also a reasonably sharp knife (for the "sections" part).

First, here's our starting cone:

Note that if you cut off just the tippy-top part then you get a single point:

On the other hand, if you carefully take a shaving down the very edge then it produces a line:

But if you make a slice perpendicular to the base, then you get a perfect circle (of any size you want, depending on how far down the cone you take it):

Make a similar slice at a slight angle and the cross-section you get is now an ellipse:

Take the slice at a steeper angle and you'll produce our old quadratic friend, the parabola:

And increase the angle a bit more (greater than the edge of the cone itself), and you'll produce the parabola's angry cousin, the hyperbola (or really a half-branch of such):

Kind of neat. Full disclosure: the cone gets pretty "smooshed" on each cut (kind of like a loaf of bread with a dull knife), and I had to gently re-shape back into the proper section before each photo. Therefore, this demonstration probably works best in static photography, and would be somewhat less elegant live or in a video. But the nice thing about the Play-Doh is that you can sticky it back together pretty well after each sectional cut, and it's the only material I could think of that would work well in that way. Can you think of anything else?

Monday, February 16, 2015

Sorting Blackboard Test Results

On the Blackboard class management system, tests may be assigned where the order of the questions is randomized for different students (useful to somewhat improve security, make sure no question is biased due to ordering, etc.). However, a problem arises: when individual results are downloaded, the questions still appear in this randomized order for each separate student. That is: questions don't match down columns, they don't match in the listed "ID" numbers, etc.; and therefore there's no obvious way to assess or correlate individual questions between students or with any outside data source (such as a final exam, pretest/post-test structure, etc.). A brief discussion about this problem can be found on the "Ask the MVP" forum on the Blackboard site (link).

Now here's a solution: I wrote a computer application to take downloaded Blackboard results in this situation and sort them back into consistent question ordering, and thereby make them usable for correlation analysis (in a spreadsheet, SPSS, etc.). Java executable JAR file is below, first download that. Test results should be downloaded from Blackboard as a comma-delimited CSV file in the "long download" format ("by question and user" in the Blackboard Download Results interface), in the same directory (save as default "downloadlong.csv"). Then, on the command line, run the JAR file on by typing "java -jar BlackboardResultSort.jar".

The program reads the downloaded data file and outputs two separate files. The first, "questions.csv", is a key to the questions, listing each Question ID, Possible Points, and full Question text. The second, "users.csv", is a matrix of the different users (test-takers) and their scores on each question (each row is one user, and each column is their score for one particular question, consistent as per the questions.csv key). This makes it far more convenient to add outside data correlate success on any particular question with overall results. Ping me here if you have other questions.

Monday, February 2, 2015

Yitang Zhang Article in the New Yorker

The lead article in this week's New Yorker (Feb-2, 2015) is on Yitang Zhang, the UNH professor who appeared from obscurity last year to prove the first real result in the direction of the twin-primes conjecture (specifically, a concrete repeating bounded gap between primes; full article here).

To some extent I feel an unwarranted amount of closeness to this story. First, I grew up very close to UNH (just over the border in Maine), I would use the library there all through high school to do research for papers, and I worked at the dairy facility there for a few summers while I was in college. Secondly, the "twin primes conjecture" is basically the only real math research problem that I ever even had any intuition about -- along about senior year in my math program I think wrote a paper in abstract algebra where after some investigation on a computer I wrote "it's interesting to note that primes separated by only two repeat infinitely", to which the professor wrote back in red pen, "unproven conjecture!". I sort of have a running debate with a colleague at school that it's sort of intuitively obvious if you look at it, while course there's no rigorous proof. Yet.

When I saw this New Yorker in our apartment around midnight Friday after I got back from school, I first noticed that there was some article on math (the writer makes it pretty opaque initially about exactly who or what the subject is). My partner Isabelle immediately said, "For god's sake, don't read it tonight and go to bed angry!", to which I said, "Mmmm-hmmm, probably a good idea." But I did so anyway. Frankly, I got less angered by it than you might expect, because while it's big pile of dumb fucking shit, it's dumb in a way that so stupidly predictable it almost turns around and becomes comedy if you know what's going on. It's dumb in exactly the carbon-copy way, almost word-for-word that all of these articles are dumb -- so it's at least unsurprisingly stupid. Let's check off some boxes...

The "Beautiful Math" Trope

Sure enough, the title of the article is "The Pursuit of Beauty". Paragraph #2 of the article is a string of predictable quotes by some dead white guys about "proofs can be beautiful" (G.H. Hardy, Bertrand Russell). The writer managed to find one living professor who he got to use that word one time (Edward Frankel, UC Berkeley, the proof having "a renaissance beauty", sounding like the author pressed him on the question and was grudgingly humored). And then he gets a hail-Mary sentence on neuroscientists connecting math to art in some lobe of the brain. But Zhang never says that. Nor anyone else in the article from that point.

This is so goddamn predictable that, yes, it's the raison d'etre of this very six-year blog, to respond to that exact piece of nonsense in pop math writing (see tagline above; and the "Manifesto" in the first post). It's bullshit, it's not part of the real work of math. Sure, shorter is better, and it's far more convenient to get at a proof quickly with some heavy-caliber technique or clever trick, and I'd argue this is all that's meant by the "beautiful" trope. Someone gets careless and uses "beautiful" as a metaphor, in the way that Einstein or someone likes to pitch "God" as a metaphor -- when they secretly have some nonstandard definition like, "scientific research reducing superstition" (see: letter to Herbert Goldstein) -- and then it gets repeated by a thousand propagandists for their personal crusades. In the case of a pop media writer, they can latch onto the "beautiful" tag line and feel that they've got a hook on the story, and approach the rest of it like it's an article on Jeff Koons or some other high-society, celebrity scam artist.

But at any rate, the "beautiful math" pitch is entirely isolated to the article title and a single paragraph, it has zero connection to the rest of the story, it's basically just clickbait, so let's move on.

Journalist-Mathematician Antimatter

The broader issue that makes article count as downright comedy is the completely predictable acid-and-water interaction between the journalist and the mathematician. The writer here, Alec Wilkinson, is an exemplar of his industry -- scammy, full of bullshit, and just downright really fucking stupid. We've all met these folks at this point, have we not? Doesn't really know about anything. Has a single journalistic move up his sleeve for every article: "put a human face on the story", make it personal, make it about the people, "how did X make you feel?". (Elsewhere in the magazine, another writer waxes nostalgic for the classic traditions of New Yorker staffers: "all the editors dressed up and out every night for dinner and a show... a shrine of exotic booze...", Talk of the Town).

But here Wilkinson confronts a person who is ultimately patient, disciplined, humble, hard-working, and truth-seeking. And he doesn't know what the hell to do with that. No other professional mathematician had known what Zhang was doing for over 10 years. He received no accolades nor enemies. He doesn't seem aggrieved or jealous that other people's careers advanced ahead of his own. He speaks softly at awards ceremonies and talks. There's no "personal face" meat here.

So here's how Wilkinson responds; he makes the article about himself. Specifically about how he's a stupid damn bullshit artist. The opening paragraph is specifically about how apparently proud he is to know nothing about math, to be unqualified to write this story, and about how he's a fucking lying cheater:

I don’t see what difference it can make now to reveal that I passed high-school math only because I cheated. I could add and subtract and multiply and divide, but I entered the wilderness when words became equations and x’s and y’s. On test days, I sat next to Bob Isner or Bruce Gelfand or Ted Chapman or Donny Chamberlain—smart boys whose handwriting I could read—and divided my attention between his desk and the teacher’s eyes.

Later, here's a summary of his interactions with Zhang:
Zhang is deeply reticent, and his manner is formal and elaborately polite. Recently, when we were walking, he said, “May I use these?” He meant a pair of clip-on shades, which he held toward me as if I might want to examine them first. His enthusiasm for answering questions about himself and his work is slight. About half an hour after I had met him for the first time, he said, “I have a question.” We had been talking about his childhood. He said, “How many more questions you going to have?” He depends heavily on three responses: “Maybe,” “Not so much,” and “Maybe not so much.” From diffidence, he often says “we” instead of “I,” as in, “We may not think this approach is so important.”... Peter Sarnak, a member of the Institute for Advanced Study, says that one day he ran into Zhang and said hello, and Zhang said hello, then Zhang said that it was the first word he’d spoken to anyone in ten days. 

This is not the kind of thing that a drinky, likely coke-blowing, social butterfly bullshit artist has any way of processing. And come on, that's pretty fucking funny; in that regard you almost couldn't make this stuff up. But on the downside it argues that these articles are always thricefold doomed; no journalist will ever write about the practice or results of math in any intelligible or useful way, because they're constitutionally, commercially, and philosophically opposed to it.

This is how predictable it all is: I give a mini-rant to Isabelle and she says, "Oh, he probably just went after something a family member mentioned to him once", and that is in fact exactly what motivated the article (see end of the first paragraph). So frankly I could read about three sentences and map out in advance the progression of all the rest of the article. Hard to get usefully enraged by that; just standard-stupid is all.

The Community of Math

That said, the article does brush up against a real essential issue that I've been wrestling with for a few years now. Many of the math blogs that I've been reading in the last half-decade make a powerful and sustained case for the "community of math", that math cannot be done in isolation, that it only exists in the context of communicating with colleagues. Even that the writing of papers is inherently a peripheral and transient distraction, that the "true" productive activity of math is done verbally face-to-face and via body language with other experts -- writing being a faint shadow of that true work. (Hit me up for references on any of these points if you want them.)

Unfortunately, this hits me something like an attack right through my own person. This is exactly the way that I personally failed in graduate school, and did not proceed on to the doctorate -- by continuing to work furiously in isolation while the rest of the classes basically passed me by. I've recently seen this called "John Henry Disease" in the work of Claude Steele (although there he holds it out as uniquely a phenomenon for black students). When I bring this up to colleagues nowadays, I can tell this story lightly enough that I get a laugh out of them, "Obviously you had to know better than that", or some-such. But a combination of personality and cultural upbringing literally left me completely unaware of the idea that you'd go get someone else's help on a math problem. So in that regard the "math community" thesis is a strong one.

But on the other hand, the whole prime-directive that I've established for my math classes in the last few years is: Learn how to read and write math properly. It's literally the first thing on my syllabi now; the idea that math (algebraic) language is inherently a written language and not primarily verbal, and that this is the hard thing to master if you're a standard poorly-prepared city public high school graduate. That learning to read a math book was the key that got me through calculus and all the rest of a math program (through the undergraduate level, anyway). That the software that runs our world are fundamentally products of writing (see a prior post here). And once I commit to this goal in class, and get most of the students to buy in to it, I've been getting what I think are wonderful and satisfying results with it, incredibly encouraging, in the last few years. Ken Bain's book "What the Best College Teachers Do" hits on this as an even more universal theme: "We found among the most effective teachers a strong desire to help students learn to read in the discipline." (Chapter 3, item #8).

And now here we have, in the very recent past, multiple cases of major mathematical breakthroughs by people working entirely in isolation, effectively in secret, for one to two decades, interacting only with the published literature in the field and their own brainpower. This is what's held out as Zhang's experience. And the same could be said for Perelman with the Poincaré conjecture, right? And also Andrew Wiles with Fermat's Last Theorem. And maybe Shinichi Mochizuki with the abc conjecture? (Here's where the argument rages.) A common theme recently is that with ever-more stringent publishing requirements for tenure, people on the standard academic track must publish every year or two, not meditate on the deepest problems for a decade. And so does the institution actually force isolation on the people tackling these giant problems? Or is it merely the nature of the beast itself?
When Zhang wasn’t working [at a Subway sandwich shop], he would go to the library at the University of Kentucky and read journals in algebraic geometry and number theory. “For years, I didn’t really keep up my dream in mathematics,” he said...

When we reached Zhang’s office, I asked how he had found the door into the problem. On a whiteboard, he wrote, “Goldston-Pintz-Yıldırım”and “Bombieri-Friedlander-Iwaniec.” He said, “The first paper is on bound gaps, and the second is on the distribution of primes in arithmetic progressions. I compare these two together, plus my own innovations, based on the years of reading in the library.”

An aside: I have this exact same issue in terms of my gaming work with Dungeons & Dragons (see that blog here). The conventional wisdom is "obviously we all know that no one could learn D&D on their own, we all had some older mentor(s) who inducted us into the game". And I am in the very rare situation for whom that is absolutely false. Growing up in a rural part of Maine, the only reason I ever heard about the game was through magazines; I was the first person to get the rulebooks and read them; and the catalyst in my town and school, among anyone I ever knew, to introduce and run the game for them. Purely from the written text of the rulebooks. To the extent that there were any other conventions or understandings about the game that didn't get into the books, I never knew about them. Which in retrospect has been both a great strength and in some fewer cases a weakness for me. In short: I learned purely from the book and most people don't believe that's possible.

But back to the article by Wilkinson: he expresses further dismay and incredulity at Zhang's solitary existence, his disinterest in social gatherings, and his preference for taking a bus to school so that he can get more thinking time in. All things which I could say pretty much identically for myself; and all things which our standard-template journalist is going to find alien and utterly bewildering:
Zhang’s memory is abnormally retentive. A friend of his named Jacob Chi said, “I take him to a party sometimes. He doesn’t talk, he’s absorbing everybody. I say, ‘There’s a human decency; you must talk to people, please.’ He says, ‘I enjoy your conversation.’ Six months later, he can say who sat where and who started a conversation, and he can repeat what they said.”

“I may think socializing is a way to waste time,” Zhang says. “Also, maybe I’m a little shy.”

A few years ago, Zhang sold his car, because he didn’t really use it. He rents an apartment about four miles from campus and rides to and from his office with students on a school shuttle. He says that he sits on the bus and thinks. Seven days a week, he arrives at his office around eight or nine and stays until six or seven. The longest he has taken off from thinking is two weeks. Sometimes he wakes in the morning thinking of a math problem he had been considering when he fell asleep. Outside his office is a long corridor that he likes to walk up and down. Otherwise, he walks outside.


There are more things I could criticize -- For example, in the absence of anything useful to say, the author has to hang onto any dumb or tentative attempt at an analogy that anyone throws at him, and is really helpless to double-check or confirm any assessment with anyone else; he literally can't understand anything anyone says about the math, even when interviews multiple professors on the same subject. He refers to Terry Tao like he's just "some professor", not one of the brightest and clearest thinkers on the planet. He has a paragraph on pp. 27-27, running 40 lines on the page, simply listing every variety of "prime number" he could find defined on Wikipedia (probably) -- the most blatant attempt at bloating up the word count of an article I think I've ever seen. Of course, it's intended to make your eyes cross and seem opaque. The exact opposite of a mathematical discipline dedicated to clear and transparent explanations.

But those are just nit-picky details, and we've probably already given the article writer more attention than he deserves. Let me finish by addressing the elephantine angel in the room. Are the true, greatest breakthroughs really made by loners, working in isolation with just the written text, over decades of time? Or is that just another journalistic illusion?