Wednesday, December 23, 2009

A Renewed Presen(ts/ce)

And thus begins the latest infusion of life into this safety-valve-for-my-stream-of-consciousness (cleverly disguised as a voluntary continuation of an Honors Program assignment), which has sadly remained in a state of suspended animation for nearly one year due to a lack of what I'd like to describe as time (which is true to some extent – this past semester has been rather the opposite of Willy Wonka's favorite means of encouraging his tour group to continue their forward progress)...if not for the fact that to make such a claim (which, you will note, I have not actually done – I have merely indicated an unfulfilled desire to explain my absence by such means alone) without qualification would bring down upon me the fullness of guilt associated with the propagation of untruths through omission. For were I to make such a claim, the loyal reader (that ever-popular denizen (of uncertain existence) of hypothetical situations) would quickly point out that several-month-long period of time, named for the season in which the latter portion of its days reside, during which my daily activities were characterized by a distinct lack of presence in Portland, and inquire as to the applicability of the preceding excuse to that portion of the space-time (well, the space portion really isn't important – to make a horrible and questionably-accurate comparison to Statistics, they would be inquiring as to a region in the marginal distribution of time across all space) continuum (Oh...I almost forgot...my days were also devoid of classes during that time period – which would probably be a more likely impetus for one to pose the preceding query). (Note that I'm describing this as a hypothetical situation, considered in response to my own misgivings about such an incomplete explanation, to avoid accusations that I have engaged in time-travel and mind-reading, and the resulting tangents) The answer to which, if answered on a scale of 0 to 1 (no, I'm not telling you (a term which was discussed at length in my previous conveyance) whether it's discrete or continuous, nor whether it is linear, exponential, logarithmic, or (I suppose this sentence, due to its failure to participate in my experimentation with hypothetical situations, qualifies as a potential reading of minds, but to examine that topic at length would be akin to berating a deceased equine, and I have no desire to become the subject of a DOS attack (or worse) originating from (the following is not a misspelling of a rather-nonviolent (to the best of my knowledge) flat bread prevalent in Greek cuisine) PETA) completely arbitrary), would be relatively close to 0. Although by many standards, even 1 is relatively close to 0, so I suppose I should actually come out and state I would be unable to claim a strong causal relationship in that situation. For I have also suffered from a condition whose name varies with the observer, but which is characterized by a combination of lack of motivation, lack of inspiration (I do plan every aspect of these entries - it's not like I just sit down and type whatever comes to mind. What's that? You doubt (obligatory reference to psychic powers)? The clear direction and strict structure of these words should present irrefutable evidence...wait...the evidence may not necessarily be in my favor. I plead the Third (For, were I required to quarter troops in my house, they might be able to watch my writing process...in which case that action would be a form of self-incrimination, against which the Fifth Amendment protects me) Amendment) and simple forgetfulness. However, I have come to set things right with this Special Edition Christmas (not Holiday!) Special (brought to you by Repetition, Redundancy, and words that start with the letter R) Post. I even got started off right with a title which, depending upon one's chosen perspective, is either a straightforward description of the purpose of this post, or a nonsensical statement which accepts a horrible disagreement in number between article and noun for the sake of a mediocre (yet seasonally-appropriate) pun.

And now, for our feature presentation:

I have solved the Twelve Days of Christmas!


After listening to this traditional Christmas song far too many times, and engaging in conversations regarding the outrageous purchases made by the true love, I found myself wondering exactly how many of each gift the singer received by the conclusion of the twelfth day (not night, for Shakespeare would be of little assistance in such calculations). Rather than simply count up the gifts, I attempted to derive a general formula. My conclusion is that, if n represents the first day on which a gift is received (for example, n = 5 for Golden Rings), then we can obtain the formula:

Quantity of gift received = n * (13 – n)

Proof: This gift is given from the nth day until the 12th day. Applying the standard formula (b – a + 1), this gift is given for 12 – n + 1 days, which simplifies to 13 – n. Multiplying by the n gifts of this type received for each day on which it is given, we arrive at the above formula.

Of course, I didn't want to simply stop there...I have a general expression, and I should try to obtain some more useful results from it. For example, of which gift did the true love give the largest quantity.

We multiply the general expression out to obtain 13n – n2.

We must find critical points, so we take a derivative and solve : 13 – 2n = 0

We have a critical point when 13 = 2n, or n = 6.5.

The second derivative is a constant -2. Therefore, by the test named for derivatives of the aforementioned order, this critical point is a local maximum (which, because this quadratic function is a downward-facing parabola (negative coefficient on n2, is also a global maximum).

However, we are dealing with discrete values; there is no 6.5th day. By symmetry of the parabola, however, we know that n = 6 and n = 7 will represent the discrete values for which this function is maximized.

Plugging these values in to the general equation, we find that the true love gives 42 each (It is a coincidence that he/she gives a maximum of the answer to life, the universe, and everything? I think not.) of Swans a Swimming and Geese a Laying.


I was also interested in the total number of gifts given. I will spare you the full showing-of-work (it is a simple summation of the general formula), but the true love ultimately gives 364 gifts (actually, 376 if the partridge and the pear tree are considered to be independent units). In other words, the true love could have spread these gifts out, and given one on each day of the (non-leap) year except for Christmas. Whether this would have been a more desirable means of delivery, I am not qualified to say. Some choose to receive their lottery payment as a lump sum; others prefer monthly payments (of course, this is not a completely valid analogy, as there is a difference in payout between these two choices, but the concepts remain sufficiently similar for me to feel comfortable publishing such a comparison).


Well, this concludes our Christmas broadcast. We hope that you have found it entertaining, enjoyable, and not overly full of misused first-person plural pronouns. Please feel free (and indeed, encouraged) to check the above mathematics for validity and post your findings and/or any other interesting results which you are able to derive in the comments section below.


Until my next post, (which will hopefully occur after a shorter period of inactivity than did this one), I wish you a Happy Christmas, a Merry New Year, and a Joyous Epiphany.

Farewell for now...

Elyk Samoht Yenraek

Sunday, January 11, 2009

In Which The Author Returns To His Stated Purpose

And, I suppose, in which he continues, perhaps initiating a tradition – which will remain to be seen – the time and energy which might at one point have been devoted to creating a long-term plan for this blog has been usurped by the time and energy that has gone into planning out my rather unusual course schedule so as to ensure that my study abroad plans do not prolong my presence here at UP for longer than the average number of years(to clarify (but not to say it outright – what would be the fun in that?), I don't want to spend more time in college than I did in high school (no, I didn't get held back or skip a grade) – a statement which, in case you (a pronoun which may be singular or plural depending on how many people end up mentally processing this test – luckily the support in the English language for generics is more akin to that of Java (which I realize I've previously compared to Esperanto – the transitive property is not intended to hold for my similes. Although there are many who wish for English to become the universal language of planet Earth, an intention which I believe the creators of Esperanto shared) than of c++ - a simile which raises the question of which action in natural language is akin to compilation of a computer program. I would say that compilation is analogous to interpreting the meaning of a sentence. The parsing of the source code would be analogous to the mental OCR of the source text and the subsequent division into sentences and the components thereof (an action which for many is subconscious, the exception being those occasions when a grade-school or high-school teacher forces them to perform that rather-pointless-in-my-opinion task known as sentence diagramming. (and perhaps when attempting to make sense of the deeply-nested parentheses typically found here (a location which is intended to refer to this website, and which is discussed in depth in an earlier post) – but I digress) For those readers who are fortunate enough to have been spared this ordeal, it's a similar process to the conversion of mathematical statements into RPN, the difference being that RPN is actually useful for programmatically handling order of operations.) - if only compilers ability had sentences incomplete understand humans like have. Or, on second thought, perhaps I should be grateful that my compiler will always ask for clarification rather than attempting to make assumptions regarding what I wish to do – see Internet Explorer if you still believe it wise to provide computers with the human ability to make assumptions when the meaning of a statement is unclear.) are wondering (since I clearly lack the psychic ability to foresee whether such a question will arise in the mind of any of my readers) is intended to express not a dislike for life here on the Bluff (here, “here” performs its more natural function of referencing a physical location – although I am writing this not from the Bluff but from several miles above sea level en route from San Diego to Portland. Fortunately, The Bluff is an equally ambiguous term, referring either to a spot on campus, then entire campus, or the University and the neighborhood surrounding it) but rather a lack of funding for longer than the traditional four (Zut! I was doing so well and then I had to go and say outright that number which I had been so subtly hinting at. If only life had an undo button.) years. Not even my individual posts are planned in most cases. This post was one of the few exceptions, as the title indicates. In addition to continuing to spoof literary naming conventions, I intend to return to the mandate contained in the assignment which provided the impetus for the formation of this blog: to document my experiences as an engineering student at the University of Portland, specifically my experience last summer as I took Data Structures I through National University's online education program. Yet due to my prior tangents I fear I lack the space (in the attention span of some of my readers) for an in depth description of all that I experienced. I would have to describe how, contrary to my belief that online education would offer a flexible schedule, the professor desired the entire class to sign on for a two hour period several times each week, and my need to make do with the recordings of the class sessions due to the impracticality of maintaining such a schedule while traveling back to Portland. Or how the class sessions consisted mostly of the professor reading Powerpoint slides, without any elaboration on the bullet points which appeared, over a low quality audio link, which due to its emphasis on mid-high frequencies quickly became painful to listen to. And then there was the final exam, which, like the class sessions, was scheduled for a specific three hour period, with notification of this time provided only a couple of days beforehand. I had to request an extension of that time period, being gone that entire day at an event which had been planned for months. Lest it be thought that I am simply being unreasonably negative, I will say that I do feel like I learned the material – but I basically paid a large sum of money to teach myself the course. Additionally, the faculty were willing to allow me to work around my schedule constraints, but I feel that for a program which frequently touts its flexibility, I should not have needed to go to the lengths I did to achieve this flexibility – I should not have been sending frantic emails a day before the final requesting a different time. Many of the other students had full-time jobs – these generally require more notice than was given. But as I lack the space to do so, I am grateful that I can summarize my experience quite briefly. If you are considering taking a course online, and you are not desperate for an opportunity to take that course (as I was), my advice to you is simple: Don't!