December 30, 2011

  • An Existential Crisis

    During a layover in Dallas Fort Worth, with little else to do, I wandered the bookshops in search of postcards. I happened upon Godel, Escher, Bach on a shelf and decided now was as good a time as any to read it.

    Eight pages into the author’s preface, Hofstadter writes that although he writes (presumably metaphorically?) about formal mathematics having a “self”, he did not mean to say that mathematics was a conscious person, and that human brains are much more convoluted than the rules of mathematics. He said that there is no equivalent in a mathematical system to the passage of time, change, birth, and death.

    Even the preface is hard to read. It isn’t intentionally confusing; in fact, Hofstadter tries to say things as clearly as possible. It is difficult because I have to spend a couple minutes thinking after each paragraph.

    And I guess everything comes back to our existence and the fate thereof. A very few weeks ago, a simple discussion of eating habits turned into a question on the sentience of animals, in which Pesto put forth a definition I hadn’t heard before. He said that sentience was a preference to continue to exist. He said that sentient beings gained utility from thinking that they would continue to exist.

    I was reminded of other similar talks I’d had, where we’d tried to figure out what was a person, and what was a consciousness, and if we were all starting with the same premises (we were all atheists and monists (people who believe the self does not exist outside the physical body, that is, the perception of self ends when the brain is destroyed)), how come we couldn’t reach the same conclusion? The trouble was that the majority of Rationality Camp, by the end of summer, would happily walk through a teleporter, and I adamantly refused to consider it. I tried to explain why. Somewhy, I couldn’t communicate what I wanted to say, and we couldn’t even suggest an experiment, because whatever experiment was suggested, all of us (myself included) agreed on the expected results.

    How can we expect ourselves to behave differently in the same situation when our models of the world produce the same expected experimental results in every observable detail?

    The explanation came some months later from Solar Wind, who had been my teacher over the summer. The trouble was that most of the Rationality Camp rationalists were confident that in the case of the teleporter, there was one person involved, but I was not confident whether there was one or two, and I was therefore unwilling to take the risk. Perhaps I’d feel differently if I knew enough quantum physics to be convinced very small particles are not just indistinguishable, but also not possessed of any individual identities. Even if I were, I doubt I’d be confident enough to walk through a teleporter.

    At this point, things look a lot like a continuity of consciousness issue, and that’s very strange. If I am frozen and then re-animated, is that continuous? If some parts of my brain shut down for a night, is that continuous? If one brain cell were replaced at a time. . . but that’s particularly strange. Brain cells are being replaced all the time.

    A different person, the Programming Musician, once asked me these things, hoping to make me less afraid of the teleporter, but I actually became afraid to sleep, afraid to blink, and afraid of the passage of time. I anticipate experiencing tomorrow. When I sleep, I am convinced that only one person is involved. But how can I tell if that’s true? I remember experiencing yesterday, and I remember feeling things. I was playing Terraria, and I was frustrated when my character got eaten by a bonedragon, and I remember what that feels like, and I remember feeling those things! But of course I’d remember that; they are stored in the physical configuration of neurons in my brain. It could be that all those years I remember living were experienced by a different consciousness, and I only think it was the same one as now because I have memories of them, and there’s no experimental way to tell the difference! “What do you mean, a different consciousness?” A person with my brain, regardless of what consciousness is experiencing it, would behave the same way. I have no doubt that whoever walked out the other end of the teleporter would behave the same way as myself, and be indistinguishable from myself, and be truly and rightfully me (with the one exception that afterwards she would not fear teleporters (although she would remember this argument and might resist them even with the experience of going through one once and feeling like it was ok)). But I don’t anticipate walking out of the teleporter! What does that even mean? Should I anticipate waking up in the morning?

December 29, 2011

  • Terraria Revisited

    I downloaded the awful thing. And then I built a house in a ditch and ran around the randomly-generated world for many hours, swinging my progressively better swords at things, getting eaten by things, and occasionally surviving long enough to see the warm glow of the lava. . . before I fell in and burned to death. Tombstones marked my path down, but hey, at least I’d never get lost.

    Catalan gradually became less inept. The first major turning point was the grappling hook, which made getting around a lot friendlier. The second was when I got online and pestered Discord into playing multiplayer with me. He made a whole new character, and even so he was much more adroit than me anyways, mining enough ore for the both of us. An hour or so with Discord was about as effective as all the time before when I was running around the world alone.

    Afterwards, Discord spent awhiles teaching me how each Terraria world works. It actually has storylines layered upon more storylines, and, hearing them all, I despaired of ever defeating the ugliest boss and building wings. But I imagine, if I tried to tell someone about Kingdom of Loathing, it might sound the same way, and at any rate, it’s hard to stop playing.

December 28, 2011

  • AlgoRhythms: Computer Science and Hungarian Dance

    While surfing the Internets in a procrastinative stupor a few days back, I came across this wonderful little video (http://www.youtube.com/watch?v=ywWBy6J5gz8), recommended by a dear friend on Facebook. It is a (surprisingly clear) explanation of the Quick Sort algorithm, communicated through Hungarian folk dance, and is quite the most adorable thing ever.

    Quick Sort is one of many sorts that takes a list and puts it into some sort of order. It works by first choosing an element, which acts as the “pivot”, and then sorting each entry into one of two piles: “less than” or “before” the pivot, or “greater than” or “after”. Most implementations that I’ve learned or seen have also included a third pile, “equal to”. Then, the less and greater piles are sorted independently, and then tacked onto either side of the equals pile. A common choice of pivot is to choose the first element in the unsorted list.

    As such recursive sorts generally are, Quick Sort has an average time of O(nlogn). However, unlike the famous Merge Sort, which has a worst case time of O(nlogn), Quick Sort can have a worst case of O(n^2). This happens when the elements are already in order to begin with, or in reverse order. The pivot is compared to everything else, but afterwards, the one pile is empty while the other has everything, so the next pivot has to again be compared to every single element, and so on.

    Another choice of pivot that I’ve heard of is to choose the median element, which takes O(n) time to find, or to choose a random element, since getting a presorted list is actually pretty likely. If the list is unsorted, choosing the first element and a random element is practically the same thing, and if the list is sorted, it’s better to choose randomly than to choose the first element each time.

    There is actually a whole series of these videos. The one for bubble sort is here (http://www.youtube.com/watch?v=lyZQPjUT5B4). But upon watching it, there was a strange irregularity that confused me. The version usually taught begins by comparing the first and second elements. If the first is smaller than the second, then they’re ok. Otherwise, they are out of order, and so they switch places. Then, the (new) second and third elements are compared, and then the third and the fourth, and so on, until the last two elements are compared (and switched if necessary). After the list has been traversed once, the largest element is at the very end. Then, we do it again. Now the last two elements are correct. After n times through, everything is in order, and we can stop.

    The lesson would usually continue thus: since we know that after n-1 times through the list, the second through last elements are in order, then the first must be correct also, so can skip the last run. And also, if we know the last element is in place, we don’t need to compare with it ever again. And so, on the second time through, we only compare up to the n-1st element, and then the third time through, only up to the n-2nd element, and so on.

    Back to the video. I expected that after the first iteration down the line of dancers, that the last dancer would never move again. So I was very surprised when the last two dancers froze in place. And then, this kept on happening! For a while, I wondered if it was because a pair of dancers counted as one number, but that didn’t seem right either, especially since in the last round, three or four dancers were permanently sorted at once. So I thought about it, and I thought about it some more, and then I read through the comments, and then I thought about it some more.

    And it made sense; holy Spaghetti Monster, it made sense! It turns out that if one only needs to compare up to where the last switch happened. In a list made up of the integers 1 through 10, if the last switch is between places 6 and 7, then that means everything from 7 on is in increasing order, and everything before 7 must be less than it. If something else were the biggest of the things 7 and earlier, then it would have displaced everything else, including 7, and so the switch between places 6 and 7 would have put that number instead into the 7th place.

    So here we are, everything before 7 is smaller than it, and everything from 7 on is in increasing order. That means that everything from 7 on is correctly sorted.

    Three and a half years into a Computer Science major, a short video of a dance on Youtube had something to teach me about computer science. It’s a very humbling and very happy experience.

December 27, 2011

  • Sleep Zombie

    I think I may have been sleeping more than ten hours each day this week. I never intend to, and I’ve been sleeping at a normal human time too, usually between 3:00 and 4:00 each morning. But for whatever reason, I end up sleeping until mid-afternoon.

    I’m not actually all that happy about this. All my days are really short.

    I’m guessing I probably picked up another cold somewhere. I feel like I’m going through all the steps of having a cold again, first the sore throat and now the sniffles. This is a really inconvenient time for it! I hope this one is less troublesome and passes quickly.

December 26, 2011

  • Terraria

    Today, I went to Dan’s house for a merry gathering of people in Tampa over break. Suddenly, I was overcome by a great round of folly, and asked Mason if I could play with his Terraria. He set his computer up at the game table and let me onto his Steam account.

    I wanted my first actual play of the game to be as authentic as possible, with all the challenges that new characters face. Catalan’s adventures in a Cartesian world began very very poorly. Come the first nightfall, the world filled with zombies, and she walled off a ditch to hide in until sunrise. She finally did manage to build a walled little hiding place, but not before her little burrow filled with insulting little tombstones saying things like “a zombie put an end to Catalan’s flailing.” Eventually, she found enough ore to make a bigger sword, and then she was able to survive the nights outside. She still died often, and the land became littered with tombstones.

    For a while, I tried to dig Catalan to the Underworld, but something always came along and killed her and sent her back to respawn point. I gave up and spent a few in-game days making a voyage to the left edge of the world. There, the land gave way to water that went deeper and deeper. I wonder now if I could swim, perhaps the world would wrap around, and she’d come up on the other shore? As it was, I had to wait until Catalan sank to the bottom, and then jump up a few blocks’ height, and so that instance of Catalan drowned.

    I never was able to reach the right edge of the world. There was a big gray blot of Corruption, where no light could shine and the land was filled with holes. I kept falling into things and losing all my hit points on impact. I kept getting eaten by big fanged flying trilobites.

    The most annoying thing is how difficult it was to progress at all, because in order to make anything, I had to mine a whole lot, and that meant a great deal of getting killed by things underground. I think I’m a lot fonder of watching it than playing it. I think I’d like to never play it again.

December 25, 2011

  • Cat on the Roof

    Early this morning, my sister woke me up with cries of “you’ve got to come see this!” Grudgingly, I got out of bed, pulled on a shirt, and stumbled over to the upstairs window.

    There, on our roof, was our friendly neighborhood wild cat.

    How he’d gotten up there, none of us could tell. I wondered if he was stuck, or if he was perfectly happy where he was, but my father decided he was probably stuck. I wondered if this was the sort of thing people might call the fire department for. My sister and I traipsed outside as my father leaned a ladder against the house and climbed up to the roof. He grabbed the cat and climbed back down. The cat took off, seeming happy to be on the ground again.

    We haven’t seen him since. Our best guess is that he might’ve been chased up by a dog or wild animal, and then gotten stuck. We walked all around the house, and still didn’t see how he could’ve possibly gotten up. Cats are strange. Cats are really strange.

December 24, 2011

  • And Thus a Life Be Judged

    To those who’ve already heard all too many rants on this subject, please pardon me one more, for this is one particular thorn that has never left my conscience, one dropped stitch in a tapestry the Fates forgot to retrieve, one stale arc left unresolved in a story that moved quickly by long ago.

    I’d accidentally snuck a bottle of 5-hour Energy into my carry-on luggage. I’d forgotten it was in my purse until I was cleaning it out at home. I set it on my desk without any real plans for it.

    This year, I’ve finally given up buying my mother something for the holidays. Each year before, I’d stubbornly gone out, scoured the local malls, and picked something for her, and each year, she never ever liked it. When she says “I don’t want you to buy me anything”, she actually means it for real, and so I give up. I told her (conversations very paraphrased), if there’s anything you want, please tell me, because I give up. If there’s anything you’d like me to do, I’ll do that too, but please tell me, because I give up. She said, here read this LSAT study book.

    So here I am with a 5-hour Energy and 400 pages of LSAT study book. I’m 50 pages in, and I can probably go at about a page a minute, so if I go quickly, maybe five hours will be enough. I hope that it will be easier to focus in the middle of the night, and anyways, tomorrow sounds like a lovely day to watch the sun respawn.

    But I began to wonder what it feels like to study with focus-enhancing medication. My mother is convinced that I have some form or other of something like ADD, that’s escaped notice because in high school, I learned things quickly. I have no doubt that if I wanted ADD medication, I could get a prescription for it. If I took some, would I suddenly have the magical ability to sit down and find this drudgery interesting? (Could I find math interesting?)

    But I’ve so far resisted it with this guilty feeling gnawing in my chest. I wanted to adventure and struggle and triumph on my own merit! When I was younger, I’d always heard of these medications, and it always seemed to me like running a race with rocket boots. No athlete takes a magic pill and suddenly has huge muscles, or if they do, bad things happen to them. But it’s not actually cheating either. In the end, when I sit down and take a test, everything is coming from myself. If I mind, perhaps I can just not take a magic pill that day, and have everything come from myself during the test. It’s not like I’m having someone else sit the test for me.

    But it’d still an advantage others wouldn’t have. But around here, things become rather fuzzy. 5-hour Energy is not cheap. Maybe that’s an advantage too. Or even coffee, coffee is also expensive. How about tutoring? I’ve heard of people who, prior to taking the LSAT, had half a year of private tutoring and another half-year of nervousness therapy. Why shouldn’t I have that too? Why shouldn’t I use magic pills if someone somewhere else is using them?

    Should I aim to have an average amount of helpfulness in my environment? Should I aim to have no more helpfulness than anyone else?

    I remember refusing to test out the competition-room’s piano back in elementary school.

    I don’t know how much to normalize for, and what I should normalize for. I know that studying is hard for me. People can have magic pills if studying is prohibitively hard. But people can’t have magic information if math is prohibitively hard, nor can people have more processors in parallel if holding a complicated argument in one’s mind is prohibitively hard. I can look at an argument, and sometimes I can understand it, and this is more often for me than for most people, and less often than for some people. But I don’t even know if I can normalize for that, nor do I want to. I don’t want to reduce my own processing power, but if I could, I’d increase everyone else’s processing power.

    Sometimes, I tire of being at fault all the time, for all the things I didn’t do. If I were inherently slow to understand math, nothing would be my fault, but because I am reluctant to study, my failings are justly and rightfully deserved. Maybe some people have an easier time studying than others. Maybe some people can sit still and focus more easily than others. It falls into a general category of “conscientiousness” that is generally considered my fault, and thus I am judged.

    “It is an odd thing,” Snape said, his voice still softer, “to look back after only thirty-two years, and wonder when your life was ruined past all rescuing. Was it determined when the Sorting Hat cried ‘Slytherin!’ for me? It seems unfair, since I was offered no choice; the Sorting Hat spoke the moment it touched upon my head. Yet I cannot claim it named me untruly. I never treasured knowledge for its own sake. I was not loyal to the one person I called friend. I was never one for righteous fury, then or now. Courage? There is no bravery in risking a life already ruined. My little fears have always mastered me, and I never turned aside from any of the paths I walked down, for those little fears. No, the Sorting Hat could never have put me in her House. Perhaps my final loss was determined, even then. Is that fair, I ask, even if the Sorting Hat speaks truly? Is it fair that some children should possess more courage than others, and thus a man’s life be judged?”
    — Eliezer Yudkowsky, Harry Potter and the Methods of Rationality (http://www.fanfiction.net/s/5782108/Harry_Potter_and_the_Methods_of_Rationality)

    In any case, in the here-and-now, I will drink my 5-hour Energy and have my night of study, and dream of a tomorrow when I am an actual studious person, and perhaps a day after when persons understand things they’d never known to dream.

    It must be very nearly Christmas. Happy whatever-you-celebrate. Happy life.

December 23, 2011

  • I Hate Bing

    Bing is the most annoying search engine I have ever encountered. The majority of its annoyance comes from how very aggressive it is. My homepage used to be MSN, and this was because my parents always set their homepages to MSN. The trouble was that MSN became affiliated with Bing. Every time I opened an internet window, it would go to MSN, and my cursor would be set to the address bar, but then the Bing search box would grab my cursor there. One extra click each time I opened an internet window, but the little bit of added annoyance several times a day builds up. It’s the sum effort of starting to type, finding my typing happening in the wrong place, moving from keyboard to mouse or touchpad, and then clicking, and then moving back to keyboard, and typing over. Or when I’d type and hit enter without looking, necessitating a wait while the Bing search loads itself. Eventually I became cross, and changed my home page to WikiNews, and I’ve been happy ever since. I wasn’t having any other problems with MSN. Bing, and only Bing, caused me to stop using MSN.

    Then, today, I was installing TDSSkiller in the hopes of stopping Firefox from opening random sites based on my Google searches. I simply selected the quick install option, which I assumed was all the standard options, and it changed my default search engine to Bing, and installed a Bing toolbar! Now, whenever I open a new tab, the stupid Bing search appears, and I never wanted it there. Seeing it makes a little ball of anger flame up in my stomach. I’m quite ready to stop using Firefox if I can’t fix it. Being all aggressive and snatching my cursor and installing itself without my authorization? I’ll never patronize Bing.

    Update: I uninstalled it. It was even more underhanded than I expected. I was searching for it and trying to uninstall it, and I couldn’t find it on my list of programs. That’s because it wasn’t even named “Bing Toolbar” or anything else with “Bing” in it, it was named “StartNow”. My goodness. Bing, fuck you.

December 22, 2011

  • Bleh

    Things are kind of boring. Things are boring! I wish it were still school, so that there’d be more to do than time to do it, so that everything would be exciting again. It’s very strange looking around with the sun still high and realizing the Internet’s entertainment has worn out. During the day, at least, I can sit down at the piano and make a lot of noise; there’s always something satisfying about making a lot of noise. It must be well past time to start studying again, hopefully for realz this time.

    In other news, computer is still opening junk ad sites and randomly crashing, and that’s not very happy at all. The house computer downstairs has trouble too: every Google search likes to redirect everything to ad sites. This is annoying. I need to go fix it.

    I went for a long (barefooted) walk with my sister today, and it was full of spiky things in my foot and taking very careful steps so as not to step on ants. We were accidentally outside as the sun was setting, and it is very happy to watch the world grow dark on the darkest day of the year.

    Happy winter solstice!

December 21, 2011

  • Romance and Ramsey Theory

    Today, an interesting fellow voiced to me the thesis that Ramsey Theory was particularly romantic.

    First, I had to go to Wikipedia really quickly, and look up what is Ramsey Theory? And it turned out to be a whole class of problems and findings about graphs containing certain subgraphs, the most famous of which is probably the dinner-party problem, where it is good to hold dinner parties with six people. Six is a perfect number of people, after all. However, aside from that, it is also guaranteed that of those six, there will always be three people who all mutually know each other (ensuring that they will not be strangers at the party) or three people who are all mutually strangers (ensuring that they will be meeting new people at the party).

    Although it all sounds very fun and interesting to study, it didn’t sound particularly romantic to me. It sounded like the second-least romantic thing ever, after Analytic Number Theory, which is the least everything ever of anything in the world.

    A slightly different problem, since three is a crowd, and the only set of unacceptable people at a dinner, {DS, Discord, and wobster109} comprises three people: now, we want enough guests so that some four people will either all know each other or all be strangers. Now we need 18 guests. What if we want a group of five? Now we need somewhere between 43 and 49 people.

    This means that as far as mathematics is today, we know 42 people can be socially-connected in a way that if all of them (and no one else) attended a dinner party, in any group of five, some two would be strangers, and some two would know each other. We also know that if there were instead 50 people, then there’d be a group of five where either no one was a stranger to anyone else, or everyone was a stranger to everyone.

    The range grows larger very quickly. By the time we want a group of size ten, we know that we’ll need anywhere from 798 to 23556 people.

    But we don’t have to restrict ourselves to strangers and friends. We can generalize to include more complicated social relationships: acquaintances, coworkers, (non-exclusive) arch-enemies, polyamorous partners, and so on. Nor do we have to have, say, three people who know each other or three who do not. We could require at least three people to know each other or ten people to be strangers if we wish. The number R(a1, a2, . . . , an) is used to refer to the smallest number of people such that there is either a1 of them who are all of relationship type 1 with each other, or a2 of them who are all mutually relationship 2, and so on. For example, R(10, 20, 30) is the fewest people required so that of these three statements:
    - There are 10 people who are all friends with each other.
    - There are 20 people who are all enemies with each other.
    - There are 30 people who are all strangers with each other.
    at least one of them is true.

    Wikipedia (from whence all my numbers come) gives a proof that in general, for any number of relationship-types, and any size group a person wishes of each, there is a big enough dinner party such that one of those relationship group-sizes can be found. It also gives an upper bound for any 2-relationship case, and that bound is C(r+s-2, r-1). For example, if you want either a group of three friends or a group of four strangers, and everyone is either a friend or a stranger with everyone else, then for certain you can do it with C(3+4-2, 3-1) = C(5, 2) = 10 total people, and perhaps you can do it with fewer.

    In fact, you can do it with nine.

    But why?

    Wikipedia’s article on Ramsey’s Theorem also gives the first few values of R(r, s). It turns out that the values resemble the first few rows of Pascal’s Triangle, with each term approximately the sum of the term above and the term to its left, usually exactly the sum, but sometimes a bit less. And not always less by the same amount.

    Why does it do that? There’s something so very random and bothersome about it, that it doesn’t behave predictably, that sometimes you can do it with less, but most of the time you can’t, and I at least can’t tell what decides if you can or cannot. What’s so special about R(3, 4) that doesn’t show up for any r+s < 7?