I’ve Got Your Toothpick Right Here: Part 1

Last month’s WIRED magazine focused on puzzles and mind games. Throughout the issue were little puzzles crammed into the margins of the pages. Most of these looked like they might require what I like to call “work,” something that would take multiple sheets of paper and time. The following puzzle, however, stuck out as obtainable with my meager brain and marginally better-than-average ability to remember trivia:

Toothpick puzzles challenge you to move line segments to form words or shapes. For example, removing the center bar below spells BOB:

Your challenge: Without rearranging any, remove exactly nine toothpicks below to spell the last name of a US president.

Doesn’t seem bad, right? So I started trying to remember all the presidents, and applying the rules of the puzzle:

1. It has to spell out the last name of a U.S. President.

2. You have to remove exactly nine toothpicks.

3. You can’t rearrange anything.

So after several minutes of mental churning, I enlisted my compatriot and long-time reader of the blog, Lenore, to aid in solving this puzzle, effectively tripling the power of the braincluster. Still nothing. So I thought about it for day, thinking I would just stumble across a president I’m forgetting. Last night, I started thinking how to write a script to provide me with a list of potential solutions, which I could just read and think “How did I forget about him?!?!” This would provide me with a sense of accomplishment, as I would just be writing the script to jog my memory of names, and would not count as cheating.

So I wrote the following script…..

#==============================================================================================#
#! /usr/bin/env python

# The puzzle requires you to remove a total of nine "toothpicks" to spell out the name.
# The number value beside each letter refers to the number of toothpicks removed from each
# character to make it that letter. So the numeric values of each letter in the final name
# must equal nine.

letters = {"A":1,"B":0,"C":2,"D":1,"E":1,"F":2,"H":2,"I":2,"L":3,"M":1,"O":1,"T":3,"U":2,"W":1,}

# The four mystery characters can be made into certain letters. All possible choices
# are shown here. I preserve a copy here so that the actual list can be tweaked to
# remove possibilities from the final batch of potential answers.

#ROWS BEFORE TWEAKING
#first = ["A","B","C","D","E","F","H","L","O","U"]
#second = ["C","D","I","L","M","O","T","U","W"]
#third = ["C","D","I","L","M","O","T","U","W"]
#fourth = ["A","B","C","D","E","F","H","L","O","U"]

# I have remove certain characters that would produce even more gibberish responses.
first = ["A","B","C","D","E","F","H","L","O"]
second = ["C","D","I","L","M","O","T","U"]
third = ["C","D","I","L","M","O","T","U","W"]
fourth = ["A","B","D","E","F","H","L","O"]

# Opens a file named "answer.txt" in your current directory.
file = open ('answer.txt', 'w')

# Loops through every possibility for each character
for a in first:
	for b in second:
		for c in third:
			for d in fourth:
				#Adds the number of "toothpicks" that have been "removed."
				sum = int(letters[a] + letters[b] + letters[c] + letters[d])

				# if the sum is 9, and the first letter is not equal to the second
				# letter, and the second letter is not equal to the third letter,
				# then that combination is written to a file for human perusal.

				if sum == 9 and a != b and b != c:
					file.write(a + b + c + d + '\n')
#==============================================================================================#

…because I’m a huge dork. The results are in a list. An example:

ACLL
ACTL
AILL
AITL
ALCL
ALIL
ALTF
ALTH
ALUL

So the idea was that the name of a forgotten president would jump out at me. I tweaked the possible characters so that I would get less gibberish, which cut down the results to 306 possibilities. I’m sure Ackermann’s beard would weep were it to read the script, but I’m not pretending to be a computer scientist anymore. I’m just another IT weenie that knows some rudimentary scripting. You should be happy that there are comments.

mspaint.exe

mspaint.exe

(I’M LOOKING AT YOU, MATT.)

I will post the answer and my final thoughts tomorrow, after everyone has gotten a chance to look at the original puzzle.

LINK TO ORIGINAL PUZZLE:

Pick Nine: Forming Words From a Jumble of Toothpicks

I consider the following to be CHEATING:

  • Looking at the answer
  • Looking at the comments
  • Looking at a list of the presidents
  • Asking someone who you know will look at the list of the presidents

Related Posts

This entry was posted in 930posts, Fun Stuff, Puzzles and tagged , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>