Monday, April 21, 2025

Animal (5) --> bird (7) --> animal (9)

It's Monday Funday here at Natural Language Puzzling, the blog where we explore natural language processing (NLP), artificial intelligence (AI), language modeling and linguistics for the purposes of solving the weekly challenge from NPR's Sunday Puzzle. Welcome back! Let's take a crack at this week's challenge:

This week's challenge comes from Philip Goodman, of Binghamton, N.Y. Name an animal in five letters. Add two letters and rearrange the result to name a bird in seven letters. Then add two letters to that and rearrange the result to name another animal in nine letters. What creatures are these?

How should we approach this one? It basically follows the classic Sunday Puzzle pattern:

Take a thing from Class A and apply a transformation to yield a thing from Class B.

In this case, it's a little more complicated but really we're just adding a second transformation from Class B to Class C (which is similar to Class A, but the strings are nine letters instead of five).

As you can probably see, this one is relatively light on NLP, AI, and linguistics. We really just need good lists of birds and animals to start with, and it'll all be string and list manipulation from there.

Here's the approach I plan to take. I'll need these things:

  • A: A big ol'  list of animals
    • I've cobbled one together from lists on the web
    • You could also ask your favorite LLM chatbot
    • When we load the list to work with it in python, we'll filter it out into a list of five-letter words and another list of nine-letter words
  • B: A big ol' list of birds
    • Again, I found multiple different lists on the web and combined them, then removed duplicates, lowercased everything, etc.
    • We'll filter this one and keep only the birds with seven-letter names
  • check_letters: We need some kind of function to compare the letters in each of the strings in the above lists
    • We can brute force this as it's not super computationally heavy and it's a one-off solution anyway.
    • I'll take each five-letter animal (i.e., "for m in five_letter_animals:")
      • split it into a list of letters
      • take each (seven-letter) bird
        • split it into a list of letters
        • take each letter from the animal and try to remove it from the list of bird letters
        • if only two letters remain in the bird letter list, we keep this pair as a possible solution
    • Then we can more or less repeat this process, starting with the bird list and nine-letter animal list;
      • Again, if we can remove all the letters from the shorter word and we're left with two letters from the longer word, we have a possible solution.
      • We'll know the solution when we have a bird that is a possible solution in both of these comparisons
I'm happy to report that the approach above worked for me and I have the solution! I'll be keeping it (and my python script) to myself until after the Thursday 3pm ET deadline for submitting solutions to NPR, as I wouldn't want to get on host Will Shortz' naughty list for giving spoilers. But please check back after then if you'd like to see exactly how I solved it. Good luck, Puzzlers!


The deadline for NPR submissions has passed, so click the spoiler button below to see my solution, and click here to see my script.

No comments:

Post a Comment

Director, anagram, film award

Welcome back to Natural Language Puzzling, the blog where we use natural language processing and linguistics to solve the Sunday Puzzle from...