CS 215, Unit 4

While this unit begins with some basic statistics concepts (mean, median, mode, maximum, minimum), it quickly shifts gears to talking about partitioning and sorting lists. A couple of versions of code for finding the kth largest element of a list are presented, leading to an in-depth discussion of heaps, which are a particular type of tree useful in dealing with sorted data.

The problem set for this lesson starts out with two strange problems that don’t seem to line up with anything done in the unit. However, once you realize that the question is really asking for a central value in a list, it’s not a big leap to realize that the unit only covers three central elements in a list: mean, median, and mode. From there it’s pretty easy to either determine which one, or try out all three and see which one works.

ASTR 160, Lecture 6

This lecture (which is mislabeled on youtube) talks about a second method for detecting planets. When a planet passes in front of a star, known as a transit, the luminosity of that star decreases in a very predictable manner. Unfortunately, for this method to successfully identify a planet, the orbit of the planet needs to be “edge-on” so that the planet actually passes in front of the star and not just above or just below. While this means a lower percentage of planetary systems can be identified in this manner, it is also easier to do than the Doppler-based observations, and so the method has been successful in finding previously unknown systems. In addition, this method has been applied to systems previously thought to have Hot Jupiters, and the observations line up perfectly with the Doppler shifting, making it extremely unlikely that there is an alternative explanation for the data.

However, this still leaves a hole in our theory of planetary formation, which predicted that only small, rocky, terrestrial planets would exist that close to the sun. The currently accepted explanation is that of planetary migration: the planets form in the outer regions we would expect, and then have their orbits slowed so that they fall closer to the star.

ASTR 160, Lectures 4 and 5

Lecture 4 begins with a suggested theory of planetary formation based on our solar system. It sounds very nice, until he works through the data from the first exoplanets discovered: planets larger than Jupiter in shorter orbits than Mercury (referred to as “Hot Jupiters” for obvious reasons). These planets were discovered by observing the Doppler shift in the light emitted by the star caused by the orbit of the planet. As the planet moves towards us, the star moves away, and the light is red-shifted; similarly, as the planet moves away from us, the star moves closer, and the light is blue-shifted. Unfortunately, the existence of Hot Jupiters is not at all explained by the original suggestion for planetary formation.

This Hot Jupiter discussion continues in lecture 5 (after providing some interesting comments about the homework problems) with a bit more detail on the observation process, as well as two proposed explanations for the observations other than Hot Jupiters: double star systems and pulsating stars. Both of these counter-theories are refuted with some additional details on the data that was observed, but a new theory of planetary formation is left for lecture 6.

CS 215, Unit 2

The course continues with more introductory material, going into more detail on the two main topics of unit 1. Runtime is expanded by explaining big-Theta notation, while graphs are expanded by talking about chains, rings, trees, cliques, hypercubes, and planar graphs. The two topics are then combined by talking about randomly generating graphs, and analyzing the runtime and output of a couple of pseudo-code examples which generate particular types of random graphs.

CS 215, Unit 1

Now that 212 is over, I’m starting a new Udacity course: CS 215, “Algorithms”.  Unit 1 started by introducing the concept of graphs, and gave a couple of examples of Eulerian Paths. It then used a couple of multiplication algorithms (including an interesting method dating back ancient Egypt) to give a brief intro to running time. The problem set was a little annoying, as running time at this point is just in terms of arbitrarily defined “steps”; these will lead into big-O notation very shortly, but this unit required some guess-work to figure out the exact values for constants in the runtime formulas.

CS 212, Unit 7 and Exam

The final unit doesn’t introduce any new content; instead, it consists of a few short interviews with various guests. None of them were overly exciting, even though there were some interesting speakers, including Guido van Rossum, the original designer of Python.

The final exam was very long, and I’ll admit I got bored midway through. Some of the questions were interesting, but they involved a lot of coding beyond the concepts in the course in order to work. I made sure I understood which course concepts were relevant for each question, and that I knew how to apply them in those situations, but I wasn’t interested enough to do all of the extra work required to build up the context for those applications. Perhaps I’ll go back in the future and finish them off, but for now I’d rather start something new.

CS 212, Unit 6

One of the problems I’ve noticed in my (limited) experience with computer science classes is that increasing the complexity of the problem by a small amount can increase the complexity of the solution by a large amount. In this case, it’s a jump from some simple games and logic puzzels of the previous two units to an attempt in this unit to find the best move in scrabble.

From a problem standpoint, it’s basically the same idea as before: try every possible move, and then pick the one with the highest score. But the code involved in doing that becomes very complicated; in order to keep things moving froward, most of the work is done by the instructor, and the student is left to fill in some fairly trivial blanks. It’s interesting to see the more complicated outcome, but listening to someone explain their program is overall less engaging than doing the work yourself. In addition, the difficulty of testing comes into play again, making some of the exercises annoying to complete.

CS 212, Unit 5

It seems that my perceived difficulty in this course is almost entirely based on my familiarity with the subject matter beforehand. This unit dealt with some probabilistic programming and game theory, which I have spent some time thinking about, but never in a big way. The goal of the exercises was to find optimal strategies for some simple dice and card games. It was very interesting, and a little surprising how easy it is to write code that finds an optimal strategy (when the games are simple enough that trying every option is feasible). The problem set was tricky, primarily because it was almost impossible to test; once you get more than one or two moves away from the end of the game, it’s impossible to do the same computations as the program by hand.