The Knapsack Problem: Discrete Optimization, week 2

I’ve been doing this Coursera Discrete Optimization course with my friends. It’s a lot of fun and I’m learning a bunch. The instructor is a total goofball too, which is a plus. I’ve taken a handful of online courses before, but to be honest, the assignments have usually been pretty easy. Not so with this Discrete Optimization (DO (my initials!)) course! Each week, you have to solve 6 problems, and each is graded out of 10 depending on how well you do. I believe the breakdown is: 0/10 if your answer doesn’t even match the output format required, 3/10 if you do basically anything (even if your answer is quite wrong), 7/10 if you have an answer above some threshold but still not perfect, and 10/10 if your answer is optimal (I guess they know the optimal solution for all of them?). Usually, the problems increase in hardness throughout the set; often, the last one is difficult enough that (I believe we saw this said in the course forums by the instructor) it would be a challenge for people who specialize in DO for a living. I think that’s pretty cool! They usually give you a ton of practice problems of various difficulties, and (though I’m not 100% sure) I think the 6 you’re graded on are usually among those.

So what is DO? I certainly didn’t know when I started this course, though I guess I should’ve been able to guess. Optimization is what it sounds like, finding the best solution you can for given problems. The “discrete” part is that the quantities involved are integers or discrete (that’s the name in the title!!!) components. It turns out I had actually heard of many of the problems that DO applies to before, but didn’t know they were DO. I had heard most of them in the context of P vs NP complexity. read more

Fruits of south east asia!

I forget how I found it, but for some reason I stumbled upon this page of Thai (or more generally, south east Asian) fruits. A bunch of them are really obvious ones (mango, banana, coconut…), but a handful of them are ones I’ve never even heard of. Naturally, I have to try them all.

I mean, isn’t that kind of weird? I like to think I’ve at least heard of most of the major fruits, vegetables, and animals. I don’t mean that I’ve heard/tasted/seen literally all of them, but I usually think that the ones I haven’t heard of are just some small variant of one I already know. Like, if you learn about a blood orange, it’s cool, and yeah, a little different… but not mind blowingly different than a regular orange. It looks about the same aside from the red flesh, and tastes pretty similar. If you hear about moon bears, they’re…basically kinda weird black bears. You get the point. read more

Reading a book in one hour!

When you’re unemployed, you get to do all sorts of things that, if you had a job, you’d correctly judge as stupid, and then not do. Here’s one of them!

I was curious as to how much information I can pick up in an hour. I mean, I’ve gone to lots of talks, but I think a lot of the time it’s because they’re pretty specific, advanced topics (I mean, they’re usually talks about someone’s research). So I don’t think they’re necessarily the best metric for that. Part of why I’m curious is that there’s gotta be some sort of “information retention vs time spent learning it” curve, and I don’t really have a great grasp of the shape of it. I mean, I’m pretty sure that it’s monotonically increasing with time, but I really don’t know where the best ratio of it is. read more

Grouping IMDb top movies by runtime

Howdy!

This is a fun lil one. For an upcoming article, I need to know a list of (hopefully good) movies I haven’t yet seen, with similar runtimes. Now, I could have just scrolled down the list of IMDb.com’s top 250 movies, ctrl + clicking on the ones I haven’t seen, and then compared them by eye, because, to be honest, I think I’ve seen many (/most?) of them (we’ll see shortly). read more

Stickin it to the Myan-mar

Ahhhhhhhhh, Myanmar. “You most likely know it as Myanmar, but it’ll always be Burma to me.”

While I originally planned to go to Thailand, Laos, and Cambodia, and maybe Vietnam, I really didn’t expect to go to Myanmar at all. To be honest, pretty much all I knew about it was that line from Seinfeld and that there’s currently a genocide/ethnic cleansing/refugee crisis happening with the Rohingya in the west of the country being committed by the Myanmar government (more on that later). However, I kept meeting people who told me that it was the highlight of their whole trip in SEA. When I had a few weeks to kill before meeting my friends in Vietnam, since I had kind of tired of Cambodia, it seemed like the perfect opportunity. read more

Dimensionality reduction via Principle Component Analysis in python on face images

Hey there! It’s been a while since I wrote anything other than stuff about travel (oh, don’t you worry, there’s still more of that coming!), so it feels good to write about something like this.

Right now, I’m almost finished with the Andrew Ng Machine Learning course on Coursera. Maybe I’ll write about it sometime, but it’s really, really solid and I’m learning a lot. He’s pretty great at explaining concepts and the course is constructed pretty well. What I really like is that, for the assignments, he’ll take the concept from that week and demonstrate a really interesting application of it (even if it’s a little contrived and may not actually be a practical use for it). Either way, it just gets me to think about the breadth of what this stuff can be applied to. read more

Yes we Cam..bodia

The 4000 Islands are in the very south of Laos, where it borders Cambodia, so Cambodia was naturally my next stop. We boarded a bus to Siem Reap and the SEA nonsense quickly began. We were herded into two minivans for the border, which was only about 15 minutes away. These minivans actually weren’t too bad, but of course they weren’t the ones we’d actually be riding in for the long haul (noticing a pattern here: nice transport for the beginning, then switch to awful transport…maybe because if people saw what they paid for before they got on, they’d demand money back or something?). The border was a typical hilarious chaotic shitshow of nervously handing over our passports, short barked orders, and not knowing what’s going on. The entrance visa for Cambodia was 40 for example, they’d probably invent some “fee” so you didn’t get money back (welcome to Scambodia, as I’ve heard it called). Strangely, after getting our visas, they kinda just pointed us in a direction to walk, and we walked for a couple minutes through these empty parking lots towards a bunch of stores (the “pickup spot” I guess) that probably should have been a lot closer to the crossing point… That was a little strange, and probably an accurate introduction to Cambodia.

On the other side, there was a bus waiting, but we weren’t allowed to get on for a while because the AC was broken and they were fixing the bus. When we finally got on and left, after about…half an hour? we made another stop at some random place, and were herded out again. Apparently the bus had kicked it, and they were sending for a backup. 15 minutes, they told us. Welp, those “15 minutes” turned out to be more like 2 hours, as everyone got more restless and cranky. Eventually two minivans pulled up, but not nice ones like before…truly terrible ones, with not enough space. I was lucky to get my own seat: in the front seat of our minivan, one girl had to sit on another girl’s lap for about 5 hours. About 3 minutes into the minivan ride, the driver picked up his phone, and after chatting for a minute, pulled over to the side of the road. Oh no, we thought…what nonsense is about to happen? He picked up another guy, who he then sat on the lap of, in the front seat. This goddamn country. read more

Vientiane to the 4000 Islands, the La(o)st of Laos

Hey there again! I guess last time I left off, I was about to leave Vang Vieng to head farther south in Laos, by way of Vientiane, first. The main goal was to do two motorbike loops in central and south Laos, but I’ll get to that later. If you want to go south, especially by common bus routes, you’ll almost certainly end up going through the capital, Vientiane. I had heard pretty dismal stuff about it, but figured I’d give it about a day’s worth of attention, which I think was a good choice.

The bus ride from VV to Vientiane was uneventful, and my friend and I who were both heading there decided to check into a hostel a few friends of ours from VV were already at and said good stuff about. The bus depot we got dropped off at was annoyingly far outside of the city proper, which is an unfortunate pattern I’ve noticed (though I’m sure the tuk tuk drivers aren’t complaining). read more

A little catchup: the slow boat and beginning of Luang Prabang

Let’s see, where did my rambling last leave off…

Ahh, in Pai. Well. Let me actually finish up there. Pai is a cool place, but towards the end I had pretty much exhausted what you can do there and seen all the dreadlocks and elephant pants I needed to. There were a couple smaller things I hadn’t seen yet, but I was at the “diminishing returns” part of my stay there so it seemed like I should push on from there. To do that, there are a few options. Pai itself doesn’t have an airport (I think..? Maybe the jungle swallowed it or something..?), so if you want to make a big jump, you could go back to Chiang Mai and then fly pretty much anywhere. Otherwise, you can go by land. There are a few ways to go, but a common one is heading to Laos. read more