There's too many kids in the world!
See, you set up a great system going on for tracking a kid's actions and determining how much coal or candy they get. It's easy, and it's foolproof. Why, it's so good that Santa cut the budget for North Pole Behavior Psychology Lab, because he thinks you're capable enough to do it without money.
Now, this is a problem. More and more kids are believing in Santa every day. And the computers you've got running the matrix multiplications to determine each kid's presents? They're slow. Relics from the 80s.
In fact, you just crossed a scary threshold — given the number of children Santa needs to deliver to next Christmas, you don't have enough computing power and time to determine presents for every kid by Christmas Eve. Christmas can't happen.
Unfortunately, thanks to budget cuts and your lack of desire to kill children, you can't implement the first two solutions. Sounds like you have to make optimizations if you want to save Christmas again.
So let's re-examine our pipeline. Identify anything we can simplify.
Alright! So we go from knowing the actions per child (matrix A), to knowing the points per child (A*B), to knowing the presents per child (A*B*C).
Huh. So, when we look at our system this way… why do we even bother with matrix B, the points per action matrix? I mean, we cancel out both terms belonging to B when we multiply A*B*C — we don't ultimately care about points or actions. Can we fold B into C? Create one presents per action matrix, and discard the idea of "points" entirely?
Ooooooh. That's a good idea.
Yes! That is totally possible! In fact, this is one of the most awesome and convenient things about matrix multiplication. All you need to do to combine B and C into a presents per action matrix is… multiply them.
It's the same result as we got before! That's our exact presents-per-child matrix from previous chapter, but we only did one matrix multiplication to get it!
This is called the associative property of multiplication — previously, we did (A*B)*C, and now we're doing A*(B*C), and we get the same results. That is, matrix B can associate with A or C. If B and C are both constant matrices, we can just multiply them together into a new matrix D=B*C and use it everywhere.
So with one quick calculation of D=B*C, you just halved the amount of processing time your computers need to calculate presents per kid! You are really good at saving Christmas, dude.
This entry was posted in Math on September 29, 2013 by walkerb.
Well, your days as an event planner are over. There was a lot of blood at Bacchanal S, and the police are looking for you. So you ditch town, fly to the North Pole, and find a job in Santa's Behavior Psychology lab.
"Naughty" and "Nice" aren't simple concepts, and Santa needs experts to determine which child is which. The lab tracks each child's actions, and each action is associated with a naughtiness and niceness "score"… hey, does this look familiar to you?
Good lord, this is just like the spreadsheets you used as an event planner!
Wait. That can't be right. Your math is correct, but those numbers are way too huge. There must be a logic error somewhere. Shoot, how does this matrix multiplication thing work, again?
Look at that! These units are all wrong. So what are the right units?
Nice! You just solved what presents each kid is getting! You LITERALLY saved Christmas.
This entry was posted in Math on September 15, 2013 by walkerb.
So you got hired as an event planner. Congratulations on your new job!
Looks like Vendor 2 is cheaper for Gala A, Soiree B, and Reception C. You should keep Vendor 1 for Banquet D, though!
Matrix A holds item-to-rent details per event. A row represents a single event, and a column represents the number of a single item-type to rent for each event.
Matrix B holds vendor prices per item-to-rent. A row represents a single item-type, and a column represents a vendor's prices for each item.
If we want to add a new item-type (for instance, lamps) then we need to know how much each vendor charges per-lamp. This means that the number of columns in A (representing item-types) must match the number of rows in B (since they also represent item-types).
And you just invented matrix multiplication. Congratulations!
This entry was posted in Math on September 10, 2013 by walkerb.
What the heck is COM?