Beautiful Mathematics

While reading an article on the General Unified Theory, I came across a reference to what the author considered beautiful mathematical equations. It got me thinking: what would I consider beautiful math? I must confess right away, that it has been many years since I have done anything remotely advanced in the area of mathematics and not since my master thesis on the mathematical properties of artificial neural networks – drop me a line if you are unable to fall asleep, and I will send you a copy – have I really done any heavy math.

However, the seed was laid in my mind and during my run early this morning I began to consider if I could actually remember any mathematical equations, beautiful or not.

The first one that came to mind was Archimedes’ Recurrence Formula. Being a diver, I have always had a soft spot for old Archi 🙂

Let a_n and b_n be the perimeters of the circumscribed and inscribed n-gon and a_{2n} and b_{2n} the perimeters of the circumscribed and inscribed 2n-gon. Then

\displaystyle{a_{2n} = \frac{2a_nb_n}{a_nb_n}, b_{2n} = \sqrt{a_{2n}b_n}, a_\infty = b_\infty}

Of course the cool thing is that the successive application gives the Archimedes algorithm, which can be used to provide successive approximations to \pi.

The next equation that came to my mind was Eulers Formula or Eulers Identity, which states that

\displaystyle{e^{ix} = \cos x + i \sin x}

where i is the imaginary unit. The beautiful equation arises when setting x = \pi,

\displaystyle{e^{i\pi} + 1 = 0}

The term Mandelbrot set is used to refer both to a general class of fractal sets and to a particular instance of such a set. In general, a Mandelbrot set marks the set of points in the complex plane such that the corresponding Julia set is connected and not computable.

“The” Mandelbrot set is the set obtained from the quadratic recurrence equation

\displaystyle{z_{n+1} + z_n^2 + C, z_0 = C}

where points C in the complex plane for which the orbit of z_n does not tend to infinity are in the set.

The image below displays the famous and well known Valley of the Sea Horses.

MandelbrotSet

The next one that came to my mind was the Riemann Hypothesis.

The Riemann hypothesis is a deep mathematical conjecture which states that the non-trivial Riemann zeta function zeros, i.e., the values of s other than -2, -4, -6, \ldots such that \zeta(s) = 0 (where \zeta(s) is the Riemann zeta function) all lie on the “critical line” \sigma = \mathbb R [s] = 1/2  (where \mathbb R[s] denotes the real part of s).

The Riemann zeta-function \zeta(s) is the function of a complex variable s initially defined by the following infinite series:

\displaystyle{\zeta(s) = \sum_{n=1}^\infty \frac{1}{n^s}}

The Riemann hypothesis can be stated as:

\displaystyle{\zeta(\alpha + i\beta) = 0, \beta \not= 0 \Rightarrow \alpha = \frac{1}{2}}

One could go on and on, but I will finish off with another of my favorites, namely the Gaussian Integral.

The Gaussian integral, also called the probability integral is the integral of the one-dimensional Gaussian function over (-\infty, \infty)

\displaystyle{\int_{-\infty}^\infty e^{-x^2}dx = \sqrt{\pi}}

Posted in Writing | Tagged , | 2 Comments

CNUG Event: Unit testing with AutoFixture

I’m attending the CNUG event this Thursday on Unit testing with AutoFixture.

Speaker is my good friend Mark, the person behind AutoFixture, whom it is always a pleasure to listen to.

Pop over and say “hello” if you happen to attend as well.

Posted in Code, Conference | Tagged , | Comments Off on CNUG Event: Unit testing with AutoFixture

What to read

One of the people I follow on Twitter (@hhariri) asked if anyone had any book recommendations. This is always a good question, but it did not contain any details whether he wanted fiction or non-fiction. I will – most likely incorrectly – assume, that he was interested in non-fiction, and will in the following name a few of the books I have enjoyed reading lately.

As the people who know me are aware, I do enjoy books, and have read my fair share. The “lately” in the above paragraph should therefore be taken literally, except in the few cases where I have come across a very good book within the same genre.

The Foundation series by Isaac Asimov is a classic and it was just as enjoyable as the first time I read it. Alastair Reynolds is also a good scienfiction author. Some time ago I read House of Sun, Pushing Ice and The Prefect, and more recently Chasm City of the Revelation Space-series. I was given Redemption Ark by a good friend, but have had some problems getting a copy of Revelation Space as I would have prefered to read it on my Kindle, and I understand this book should really be read prior to reading Redemption Ark. Unfortunately Revelation Space is not available on the Kindle, making a purchased of a more “physical format” required and I am now looking forward to receiving it one of these days. As a last note, before we leave the science fiction genre, I would like to mention Blindsight by Peter Watts. I was (also) given this book as a gift and I am ever gratefull, as it is one of the best SciFi books I have read, fully comparable to the best of William Gibson (it has been a long time, since we have seen anything worth while from him).

I have always been a fan of detective novels and enjoys a good “whodoneit”. One of my favorite authors is P. D. James and her new book, Talking about Detective Fiction, was not a disapointment, even though it – as the title indicates – talks about what defines a detective novel instead of actually being one. It was fun to get her take on the genre and in addition I got a few titles from the earlier days, I will look forward to reading. Her last novel, The Private Patient, is highly recommendable. Another old favorite is Scott Turow. His latest book, Innocent, is actually a sequal to this very first book Presumed Innocent; yes, it has been made into a decent movie staring Harrison Ford and Bonnie Bedelia, but do yourself the favour and read the book. I must say, that I was slightly dissapointed with Innocent. In my opinion it does not live up to the usual high standard of his other books. An author, whom I just recently got acquainted to, is Val McDermid. She has written several books about Dr. Tony Hill and Carol Jordan. So far I have only read the first one in the series, The Mermaids Singing, and it was excellent. I am looking forward to the next one (The Wire in the Blood) which is already safely stored on my Kindle. Like for the SciFi-books, there is an author which I would like to point out, namely Mark Billingham. His books about Tom Thorne are nerve wrecking and can also be highly recommended.

One type of crime or detective novels that I enjoy is the one set in a historical setting. The books by Ellis Peters about Brother Cadfael comes to mind in this category (A Morbid Taste for Bones is the first) and I think I must have read them all. More recently, however, it is the books by C. J. Sansom about the lawer Matthew Shardlake and Wolf Hall by Hilary Mantel which have given me many hours of good entertainment. Both happes to be set under Henry VIII in England and both are able to convey how it must have felt to live back then – something I am glad I do not. A more recent setting is the books by Tom Rob Smith. He has so far writte two books taking place in the Soviet Union under Stalin. The first, Child 44, if my favorite, but the second, The Secret Speech, is not to be missed. Like Mr. Sansom and Ms. Mantel, Smith is able to give you the feeling of how it must have been like to live in fear under the reign of Stalin. Don’t read Child 44 if you (already) have problems sleeping.

How many “favorites” of something can you have, before it is not a favorite any more? I am asking because I was next going to mention a book by yet another favorite auther of mine John Irving. Ever since The World According to Garp, first published in 1978, I have been a fan. I love his humor, his plots and his ability to tell stories within the main story line. His latest novel, Last Night in Twisted River, fully lived up to my expectations.

It is very individual whether one likes a book or not. I have in the above given just a few pointers to some of the reads I really enjoyed and hope others may find them amusing/thrilling/moving as well. No classics are amongs them, but sometimes it is like that and I have read my share of Tolstoy, Dickens, Kafka, Camus, Hemingway, Green, …. I have also left out all the excellent Nordic authors I have recently read (Næsbø, Adler-Olsen, Dorph and Pasternak, Roslund and Hellström, Larsson, …).  Should you be interested and do you  have a profile at LinkedIn, I try to keep my readling list up to date. I would be really interested in suggestions of what to read next, so drop me a comment if you have a good reading experience you wish to pass on.

Finally, remember that “A book a day, keeps reality away” 🙂

Posted in Private | Tagged , | Comments Off on What to read

Working from home

Working from home from time to time is one of the benefits I really enjoy. My daily commute is around an hour each way, and even though I can fill this time with podcasts and audio books, it is nice to be without it.

You should be careful not to over do it, though, as it can spoil the good synergies you have with your colleagues. However, let’s be honest: working from home is a good thing. You save the transportation, you can spend the morning with your kids and open the door for the plumber, should she decide to swing by.

I came across the following guidelines of what to do and what to avoid, if you are so lucky that you can work from home:

  1. Do not leave your cell phone at home if you leave the house to go shopping or eat lunch.
  2. Pick up your phone – also if you are in the bathroom.
  3. Arrange some short phone meetings with people at work. They hate your guts because you are working from home and this will show them your commitment to your work – also when you are working from home.
  4. Avoid long and complex mail threads with your boss to early in the day as this may result in a call where you have to answer the question of where you are (even if you have been granted permission to work from home, then do not remind your boss of this).
  5. Do not drink alcohol early in the day, just because you are home. This also includes beer for lunch.
  6. Remember to send the long e-mail with lots of attached spreadsheets that your colleagues have been waiting several weeks for. This serves two purposes: 1) It demonstrates that you are in fact doing something and 2) You can be sure no one will react to what you have sent. It is far to complex and takes to much time to read so you get some peace and quiet.
  7. Do not leave your Elvis Costello album playing on the stereo with the volume turned to full throttle when you talk on the phone to your colleagues.
  8. Do not take the phone when you sleep. Let it wake you up. Splash then some cold water in your face. Then call back and say you were in the middle of something important. It may well be your colleagues are looking straight through you, but it was worth the try.
  9. Try to reach your boss very late in the day, but be absolutely sure he has left the office. This is the kind of attitude a boss likes. You are so engaged in your work, that you did not consider your boss might have left for the day when you called.
  10. Dress properly – do not work in your underwear. People will know. No one knows why, but people know if you are talking to them only wearing your undies or g-string.
Posted in Tips | Tagged , | 1 Comment

Palindromic numbers

I was reading an article about palindromes the other day, and came across a formel definition of palindromic numbers.

Although palindromic numbers are most often considered in the decimal system, the concept of palindromicity can be applied to the natural numbers in any numeral system.

For the few who does not know it already, here it is – and it gave me an excuse to write a little more \LaTeX 🙂

Consider a number n>0 in base b\le 2, where it is written in standard notation with k+1 digits a_i as:

\displaystyle{n = \sum_{i=0}^k a_i b^i}

with, as usual, 0\le a_i < b for all i and a_k \ne 0. Then n is palindromic if and only if a_i = a_{k-i} for all i. Zero is written 0 in any base and is also palindromic by definition.

Posted in Writing | Tagged , | Comments Off on Palindromic numbers

Community Day 2010

Going to attend Community Day 2010 at Keddelhallen on May 27.

Not much on the web site yet, but I’m sure Mr. Frost is working hard to fill in the blanks 🙂

Posted in Code, Conference | Tagged , | Comments Off on Community Day 2010

CNUG Event: TDD

I have signed up for the CNUG Event TDD for øvede on 15 April.

The speaker is again my friend Mark. Missed the one he did on MEF back in January, so I do hope I’ll make it this time around.

Come over and say ‘hello’ if you happen to attend as well.

Posted in Code, Conference | Tagged , , | Comments Off on CNUG Event: TDD

Business Travels

It happens I meet people, harboring the notion that business travels are romantic. They believe you get to travel to far and exotic places, get to see mysterious cultures and eat different and unusual dishes.

They could not be more wrong!

The reality is, that all you see is the airport and your hotel, which is often located right next to the airport, hence there is nothing to do in the evenings and you don’t event see the city you are in through a cab window – or get the change to visit the bars and restaurants in the evening. One airport looks pretty much like the next and hotel food is just not that interesting.

In my everyday life I am an “Information Technology Professional” … which is code for I know a bit more about computers than a box of rocks. During my professional career I have done quite a lot of business related travels. The following are some survival trips to make your experiences more pleasant and efficient.

The first thing you should do especially if you travel a lot is sign up with all the reward programs that airlines, hotels and maybe car rental services offer. If possible try to pick a (few) favorites and stay with those. A lot of companies will let you keep the frequent flier miles; I have gotten a lot of free plane ticket on this account. One thing is for sure: if you travel a lot and don’t sign up for these programs, you are plain stupid.

My second advise would be to never check bags with an airline. Take a course in “how to fit all your baggage into one suitcase without ruining your shirts and suits” if you have to (or ask your wife to do your packing). I have several times lost my bag and trust me, it is no fun. On a site note, you might want to memorize the location of the nearest store selling menswear at your destination, if you can’t manage with only carry-on. This reminds me of a time where I was flying into Zurich, lost my bag, and with less than an hour to my meeting ran into a department store and asked a clerk – a most distinguished older gentlemen – for a dark suit, a tie, two shirts (french cuffs), some underwear, socks and a pair of black dressshoes. He looked at me and said: Have you lost your suitcase, Sir?

These days security in airports can be a nightmare, so dress comfortably. I try to wear slip on shoes (sneaker) as these can quickly be taken on and off if required.

Sleep, sleep and more sleep. Make sure to get plenty of sleep before, during, and after your trip.

Try to eat resonably and stay hydrated.

Bring reading material like books or magazines or do like me: stack up your Kindle.

Use Skype. I have for a long time used Skype to keep contact with the folks at home. It is just more fun seeing the person you talk to than just hearing them and then it is cheaper too.

Delays in travel are inevitable. Try to be nice to the airline or travel employees. Even though they might be dorks, screaming at them won’t get you anywhere. Remember that you are only late, when your trip is over, and you are actually late. Instead open your Kindle and bury yourself in your favorite book.

The last but properly most important thing about business travels is having an understanding spouse.

Posted in Private, Tips | Tagged , | 3 Comments

Love of Coffee

One thing I really enjoy is a good cop of coffee and especially if it is served as an espresso, it being a regular espresso, an espresso macchiato or a cafe latte.

Instead of trying to explain how to make a great espresso, please check out sites like CoffeeGeek or Risteriet. If you live around Copenhagen, Risteriet is the place to buy your equipment; those guys have forgot more about coffee that you will most likely ever know.

You can’t make a good espresso without a good grinder. I need a new one and this time I want one for life, so I am seriously considering the Mazzer Mini from Mazzer near Venezia in Italy. According to e.g. CoffeeKid and others it should be the best grinder ever made. It can, of course, be bought at Risteriet.

I would also like a new espresso machine. If money was not an issue I would consider the one group Linea or the GS/3 from La Marzocco in Florence or even better the Cyncra from Synesso in Seattle. Until I win in Lotto I will have to settle for something less fancy like a Vibiemme or an ECM.

A finale note: if you are ever in Århus, do not deny yourself the treat to visit Sigfreds Kaffebar in Ryesgade. They have the best coffee in town. As their bread is almost as good as their coffee Sigfreds have fast become my favorite breakfast place when visiting the city.

Updated: 21.01.2010

After doing some more research into which grinder to buy, I am not so certain about the Mazzer Mini anymore. Not that it is not an incredible grinder that will last a lifetime, but more that I have found an alternative, which should be just as good, even more versatile and at a better price. I am referring to the Baratza Vario. Not only is it extremely capable as an espresso grinder, but you can quickly switch grind settings, grinding for press. I haven’t found a retailer here in Denmark, but you can order it from the UK.

Posted in Cooking, Private | Tagged | Comments Off on Love of Coffee

Star watching

I want one of these.

Posted in Astronomy, Private | Tagged | Comments Off on Star watching