## Archive for **July 2011**

## Linear Inequalities

I had discovered that my inequality problems didn’t need the full power of a general constraint solver, but I hadn’t realized just how overkill it was. While trying to figure out how to determine whether a particular problem is unsolvable, I encountered references to linear matrix inequalities and convex optimization. I hadn’t considered the situation as an optimization problem, but it makes sense to aim for the fewest number of ballots; even some of my hand-coded attempts had tried to start from zero and work upwards.

The linear matrix part was a real surprise. I had learned linear algebra in college, and had used it in quantum physics problems, but hadn’t used it to solve inequalities before. It turns out that there are some tricks for it, particularly when the variables are non-negative integers. The main trick seems to involve the use of a “slack” variable, allowed to be positive, to turn the inequality into an equality.

Beyond that, however, the math is a bit beyond me, not least because my Handbook of Mathematics is a dense mess of jargon. Even more to the point, it has already been programmed several times over, so I shouldn’t need to do so myself. Unfortunately, PuLP and GLPK are giving me incorrect solutions, so I don’t have anything real to report just yet. It’s possible that I can fix the input, but I might need to try another program.

## AB>AC>AD>BC>BD>CD

When I first envisioned this project, I had no idea that it would be so easy to completely ruin the elections. Even starting with the very first and arguably simplest matrix, AB>AC>AD>BC>BD>CD, I’m finding it possible for any candidate to win.

## Thoughts on Postmodern Perl

Some time ago, I read Larry Wall’s talk about postmodernism. Since then, I’ve had a couple of things on my mind, off and on. First, if postmodernism is so great, why don’t I like Perl anymore? Second, that I should try the Vorkosigan books. I’m still in the middle of each, but at least I have some thoughts.

## Quick DS Game Reviews

While visiting Legoland, my companion discovered that the Lego video games are quite a bit of fun, and wanted to purchase some. However, we at the time lacked a supported platform for them. Sure, we could buy the Windows ones in the hopes that they’d run under Wine, but there was always the chance that we would just be throwing away money in exchange for frustration. So, when our tax refund came, we decided to try a Nintendo 3DS. It has since become a major time and money sink for us, but at least it’s enjoyable.