Puzzler: What Will Bert and Amy Name Their Kid?
The answer to the first TIME Labs puzzler
Published November 9, 2016

As longtime fans of Car Talk (even as less than enthusiastic fans of cars themselves), I’m going to start rolling out the occasional puzzler to go alongside my favorite interactives. This first one occurred to me during my annual exploration of new data on the most popular baby names, which, as I’ve often told people, is the Super Bowl data visualization.

Here was the question:

Bert and Amy Cruz are celebrating the birth of their fourth child. Their first three children are named Ivy, Dewy and Bev. Which of the following names will they choose for their newborn boy?

The options are Edgar, Ira, Abel, and Claud. If you click hint, you can the following nudge: “Bert’s brother Rolfe, who does everything the opposite of Bert, named his four children Zoe, Neda, Sonja and Yuri.”

The answer, without further ado, is Abel. Can you guess why? Here’s a hint: Bert married Amy for one particular reason: Like him, she has a name in why every letter appears in alphabetical order. They passed this along to their children: Ivy, for example, is spelled in alphabetical order (I comes before V, which comes before Y.) The same holds for Dewy, Bev and Abel (but not Edgar, Ira or Claud). Rolfe, on the other hand, has the opposite kind of name: His name appears in reverse alphabetical order, as do the names of his four kids.

To gather good names, I made use of Time Magazine’s Baby Name database on Github and made a giant excel file of every American name used with any frequency since 1880. Then it was just a matter of writing a very simple script to scroll through each name and see which ones were in sequential alphabetical order, like so:

    // return 1 if name is ordered A-Z, -1 if Z-A, 0 if neither
    function is_ordered(name) {
        name = name.toLowerCase();
        // A is the first letter, B is the second
        var A = name[0], B = name[1];
        if (A === B) { // if letters repeat, like in Brook, fail the test
            return 0;
        }
        if (A < B) {
            var response = 1;
        } else {
            var response = -1;
        }

        // now loop through the rest of the letter
        for (var n = 1; n < name.length; n += 1) {
            // similar code as above
            var A = name[n], B = name[n+1];
            if (A === B) {
                return 0;
            }
            if (A > B && response === 1 || A < B && response == -1) {
                return 0;
            }
        }
        return response;
    }

    // we loaded names from the Github repo
    names.forEach(function(name) {
	var order = ordered(name.name);
	if (order == -1 && name.name.length >= 3) {
		console.log(name.name, name.gender);
	}
    });

Below is a partial list of abecedarian names the code generates. Enjoy!

Abdel (M)
Abdi (F)
Abdou (M)
Abdu (M)
Abel (M)
Abem (M)
Aben (M)
Aber (F)
Abert (M)
Abery (F)
Abey (F)
Abey (M)
Abhi (M)
Abhijot (M)
Abhik (M)
Abin (M)
Abir (F)
Abir (M)
Abou (M)
Abry (F)
Acein (M)
Acel (M)
Acen (M)
Acer (M)
Acey (F)
Acey (M)
Acil (M)
Adein (M)
Adel (F)
Adel (M)
Adelmo (M)
Adely (F)
Adem (M)
Aden (F)
Aden (M)
Ader (F)
Adey (F)
Adil (M)
Adin (F)
Adin (M)
Adir (M)
Adis (F)
Adis (M)
Adit (M)
Adiv (M)
Adly (F)
Adry (F)
Agim (M)
Ahil (M)
Ahir (M)
Aiko (F)
Aily (F)
Aimo (M)
Aimy (F)
Aino (F)
Aivy (F)
Akos (M)
Almo (F)
Almo (M)
Almos (M)
Alvy (M)
Amor (F)
Amor (M)
Amory (F)
Amory (M)
Amos (F)
Amos (M)
Amoy (F)
Amoz (M)
Amry (F)
Ansu (M)
Arty (M)
Arvy (M)
Behr (M)
Behruz (M)
Beily (F)
Belsy (F)
Beno (M)
Bentz (M)
Beny (M)
Benz (M)
Bert (F)
Bert (M)
Besty (F)
Bety (F)
Bijou (F)
Bijoux (F)
Biju (M)
Biko (M)
Bily (M)
Bintu (F)
Binu (M)
Birt (F)
Birt (M)
Birty (F)
Ceil (F)
Cely (F)
Chin (M)
Chino (M)
Chinou (M)
Chip (M)
Chirs (M)
Chirsty (F)
Chisty (F)
Chlo (F)
Chou (M)
Chuy (M)
Cloy (F)
Cloy (M)
Cort (M)
Cory (F)
Cory (M)
Coty (F)
Coty (M)
Couy (M)
Covy (M)
Cruz (F)
Cruz (M)
Deimos (M)
Deimy (F)
Dein (M)
Deisy (F)
Deivy (M)
Delmo (M)
Delmor (M)
Delmos (M)
Delmy (F)
Delno (M)
Delor (M)
Delors (F)
Delos (M)
Deloy (M)
Delsy (F)
Dely (F)
Demos (M)
Dempsy (M)
Demy (F)
Deno (M)
Dent (M)
Deny (M)
Devy (F)
Dewy (M)
Dhir (M)
Dhru (M)
Dhruv (M)
Dino (M)
Dinos (M)
Diny (F)
Diop (M)
Dior (F)
Dior (M)
Dixy (F)
Dory (F)
Dory (M)
Doty (F)
Egor (M)
Eiko (F)
Eily (F)
Eimy (F)
Eino (M)
Ekow (M)
Elmo (F)
Elmo (M)
Elmor (M)
Elno (M)
Elnor (F)
Eloy (M)
Elry (M)
Elsy (F)
Elvy (F)
Elvy (M)
Emory (F)
Emory (M)
Emry (F)
Emry (M)
Enos (M)
Enry (M)
Envy (F)
Envy (M)
Ervy (M)
Esty (F)
Fitz (M)
Flor (F)
Flor (M)
Flory (F)
Flory (M)
Floy (F)
Floy (M)
Fort (M)
Foxy (F)
Gino (F)
Gino (M)
Gipsy (F)
Girty (F)
Glory (F)
Glory (M)
Hilry (M)
Horst (M)
Ilsy (F)
Iory (M)
Jory (F)
Jory (M)
Josy (F)
Knox (F)
Knox (M)
Kort (M)
Kory (F)
Kory (M)
Koty (F)
Koty (M)
Kruz (F)
Kruz (M)
Lory (F)
Lory (M)
Luxy (F)
Mort (M)
Morty (M)
Mory (M)
Nory (F)