Archive for November, 2006

Exploiting Symmetry

Posted in Physics 3 years, 9 months ago

A recent article by Coleman on exploiting structure for portfolio optimization is an eyeopener for realtime optimization. The article talks about decomposing a dense matrix into a diagonal matrix and a linear term. The diagonal matrix can be solved in linear time O(n) as opposed to polynomial time O(n^3) for the full dense matrix.

Symmetry can also be used in speeding up particle dynamics. Routines like molecular and celestial dynamics propagate in time by solving Newton’s equations of motion. If every body interacts with every other body in the system, the interaction graph of N bodies will be a complete graph K_N, ie with N(N-1)/2 edges. Simple implementations will store the interactions in the graph’s square adjacency matrix of size N, with N^2 entries. The use of Newton’s third law

\vec{F_{ij}} = – \vec{F_{ji}}

allows us to populate just half the matrix. This results in a huge increase in speed (either for simulation or control.) I’ve created a contour plot of a symmetric random matrix with zeros along the diagonal to demonstrate the fact.

Symmetric matrix

Further reductions can be made in mechanical systems with symmetry. If the set of canonical transformations on the phase space is a symmetry group, leaving the Hamiltonian invariant, then the equations of motion can be brought down to a lower dimension space of orbits of the symmetry group. Why re-calculate something that isn’t going to change?

Further, if the equations of motion are invariant under a set of transformations (either in space or time), then conservation laws are realized. This is Noether’s Theorem.

In conclusion, though disguised most times, structure and symmetry show up in problems all the time. This post was inspired by rod’s post on the fenews article. Thanks!

Spell checking in emacs

Posted in Misc 3 years, 9 months ago

One of my favorite minor-modes in emacs is the flyspell-mode. It continuously marks all words not found in the ispell-dictionary as you type. It’s particularly useful with AucTeX because it skips comments and TeX markup.

Flyspell emacs

If you want to invoke flyspell-mode everytime you go into LaTex-mode, add this hook to your .emacs file:

(add-hook 'LaTeX-mode-hook 'flyspell-mode)

The tipping point

Posted in Misc 3 years, 9 months ago

Upon the recommendation of a business leader I highly respect, I read the Tipping Point by Malcolm Gladwell. This book talks about uncorrelated incremental changes that lead to a giant change (think runaway process.) Malcolm’s background is in disease propagation. The tipping point is when an epidemic reaches critical mass, at which point it becomes very difficult to contain it. You can see similar trends in nuclear reactions, word-of-mouth viral marketing, and ofcourse rumors.

On a related note, over the last few months, I’ve noticed an increased interest in running Linux as the primary platform. People seem to be amazed that a default installation of a modern distribution like Fedora or Ubuntu comes with so much fully functional, free software. Is this the tipping point for the adoption of Linux?

I find this very intriguing. A couple of years back, my friends and I started a Linux User Group at SFU called SFLUG. Back then, there seemed to be artificial roadblocks to the adoption of Linux (most important of these were the “free” availability of Microsoft software.) Having used Linux for over half a decade, I didn’t understand this at that time. Now I think I do.