Math Problems

einstein_math
I’ve noticed a few Grade 6 math problems on Facebook that I’m sure Einstein would be embarrassed to see his picture on. I’m not sure which is sadder, that people consider a problem given to 11-year olds genius-level, or that only 50% of adults got the answer right.

I’m much more interested in the problems that FiveThirtyEight has been posting for their Riddler series. This week the problem involves cars getting stuck in traffic. Thankfully, not something I normally have to deal with, but I think I figured out the answer.

The Problem:

There is a very long, straight highway with some number of cars (N) placed somewhere along it, randomly. The highway is only one lane, so the cars can’t pass each other. Each car is going in the same direction, and each driver has a distinct positive speed at which she prefers to travel. Each preferred speed is chosen at random. Each driver travels at her preferred speed unless she gets stuck behind a slower car, in which case she remains stuck behind the slower car. On average, how many groups of cars will eventually form? (A group is one or more cars travelling at the same speed.)

My solution:

f(N) <- average number of car groups if there are N cars
f(0) = 0
f(1) = 1

If we have 2 cars there is 50% chance of the first car being faster, which would create 2 groups; and 50% chance of the 2nd car being faster and merging into a single group.
f(2) = 0.5 * 2 + 0.5 * 1 = 1.5

More generally, if we just consider the first 2 cars. There’s a 50% chance of there being a solo lead car plus the groups that form behind it, and a 50% chance of the first car merging into the group behind it. We can define the average number of cars recursively, where:
f(N) = 0.5 * (1 + f(N-1)) + 0.5 * f(N-1)

that equation reduces to:
f(N) = 0.5 + f(N-1)

testing it out:
f(2) = 0.5 + f(1) = 1.5
f(3) = 0.5 + f(2) = 2
f(4) = 0.5 + f(3) = 2.5

Which is an arithmetic series that can be reduced to:
f(N) = 0.5 + 0.5 * N

or more succinctly:
f(N) = 0.5 * (N + 1) (for N >= 1)
f(N) = 0 (for N < 1)

Posted in Uncategorized | Tagged , , | Leave a comment

Our Long Road to Pregnancy

Baby face plant
I’ve been waiting three years to write this blog post. At times I worried it would never happen. It’s been a long and heart-wrenching experience, but I’m overjoyed to announce Emily is pregnant.

19 Weeks
Our journey probably isn’t that uncommon, and yet because of the taboo around infertility we went through most of it alone, with only our close family and friends aware that we were struggling to conceive. Like many couples today, we waited until our 30’s to have kids. We thought getting pregnant would be easy – just stop everything you’ve been doing your whole adult life to avoid getting pregnant. We were still relatively young and very healthy. We were also nerdy and so very naive. We planned and waited for the optimal month to get pregnant, May 2013. Emily had a new job with great maternity benefits and a May conception would mean a February baby and statistics show a birthday in the first few months of the year increases the odds of succeeding in life. We had it all planned out.

Advanced technology - xkcd

We were crushed when we didn’t get pregnant on the first try. Or the second, or third. After several months, we knew something was wrong. We bought ovulation kits, watched our diet, and did everything we could to increase our odds of conceiving but still no luck. We visited a fertility doctor and subjected ourselves to all kinds of tests (mostly to Emily), but no problems were ever found. We had “unexplained infertility”. We tried some mild treatments – progesterone, clomid, and IUI but we still couldn’t conceive.

It’s difficult to explain how frustrating and painful an experience this was. After only 2 years, we were burned out. Every month was an emotional roller coaster. I tried to stay positive, but failing month after month without any explanation as to why was hard on both of us, and I could see it slowly destroying our relationship.

We decided to take a break from baby making and from all the other stresses in our daily lives. We needed a change, and more importantly we needed something positive to balance out all the disappointment. We were still young, financially secure, and childless. Instead of focussing on how much we wanted children, we decided to take advantage of our situation. Emily quit her job and I got a leave of absence. We then went on the trip of a lifetime, spending an unforgettable 4 months backpacking across India.
India - Pushkar yoga Swamiji and us

I would like to say we completely forgot about trying to make a baby while we traveled, but at the back of our minds we still hoped that a change of pace was all we needed. Whenever we visited a shrine or temple known for its fertility granting powers (and there are a lot in India), we offered a prayer of our own. We even got fertility tips from Swamiji, our yoga guru in Pushkar.

But even with all that ancient Vedic wisdom flowing our way, we didn’t conceive in India. So after we got back to Vancouver we turned to Western medicine and started IVF treatment. It wasn’t an easy process but Emily was amazing. She managed to stay positive throughout despite having to inject herself daily. After a month of drugs that hyperstimulated her ovaries, the doctor extracted 18 eggs. Only 7 were mature, and only 5 successfully fertilized. After five days cell dividing in the lab, only 2 fertilized embryos remained – our best chances at having a baby. The doctors froze both embryos and waited a month to give Emily’s body a chance to return to normal hormonal levels.
Counting eggs

After 3 years of feeling unlucky, it was our turn to feel blessed as our first embryo implanted successfully. On October 13, I got the call from a nurse who said “Congratulations, you’re going to be a dad”. I could barely respond or write down any of the details she provided me. Only an hour earlier, I received word that my sister had delivered a healthy baby boy. An uncle and a dad-to-be in the same day. I was overwhelmed with relief, joy, and excitement. After I calmed down, I walked over to Emily’s work and delivered the news in person. It was one of the best days of my life.

Our bundle of joy is scheduled to arrive on June 18. And then the real fun begins.

Ultrasound

Posted in Family | Tagged , , , , , | 5 Comments

Christmas 2015

Christmas 2015 Family Photo
Christmas this year was all about spending time with family.

My parents new off-the-grid home is still under construction, but there was room to sleep all 11 of us.
Winter Ponderosa

We had fun exploring all the nooks and crannies while playing sardines.
Woodbox Sardines

We hung out in our pajama onesies.
Christmas pajama party

We played pond hockey.
Pond Hockey

We made perogies (and then ate them).
Perogy Making Time

We got to meet our nephew Jacob for the first time. He’s a real cutie.
Play Time
Walking Jacob

We went for wintry walks with the dog.
Manitoba Sunrise

We lit bonfires  …
Bonfire

and set off fireworks.Christmas Fireworks

More photos on Flickr.

Posted in Family, Holidays, Uncategorized | Tagged | Leave a comment

Remembering Baba Coulson

Baby Christening Baba & Dido Coulson

Christmas wasn’t the same this year. Just before we arrived in Manitoba, my grandmother passed away. We all knew it was coming but it still made it hard to enjoy family time when she was missing.

Baba was a huge part of my childhood. My cousins and I spent every summer, from 5-15, with her on the farm. My parents, aunts and uncles would visit, but for the most part she looked after us (up to 7 grandkids) on her own for two months of the year. We had chores (like picking weeds and feeding the animals) but she did most of the cooking and cleaning. She was a mother to 5 children and a second parent to 7 grandchildren. It must have been exhausting but she made it look easy.

Some of my fondest childhood memories are of the summers I spent with my cousins and Baba on the farm. I learned to swim in Sandy Lake, we played cribbage and crokinole in the evenings, we picked raspberries and chokecherries, and she made the best homemade bread.

Baba Perogy Boiler

She gave each of her grandchildren a trip anywhere in Canada for our 9th birthday. I chose Churchill – an odd choice, but we had a blast. We took the train up (a three day journey) with interesting people from around the world, rode a tundra buggy looking for polar bears (we didn’t find any but they let me drive for a while), ate the most amazing arctic char, and froze our butts off, even in March.

A few weeks before she passed away, I was able to talk to her and say good-bye. It wasn’t easy, but I know it’s not an opportunity most people get. She looked tired, but her mind was still sharp. She remembered things I had long forgotten. She never complained, but it must have been hard having her body fail her when her mind was still so strong.

Good bye Baba. I hope one day that my kids get the same opportunity to spend quality time with their grandparents.

Continue reading

Posted in Family, Uncategorized | Tagged , | Leave a comment

Peter and the Starcatcher – Review

Starcatcher_advance_0048-s
I had a chance this weekend to check out the brand new BMO Theatre Centre and watch the newest Arts Club play Peter and the Starcatcher. It was excellent – one of the best plays I’ve seen in Vancouver. I highly recommend checking it out if you can get tickets (it has been selling out).

The theatre is conveniently located across the street from our apartment – which was much appreciated during Saturday’s winter storm downpour. I’ve been watching the construction crews scramble to get the theatre ready on time. They barely made it, but the theatre looks great, especially the stage.

BMO Theatre Centre

BMO Theatre Centre

For Peter and the Starcatchers, the wings are open and you can watch the actors using drums, a giant sheet of metal, and other props to create the show’s sound effects. Long ropes are creatively used for many of the visual effects, standing in for a boxing ring, the mouth of an alligator, and the waves of the sea.

Starcatcher-280-s

The show has some sentimental moments, but most of it is light-hearted and extremely funny. The whole cast is great and there are some fabulous voices and catchy songs. The actress who plays Captain Black Stache was a real standout, mixing physical comedy, witty lines, and great comedic timing.

I’d say more, but I don’t want to spoil your experience. Go check it out. You won’t be disappointed.

The first and last photo are from the Arts Club website.

Posted in Theatre, Vancouver | Tagged , , , , , | Leave a comment

Great Climate Race

Great Climate Race
I’m all set for the Great Climate Race. I’ll be running 10km around Stanley Park this morning. The event is the perfect merger of two of my passions – running and environmental activism.

The money raised by the race will go to fund new solar installations around BC. You can donate here

I’m not in the best of shape, but I’m hoping to go under 43 minutes.

–Update–
Official Results: 41:36
Strava: 41:45

EnerNOC Vancouver Great Climate Race Team

Vancouver's fastest and most climate conscious employer. Good job Team Enernoc! Really impressed with all the PBs today, and the well organized race. #greatclimaterace #run #runvan

Team Enernoc – representing the fastest and most environmentally conscious employer in Vancouver. I was really impressed with all the PB’s today.

More pictures:
Continue reading

Posted in Environment, Running, Vancouver | Tagged , , , , | 1 Comment

Celebrating World Vegan Day with Perogies and a Cowspiracy

Vegan Perogies
Happy World Vegan Day!

I celebrated with some tasty perogies (recipe from Lindsay is Vegan) and a documentary – Cowspiracy on Netflix.

Generally, I’m not a fan of environmental/vegetarian documentaries, but this one impressed me. The filmmaker does a great job exposing the shocking lack of focus on animal agriculture’s role in causing a lot of the world’s environmental problems – include climate change, deforestation, and water shortages. I would definitely recommend watching this one.

Cowspiracy Infographic

Posted in Environment, Vegan, Vegetarian | Tagged , , , | 2 Comments