|
|
brute force instead of understanding Thursday, March 21 2013
My head cold is mostly gone, but I'm still blowing enough snot out of my various passageways for pseudoephedrine to be helpful. Also, I needed to crank through some tricky web development stuff today, something for which pseudoephedrine is also helpful. Of course it's often used as a precursor for crystal methamphetamine manufacture as well, and this was why when I reupped for it yesterday at Emanuel's in Stone Ridge I had to present my driver's license. (The monthly limit on sales is nine grams, though even a 48 pill blister pack, which takes me more than a month to use, is only 1.44 grams)
The cognitive task that pseudoephedrine helped me with today involved a web programming challenge: how to allocate the production of a crop over a given number of acres given that each crop has a different acre productivity and also given the goal that equal amounts of all crops will be produced. I went over this challenge in my mind a few times and eventually wrote an algorithm using successive approximation to solve generic problems of this sort to an absurd number of decimal places. But it still ate at me that I wasn't understanding the basic nature of the problem. In the example given, the number 13.5 kept popping up. It was the relationship of the smallest crop-acre allotment to the total size of acres deployed. Where was this coming from?
Only later would I realize that this was a fairly basic algebra problem that could be expressed as:
x*max_prod/prod1 + x*max_prod/prod2 + x*max_prod/prod3...=total_acres
in an example I'd been given, this formula could be expressed as:
x*6/1 + x*6/4 + x*6/3 + x*6/2 + x*6/6=81000
or
x*6 + x*1.5 + x*3 + x*2+ x*1 =81000
or
x(6+1.5+3+2+1)=81000
or
x(13.5)=81000
As algebra goes, this wasn't even all that tricky, though I suspect it was nevertheless my first encounter with algebra of such complexity since the 1980s. The amusing thing, though, was that successive approximation had been working well enough for me not to actually have to bother to understand the nature of the problem. I would guess that a lot of problems that used to be solved by careful understanding are instead solved these days by brute force computation.
For linking purposes this article's URL is: http://asecular.com/blog.php?130321 feedback previous | next |