## Towards a Sage Problem Server

### Problem Statement.

I’ve finally been making some progress towards building a Sage-based ‘problem server,’ as we were talking about way back in January.  It’s clear that the tools developed have a wide scope of use.  Before building something that gives open questions and reacts in really interesting ways to input, a stepping-stone is to build something that serves up individual math problems and asks for an answer.  In some sense, such things are already done by Webwork and Moodle with varying degrees of success, but building a nice implementation would allow some new directions.

Now, I should stress that I think WeBWorK is pretty awesome, and has some really transformative potential.  I’ve been encouraging its use in Kenya, and it’s been extremely interesting seeing it used in service courses in Strathmore University and now Maseno.  These are places with ever-increasing class sizes, and a well-designed online homework tool promises to greatly improve student comprehension of the course material.  The big database of existing problems in WeBWorK is also really helpful; there are over 26,000 problems in the Open Problem Library.  There are three issues with WeBWorK that a new implementation could/should address:

1. Modularity: WeBWorK is a pretty monolithic piece of software.  It includes three essential components: a problem server, a problem database, and a learner management system (LMS).  Basically, these should be busted out into three genuinely separate components.  Breaking out the problem server allows easy integration into Moodle or another well-thought-out LMS, or else integration directly into things like online textbooks.
2. Modernization: The WeBWorK codebase was mainly developed some time ago, and new versions are slow to come out.  (The last stable release is from December, 2010, over two years ago.)  The interface is also decidedly…  Clunky.  There’s a natural question of how one could improve the system using modern AJAX-type tools.  Better interactivity will lead to a much better user experience.  Things like one-button signup with Google or Facebook accounts is one thing I can think of off the top of my head that would greatly improve the user experience.
3. Ease of Writing Problems:  Currently, WeBWorK problems are written in a highly idiomatic version of Perl.  I was interested in writing problems a couple years ago and got the feeling that it was, in the end, a bit of a black art.  The documentation is a bit scant, and most mathematical objects have their own idiomatic libraries.  Switching to a python/sage framework would mean that writing problems should become much easier: Sage already recognizes all of these mathematical structures.  And if the problem definitions are in python, we’re really using the same syntax as our Sage work.  This should make it much, much simpler to pick up a bit of Sage and then start writing problems.

## Amagoro Library Visit

This weekend I took another trip out to Amagoro to meet see the new Amagoro library, opened by a joint effort of Kiwimbi Global and the Amagoro city council.  The library opened on February 15th, while I was on a trip to Nairobi, and by all accounts has seen heavy traffic ever since.

I set the groundwork to leave a couple Raspberry Pi computers at the library some time after elections; right now they’re still working on getting electricity together.  In the meantime I left a Pi with Jevin, the tech-guy for the Elewana project, so that he can become familiar with the system.

I also met with three groups of primary school students, about to take their final exams before going on to secondary school.  With all of the groups, I talked about how computers work, and the importance of math and computers to all of the various future occupations they were dreaming about, ranging from nurses to engineers.  (One students wants to be a ‘computer wizard’ when he grows up!)  Hopefully planting some Pi’s with interesting resources will help some of the students get where they want to be.

## Video Workflow

Mike Zabrocki asked for some kind of run-down of how I’m building the videos for the algebraic structures notes. So here’s a quick run-down! There are currently two finished and five more in the pipe.

## Looking Forward

As the term gets underway, I’m working on a number of projects trying to address some of the issues that I discussed in the Looking Backwards post…  I was chatting with Thomas Mawora yesterday, listed off all the ongoing projects I could think of, and came up with five.  (Or up to seven, depending on how you count it…)  It’s a lot, but luckily there’s a good deal of overlap, so work in one place often helps another project move forward.  If you’re going to spread yourself thin, you might as well be maximally efficient about it.

## Online Problem Solving – Problem Statement

One of the big discussions we’ve (myself, David Stern, Toni and Alan Beardon, and occasionally David Minga) been having these last couple weeks is, ‘How can we develop online materials that do a good job of teaching problem solving?’  In a lot of ways, a good problem solving course is one of the most important parts of an education in mathematics.  One gains a flexibility in approaching problems well beyond trying to reproduce an answer on an exam, and encounters numerous techniques and ideas that will motivate later coursework which might otherwise seem really dull.  (Linear algebra comes to mind: it’s stupidly important, but can seem really obtuse if you encounter it in a void.)  General problem solving skills also translate to a wide variety of contexts outside of mathematics: How do I approach this issue flexibly and adapt it into something I can address with the tools available to me?  Furthermore, can I solve bigger problems with my tools than the one immediately in front of me?

The best solving courses take the form of a conversation between students and teachers.  It’s about developing the skills to get started, to actually act on a problem creatively, rather than reproduce what a teacher tells you.  So a good problem solving course typically focuses on getting the students to actually solve problems, with a relatively small amount of guidance and advice from the instructor.

But this method is heavily reliant on reactive, non-linear instructor interaction.  Generally, it’s agreed that this is at the core of why it’s hard to put high-quality math courses on line.  How do you foster creativity with a computer interaction?

## Pi+Sage

After a great deal of effort, I’ve finally finished compiling Sage 5.5 on the Raspberry Pi.  It seems to be basically functional; it starts and adds 2+2 successfully.  (So already it’s doing better than Trurl’s Machine.)  I’m currently running the full test suite, which could very well take a few days.  We’ll see when it gets there.  For now, here’s a link to a binary; drop me a line if you have trouble with it.  To get started, extract it with:

`tar -xvpf sage-5.5-pi.tar.bz2`

Then cd into the resulting directory and run “./sage” from the command line, or set up a link which runs “[full-path-to-sage]/sage -notebook()]”, which will automatically open a sage notebook in a browser.

If you’re curious about building sage yourself, there are details after the jump.  It requires a bit of blood and something like 3 days of processor time, with somewhere south of 3 days of additional time used by the swap memory.

## Fun with the Raspberry Pi

One of the many projects we’re planning to run involves getting some Raspberry Pi computers into rural libraries and/or community centers and giving youths a chance to learn programming.  We’re particularly looking at bringing on just-graduated students, who typically hav about eight months of dead time between the end of secondary school and the start of university.

So I’ve gotten my hands on a couple RP’s; the last few days I’ve really started hacking around with one in particular.  My short-term goal is to get a working Sage binary together, built for the Pi.  (Admittedly, I haven’t tried the ARM binary at sagemath.org, but it claims to not be built for the particular processor in the Pi.) It will generally be a good public service to get a Pi-ready build of Sage out there in the world.  One will probably need an 8gb sd card to run it properly, though, as the binary will probably weigh in at a bit over 2gb.

## A Small Exercise in Categorification

To celebrate the fact that I’ve finally got latex working on the blog, I’m going to bore you with a post about combinatorics and categories…

After some nice student questions in the Foundations course the other day, David and I were playing around with the number of surjections that exist between finite sets. And somehow this led down the road of writing the number of maps between two finite sets as a sum over the number of pre-image sets. There’s a very nice formula for this, actually. The number of surjections ${rm Sur}^n_k$ from set of $n$ things to a set of $k$ things is given by $k!S(n,k)$, where $S(n,k)$ is the Sterling number of the second kind, which counts the ways of partioning an n-element set into k subsets. (And it’s pretty easy to backwards reason why the number of surjections is this number!) The number of injections ${rm Inj}^n_k$ is the falling factorial, $(k)_n=k(k-1)cdots (k-n)$.

## Akirachix MobileGarage

Today is the kick-off of the Maseno MobileGarage, a two-day boot-camp hosted by the Akirachix, a group promoting ITC development for women and more generally.  The idea is to give trainings on mobile application development to the local students.  I gave a short 15-minute talk for the kick-off emphasizing the importance of developing open-source tools in addition to focus on winning the lottery in the app store.

With luck, I’ll be able to poach an enterprising undergraduate to help develop an Android version of the photo-uploading script I wrote; I think it would be a great app for getting student work up on a website quickly and easily, which facilitates peer-learning and peer-review of student submissions.

Good times!

## Sage for Specht Modules

As the strike drags on, I’ve had some time to actually do some maths.  In particular, I’m preparing to run a weekly seminar on using representation theory for certain statistical problems.  The plan is to work from some old lecture notes by Persi Diaconis entitled ‘Group Representations in Probability and Statistics.’ These deal with, for example, how long one should apply a random shuffling process before the thing which is being shuffled is well-mixed.  Particular examples include the question of how many times one should shuffle a deck of cards, and how long one should let a random walk on Z_n run before we can be reasonably sure that every point has been reached.  There are numerous real-world applications of the results, and it uses a lot of first-rate representation theory along the way!