October 30th, 2008
Last night I was looking for interesting programming problems, and I came across this page about the Möbius Function. It’s a pretty simple idea, although I have no idea how August Möbius came up with the idea in the first place.
Given a positive integer n, the Möbius function μ(n) returns:
- 0 if the number is a multiple of a square
- -1 if the number has an odd number of distinct prime factors
- 1 if the number has an even number of distinct prime factors
The n = 1 case is a special case; μ(1) is defined to return 1.
I thought this would be a fun little problem to play around with; it’s all about generating the list of prime factors for the input value. A number is a multiple of a square if it has any duplicate prime factors; for example, 12 = 2 × 2 × 3, so it is a multiple of a square, and μ(12) = 0.
An interesting little related problem is to find runs of numbers for which μ(n) is 0. For example, the first run of three multiples of squares is {48, 49, 50}. The first run of six square-multiples starts at 22020.
So, I wrote a Scheme program to implement the Möbius Function, and to find runs of square-multiples; here it is if you want to take a look! It was pretty fun, although the program starts to get annoyingly slow when hunting for runs of 7 or 8 square-multiples. I would have to upgrade to a much faster language if I were going to do something like that. Or perhaps there’s something I can improve in my implementation…
Posted in Hacking | No Comments »
October 28th, 2008
If you ever liked Rubik’s Cubes, check out these beasts: V-Cubes
The short version is that some professor figured out how to make Rubik’s Cube puzzles with sizes all the way up to 11×11x11. Right now his company is selling up to 7×7x7 “cubes” (they are actually slightly rounded), with larger versions in the offing.
I decided I just had to check these out, so I went ahead and ordered the set that includes the 5×5x5, the 6×6x6, and the 7×7x7. Should be fun!
Posted in Uncategorized | No Comments »
July 31st, 2008
For about the last month I have been really working hard to rearrange my working area at home, because it was just unusable before. I didn’t have enough room to do much of anything, and what little room I had was really unenjoyable to use.
So, I got a new desk - a really nice large desk with plenty of filing space, and I have been cleaning things up and throwing things out like crazy. But the last thing I needed was a storage cabinet, for all the odds and ends that couldn’t really go anywhere else. Blank media, blank paper, tools, planispheres, that kind of stuff. (Actually, I already have a good place for my planisphere…)
I finally found the storage cabinet I wanted on Office Depot’s website, so I ordered it earlier this week. I got an email confirmation with details on how to check my order status, so I went ahead and checked out the order page.
Lo and behold, the very first order status, before anything has actually happened, is called “Buyer’s Remorse.” What’s up with that??
(The only thing that made me feel any remorse was that the estimate said it was going to take a month to get my storage cabinet.)
Posted in Uncategorized | No Comments »
July 30th, 2008
I was browsing through MSNBC.com (the CNN.com clone) this morning, looking at some of the pictures of the Chinese Olympics facilities, and lo and behold, I came across this picture of the aquatics center:
The pattern on the wall is called a Voronoi diagram, and is formed by taking a bunch of random points, and dividing the space into regions that are closest to a particular point. The boundaries are lines that are equidistant between two points.
The ceiling of the aquatics center uses the same technique:
Who knew?!
Posted in Uncategorized | 3 Comments »
July 29th, 2008
Evidently there was a sizable earthquake today.
Unfortunately, I didn’t feel it since I was in the swimming pool when it happened.
So now I am trying to figure out if it is a massive nationwide conspiracy.
Posted in Uncategorized | 1 Comment »
July 21st, 2008
A while ago a friend sent me a link to an article called Vogue’s 8 Steps to Hamburger Perfection. The article is actually based on an interview with Jeffrey Steingarten, who frequently appears on Iron Chef America, and is highly entertaining primarily because he is just so disagreeable with everyone. He is mesmerizing to watch at times, because he is so inventive in devising ways to crush the spirits of other people.
Anyway, the article goes through and describes how to create “the perfect hamburger,” although it focuses primarily on the preparation of the meat patty. This is only one of many factors in preparing a perfect burger. But, I am also a bit obsessed about perfect hamburgers, and I had never tried grinding my own meat for making burgers, so I decided that it was worth giving this whole thing a try.
Read the rest of this entry »
Posted in Food | 1 Comment »
June 19th, 2008
The summer break is finally here, and I for one am very excited about this summer. This year I have a SURF student helping me out with the implementation of my “educational database system” in Java. The working name is currently NanoDB, although I am certainly open to other suggestions.
Read the rest of this entry »
Posted in Databases, Java | No Comments »
June 18th, 2008
A few days ago my WordPress installation was hacked. This is not a big surprise, since I haven’t been keeping up with the releases as they came out, and there have been a lot of security bugfixes along the way.
The hack was also very subtle, or it didn’t really accomplish a whole lot. I am not entirely sure what to make of it. But the exploit basically involved using the WordPress upload functionality to drop a PHP script into my /tmp directory, and also to ensure that it would always be run when a WordPress page was rendered.
Fortunately, when this happened, it broke certain parts of my website, so it became obvious pretty quickly. Also, fortunately, I keep a week’s worth of backups around, so if I catch a problem right away then I can roll back my installation to the day before the problem.
So that’s what I did this time; I rolled back my website software to before the hack, then I applied the latest and greatest upgrades, and finally I went through some of the “site-hardening” guides for making it much harder to hack these pieces of software.
We shall see if it actually solves the problems! And I for one will be much more diligent about applying upgrades when they come out…
Posted in Website | No Comments »
June 3rd, 2008
Finally I have an Uninterruptible Power Supply on my server! “Uninterruptible” is decidedly over the top, but at least I’ll get clean shutdowns now if the power carks it on me.
I went ahead and got one of the APC battery-backup systems, a Back-UPS ES 750VA model. (This model is discontinued now; APC has a new, more streamlined version with the same general features.) The UPS has a port that allows you to connect it to a USB port, so that the power supply can tell the computer that things are about to get ugly. I still need to set up the power-monitoring software on my Linux box, but after that, I should be all set.
Posted in Computers, Website | No Comments »
June 2nd, 2008
At long last, I am finally getting back to building my 13.1″ telescope!
The last time I did anything with that beast, I think I had just finished the 320-grit grinding. The surface looked great; reflections from the wet mirror were really beginning to look sharp. But, there was one little problem: the mirror’s focal length was awfully long. I was looking at a telescope that would probably be 6-7 feet tall, and for a 13.1″ mirror that is a little silly. I didn’t want to have to stand on a stool just to look through my little telescope. For an 18″ aperture, that might be completely reasonable, but for a 13″ it’s just silly. Going back over my mirror-grinding e-mails, I think my technique was causing the problem. Regardless, at the time I was pretty frustrated with the thing so I wrapped it up and put it in a box for a future time.
Nearly five years passed… and in the meantime I decided that what I really needed to do was to just go back to the beginning and deepen the curve of my mirror, then go through the intermediate stages again with a little more care. It took a while for me to warm up to the idea though. Mirror-grinding is hard and painful work. I think I needed to forget how bad it was before I went back to try again!
So, I finally got around to ordering more mirror-grinding grit from Newport Glass Works, a pretty cool company that I definitely want to use again once I get this telescope done and begin working on the next one. I ordered a grit-kit that contains all of the different grit-sizes, along with cerium oxide and pitch. The grit-kit showed up today (my last day of lectures, quite convenient), so I should be able to get back into the mirror-grinding pretty quickly. This should be a lot of fun!
Posted in Telescopes | No Comments »