Showing posts with label fakemath. Show all posts
Showing posts with label fakemath. Show all posts

Wednesday, 23 March 2011

Life is (at least) NP-Hard

We have a very large number of experiences that we can fit into our lives. Certainly many more than is possible to fit in.

Assigning a value of (v) to each of our (n) possible experiences and a cost (t) of how much of our life it would take to gain that experience, the problem of life is to choose which experiences to fill our life with out of the O(n!) combinations that exist.

If we had a solution to this, it would obviously be a solution to the knapsack problem. Therefor life is NP-Hard.


FURTHER COMPLICATIONS:

Indeed, if we consider that this is an online problem, with constantly changing opportunities each leading to a different but unknown future set of opportunities and further complicate our model with the exclusivity of certain experiences (cannot be the pope and married, etc) this problem becomes even more difficult. Perhaps it's exp-space. Perhaps it's unsolvable...

Thursday, 27 January 2011

dA / dW

Let:
W = a day of the week: monday=1, tuesday=2, etc
Aw= the time of my first class on day W
Bw = the time I get to sleep on day W
Sw = the amount of sleep I get on day W
N = the amount of sleep I need nightly ?= 8 hours
Tw = the average amount of sleep I've gotten averaged over the week so far = sum from{i=1} to {w} of {Si / w}

Proof that my current class schedule SUCKS!:
We define suckiness (U) of my week as the total amount of deviation of Tw from N during the week. Namely:

U = sum from {i=1} to {7} of {N - Tw}

Lemma 1: Sw <= N
We know that I will stay up for long enough at night such that Sw cannot excede N

Lemma 2: Bw = B1 forall w We also know that when I go to sleep on the first night, sets when I go to sleep on subsequent nights.

And since: S = A - B (and B is constant from the above lemma 2) this implies that:

dS / dW = dA / dW
and
Sw = S1 + w * dA / dW

Tw = integral {Si / w} implies that Tw = (S1 * w + 1/2 * w^2 * dS/dW) / w, and pluggin in for the above, we get that:

Tw <= N + (1/2 * w^2 * dA/dW)

Breaking out definition of suckiness apart:

U = integral {N - Tw} = 5*N - integral{Tw}

Plugging in our inequality:

U = 5N - (5*N + 1/6 * 5^3 * dA/dW)

U = -37.5 * dA/dW

Thus we have shown that suckiness of a schedule is directly proportional to opposite of the rate of change of the time of your first class as the week progresses. In my case, I have class 1.5 hours earlier each day as the week progresses, so for me:

dA/dW = -1.5

Which implies that:

U = 56

Therefor: My schedule sucks by 56 (units?)

Note:
I did the calculus wrong here I think... please help me by letting me know how to fix it. I haven't slept enough in a while. . .