Monthly Archives: November 2009

Beginning with LaTeX

Using LaTeX for the very first time. I’m finding the LaTeX wikibook rather useful. I’m using LEd and MikTeX. Simple so far. Here goes nothin’.

Advertisements

The Knapsack Problem and its possible applications on Amazon.com

I’ve never been much of an online shopper. I avoided shopping online as much as I could. Until recently.

I discovered Amazon’s Mechanical Turk just before I left India. I created an ID with my India address and forgot all about it.

Until a few weeks back. I made some money on MTurk by participating in surveys, transcription, stuff like that. And then I wanted to transfer it to my US account.

Nope, nada. You can’t. You can only get it delivered to your India address. Which will take six weeks. And $4. And you can’t change the address unless you delete your account (and lose your money) and create a new one.

So the only other option I have is to convert it to Amazon.com balance. Which I did.

And after buying stuff for friends and family on the website, I now have a modest amount left to spend on myself. Let’s say I have $15.

I want to know what I can get for $15 in books. What sort of combinations. Woody Allen + Milan Kundera? Artemis Fowl + Le Petit Nicolas? What am I missing out on? What can I buy which is better?

So… this can be considered a knapsack problem. It occurred to me after my situation reminded me of this xkcd cartoon:
XKCD travelling salesman + knapsack problem

So what is the Knapsack problem? I’ll explain the simpler, more common 0/1 Knapsack Problem. So you have a set of items. Each item has a weight w and a value v. The knapsack can hold at most a weight of W. The problem is to choose which items to fill in the knapsack, such as to maximize the total V in the knapsack, while keeping the total weight under W. You can learn more here.

My Amazon.com problem can be considered a knapsack problem with the weight w of each item as its price, and the value v as how much Amazon thinks I’ll like the item. That of course is possible using collaborative filtering (yes! I know a term!) and other techniques. They can also use their ‘frequently bought together’ feature here.

Would others find it useful? Yes, if they are on a fixed budget like I am. Or if they want to buy just enough to be eligible for Free Super Saver Shipping.

Would it be possible in real time? I’m sure something can be worked out there.

And…. crowdsourcing this… any recommendations for nice books worth buying under $15?

On an aside, it’d be nice if WordPress.com had suggestions for most-frequent tags, and asked if we want these tags to be converted into categories.

And… Happy Thanksgiving! Wish you the best of Black Friday deals!

Creating IPhone Mockups using Adobe Fireworks

I’ve taken an introductory course in Human-Computer Interaction, and as part of it, I need to create paper prototypes of an IPhone app. We folks considered actually doing it on paper, as our instructor suggested, and decided it’ll be way too much of a pain. We found these rather useful links which told us how to use Adobe Fireworks for creating iPhone mockups.

First on is the link to download a trial version of Adobe Fireworks, or buy it, if you so wish. Here.

Then this toolkit by folks at Blogspark, where every element you need has been redrawn as a vector so that you can edit it to your heart’s content, copy-paste, drag-drop… here.

And finally, this video explaining how to go about making iPhone mockups using the toolkit. Here.

It’s really really easy. Even a total noob like me, who has no idea of what looks good and has no experience of designing goodlooking things on the Net could come up with rather slick-looking iPhone screens. It’s great that there’s a framework like Fireworks which is designed explicitly for web prototyping. Fifteen minutes into the video, and you should be able to figure out most things on your own.

Damn awesome. I’m using Fireworks much more often now.

The Google Earth API

I’ve been using it for the past couple of months, for visualizations.

Here, go on and read the documentation. It’s rather well-written.

The short of it: You can access the API using Javascript. But the fun doesn’t begin until you’ve begun with KML.

More coming up. I’ve been working on this quite a bit.

%d bloggers like this: