Pages

Monday, September 23, 2013

Reflexive tweets

In language, a reflexive sentence is one in which the subject and object are the same:

The boy washed himself.

As opposed to a transitive sentence:

The boy ate the apple.

However, the title of this post uses a different meaning of the word 'reflexive'.

Reflexivity is a word used in social theory to mean self-referential. So in this context, a reflexive sentence is a sentence in which the subject is the actual sentence itself.

Confused? Here are some cool mind-bending examples.

This sentence is false.
You have, of course, just begun reading the sentence that you have just finished reading. 
This sentence contains exactly threee erors.

That last one is my favourite. Do you get it?

I first came across this concept (and the above sentences) in a wonderful book called Metamagical Themas. This book has many examples and explores the concept down the rabbit hole.

In 1982, Douglas Hofstadter (a columnist for Scientific American and the author of the abovementioned book) published a self referential sentence that enumerated some of its own words:

In this sentence the word AND occurs twice, the word EIGHT occurs twice, the word FOUR occurs twice, the word FOURTEEN occurs four times, the word IN occurs twice, the word OCCURS occurs fourteen times, the word SENTENCE occurs twice, the word SEVEN occurs twice, the word THE occurs fourteen times, the word THIS occurs twice, the word TIMES occurs seven times, the word TWICE occurs eight times, and the word WORD occurs fourteen times.

This led to Lee Swallows creating this sentence:

Only the fool would take trouble to verify that his sentence was composed of ten a's, three b's, four c's, four d's, forty-six e's, sixteen f's, four g's, thirteen h's, fifteen i's, two k's, nine l's, four m's, twenty-five n's, twenty-four o's, five p's, sixteen r's, forty-one s's, thirty-seven t's, ten u's, eight v's, eight w's, four x's, eleven y's, twenty-seven commas, twenty-three apostrophes, seven hyphens and, last but not least, a single ! 

Which is really impressive (it also enumerates its own punctuation), but is not a true pangram (a sentence containing every letter) because it is missing 'j', 'q' and 'z'.

Later, Rudy Kousbroek, a Dutch writer, improved on Swallows' work by creating the worlds first true reflexive pangram in dutch:

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, en zes z's.

This sentence only enumerates every letter of the alphabet, and not the punctuation marks.

Lee Swallows and later Ed Miller decided to create computer programs (and even dedicated hardware) to search for other pangrams. Here are some others they found:

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.

This pangram contains four a's, one b, two c's, one d, twenty-six e's, six f's, three g's, six h's, eleven i's, one j, one k, two l's, two m's, seventeen n's, fifteen o's, two p's, one q, eight r's, thirty s's, seventeen t's, four u's, four v's, six w's, six x's, three y's, & one z.



But many more were found with exhaustive searches and different starting phrases.

The above historical information is a summary of the information found on this site.

--------------------------------------------

Anyway, this leads me to my tweet.

I wanted to create a reflexive pangram tweet. Of course, there is not enough room for a true pangram so I had to limit the scope a bit. I initially decided on enumerating the vowels, and various punctuation marks.

I wrote a small computer program to aid me in my quest. Not to search for solutions (that would remove most of the fun) but simply to tell me how many characters there are in the current sentence, so that I didn't have to manually tally characters for every iteration (now THAT would be hell).

Now, the most important contraint (other than being correct) was that the tweet had to fit in EXACTLY 140 characters. All my stories (apart from a few at the begining) are 140 characters.

So I set out to find a valid self-referential, self-enumerting tweet.

Here are some (almost) valid sentences. They are valid except for lying about their character lengths. The actual character lengths are give after each sentence.

"This tweet has eight a's, thirteen e's, six i's, six o's, two u's, seven commas, twenty-two spaces, and one hundred and forty characters." (137)
"This tweet's got six a's, sixteen e's, nine i's, eight o's, one u, seven commas, five apostrophes, twenty-two spaces and a single period." (137)
"My tweet contains eight a's, thirteen e's, six i's, seven o's, two u's, six commas, twenty-two spaces and one hundred and forty characters." (139)
"My tweet has got nine a's, sixteen e's, five i's, five o's, two u's, seven commas, twenty-three spaces, and a hundred and forty characters." (139)
"This tweet contains nine a's, thirteen e's, eight i's, seven o's, two u's, six commas, five apostrophes and a hundred and forty characters." (139)
"This tweet has eight a's, fifteen e's, seven i's, seven o's, two u's, six commas and five apostrophes, in one hundred and forty characters." (139)
"This tweet has eight a's, sixteen e's, six i's, five o's, two u's, seven commas, twenty three spaces, and one hundred and forty characters." (139)
"This tweet has eight a's, fifteen e's, eight i's, five o's, two u's, six commas and twenty-three spaces, in one hundred and forty characters." (141)
"This tweet has eight a's, sixteen e's, eight i's, five o's, two u's, five commas and twenty-three spaces in one hundred and forty characters." (141)
"This tweet's got eight a's, fifteen e's, eight i's, five o's, two u's, five commas and twenty-three spaces in a hundred and forty characters." (141)
"This tweet's got exactly six a's, eighteen e's, eight i's, nine o's, one u, seven commas, five apostrophes, twenty-two spaces and one period." (141)
"This tweet contains eight a's, fifteen e's, seven i's, six o's, two u's, six commas, twenty three spaces and one hundred and forty characters." (142)
"This tweet has got eight a's, fifteen e's, six i's, six o's, two u's, seven commas, twenty-three spaces, and one hundred and forty characters." (142)
"This tweet has got six a's, seventeen e's, six i's, eight o's, two u's, seven commas, five apostrophes, twenty-three spaces and one full stop." (142)
"This tweet's got seven a's, nineteen e's, three i's, seven o's, two u's, seven commas, twenty-two spaces, and one hundred and forty characters." (143)
"There are nine a's, fifteen e's, eight i's, five o's, four u's, six commas, twenty-four spaces and a hundred and forty characters in this tweet." (144)


You can see how frustrating it was, I just couldn't get 140 characters.

Two interesting difficulties popped up:

The first was when I had written "seven i's" but my program told me there were in fact only six. So I change the sentence to "six i's" which of course makes the total number of i's seven. Grrrr!

The second was when I removed the character count ("hundred" contains a 'u'). This left only a single 'u' so I had to write "one u" instead of "two u's". This then made me change "five apostrophes" to "four apostrophes", thereby introducing a second 'u'. Gyaaaaaa!!!!!!

So I had to change my approach.

I decided to count consonants and vowels instead. Somehow this seemed more impressive because the values were larger. It allowed me to find a valid solution:

"This tweet has seventy-four consonants, thirty-nine vowels, five commas, nineteen spaces, a full stop, and one hundred and forty characters."

This is correct and has exactly 140 characters. Yay!
However, I was slightly unhappy with it because it says "and one hundred and forty characters" instead of "in one hundred and forty characters". It kind of suggests more than 140 characters.

So I rearranged it:

"This tweet has one hundred and forty characters, seventy-four consonants, thirty-nine vowels, nineteen spaces, five commas, and a full stop."

Which is the sentence I tweeted. Then I made it better by using a colon:

"This tweet has one hundred and forty characters: seventy-four consonants, thirty-nine vowels, nineteen spaces, four commas, and a full stop."

Which I think is much nicer.

And here is a variant that removes the oxford comma, just for fun:

"This tweet has one hundred and forty characters: seventy-five consonants, thirty-nine vowels, nineteen spaces, three commas and a full stop."

Phew! Certainly not easy to make it work, but it was fun to do and highly rewarding to finally get a valid reflexive tweet.

Note: I have used reflexivity in one of my earlier horror tweets. It is not great, and is not 140 characters, but will leave you scratching your head.

Have you done something similar with reflexivity? I'd love to see it.