Combining Physics and Computer Science


Ben Breech
babreech@gmail.com

1. Introduction

(Still a work in progress. I haven't even proofread the thing yet...)

This is just some thoughts I wrote down concerning my experiences combining physics and computer science and also some advice for those looking to do the same. It may or may not be useful to you. If it is, great! If not, well, thanks for stopping by anyway.

1.1 Why should I care about your opinions?

Well, that's always a good question to ask when reading somebody else's opinion. In my case I like to think that my opinion matters because I'm doing two PhDs at the same time. Yes, you read that right, I am actually working on a dual PhD degree. Why I'm doing that is the subject for another column. Given the subject material one could infer that I'm doing a PhD in Computer Science and Physics at the University of Delaware. At the time of the first draft of this column (summer 2003) I had passed all my course requirements, the qualifier exams for both departments and have had a few publications. My undergraduate work was at Shippensburg University in Pennsylvania and was also in physics and computer science. In other words I've seen it all from the academic perspective.

My rather ambitious (and perhaps insane) academic program made no real attempt at combining both programs in the sense of skipping a few courses or requirements here and there. There just wasn't any realistic way to do that and still get a PhD in both places. I have been, for all intents and purposes, two different grad students; one existing in the physics department and one in the computer science department. Nonetheless, I have thought about various combinations of grad level degrees between the two areas, and what things are more important for different goals. You'll find those thoughts down below.

I've divided the sections up into undergraduate and graduate life as that seemed a rather fitting division to make. I would encourage you to read both sections, but at least read the section that applies currently to you.

2. General Stuff

2.1 Do I really want to do this?

Yet another astute question to ask. Combining two areas of academic study is never easy but it's more difficult in the case of physics and computer science because those two areas are each by themselves extremely challenging and arduous areas to work in. Combining these two, at any level, is not for the feint of heart. The best advice I can offer you about this is the following:

So, brave knights, if you do doubt your courage, or your strength, come no further...
-- Tim the Enchanter from Monty Python and the Holy Grail

The quote may be humorous but the point is very serious. Combinining the two areas is damn difficult at any level of study and only gets worse as you progress. You really need confidence in yourself and your abilities to pull this off.

Please don't take the previous paragraph as meaning you should never ever try combining the two in some fashion if you have the slightest doubts. If you're not sure then you should start small by taking a couple courses in the weaker subject and see how it goes. If they go well then contemplate going for it all, but I'll have more to say about various combinations later.

2.2 Nice try at scaring me off, but I'm still here. Now, why would I even want to contemplate such a thing?

Good! You're still here. You have evidently have some confidence and, obviously, some fortitude since my writing style apparently hasn't caused you to go into a psychotic rage yet. Why you would want to do such a thing is a good question. Let's look at it from two different perspectives.

2.2.1 I'm a physicist

Physicists have good reason to learn some computer science. Numerical techniques and simulations are becoming more important as we look at more complicated phenomena (do doo do do, sorry. You probably don't remember the Muppet Show so that one just flew over you head. Sigh.) Nonlinear problems such as turbulence are near impossible to solve unless you're studying simplified cases or extremely watered down examples. You need programming skills so you can see the really cool stuff going on. (An aside though: whatever you do, don't let your analytical skills waste away. Computers are very useful but you still need some intuition about what it is you're doing. You can only get that by either being an incredible genius like Einstein, or Kolmogoroff or by getting the pen and paper out and trying things. Maybe I'll write another column about this at some point.)

At this point I need to clear something up. I said in the previous paragraph that you definately need programming skills. That is alot different from computer science. I get a sense from talking to some physicists that they think computer science is just programming. No. Wrong. Thanks for playing. Next contestant please. Saying such things is akin to saying "Physics is just putting numbers into equations." Find me a "physicist" who thinks that and I'll show you someone who doesn't have a clue as to what their job is.

I have never seen any really hard and fast definition of computer science, just like I've never really seen a hard and fast definition of physics. For me computer science is the study of how computers work, similar to physics being the study of nature works. This is why studying computer science, and not just programming, is useful for physicists. You're going to be spending a significant chunk of time with the things. Life will be alot easier if you know what's happening under the hood. Don't know why sending a single integer from within MPI is wasteful? Take a networking course and you'll find out in a hurry. Know anything about cache? Do you know various tricks that can help you take more advantagous use of the cache? Take an architecture course and you'll know. How 'bout what a compiler does? I mean you will use the things all the time, but do you know what it does? Do you know what it can do for your code in terms of optimizations? Take a compiler course. Get the idea yet? Computer science, and not just programming, can help a great deal in your day to day work.

2.2.2 I'm a computer scientist
Ah, so you already know some things about computers and are wondering why you may want to study physics. Part of this would depend on what you want to do. Wanna be a game programmer? Take physics. Especially mechanics. More and more game companies want people who understand physics so that they put more realistic models into their games. Wanna do computer science research, especially graphics? A fair bit of such research involves modeling things in realistic fashion. Realism can only be obtained if you understand the underlying physics.
2.2.3 A reason that applies to both
I put this section in here to go over another reason to combine the two; a reason that applies to both areas. I don't think this reason is mentioned as often because it's hard to quantify. Nonetheless it's something to be thought about.

A reason to combine the two areas is for the mental discipline and problem solving skills you get from both. I can see some of you rolling your eyes thinking that I must have finally slipped off my rocker, but I'm serious. When you take courses in a particular area you learn not only the subject matter but also start to pick up how to go about solving problems. If you don't then you're not paying enough attention and should wake up more in your classes.

In computer science we learn to think logically. Actually, the more precise term would be algorithmically. We think in terms of how a computer solves problems. This is a plus and a negative. The downside is that some people take it to extremes and can only think in terms of rigid boundaries. However, the upshot is that we learn to take a problem apart, break it into smaller pieces and think about solving that particular small problem and then combine the pieces together. Yes, we do this in physics too, but not nearly to the extent that it is performed in computer science. You'll get much more practice at it in computer science.

Physics, though, provides its own problem solving skills. You learn (and quickly if you want to be successful at physics) about being careful in your work and checking for consistency. A simple example of this is solving elementary mechanics problems, such as throwing a ball off a roof top where you want to know how long before the ball hits the ground. When you solve it you get two different answers, a positive and negative one. Both are mathematically correct, but only one makes sense for the problem; the positive answer. The negative time would correspond to the elapsed time before you threw the ball. This is only a simple example. As you progress further in physics studies you find more complex ones. It is never enough to simply solve the problem, you also must understand the problem enough to throw away any mathematical nonesense. This includes checking limits to make sure sensible answers come, that the units are correct, etc. This type of checking isn't stressed as much in computer science. There we simply try to get a solution, and make sure there are no bugs.

Physics encourages examing the big picture. We first analyze a problem to get a sense of what we should try and then go to town on it. I'm not describing this very well and I'll have to think more about it. I know it sounds similar to the computer science approach of breaking a problem down but there's some subtle issues involved; issues that I haven't fully thought through.

Physics also encourages intuitive leaps. You would be surprised how many clever solutions to physics problems there are. There is an art in applying approximations to problems in order to extract useful information. It's an art that takes a lot of practice (and consistency checks) to get right but it's extremely powerful. Computer science doesn't get into this as much because we spend so much time thinking logically about how a computer would solve a problem.

Despite my blundering this section, I think it is important to realize that the two areas offer alot more than just knowledge about their particular areas. The problem solving skills you get from both are very important and dramatically help, no matter what you do.

2.3 Well, now what?

Well if you're still reading this then it's time to get into more specifics. Most of you will be learning the subjects at the college level, so it makes sense to take a look at combining the two areas from the undergrad level. A few will also take advantage of graduate work so there's a relevant section coming up.

3. Undergraduate Work

At the undergrad level I'm assuming you're majoring in either computer science or physics. The question becomes should you minor, major, or do nothing official in the other area. That last option may sound strange. Why would you do nothing official? Well, some people may want to simply take one or two courses in the other area without necessarily minoring. I think this option is more useful for physicists who are just trying to get some basic programming skills without necessarily going all the way for computer science.

The question now becomes whether to minor or major. Obviously the major will be more work, but may not be a whole lot more. The gen-ed requirements between the two fields are likely to be very similar. Furthermore I think it's also likely that you're fulfill some requirements by using courses in the other field. For example, my undergrad computer science department had a science requirement but you could fulfill that by taking the first two physics courses (mechanics and E&M) which, of course, were also required by the physics department. Similarly the physics department also had the requirement that you had to take the first two CS courses. The result of these types of overlaps is that taking the second subject up as a major may not result in all that many more classes than a minor.

Nonetheless going for the 2nd major may be problematic. You may not have enough time, energy, or finances for it. There are no hard and fast rules for deciding if you should minor or major. It really depends on you and what you're goals are. Here's my thoughts:

There's not much to say about course work and what not. Whatever path you pick pretty much chooses your courses for you. You do get some freedom, but not alot. One recommendation would be that if your CS department offers a parallel programming course then take it, even if it is not required or doesn't fulfill some silly requirement. You could very well find yourself in a position later on to be doing parallel computations. Yes, you could probably learn it yourself when the time comes but there are alot of tricks and pitfalls to avoid that you can either learn the hard way or learn in a class.

4. Graduate Work

4.1 General Headaches

Grad school is where this whole combining thing gets to be extremely difficult. It isn't so much that the courses become that much harder (though they certainly are). It's the administrative headaches that can really make this difficult. Once you join a given department you are under their rules concerning the grad program. Such rules can vary quite a bit from department to department. If you join two different departments then you have to make sure you follow each department's rules and meet their expectations. This can be maddening.
4.1.1 Funding
Funding can also be difficult. If you join two different departments then you have to be very explicit about where your funding is coming from. Do not just assume that one of the departments will just pick you up as that dept. may assume the other one will get you. You need to go to both departments and make sure everyone knows where your funding is coming from.

Naturally if a department is funding you through a teaching assistantship (TA) then they have the right to expect you to be, more or less, one of their grad students. That could mean expecting you to take a majority of your semester classes from them. It could also mean they expect you to place their extra obligations, such as colloquium attendance, and meeting with faculty candidates, over that of the other department.

Your funding could also come from research assistanship (RA). Then the person who is giving you the RA has the right to expect you to be doing sufficient work towards their project. This could lead you to delay or complete forget about some project or obligation in the other department.

The bottom line about funding is that it is your responsibility to keep whomever is paying you happy. If they're not happy then you could lose your funding which opens up a whole other can of worms to deal with (unless you happen to be financially wealthy and can afford grad school on your own).

4.1.2 Advisors
In grad school, your advisor is probably the single most important person you know. Pick the wrong advisor and your life will be a living hell for 5-6 years (think of it as being trapped in a loveless marriage where you can't get a divorce for 5 years). Others have written about picking your advisor so I won't bother. Your advisor is there to help you with your research, get funding, get through the damn PhD qualifier exams, pick the right courses, get a job, etc.

Your advisor is important even without trying to do extra grad work. When you start looking at combining fields, you desperately need to pick good advisors. You need people who understand that you've chosen to go off and combine areas (bonus if they think it's a good thing) because there will be times where one subject requires all of your attention. If you're advisor doesn't understand that (and cut you some slack during those times), then you're going to be in for a rough time.

4.2 The Combinations...

Here we look at the various combinations of grad degrees and the joy they bring. I assume you have some idea of what degree you want and are looking to add to it. I'm sure others have written about the difference between degrees so I won't get into that.
4.2.1 Two Master's Degrees
The primary reasons to get a PhD (in either field) is to go teach at the college level or do research in either an academic institution or at a research lab. If those aren't your career goals, then there's not much point in putting yourself through the stress and anguish the degree brings.

Conclusions

Well, so there you have. My opinions on combining physics and computer science. If you have any comments, or information about your experiences at pulling off the same trick then please drop me a line. I'd love to hear it.

Other updates

I have finished both PhDs.

Someday, I'm going to get back to finishing this essay up.


Ben Breech
babreech@gmail.com