Check out my new blog

Saturday, November 27, 2010

Ranking a semordnilap

Ever heard of semordnilap? As Wikipedia says, semordnilap is also known as volvogram, heteropalindrome, semi-palindrome, half-palindrome, reversgram, mynoreteh, reversible anagram, word reversal, or anadrome. It is basically a word that spells another word backwards.

What's cool about it?

Semordnilap spells Palindromes in a mirror. It is Palindrome when spells backward.

Semordnilap, as differs in palindrome, forms two different words. Two different words in one set of letters. Basically, they are both equal in the sense of word length. But frequently in computer science or programming, words must be treated to have a mathematical value.

As defined, semordnilap forms two different words and obviously, they both have different mathematical value. But how will semordnilap be ranked?

It is easy. Alphabetical order. The conventional way. Which ever comes first, must be first and always be first.

So let's take an example. Peek and Keep are words that are semordnilap with each other. So which ranks first? Which must be treated first? And as we all know...

K is always first than P.
K comes first in alphabetical order than P.

Thus, when ranked, Keep will come first than Peek. And it will always be like that if alphabetical order is in.

But if not the conventional way is used, the ranking might be different. Peek might comes first than Keep. It is just based on the ranker's own perspective.

Hey, it might be alphabetical order in descending order is what the ranker prefers much. And we can't do anything about it. :)

But again, semordnilap. Two different words. One set of letters. But one must rank higher than the other.

No comments:

Post a Comment