A few days ago, my friend David asked me if I could help him with a card trick. I said I could, hence this post. I managed to pin David down in front of my camera long enough for him to demonstrate the trick; a full explanation follows this video:
You're reading: cp’s mathem-o-blog
Carnival of Mathematics 88
Better late than never, here’s the 88th Carnival of Mathematics. As an editor of The Aperiodical, I’ve been press-ganged into interrupting my holiday to write this month’s edition.
Before I start with the real submissions, I think I’ll abuse this bully pulpit to link to some of my recent blogging efforts. I found each letter’s favourite words, recorded a video proving a nice fact about grids of fibonacci numbers, and wrote an Aperiodical Round Up. I also wrote a jQuery and WordPress plugin to give blog commentors instant previews of LaTeX in their comments. You can try that in the comments section here, if you’d like.
Continue reading “Carnival of Mathematics 88” on cp’s mathem-o-blog
Instant MathJax preview of LaTeX typed into HTML textareas
I’ve completely rewritten my write maths, see maths library to be a little jQuery plugin that attaches itself to editable areas on pages, like contenteditable elements, textareas, and input boxes. When your cursor is inside some LaTeX, a little preview box appears just above it with the LaTeX rendered through MathJax. I’ve made a demo page on GitHub, and the code itself is available there too.
Continue reading “Instant MathJax preview of LaTeX typed into HTML textareas” on cp’s mathem-o-blog
A huggermuggering nonannouncement of an overinvolved knickknack
It’s odd, the process of waking up. Sometimes you can get out of bed and stumble around for an hour or two, maybe even get dressed and go to work, before your brain does anything to differentiate you from a patient in a highly mobile vegetative state. On other days it seems that your mental starter motor catches on the first try and before you’ve even opened your eyes all sorts of brilliantly original thoughts are competing for attention.
Today is one of those days. As I swung my big long legs out of bed the thought occurred to me that the word “cheese” has an awful lot of Es in it.
Fibonacci Grids
I uploaded this video to YouTube last week but I forgot to make a post here. It’s about a moderately interesting fact about fibonacci numbers that David Cushing told me at MathsJam. I generalised it a bit, so I’ve been meaning to write a post for The Aperiodical or do a snappy video or something like that for ages.
I finally decided last week to just sit down and record myself going through the proof, so here’s that video. I deliberately didn’t prepare beforehand, so it’s just under an hour long and contains a lot of thinking out loud.
Converting a stream of binary digits to a stream of base $n$ digits
James Coglan asked on twitter:
Suggestions wanted: how to turn an indefinite stream of bits (01110010…) into a stream of [A-Z] where letters are evenly distributed.
— James Coglan (@jcoglan) June 11, 2012
And I don’t mean just select character codes, I mean select from an arbitrary-sized character set of any length.
— James Coglan (@jcoglan) June 11, 2012
So you have an infinite stream of uniform random binary digits, and want to use it to produce an infinite stream of uniform random base $n$ digits.
The obvious really easy way to do it is to find the smallest $k$ such that $2^k \geq n$, and generate numbers in the range $0 \dots 2^k-1$.
Problems I’m currently thinking about
I’ve been in a bit of a problem-posing mood recently. Hopefully I’ll do some problem-solving soon. Here are a few questions I’ve thought of but haven’t got solutions for. I haven’t done any literature searching, so these might have been done before.
All the problems are quite computery. Maybe I’m a computer scientist, really.
Problem 1: Reordering the alphabet
What reordering of the letters of the alphabet contains the most (contiguous) English words? This is a big search space problem. I did a little bit of tinkering in python, trying first of all to find the single word which contains the most smaller words.
Continue reading “Problems I’m currently thinking about” on cp’s mathem-o-blog