## I’m movin

14. August 2009

My page/blog is moving to another page:

## SAT – a randomized algorithm

4. August 2009

As everybody knows, SAT is NP-complete.

Here is a randomized algorithm that (eventually) solves an instance of a SAT-Problem (in polynomial time).
Read the rest of this entry »

## A nice method for…

29. July 2009

Consider the following Code (in Python):

def dosomething(a, b):
result=0
while (a):
if (a&1):
result+=b
b=b<<1
a=a>>1
return result

The function needs a to be a positive integer and b to be an integer.

What does the function do? Can you tell how it works?

## Some algorithmic quizzes

11. July 2009

Many algorithmic puzzles are circulating around the net. Here i want to present some problems i came across and found interesting to solve (or not to solve).
Read the rest of this entry »

## Can you solve it? – Maximum sum

11. July 2009

Here i want to present a quite nice small puzzle: Given an array of not necessarily positive numbers (elements are called $a_0, a_1, \dots, a_n$), i want to find the indices $i$, $j$, where $i \leq j$, so that the sum $\sum_{k=i}^j a_k$ is maximal.

The task is to find an algorithm that runs in $O(n)$.

## Five easy to avoid programming mistakes

10. July 2009

When reading source code, i often wonder, why it is so hard to understand. This applies for code from others as well as for my own code i wrote some time ago.

Here are some tipps that could make maintaining and reading your code a bit easier.
Read the rest of this entry »

## Some thoughts on terrain generation

9. June 2009

This file provides a general insight in how to generate terrains using the diamond-square algorithm.

You can download the file here. It is just a draft, but i’m offering it here, because i hope it could help somebody.

## Logarithm of float numbers

8. June 2009

Some time ago, a teacher asked me, how computers logarithmize float numbers.
Of couse, one could use the power series
$\ln(1+x) = \sum_{k=1}^{\infty} (-1)^{k+1} \cdot \dfrac{x^k}{k}$.
But soon it is clear, that the series converges quite slowly.

The following article gives a general insight how floats could be logarithmized faster. It shows an approximative algorithm that can be extended to get more accurate results.
Read the rest of this entry »

## Erlang

2. June 2009

I found a very nice (for me) new programming language: Erlang. It is a concurrent, functional programming language.
Read the rest of this entry »

## “Milestones”

25. May 2009

Every programmer has his own personal milestones. Here are some of mine, that were – especially when i began programming – my favourite projects.