The Best of Creative Computing Volume 1 (published 1976)

Page 168 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails

Palindromes: For Those Who Like to End at the Beginning (Palindromes in words and numbers)

graphic of page

Palindromes: For Those Who Like to End at the Beginning
by Water Koetke
Egad, a base life defiles a bad age Doom an evil deed, liven a mood Harass
sensuousness, Sarah Golf; No, sir, prefer prison-flog Ban campus motto, "Bottoms
up, MacNab"

A palindrome is a work, verse, number or what have you that reads the same
backward as forward. The unit in a palindrome may vary. Each of the five lines
in the poem at the beginning of this article is itself a palindrome using a
letter as the unit. However, a palindromic poem might be written for which the
entire poem is a palindrome rather than the individual lines. The unit in
apalindrome might also be a word as in:

Men wanted warning before police approached; squealer approached police before
warning wanted men.

The length of plaindromes is, of course, dependent upon the author's cunning and
patience. Whether a simple "Mom" or the "Ethopoiia Karkinikie", a palindromic
Greek poem of over 400 lines published in 1802, all palindromes seem to merit
special admiration. Howard Bergerson's book referenced at the end of this
article is a very comprehensive collection of palindromes of many types. His
work will be a classic for those interested in literary games. The six
palindromic sentences in this article all appear in Bergerson's book.

Palindromes are appropriate as the subject of introductory programs involving
string manipulation. For example, writing a program to recognize a palindromic
sentence using a letter as the unit requires character manipulation. Writing a
program to recognize a palindromic sentence or paragraph using a word as the
unit requires both character and word manipulation. This is particularly
interesting if the sentence or paragraph is entered one line rather than one
word at a time. The creation of palindromes is likely to remain in the province
of a human and not a machine endeavor. One may devise clever programs to assist
that endeavor, but human creativity supported by a well thumbed dictionary shall
remain the most essential resources.

Numeric palindromes are those numbers that read the same backward as forward.
The examination of these numbers is a field rich with possibilities for creative
computing.

Consider all palindromes that can be written in the form N[power of]k where N
and k are positive integers. Would you expect that N is also a palindrome; Let's
consider the case of k=2. 14641 and 484 are both palindromes that can be written
in the form N[power of]2 :

14641 = 121[power of]2
484 = 22[power of]2
And both 121 and 22 are also palindromes! ls this always true; And what about,
other values of k; Is the cube root of a palindromic cube also a palindrome; ls
the fourth root of palindromic fourth power also a palindrome?

These questions are of interest because only partial answers have been given.
When k=2-if N[power of]2 is a palindrome then N is often, but not always, a
palindrome. When k=3-the only known palindromic cube without a palindromic cube
root is 10,662,526,601, but there may be others yet undiscovered. When k=4 -all
known palindromic fourth powers have fourth roots that are palindromes, but what
about those that are yet unknown; When k=5 -this one's a little harder as there
are no known palindromes that can be written in the form N[power of]5. Clearly
the answers to these questions are a proper subject for creative

Page 168 << PREVIOUS >> NEXT Jump to page:
Go to contents Go to thumbnails