2007: J F M A M J J A S O N D
2008: J F M A M J J A S O N D
2009: J F M A M J J A S O N D
2010: J F M A M J J A S O N D
2011: J F M A M J J A S O N D
2012: J F M A M J J A S O N D
2013: J F M A M J J A S O N D

# Blog, by category: personal

from the desk of travis johnson.

## some tips for project euler problems (from 2013/01/26)

I wanted to make a list of a few tips on solving Project Euler problems that have been helpful for me while I solve them. These are general principles, even though I do most of my Project Euler coding in Python.

• If the problem is asking for something concerning the number of digits, typically this indicates that the use of the function is warranted.

• If the problem is asking for the last few digits, modulo arithmetic might speed it up considerably.

• Some might consider this cheating, but looking up some small numbers in the Online Encyclopedia of Integer Sequences is occasionally pretty helpful.

• Many problems boil down to: Find numbers with property and property . Two solutions are:

• Brute force: Try all numbers with tests of property and .

• Find numbers with property and filter by a test of property .

• Find numbers with property and filter by a test of property .

• Find the set of numbers with property and the set of numbers with property . Compute their intersection.

I've found that it's sometimes hard to predict which one will end up being the fastest. It depends on the relative speed of the tests and the generators, and the frequency of finding numbers which have that property.

## Some Recent Photography (from 2012/12/16)

My girlfriend and I were out by the lake taking pictures recently. I was trying to get the Chicago skyline, but we really weren't in the right place for it. So instead I settled for taking some long exposure photos of stuff I found.

I think they came out pretty good, especially because it was all a ruse to get her to the lakefront so that I could ask if she would marry me. She said yes!

## Perturbation Theory Problems with bvp4c (from 2012/10/22)

I have been watching Nathan Kutz’ lectures on Coursera. One change he made to the course since I took AMATH 581 at University of Washington was introducing the MATLAB function bvp4c. I immediately realized that this would be nice for solving boundary layer problems that arise in asymptotics.

Following my life philosophy of doing the dumbest thing that could possibly work, I tried implementing Nathan's code for a single-layer boundary layer problem from Holmes, Chapter 2:

The code for this DE looks like:

clear all; close all;clc
epsilonVec = [1,1e-1,1e-2];
BS={};
for i=1:length(epsilonVec);
epsilon = epsilonVec(i);
singular_rhs_anon=@(x,y) [y(2); (-2*y(2)-2*y(1))/epsilon];
singular_bc_anon=@(yl,yr) [yl(1)-0; yr(1)-1];

init = bvpinit(linspace(0,1,20), [0,0]);
sol = bvp4c(singular_rhs_anon, ...
singular_bc_anon, init);
x = linspace(0,1,1000);
BS{i}=deval(sol, x);
end
plot(x,BS{1}(1,:),x,BS{2}(1,:),x,BS{3}(1,:));
legend('\epsilon=1','\epsilon=1e-1','\epsilon=1e-2');


Here, the rhs function works exactly like a standard ODE45 call(turn the second order DE into a system of first order DE; coefficient on term should be 1). The bc function specifies the right and left bounds. The guess given to bvpinit is critical, but it seems that worked okay here. Also note that the granularity might need to be turned up for more difficult problems. Finally, note the use of anonymous functions to define a function without a separate MATLAB .m file.

This generates plots like the following:

This is a pretty slick way to solve boundary layer problems!

There's a lot of existing stuff out there on this. A quick google search for 'perturbation problems with bvp4c’ turned up:

## McCormick Interview: Outreach 101 + QUALS (from 2012/06/14)

I was interviewed and given a semi-prominent placement in Northwestern's McCormick Magazine for the outreach work that 2011-2012 NU-IEEE President Curtis Wang and I have put together. Permalink to article. It was a really nice writeup and really great to get to throw out a mention of Joyce Stark!

In other news–I had a crazy couple of weeks due to preparing for (and eventually, taking!) my PhD qualifying examinations. They consist of a panel of three professors questioning me on intricacies of material that I've been learning over the last couple of years, namely: Numerical PDE methods, Analytic PDE methods, and optimization. Professor Kath had a particularly interesting question where I derived the heat equation from a minimum-energy problem. The exams went for 95 minutes, followed by a 5 minute deliberation, after which each professor came out with handshakes and congratulations.

It was a great day!

## digital photography (from 2012/03/29)

Recently I've decided to dedicate a slight bit of time to get a bit better at taking pictures. I'd always wanted to get a truly nice camera, and the opportunity presented itself, so I decided to go for it and bought a Nikon D5100 DSLR. I also ended up getting a complete steal on the Nikon 55-200mm DX VR lens, which was pretty awesome. Project 365 would be a great move from here, since I'm certainly no photographer, but it's been fun just learning about it all the ins and outs and how it all works together. In any case, I did start a Flickr: drtraviscj account which I'll be posting stuff.

More later.

## Happy Birthday To Me (from 2008/10/26)

I should have written this up sooner, but I guess it worked out well because the last of it didn't happen until just recently.

My friends did a fantastic job of throwing me one hell of a birthday this year. Beals made it up a little bit early to begin the celebrations with food and manly stuff. Then Katie and I had a joint birthday dinner at Boca de Beppos. Tuesday Sharvil and I made it out for a while. Wednesday we had a nice dinner at Shultzy's, though they're kindof in the doghouse for the service that night. Thursday Jackie took me out to Sonrisa, which was absolutely delicious. And finally, Friday night Jackie gathered up a bunch of the Brazil crowd into Finn MacCools, and it was absolutely wonderful to see them all.

Grandma also sent a few bucks my way. I'm still trying to decide what to do with that. The new MacBooks are really flashy and great, and pretty tempting… but I'm a <em>long</em> way off from one of those. There's a chance I could make up the difference by shuffling some stuff around, but my last few attempts to sell stuff on CraigsList have not been all that impressive. NewEgg has a 3.16ghz Core 2 Duo that is very, very tempting… but would require some other upgrades.

But for tonight, and probably tomorrow, it's back to German and trying to not get too distracted by such possibilities.

## Smart People Shows (from 2008/10/26)

Sharvil and I started watching Numb3rs today, from the pilot episode. We both basically decided that it's really nice to watch shows that are sortof motivational in a way. Admittedly, they're mostly designed to motivate you to watch more shows… but I think Numb3rs has been an important show for me, if for no reason other than motivating me to keep working on stuff when I'd rather not or when I'm nearly too frustrated to keep going. (I have been watching it for a couple years now, if that wasn't obvious). Anyways, it's usually worth the Numbers Painfully Awkward Lines and just general cheesiness and admittedly odd scenes. (Look up Numb3rs on TheRecapist and prepare to giggle a bit.) And it turns out a fair bit of the math is pretty legit, even if usually the equations he's writing on the boards are sortof generic and not necesarily what he's talking about.

But in any case, it has occurred to me that I really enjoy watching shows about smart people, or the nearest approximation you can get while still being a show. Charlie Epps is maybe the closest to what I aspire to, but Brennan and House in Bones and House MD are both great, brilliant characters. I have to say that the last season finale of Bones was a little sad in this respect, but you'll have to watch it yourself–I won't spoil it! And House goes without saying. Though, I think he 'try the craziest thing you can think of and run with it to see how far it will get us’ works better in math and computing than medicine. At one point I had a list of the top ten episodes of House… I'm not sure I could come up with such a solid list for Numb3rs, but it'd probably be worth a try. Another day, another blog.

## Of Weddings and Best Men (from 2008/07/15)

This past weekend I had the honor of being the Best Man at my sister Crystal’s wedding. It was a beautiful wedding at Silverlake Winery in Zillah, WA. I highly recommend it to anyone looking for a pretty spot like that, and it was definitely adequate for our relatively small 120 person party. Also, the wine was excellent. I enjoyed their Chenin Blanc most of the night, though I tried everything about twice, and ended up going home with some of their Reserve Chardonnay.

I had what I what I wanted to say for the speech typed up, so it wasn’t a whole lot of trouble to polish it off with a little bit of typesetting  and post it here. It received unianimously good feedback, and was a great moment for me. I feel a little bad, because I sorta feign unassuredness to hear how good it was again, but so far everyone seems pretty happy to oblige. On a distantly related note, I’d really like to get in the habit of speaking more often. I m ight look into Toastmasters when I get back from Brazil. Anyways, here’s a link to the speech:  A Toast for Jared and Crystal Mathey

## Introducing… me (from 2007/06/29)

Or not. Ok, so… Every previous blog attempt has been a pile of crap. Well, therealtravisjohnson wasn't always, but it kinda got stale. So, I'm not gonna bother talking about me until I have a substantial amount of posts.

I got owned on my math quiz today. It's kinda ridiculous that we have a 60 minute quiz after 3 hours of lecture, I feel. Thank god I've largely gotten over the not studying well phase.

Work is going well. I read a bunch on RRDtools and Nagios, and I'm in the process of getting mouradserver1 up and running. It will be our host for the APL wiki, nagios, backups, and who knows what else.

## Where I'm At (from 2007/03/03)

So it's almost the end of Winter Quarter 07 at the University of Washington. It's cold and rainy and lame. Last week I got turned down from the Computer Science program here, which meant I spent the weekend generally freaking out.

In any case, I then remembered that I liked the idea of an ACMS degree. The base of the major consists of the physics series, a Numerical Methods course and a Continuous modeling course from the AMATH department, and discrete models and statistics from the math department.

They have a Discrete Mathematics and Algorithms option, which means I take: A mathematical proofs course, a data structures course, a course on Computer Systems, either a programming languages course or an artificial intelligence course, and an Algorithms and Complexity course. Then I take some classes on linear, nonlinear, and discrete optimization or combinatorial theory.

They also have a scientific computing and numerical algorithms option. With this, the CS courses get traded for some Numerical Analysis math classes and 11 elective credits. This doesn't sound as exciting, but it still sounds pretty cool. Probably I'll see how the other stuff goes.

This next quarter I'm signed up for Math 310 and AMATH 353(And german and macroeconomics). The german and econ are for gen-ed requirements. Math 310 is a pre-req for math 327 which is a prereq for the 464 series math courses, as well as a major program requirement. I wouldn't take AMATH 353, except that Kutz is teaching it. It was never a dull one.

Now, why do I have a blog about all of this? I'd like to chronicle my endeavor into the world of mathematics. So we'll see how it all works out, I guess. Next up: talk to some advisors. (backposted from a really REALLY long time ago on Feb 8, 2009)