Categories
geek just life

mr. cook, we have a problem.

when i failed to join the air force and had to choose another career, i picked informatics, journalism and astronomy, all in the same application form – that’s how clueless i was towards my future. in the end, informatics won, and 7 years later, here i am, still clueless but with an engineering degree! :)
every now and then, on the most improbable situations, the informatics/mathematics part comes in handy, like for instance (and ironically) when i have to fly.

here’s the formal definition of a common problem, known as packing. the next time your mom tells you to stop procrastinating on your packing duties, you can properly explain her how hard that is – and hopefully delay the task a little longer!

  • you have n kinds of items, 1 through n. each item j has a value (sentimental or of importance) pj and a weight wj. the maximum weight one can carry in the suitcase is c, and according to british airways, c=23 kgs.
  • the number of each kind of item in the suitcase, xj, is restricted to zero or one (for simplicity purposes).
  • mathematically the problem can be formulated as:
    maximize \sum_{j=1}^n p_j x_j.
    subject to \sum_{j=1}^n w_j x_j \le c, \quad \quad x_j = 0\;\mbox{or}\;1, \quad j=1,\dots,n.

this is called a 0-1-knapsack problem, which is known to be a np-complete problem. np stands for non-deterministic polynomial time… and that translates into “very hard & time-consuming problem”.

another np-complete problem is called bin packing, which consists of neatly placing different volumes in as less bins as possible. no time-efficient solution has been discovered for these problems.

so there you go. combine the two and you have packing! :D

(and now, back to the suitcases…)

ps – images from wikipedia, more on the subject here.
ps2 – who was stephen cook?

Categories
on the big screen photography traveling

on roadtrips

roadtrip

“Ernesto Guevara: What do we leave behind when we cross each frontier? Each moment seems split in two; melancholy for what was left behind and the excitement of entering a new land.”
from diarios de motocicleta.

if i hadn’t already felt the urge to travel to south america, i would surely get the itch after watching diarios de motocicleta: the story of young che guevara on his south-american continental roadtrip on a bike named la poderosa (“the mighty one”). the film photography is simple and stunning, eye-catching in its rawness.

besides, roadtrips fascinate me, as i am sure they do to many other travelers out there. my only stint at a roadtrip was a 3 or 4 days drive through colorado, utah and wyoming, over a year ago.
it was beautiful and liberating, and we plan to go back to the states and repeat it someday, with a twist: we shall visit an itinerary of odd-named places. it will certainly include highlights like potomac, normal, breakneck, chicken, gringo, frostproof, ding dong and most definitely choconut. no kidding!

above, our detour to visit a place called cisco. :)

Categories
just life photography

happy 2008!

feliz 2008!

2008 is going to be a good year. i have a thing for even numbered years, and i especially like “round” years (or names). as an example, number 7 is kind of spiky, but 8 is round and nice, so i like 8 better. hey, we all need criteria, right?

have a smashing 2008!

Categories
links and ideas

camions-bidons

there was a time when i had to make up all sorts of games and tricks to keep my cousin quiet for a bit (and for my own sanity). i’m sure these cute camions-bidons, by martine camillieri would have made quite a success.
check out her website for an overload of color and creativity, as well as many ideas to entertain children – and yourself!

camion bidon


Categories
just life music

plastic jesus


“i don’t care if it rains or freezes
as long as i’ve got my plastic jesus
sitting on the dashboard of my car basket of my bike

it comes in colours pink and pleasant
it glows in the dark cause it’s irisdescent
i take it with me whenever i go far

so give me my lady madonna
dressed in rhinestones and sitting on a
pedestal of abalone shells

i’m driving 90 but i’m not scared
cause i’ve got my virgin mary
assuring me that i’ll never go to hell”

plastic jesus, jack johnson cover.

i’m so getting one for my bike, just so that i can sing this song whenever i ride it… i love singing when i’m driving (car or bike). makes me happy!