Tuesday 2 December 2014

The dreaded problem-solving episode

So. Hi there, reader. In 165, my favorite lectures were always the problem-solving lectures, and not because it meant we weren't technically learning anything new! Rather, I really enjoyed the experience, each time, of bashing my brainpower against some problem, even when I didn't solve it. It would be the most apt for me to talk about the most recent problem-solving lecture, since it happened so recently, but the one I really enjoyed the most was the first one; the folding problem. This is most likely because it was the one I was able to solve the most completely on my own brainpower, without the use of the hints on the back of the page and whatnot. In fact, the most recent problem, the diagonal problem, I wasn't able to solve at all, which was frustrating. Anyroad, back to the folding problem. Danny had just lectured that week about the whole "positive mental feedback" that your brain induces when you solve a tough problem, that sort of rush of natural opioids, as he described it, and the reason that problem was my favorite was because I could absolutely understand where he was coming from with that explanation. Despite the fact that I'm sure it was an easy problem, and many of us solved it, and I shouldn't feel special for doing so, I really felt that rush of endorphins upon figuring it out on my own. Okay, on to describing the problem-solving process. I'm sure you were all present, but it was a long time ago that we did the folding problem, so I'll reiterate my understanding of the problem briefly: we were asked to fold a strip of paper in half several times (always so that the left edge was on top of the right edge), and try to figure out a rule by which one could determine the order of creases that pointed up or down when the strip was unfolded again. My personal plan for solving this problem involved mapping out the first few iterations of the problem, so I created an input/output table, where the results for each input (an int, a number of folds) were expressed by a series of Ds and Us, representing down creases and up creases, respectively. From there, my plan was to look at each sequence and determine its relation to the next sequence, the same as figuring out any pattern. Upon doing this, I realized that each output in the table contained the previous output within it (a theory that was validated when hint 1 was revealed). Upon further analysis, I realized that the relationship between the previous output and the current one was that the current output always contained a central D, in the dead center of the line of Us and Ds, and then the entirety of the previous output. From there, having figured out how the second half of the output was structured, I looked back at the first, and realized that it was essentially an inverse mirror of the second half, where if both begin outwards from the central D, then for every D or U in the second half, there existed its opposite in the first half. For example, in the output UUDUUDDDUUDDUDD, I have marked the central D, and you'll notice that if you count outwards from that D, every U on the right side is matched by a D on the left side, and the same rule applies to every D on the right side. I chose to refer to this as the inverse of the previous input. Thus, the solution/ the rule that this problem followed was as such: For any input n, the output was (inverse of n-1) + D + (n-1). I don't know why I enjoyed solving that problem so much at the time, but maybe it was just because it was a different kind of thinking, and I could feel capable for once, unlike when I'm left behind by some of the regular material. Alright, that's all for now. Thanks for reading!
-Gabe