THINK

that’s how i naturally know

Archive for September, 2011

Tournament rankings – a K-ary sort problem

leave a comment

I was working on some programming projects then I suddenly got stuck at a particular problem that took me a whole day still unable to solve. When simplified, it looks like this:

Background
Consider a tournament where we want to find out the ranking of N contestants. In each competition, M contestants compete with each other at the same time to generate a ranking order. How many such competitions S are required in the tournament to fully rank all contestants given N => M” title=”N => M”/>?</p>
<p>Did some search online and it turns out that this is an ongoing research problem more officially known as the K-ary sort algorithm, although the it is formulated slightly differently where <img src= (which would become regular binary sort) and K = 3.

There are a few things that are obvious:
1. Inherently at atomic level, the act of ranking involves comparing 2 contestants, which is a binary case.
2. We do not need every contestant to have had competed with every other contestant. Between 2 contestants, the winner wins every other person that the loser wins and vice versa.
3. We must have information of combination(N, 2) rankings between any 2 contestants.

To be continued…

Written by Jake

September 25th, 2011 at 12:30 pm

Posted in Science

Tagged with ,

Past versus future

leave a comment

Conventional wisdom says that one will never know what will happen (in the future), that we face uncertainties down the road; it also tells us that compared to the future, we know much more of what had happened in the past. But I beg to differ.

I could argue that it is actually easier to predict the future with a high level of certainty than to know what events had unveiled in the past arising the present.

For example, if it is said that the answer to an equation is 2, we can never quite know whether it was 1 + 1 = 2 or 0.5 + 1.5 = 2; even if some of the operands were known, there are still quite many possible equations that gives the answer 2. Conversely, if in the present we set the operands to 1 + 1 it will always equal 2. In fact predicting the future and pre-setting the future is what we do on a daily basis, especially in science and engineering.

The problem with being certain about the past is that it requires us to be certain about the number of pieces that makes up the present, but that is not an easy task at all as we cannot logically proof that there is no coin in the room when we only cannot not find a coin.

Well, as always, conventional wisdom contradicts each other, the future is indeed in our hands.

Written by Jake

September 11th, 2011 at 2:51 pm

Posted in Philosophy

Tagged with , ,