Wednesday, November 4, 2009

The Secret to Learning Tricks

As you get better and better at a subject, you start to develop intuitive tricks to make your life easier. For example, many people know that multiplying something by 9 is easy. Multiply by 10 and subtract itself once. Or, how about multiplying 2 digit numbers by 11? You could do the 10+1 or split the digits and the middle digit is the sum of the outer two (don't forget to carry if required into the 100s digit).

While these all seem fairly common knowledge, there's a serious flaw with trying to teach these "tricks". That is when you try to teach the trick but don't give proper foundational knowledge of why it's a trick.


Returning to the multiplying tricks, the real reason these work is because multiplying is effectively shorthand for multiple additions of the same number. Without that foundation, these tricks may appear as magic. To the uninformed, these tricks are true just because. Sure they help out in a test, but when it comes to applying the concept of multiplication to other problems (like multiplying by 12) they may falter. The trick has become and answer, not the shortcut to the deeper underlying system.


This problem was recently accentuated when a friend still at Mudd posted a question about STEMs. It's a class that deals with signals and systems and moving between time and frequency domains due to sampling and a host of other things. One of the concepts is that when you sample something, you could be seeing a lower frequency of something much higher, but you're not sampling fast enough to notice. It's called aliasing.

Say you have a 1Hz signal, amplitude 2. When you sample it, in a perfect world, you would see spectra at the +1Hz and -1Hz in the frequency domain, each magnitude 1. However, say you sample it at 2Hz. Assuming we sample perfectly in phase and see each peak and trough, the sampled data could have come from say a 2Hz signal. Or 3Hz. To show this, the students are taught that their spectra lines in the frequency domain are shifted. So, the frequency domain will have spectra at the +2Hz and -2Hz points, the +3Hz and -3Hz points, and so on.


Here's the problem. They were taught that to do this you essentially copy and paste the spectras in regular intervals. So, you take the +/-1Hz signals, move it right by 2Hz, and you get a +3Hz and +1Hz spectra (magnitude 1). However, the students thought you add these new spectra to the original spectra, resulting in magnitude 2 spectra at the +/- 1Hz positions. This is weird. Now, if we "reconstruct" the signal, we have a 1Hz amplitude 4 signal? Whoa, where did that come from! I thought we started with a 1Hz amplitude 2 signal! GAAAAAH!

You see, the trick took over instead of intuition about what they were doing. In reality, the aliasing effect they were doing when moving the spectra around doesn't involve adding in the way they thought it did. The fundamental idea is to show that this could be a amplitude 2 signal with a variety of frequencies, but we don't know them because we sampled too slowly. The extra weird addition step broke things. Sure you add the spectra in general, but not in the way they were applying the trick.


Similarly, a course I'm currently TA-ing is EEC180A at UCDavis. It involves digital circuitry. There is a special kind of code called a Hardware Description Language (HDL) that lets you effectively write code for how you want your circuit to work and the computer will figure it out and implement it for you. This is a really cool trick! Saves you lots of writing and figuring out the optimal gate set up.

However, they first make them build very complex circuits using wires and physical gates. This is to build the intuition of how to design a circuit. At the end of the day, the HDL has to translate what you wrote into circuitry. If you improperly code something, maybe the computer will figure out a way to make it work functionally, but it will be a mess. The correct way is the use the code as if you were designing gates and wires. Again, the trick saves time, but fundamental understanding of what is going on inside is crucial.


That isn't to say we can't black box things. Since you are reading this, I'm sure you're using a computer with internet. Do you really need to know how the trick of pushing a key on the keyboard works? Or how your computer sends messages to servers and gets this blog? Or the way your modem protects you from hackers? Nope. We've simplified it to so you don't have to.

Then again, the moment your special simplified streamlined trick breaks, do you know how to fix it?

No comments:

Post a Comment