Construct a true sentence of the form: "This sentence contains _ a's, _ b's, _ c's, ...," where the numbers...
language/english/sentences/self.ref/self.ref.letters Added material
Problem
Construct a true sentence of the form: "This sentence contains _ a's, _ b's, _ c's, ...," where the numbers filling in the blanks are spelled out.
Show solution
A little history of the problem, culled from the pages of _Metamagical
Themas_, Hofstadter's collection of his _Scientific American_ columns.
First mention of it is in the Jan. '82 column. Lee Sallows opened the
field with a sentence that began "Only the fool would take trouble to
verify that his sentence was composed of ten a's ...." etc.
Then in the addendum to the Jan.'83 column on viral sentences, Hofstadter
quotes Sallows describing his Pangram Machine, "a clock-driven cascade of
sixteen Johnson-counters," to tackle the problem. An early success was:
"This pangram tallies five a's, one b, one c, two d's, twenty-
eight e's, eight f's, six g's, eight h's, thirteen i's, one j,
one k, three l's, two m's, eighteen n's, fifteen o's, two p's,
one q, seven r's, twenty-five s's, twenty-two t's, four u's, four
v's, nine w's, two x's, four y's, and one z."
Sallows wagered ten guilders that no-one could create a perfect self-
documenting sentence beginning, "This computer-generated pangram contains
...." within ten years.
It was solved very quickly, after Sallows' challenge appeared in Dewdney's
Oct. '84 SA column. Larry Tesler solved it by a method Hofstadter calls
"Robinsonizing," which involves starting with an arbitrary set of values
for each letter, getting the true values when the sentence is made, and
plugging the new values back in, making a feedback loop. Eventually, you
can zero in on a set of values that work. Tesler's sentence:
This computer-generated pangram contains six a's, one b, three
c's, three d's, thirty-seven e's, six f's, three g's, nine h's,
twelve i's, one j, one k, two l's, three m's, twenty-two n's,
thirteen o's, three p's, one q, fourteen r's, twenty-nine s's,
twenty-four t's, five u's, six v's, seven w's, four x's, five
y's, and one z.
The method of solution (called "Robinsonizing," after the logician Raphael
Robinson) is as follows:
1) Fix the count of a's.
2) Fix the count of b's.
3) Fix the count of c's.
...
26) Fix the count of z's.
Then, if the sentence is still wrong, go back to step 1.
Most attempts will fall into long loops (what Hofstadter calls attractive
orbits), but with a good computer program, it's not too hard to find a
Robinsonizing sequence that zeros in on a fixed set of values.
The February and May 1992 _Word Ways_ have articles on this subject,
titled "In Quest of a Pangram, (Part 1)" by Lee Sallows. It tells of his
search for a self-referential pangram of the form, "This pangram
contains _ a's, ..., and one z." (He built special hardware to search
for them.) Two such pangrams given in the article are:
This pangram lists four a's, one b, one c, two d's,
twenty-nine e's, eight f's, three g's, five h's, eleven i's,
one j, one k, three l's, two m's twenty-two n's, fifteen o's,
two p's, one q, seven r's, twenty-six s's, nineteen t's, four
u's, five v's, nine w's, two x's, four y's, and one z.
This pangram contains four a's, one b, two c's, one d, thirty
e's, six f's, five g's, seven h's, eleven i's, one j, one k,
two l's, two m's eighteen n's, fifteen o's, two p's, one q,
five r's, twenty-seven s's, eighteen t's, two u's, seven v's,
eight w's, two x's, three y's, & one z.
It also contains one in Dutch by Rudy Kousbroek:
Dit pangram bevat vijf a's, twee b's, twee c's, drie d's,
zesenveertig e's, vijf f's, vier g's, twee h's, vijftien i's,
vier j's, een k, twee l's, twee m's, zeventien n's, een o,
twee p's, een q, zeven r's, vierentwintig s's, zestien t's,
een u, elf v's, acht w's, een x, een y, and zes z's.
References:
Dewdney, A.K. Scientific American, Oct. 1984, pp 18-22.
Sallows, L.C.F. Abacus, Vol.2, No.3, Spring 1985, pp 22-40.
Sallows, L.C.F. Word Ways, Feb. & May 1992
Hofstadter, D. Scientific American, Jan. 1982, pp 12-17.
Additional material
Tanaka Tomoyuki found this sentence which consists of exactly three `T's, ten `a's, one `b', six `c's, four `d's, forty-one `e's, fourteen `f's, three `g's, thirteen `h's, twenty-one `i's, one `j', three `k's, five `l's, four `m's, twenty-nine `n's, twenty-four `o's, four `p's, two `q's, sixteen `r's, forty `s's, thirty-one `t's, nine `u's, five `v's, eight `w's, six `x's, twelve `y's, one `z', six hyphens, thirty commas, twenty-seven pairs of single quotes, and a final period. I first got the idea from Douglas R. Hofstadter's book, "Metamagical Themas". -- Tomoyuki Tanaka <ez074520@dilbert.ucdavis.edu>, March 1998 In article <genewEqAKus.8r2@netcom.com>, Gene Wagenbreth <genew@netcom.com> wrote: >I read that a good way to solve this problem, rather than an exhaustive >search, is to make a guess, count the letters in the guess and replace >the values. You keep iterating until you reach a stable solution. The >problem is loops. you go guess1->guess2->...->guess<n>->guess1. You >have to look for loops, then randomly perturb the current guess to get >out of it. > >When I programmed it, I got nothing but loops, never converging to a >real solution. Has anyone tried this ? Did I do something wrong ? that's close to the way i did it, which i call "randomized Robinsonizing" [Editor: spelled "Robisonizing" in the original]. (it's too bad i didn't discover randomized Robinsonizing. i didn't even re-discover it.) randomized Robinsonizing: let's say in candidate(N) which includes the phrase "... eight `a's ..." actually contains 13 `a's. then in candidate(N+1) you pick a random number R between 8 and 13 (inclusive) and put the phrase "... [R] `a's ...". you do this for each letter. in randomized Robinsonizing you don't have to check for loops. -- Tomoyuki Tanaka