Sunday, March 25, 2007

Palindrome !!!?

Palindrome is an English word. I am NOT resourceful when it come to English vocabulary. I thought this word is worth talking about.

I am an IT guy and most of my knowledge , including written and spoken languages, is tightly coupled to the IT domain (Tightly coupled is one example, where people talk about Tightly Coupled Multi-processor system).

Naturally, then, Palindrome, must have something to do with IT.

I was looking for a way to speed up retrieval of names from an Oracle database system based on some knowledge about the suffix of the name (letters at the end of the word). Normal indexing wont work since indexing is based on the prefix of the name (Like when you look up the phone no of a person using a phone book, you search by the leading part of the name and not the trailing part).

I wanted to try an old SYNTAX that i still remeber which is the Reverse Key index , in which, index entries are indexed by the trailing part. While this approach is not intended for my purpose and has its own usage, but to properly use such indexing method, I also need to reverse my search variable, for example

the original query is

SELECT * FROM EMP where ENAME like '%AMMAR'

it should become

SELECT * FROM EMP where ENAME like ' RAMMA%'

To make is easier for the programmers, i thought that it would be good to introduce a REVRSE function so the the second query would look like

SELECT * FROM EMP where ENAME like REVERSE '%AMMAR'

The REVERSE function takes care of resequencing the name.

So what does Palindrome have to do with this?

IF REVERSE (X) = X then X is a Palindrome

IF X reads the same backward or Forward then it satisfies the meaning of Palindrome
Actually, it does have to be a word , it also can be a whole sentence (Read the following sentecne backward "A man, a plan, a canal, Panama")

"Side note: the word has another medical meaning
A segment of double-stranded DNA in which the nucleotide sequence of one strand reads in reverse order to that of the complementary strand."
The longest Palindrome is believed to be tattarrattat , then detartrated

Some examples from the web

civic
rotator
EYE
level
madam
minim
refer
sagas
dad
did
تُوْت
خَوْخ

[phrases and sentences]
Do geese see God?
Was it Eliot's toilet I saw?
Murder for a jar of red rum.
Some men interpret nine memos.
Never odd or even.
12/02/2021

can you verify that the following is Palindromic
我愛媽媽,媽媽愛我
Anyone with more words that satisfy the Palindrome criteria?

Ammar

2 comments:

Ramma said...

what I like the most:
eve
"First Ladies rule the State and state the rule: ladies first"


Others:
radar
"Neil, a trap! Sid is part alien!"
"sit on a potato pan, otis"
"Able was I ere I saw Elba"
"fall leaves after leaves fall"

"Madam, in Eden I'm Adam," (a reference to the creation story in the Bible)

Mohammad Lahlouh said...

دام علا العماد
سر فلا كبا بك الفرس

Getting Ref of the View Object referenced by the current Iterator binding for One iterator page without knowing the name of the iterator

Getting Ref of the View Object referenced by the current Iterator binding for One iterator page without knowing the name of the iterator ...