Monday, September 2, 2013

Downpour

     As I was walking out of the drugstore a few days ago, the atmosphere erupted in rain. There I stood, bathtub cleaner and a box of hair colour in hand, as fat raindrops drove toward the ground like missiles, the skim of water on the sidewalk exploding from the impact. Catastrophe and renewal hung like the mist in the air around me. I love a good downpour.

     When I was young, my family and I would go for regular walks in the forest, rain or shine. During one particularly powerful squall, my dad held my younger sister and I under the cover of a cedar tree. "Look," he said, "at how the raindrops strike the wooden railing on that bridge. Look at how the water sprays."

Rail Top Rain Drop by Robert Case


     We watched as the wooden plank transformed into a bombing range for two or three minutes. As each drop made contact, it was annihilated into a cone of water an inch or two in height. The rain was so intense that I almost expected craters to be etched into the wood.

     That was the day I learned that my dad was the kind of man who could find the beauty in a raindrop. It would take a decade to realize that he had devoted thirty years of his life to raising children who can appreciate those raindrops. My siblings and I grew up in a west coast town that had on average 167 rainy days per year. By learning to find joy wet weather, we could fall in love over and over with this funny place called home. By learning to see the grace in everyday, we could make a new home wherever the wind would blow us.

     On the way home from the drug store, I left my hood down. It was so easy to feel as excited and dramatic as the weather that washed over me. The rain only lasted a few minutes, but it was long enough to remember how to feel alive. Someone told me that the key to a happy life is to learn to dance in the rain. When taken literally, I have to agree.

Monday, June 24, 2013

Codes

    I was going to write a post about how to be a good human being, but I didn't really feel like preaching to my readers from atop a cyber soapbox. Then I thought I might cleverly disguise the lesson in some cool story or anecdote, but I realized that such an act would still qualify as preaching and my audience deserves better. I scrapped my sappy musings (in case you were interested, here's the gist: try to be nice to everyone) and decided to write about something cool: codes.

    Suppose that you were talking to your friend over the phone in an area where the reception is poor. She says, "Let's meet up for beer-garitas!" but you hear "Let's meet up for deer fajitas!" Since deer fajitas is not a word in your everyday vocabulary, and the reception is bad, you assume that you have misheard her. Beer-garitas is a familiar word, and it sounds a lot like deer fajitas. You automatically correct the mistake and reply with, "Sure. My place at six. Bring limes."

    Now imagine a computer receiving a command with a small error in it. Since errors occur frequently during transmission, we expect quite a few of them. We want our computers to automatically detect and correct minor alterations in received messages. Our machines do not have the advantage of a human brain to help them sort out jumbled commands, so we accomplish our task by cleverly choosing a suitable code.

    We will design a language of codewords that our computer can understand. Our computer (let's call it MAX) only understands two symbols, 0 and 1, so all of our codewords should use 0s and 1s. There are codes with different letters and symbols, but I'll save that discussion for another day. MAX can execute four commands: standby, turn off, play music, and fire the missiles. Errors occur every now and then.

Let's consider the following code for those tasks:

00    =    standby
01    =    turn off
10    =    play music 
11    =    fire the missiles

     This code is just fine in a perfect world, but errors occur here in the real world. Let's say that you sent the message 01 (turn off) but an error occurred and the message 11 (fire the missiles) was received. Catastrophe ensues.

      We can improve our code by building in some extra digits. Consider the code:

0000    =    standby
0011    =    turn off
1100    =    play music
1111    =    fire the missiles.

    Say we want to groove to some Micheal Jackson, so we send the computer the message 1100 (play music.) A single error occurs, and the computer receives 1101. MAX knows that an error has occurred because 1101 is not a codeword in its dictionary. However, MAX cannot tell if the original codeword was 1100 or 1111, since both are only different from 1101 by one digit. Should the computer play music or fire missiles? Tough call for a machine. A single error in any codeword would produce some number outside the code. MAX would be able to detect any single error, so our second code is superior to the first. Unfortunately, if any single error occurs, MAX cannot tell which codeword was originally sent, and cannot automatically correct the command.

     We can fix this problem by making our codewords just a little longer. Consider the code:

000000    =    standby
000111    =    turn off
111000    =    play music
111111    =    fire the missiles.

    Say we want to send the message 000000 but MAX receives 001000. An error has clearly occurred since 001000 is not command that MAX recognizes. 001000 is different from 000000 at one digit, 000111 at four digits, 111000 at two digits, and 111111 at five digits. Since 000000 is the closest codeword to 001000, MAX automatically corrects the command to 000000. In fact, any single error in any codeword could be automatically detected and corrected this way! Now, as long as two errors don't occur in the same command (come on, what are the chances?) MAX won't fire the missiles by accident.

     Our CD players use similar principles to make sure that Billy Jean plays smoothly, even when the disc is scratched. The music is stored digitally as a numeric code, but imperfections on the CD surface cause errors when the laser reads the disc. The machine is able to automatically detect and correct these errors so that the music plays seamlessly. How? The numeric code that stores the information was cleverly chosen so that no two codewords were too similar.

     The holy grail of coding theory is to find codes such that the codewords are different enough to be robust against errors, short enough to facilitate quick transmission, and diverse enough to accommodate as many commands as need.

     If you've made it to the end of this very technical post, congratulations. This is the stuff of fourth year theoretical mathematics. You deserve a beer-garita, you brainiac (or a deer fajita if you are into that). Cheers!

     Many thanks to the UVic discreet math department, specifically Dr. Dukes, for teaching me about codes. The information presented here was adapted from an introductory lecture on Coding Theory.

Friday, April 19, 2013

Love set aside

When I was seven years old, my parents bought me my first guitar. It was a 3/4 size, classical style guitar with gentle nylon strings for my miniature hands. Once the basics were mastered, my teacher asked which style I wanted to pursue. Several choices were presented to me, and I opted for classical music. So every week for eight years, my dad drove me to classical guitar lessons. In eight years, I studied with four teachers at two studios, accumulated eight guitars, went through dozens of packs of strings, taught scores of students of my own, competed in several exams and festivals, and found one of my greatest passions. My parents were committed to my music, so long as I found joy in it, and gifted me with encouragement, support, strings, the occasional new instrument, and weekly rides to my lessons.

It was not always easy to learn a new piece. The fingering was unfamiliar and clumsy and it often sounded terrible. But as I studied the piece it would come alive. At some point, the music would transition from notes on a page to some living entity. I wasn't in control of the music anymore; it controlled me. That was the only time that I could be completely "in the moment," and it brought me more happiness and peace than just about anything else.

After I graduated high school, I didn't play much. I'd try and jam every now and then, but it felt forced and awkward. Every now and then I'd pull out my guitar and try a few classical pieces, but I'd grown rusty and it was frustrating to stumble on phrases that once were easy. After my dad passed away, I didn't play a note for months. I set aside a grand and joyous piece of my life, and it wasn't clear when I would pick it up again.

Recently, I woke up and I wanted to play. I wanted my old skills back. I wanted to feel as alive as I had when I played as a child. It has been a struggle to be patient with myself as I relearn old pieces and strengthen dormant muscles. I've been playing classical music almost every day, and although it's a gradual process, my passion has returned. Sometimes we don't need to look forward to find happiness, but backward.

Saturday, January 5, 2013

Planning our Wedding - A Miracle!

Last week a miracle happened.

Last week Mr. Right came home from work, and I greeted him with a big hug and a kiss and detailed information about elopement packages. Three nights accommodation in the mega-ultra-deluxe suite, wine and chocolates included, flowers included, cake included, officiant included, witnesses included, photos included, eat-your-guts-out dinner included, spa trip included. All for the low, low price of keeping my sanity. Why hadn't we thought of this before?

Mr. Right looked into my crazed eyes and said he didn't want to elope. (Had he not heard me? Mega-ultra-deluxe suite!) He convinced me that we should try to look for a venue for our family celebration one more time.

Fast forward to Saturday morning. The head chef at an Italian Restaurant was pouring us a cup of coffee and sitting down with us in his restaurant. As I looked around the space, our wedding transformed from an obscenely expensive obligation to society that had nothing to do with Mr. Right and I into the family celebration of love, commitment, and partnership that would take place in that gorgeous space. We spent about an hour discussing policies and visions with the head chef, and we discovered that he was a hard working, warmhearted, decent human being, instead of some corporate psychopath who invents wedding pricing at some resort. (Who thinks it's a great idea to surprise you on one of the biggest days of your life with a fee of $5/slice to cut a wedding cake? If resorts need to take in more revenue, they could find a less weaselly way to add it on to your bill.)

So we went home and thought about it for a few days, just in case the sparkle faded. But the fit for us was too perfect, so we booked it! For the first time since my proposal, I am genuinely excited and proud to host a big fat family wedding in a fantastic venue. Indeed, this will be a grand way to celebrate our sendoff into the grand adventure of marriage, and to thank those who have supported us in our relationship for the past 8 years.

Planning a wedding is tricky business, but Christmas miracles do exist!

Thursday, November 29, 2012

Adventures in Education: Problems with Visualization

In a previous post, I remarked on the beauty of abstract algebra. This post regarding the subject is not so positive.

Since then, the material has gotten quite sophisticated. Simultaneously, significant events in my personal life have taken my focus away from the subject. Moments of clarity have been few and far between. I am using strange rules to justify arguments that I don't believe. I am blind in a world where visualization has always been my most valuable tool. Now what do I do?

Earlier in the course I could see the structures I was learning about in my mind. I could watch the elements interact, and manipulate their behavior to simulate a result. It was not easy to do, but I was operating on some level of intuition. That intuition is now completely gone, and I'm finding this type of mathematics a most frustrating endeavor. I'm memorizing rules and trying to remember when I am supposed to use them. Algebra is not supposed to be like this. The only things that keep me going are the hope that I will finally understand the material (better late than never), and the fact that I'm not going to let this subject best me.

I wonder if there are few math-o-phobes who have tried learning the subject blindly by memorizing rules and techniques. I recall a few high school math lessons where teachers would recite, "Well, if you see a question like this then you do this. See? It works." How dreadfully boring! If I had learned all math that way, I would have sworn off the subject a long time ago. It's an awful way to go. There is no fun in it! It's easy to see how frustrating this method of learning is when I'm actively doing it.

So, to end on a positive note, here is a graph theory question that everyone can have a crack at. It's intuitive, it requires logic, and most of all, its FUN! It was on my last assignment. Don't worry; it's a relatively easy question and it doesn't require any formal training in graph theory.

Suppose you wanted to colour the lines on this diagram. (This is called the Petersen graph, in case you were interested.) Here are the rules: each line gets exactly one colour. You may use the same colour for two different lines if you wish, but only if those lines do not share a dot. Can you convince yourself that it is impossible to do it with only three colours? (I.e. you need at least four colours.)





Sunday, October 21, 2012

Planning our Wedding

Spoiler alert: this post is a rant, and it's probably poorly written. If you are looking for something lighthearted and funny, check out this video instead.

My fiance and I are planning our wedding, and I've been reading magazines and watching wedding-related reality TV shows in the name of research. Have you seen Four Weddings? It's a show where people get married and guests complain that the free signature cocktails aren't to their taste, and that the wedding dress doesn't fit around the hips, and how the five course dinner had steak and chicken. (I'm not sure why that was a problem, but trust me it was.)

Not too long from now, Mr. Right and I will stand in front of our friends and family and promise to be a team for the rest of our lives. We will work together to make our lives amazing, and take care of each other even when everything sucks. This is a significant decision and a huge promise, and although it has taken us eight years of consideration before agreeing to take the plunge, it is a decision we make with confidence.

Frankly, chair covers, specialty linens, and centerpieces seem insignificant. During this process, I have not once thought, "Gee, I'm about to marry my match. Therefore, all chairs must wear matching outfits. Yes, chair covers are essential; I wouldn't want my guests sitting on an uncovered chair like a savage. Only $500? Well worth every penny. And while I'm at it, why not spend the PhD/house fund on pipe-and-drape and twinkle lights, so our decor can be competitive with the weddings I've seen in magazines. I must have decor. It's so essential for a wedding. That's what guests should remember."

There are a few traditional elements I'm genuinely excited about. My dress is fantastic and I can't wait to wear it. I might even purchase a little flower to wear in my hair. My playlists have been perused to find that perfect "first dance" song. I'm especially excited to get some professional photos taken. Finally, photos in which neither of us is making a funny face! I never thought the day would come.

Most of all, I'm excited to celebrate with the family and friends who have supported us in our relationship over the past eight years. We'll host a good party for our loved ones. We're gonna feed 'em! There will certainly be dancing and drinking and laughing and carrying on. It will probably be loud, and at times inappropriate (hopefully not too inappropriate). What I want most of all (other than a loving commitment from Mr. Right, of course) are a great set of stories to begin our new family repertoire. In ten years, I hope we can sit around the dinner table and reminisce about the goings-on at our little wedding.

There are few times in our lives when we can count on our families to take a day or two off so that everyone is together to celebrate. Other times, we find excuses for absence in mundane tasks and empty commitments. We ask "When was the last time we were all together?" A wedding is such a grand opportunity to take enjoyment in our family and friends. We need this time together. We need to take these memories with us on our journeys. I hope our modest little wedding is rich with humor, love, joy, and family. If we can pull that off, we don't really need chair covers.

Thursday, September 27, 2012

Adventures in Education: An instant of revelation

In my last post, I discussed how strongly I wanted to understand abstract algebra. Today, I am getting closer.

Mathematics is a play. In this play, there is a character (appropriately named the characteristic) that seemed alien to me. Its definition was quite simple, but the character was mysterious. I knew what it did, but not how it worked or what it was capable of. But then, in an instant, I learned a side of the character previously hidden. As if in soliloquy, it divulged just enough information to give me a taste of it's ambitions and agendas. And then, the rest of the story began to make sense. Those mysterious theorems, those awkward propositions, and those questionable conclusions began to fit together in a cascade of connections. A grand mystery has been resolved, and I can still feel the afterglow of the euphoria in my rosy cheeks and my tingling fingers. It felt like the tipping point in a Sudoku solution, when the identification of a single entry immediately reveals all of the others.

This character reached out and handed me a key. It is not a key that opens the entire subject of abstract algebra, but it is a key to its front foyer. Finally, I could step inside and marvel at the intricate workings of the subject! I expected it to be complicated and detailed and expansive, much like a grand hall with gold leaf designs and high ceilings and fine Victorian architecture. Much to my surprise, it was simple, compact, and clean like a photo in an Ikea catalogue. Where I expected a grand cabinet of tools I found a small cupboard with a few multipurpose theorems. It is incredible that such a great set of perfect ideas can collapse easily into such a small yet robust framework of elegantly simple rules.

Today, I went to class and understood everything the prof said. I didn't find the minor error in his notes. I didn't ask the clever question about a strange definition. I couldn't repeat the lecture back to you. But I understood what he was talking about the entire time. Hallelujah!

Some weeks are good weeks and some weeks are bad weeks. This week is a good week.