This is such a hilarious question I just had to take a crack at it.
First, let’s get one thing out of the way: even single-line procedures are technically algorithms. Hence,
Jeffrey. Love me.
is an algorithm, provided by Maude to The Dude. Admittedly, however, those are not very interesting algorithms (though they can be plenty useful), so let’s focus on more elaborate ones.
Take, for example, lovemaking. You have an algorithm for that.
It has bifurcations.
1 2 3 4
Move to Next Step.
It has loops.
1 2 3 4 5 6
Until (something magical happens) or (you're exhausted).
It has subroutines.
1 2 3 4
That Thing That Always Sends Him To The Moon.
It relies heavily on random number generators.
1 2 3…
View original post 169 more words
Let $latex G=(V,E,c)$ be a direct graph with non-negative costs. Also consider a starting vertex $latex s$ and a goal vertex $latex g$. The classic search problem is to find a optimal cost path between $latex s$ and $latex g$. Consider the distance function $latex d:V \times V \to \mathbb R$ induced by the cost $latex c$ (the cost of the minimum cost path). Also, assume the graph $latex G$ is strongly connected. Also let $latex w$ be a real greater or equal to 1.
A heuristic is a function $latex h:V \to \mathbb R$. An heuristic $latex h$ is $latex w-$admissible if $latex h(x) \leq wd(x,g)$ for all $latex x \in v$. A heuristic is $latex w-$consistent if $latex h(g) = 0$ and for all $latex x,y \in V$ such that $latex (x,y) \in E$ we have $latex h(x) \leq wc(x,y) + h(y)$. For $latex w= 1$ we just say…
View original post 1,851 more words