Archive for February, 2008

On the arbitrariness of language

Tuesday, February 26th, 2008

If you thought it was hard to remember the gender of French nouns, take heart: apparently French people don’t always get it “right” either.

Depending on your perspective, this says something about either the silliness of French grammar or the factual authority of dictionaries. (Personally I think written French is silly for still inflecting adjectives for number when the spoken language did away with that centuries ago, but calling gender silly would be going too far.)

QOTD XVII

Friday, February 15th, 2008

Vagueness is standardly defined as the possession of borderline cases. For example, ‘tall’ is vague because a man who is 1.8 meters in height is neither clearly tall nor clearly non-tall. No amount of conceptual analysis or empirical investigation can settle whether a 1.8 meter man is tall. Borderline cases are inquiry resistant. Indeed, the inquiry resistance typically recurses. For in addition to the unclarity of the borderline case, there is normally unclarity as to where the unclarity begins. In other words ‘borderline case’ has borderline cases. This higher order vagueness shows that ‘vague’ is vague.

— Roy Sorensen, Stanford Encyclopedia of Philosophy, “Vagueness” (from Language Log).

How to cheat at Mensa puzzles

Saturday, February 9th, 2008

At freshers’ fayre (yeah, a long time ago now) I was handed a slip from Mensa. I intended to follow it up later but being busy I never got round to it. Today I rediscovered it on my desk, and of course it had a couple of puzzles on it. One is a pretty simple number sequence. The other has you find an anagram:

Rearrange the letters of ‘ANY TIME‘ to give a seven letter word. What is it?

Obviously “anytime” is excluded (well, we’re not Americans ;). I tried to find one manually for a while, but then realised I could just solve it with a couple of commands:

[pwb@rhuidean ~]$ ghci -e 'Monad.mapM_ putStrLn (let s = "anytime" in filter (\s2 -> all (`elem` s2) s) $ Control.Monad.replicateM 7 s)' > words
[pwb@rhuidean ~]$ grep -f words /usr/share/dict/words

This was taking a long time. But then I realised you can cut out a big chunk of the search space by filtering out all the non-anagrams, which you can do easily with grep.

[pwb@rhuidean ~]$ grep '^[anytime]{7}$' /usr/share/dict/words | grep -f words
amenity
anytime

I wonder how this reflects on my intelligence… :)