Monday, December 7, 2009

The Power of the Internet

In this blog I reflect on a recent experience, which showed my the power of the internet.

Followers of my blog may have noticed that I wrote an article about the number 3435. In that article I generalized one of the properties 3435 has i.e.

3^3 + 4^4 + 3^3 + 5^5 = 3435

I defined Munchausen numbers in base b and proved that there are only finitely many Munchausen numbers in any base. Although I appreciated the result I never expected that the article would be read. This is where the power of the internet enters the stage.

Soon after I posted my article on the internet, a Andrew Baxter mailed my with some comments and suggestions. After including Andrew's suggestions and posting a new version of the article, I was content. Someone else had read my article, and it wasn't my mom.

After that I got an other mail, this time by Tracy Harms. He told my that my article inspired a discussion on Twitter. The discussion was about understanding the source of a program in the programming language J.
So a lot more people had read my article, even twittered about it.

I just finished googling "Munchausen Numbers" and there are numerous links all about an article I wrote. Without the internet nobody (besides my mom) would have read my article, let alone reacted on it. This experience showed my the power of the internet. And I am in awe.

Tuesday, November 17, 2009

Why I Believe In Strong AI

I am a believer in strong AI. There I said it. In this blog I will motivate my believe.

I think that my brain is responsible for all the acts of intelligence that I perform. How it does it, I do not know. But I think that my thoughts, emotions, feelings and decisions originate in my brain.
My brain is, in a sense, nothing but a machine. It has neurons which interact with each other in a certain way. Nothing in this setup is in any way unique, except the specific complexity attained.

I believe that it is possible that a machinery which acts in a similar way will produce similar result. So if there are a lot of agents who can simulate neurons, and if these agents could interconnecting in a similar way as my neurons do, I believe that the same processes will occur as in my brain.

If such a machine were to be build, it would live in a way I could relate to. It would have feelings like I do. it would have a personality like I do. It would be intelligent.
Such a machine would live and it would die if we would pull the plug.

That's is how I think about it.

Sunday, October 25, 2009

Interesting Destination

I use the train a lot. Everyday I use the train to commute to my work. And although I know the train schedule by heart, I often glance at the electronic information boards.

A while ago I noticed a peculiar destination on the board. Below are pictures of the board and a close up. I never heard of a city called: "mmlh".

I keep wondering: How can a mistake like this be made? And for how long did it go unnoticed?

Sunday, August 30, 2009

The virtues of 3435

Folklore tells us that there is no such thing as an uninteresting integer. For, would such uninteresting integers exist, there would certainly be a smallest among them. But being the smallest uninteresting integer is a very interesting property, hence we should not have found it. The only way around this conundrum is to conclude that every integer is interesting.

Well, today three thousand four hundred thirty five got a little more interesting. Besides having a nice decimal representation, this number also possesses the following curious property:

3^3 + 4^4 + 3^3 + 5^5 = 3435

The only numbers who have this property are 1 and 3435. I know this for a fact because an exhaustive computer search until \(10^{10}\) did not reveal any other then numbers mentioned above.
Furthermore, if \(n > 10^{10}\) then \(n > 9^9\log(n)\) for

\frac{10^{10}}{\log(10^{10})} = \frac{10^{10}}{10} = 10^{9} > 9^{9}

Now, define \(\theta(n) := \sum c_{i}^{c_{i}}\) where the \(c_{i}\) are the numerals that express \(n\) in base 10. Then it can be shown that \(9^{9}\log(n) > \theta(n)\).

Now we know that 3435 is the only nontrivial number with such a special property.

Saturday, August 15, 2009

Highly Palindromic Primes

Over at the μtoast the blogger Attila Oláh described an in interesting property of primes in Highly palindromic primes.

In his post Atilla explores the question "How palindromic is a prime number?". For a prime \(p\) he inspects all the representations in meaningful bases i.e. all bases from 1 to \(p-1\). Attila then counts the number of representations which are palindromes.

In the search for higly palindromic primes, Atilla lists 291721. It is a prime number which is palindromic in 16 bases. I found several highly palindromic primes which are palindromes in 17 bases, and one prime which is a palindrome in 18 bases.

The primes I found which are palindromes in 17 bases are: 950041, 960961, 1062601, 1108801. The prime which is a palindrome in 18 bases is: 1259701.

Which higly palindromic primes can you find?

Thursday, August 13, 2009

A Perl Quine

A quine, as popularized by Douglas Hofstadter, is a self-producing program. A program which, upon execution, will output its own source. I finally took the time to write a quine myself and in this blog I will explain my motivations. I have chosen Perl as the language to implement my quine in, although the ideas are language independent.

The first idea I had was something along the line of

#! /usr/bin/env perl

$program = <<'EOP';
#! /usr/bin/env perl

$program = <<'EOP';
#! /usr/bin/env perl

$program = <<'EOP';

$program =~ s/^\t//g;
print $program;

$program =~ s/^\t//g;
print $program;

$program =~ s/^\t//g;
print $program;

It is an infinite program, so no computer could ever execute it. But it is a quine non the less. It essence is nicely depicted by the following picture.

In this picture the entire ensemble of points is similar to the ensemble with first point removed. (Depicted as a gray point.) The entire ensemble is representing the program, and the ensemble without the first point is the content of the $program variable.

But alas, it is infinite, and although the construction is appealing, it is a bit disappointing. So let's take an other try, staying as close to the original idea as possible. The greatest problem is the moment we start to fill the second $program variable. We been down that road and know it does not lead to anything practical. We will ignore the problem for now and finish our proposal like this.

#! /usr/bin/env perl

my $program = <<'EOP';
#! /usr/bin/env perl

my $program = <<'EOP';

$program =~ s/^\t//g;
print $program;

$program =~ s/^\t//g;
print $program;

Now we are almost there. The only difference between the source and it's output is the part which is defined between the EOP markers. But this part is the value of the $program variable. So if we substitute the value of $program at the right place we are done.

The resulting program can be found on google code.

Sunday, August 2, 2009

Counting Unlock Patterns

In this blog post I will enumerate the number of unlock patterns of the andriod operating system.

Imagine a square array of points, arranged in a three by three formation. We set our selfs the task of tracing a path through a number of these points subjected to the following rules.

  1. No point can be visited twice.
  2. If a point obstructs an other point, the obstructing point should be visited first.

I will illustrate rule two with an example. Let's say we start our path in the lower left point of our arrangement. Our goal is the upper right point. If we would trace a pattern from our starting point to the target point we visit the center point, which should be included in our path.
Here is an other example which also illustrates rule one. Now our path starts in the center point and again our goal is the upper right point. Instead of directly going to our target we make a little detour via the lower left point. Because we started in the center point, it does not obstruct our goal any more and we can go directly to our goal, the upper right point.

This lengthy explanation is in fact a description of the android unlock pattern. Being a proud owner of a android phone I pondered about the question: "How many unlock patterns are possible". So I set out and wrote a little script to enumerate the different unlock patterns.

The following tables summarizes my findings. The first column list the path lengths. The second column list the corresponding number of unlock patterns. So there is a total of 389498 unlock patterns.

Pattern length#Patterns

The most important section of code is displayed here below. It recursively builds a tree of patterns which can be inspected via a visitor. Check out the source if you like.

def generate(self):
for patternElement in self.possible:
nextPossible = self.possible.copy()

if (self.reachable(patternElement)):
child = PatternTree(self,patternElement,nextPossible)

Tuesday, July 7, 2009

The Power of LaTeX in Blogger

Check out yourequations to learn how to output beautiful mathematics like


Friday, June 26, 2009

Syntax Highlighting in Blogger

I want to write about code and I like to see my code nicely formatted. I have seen it done on other blogs so I started to look around how it was done. The nicest formatted code all used syntaxhighlighter. So I wanted to use this tool as well.

In my search I came across some older posts which seemed outdated. In the end I found the right place for reference. Just go straight to Alex Gorbatchev's site about the tool he made.

If your curious about how to use syntaxhighlighter in blogger read techqi's blog. I would be repeating him if I would explain how to use syntaxhighlighter in blogger. Don't forget to read the comments for the original posting misses an imported blogger related configuration.

Last but not least, something that the above blog does not mention. Do not forget to donate. The tool that Alex made is really great and he deserves credit for it. Why not make it some real credit he can spend.

Tuesday, June 23, 2009

Reasons to Twitter

In this blog I list my reason for starting to twitter.

I have started twittering. Not that anybody noticed, but that is besides the point. Twitter started in 2006 so it took me a long time before I joined the bandwagon. So why join now?

There are various reasons to twitter. Twitter gives protesters in Iran a voice to vent their frustration about the recent elections. They also provide an information stream for journalists which are refused to enter the country. Twitter therefore empowers people who otherwise would not be heard.

I think that the web is still gaining an influential role in the social lives of a lot of people. One of the means to communicate in this on-line network is twitter. Although the value of this communication can be questioned, it is never the less a means to express your self in this network. As such, it can act as a social glue which brings people closer together.

Furthermore reading my tweets is voluntarily. I force nobody to follow my twitter account. (Nor for that matter my blog.) So by reading my tweets your are fulfilling a need. I think this need is the main reason for me to start twittering. People want to read about the trivialities of other peoples life's.

Wednesday, June 17, 2009

Emancipation of Dutch Naming Laws

In this blog I wonder about the peculiarities of Dutch naming laws.

I am getting married and my girlfriend and I decided that I will take her last name. The main reason for doing this is my conviction that the emancipation of women is not fully adopted in the Netherlands.

Since 1998 men in the Netherlands are able to legally take the name of their partners. Not a lot of couples are using this right. Trouw (in Dutch) published an article with the following numbers. In approximately two percent of the married couples the men adopted the name of their spouse.
What is worse is that 83% of women prefer to take the name of their husband.

Although these numbers concern me, I found the following troublesome. Yesterday my girlfriend and I signed a notice of marriage. The official present told us that our children will have my name unless we sign a form. This form can only be signed during pregnancy before our children are born.

Why this archaic law in a country which calls itself emancipated?