This
week in Computer Science, we learned about sorting algorithms, and, recently, I
learned about eigenvectors and eigenvalues in Linear Algebra, which do share
some grounds for comparison.
Linear
algebra often involves the multiplication of matrices and vectors, in which a
matrix is essentially a grid of numbers and vectors are represented by a column
of numbers. It is not a difficult operation, but it can be tedious. It leaves
lots of room for simple errors in calculation and is wearisome for larger
matrices. However, the concept of eigenvectors and eigenvalues reduces this
time-consuming task into simple scalar multiplication, which is considerably easier.
One
may ask: what's the point of sorting? Can't a collection of items be dealt with
in an unordered manner? Does it really make a difference to have something
sorted? Although sorting isn't always necessary, there are countless cases in
which sorting makes complex tasks very simple. Imagine trying to find someone's
number in an unordered phone book and you'll understand very quickly.
Yes,
you can work with unordered collections just as you can work with matrices and
vectors, but with powerful concepts like eigenvectors and sorting, why not take
the shortcut where applicable? There is a large array of tools at our disposal
as computer scientists, since we are able to use a variety of sorting
techniques like insertion sort, quick sort, merge sort, and other sorting
algorithms. The trade-off is worth it most of the time, being able to use a
simple sorting function to make a collection's behaviour predictable and more
manageable.
In
the long run, sorting can make our solution to a problem more efficient and
less time-consuming, just like eigenvectors in linear algebra. I hope to master
and make use of these weapons at my disposal, and I hope you do, too.
I'm sorry, but I still can't see the connection between eigenvectors/eigenvalues and sorting except that those are techniques for approaching particular problems.
ReplyDeleteHaha, I guess that's sort of the point I'm driving at (that they're specific tools that make particular problems easier to solve), but I guess it just made more sense in my head when I thought about it. xD
ReplyDelete