Subscribe to Computing Intelligence

Showing posts with label Puzzle Solutions. Show all posts
Showing posts with label Puzzle Solutions. Show all posts

Saturday, May 12, 2012

Solution to Puzzle 16: Trip to Canada

Here is the solution to the "Trip to Canada" puzzle:

The Uncle traveled to one location in each province and territory in Canada in the following order:

1.) Alert, Nunavut
2.) Yellowknife, Northwest Territory
3.) Whitehorse, Yukon
4.) Whistler, British Columbia
5.) Red Deer, Alberta
6.) Moose Jaw, Saskatchewan
7.) Winnipeg, Manitoba
8.) Newmarket, Ontario
9.) Trois-Rivieres, Quebec
10.) Eel River Crossing, New Brunswick
11.) Cow Bay, Nova Scotia
12.) Cornwall, Prince Edward Island
13.) Labrador City, Newfoundland and Labrador

I unfortunately did not realize that there is also a Cornwall, Ontario, until after I published this puzzle, but I hope the rest of the locations were unique enough for the puzzle to still have been solvable (plus, Cornwall, PE is the only one which would make sense given the order of the Uncle's travels).

Tuesday, August 30, 2011

Solution to Puzzle 15: The Oblique Title Wars

After a long delay, here are the solutions to the latest puzzle.

Solutions were sent in by Scott, Ian*, and Robert. It should also be noted that Robert's solutions come in two varieties: those which Robert answered on his own first pass through, and then those solutions provided collectively by Robert and other members of the UNCG Atheists, Agnostics, and Skeptics.

1.) The Office of Modification
The Adjustment Bureau (Movie)
Solved by Scott and Robert.

2.) 510nm Illumination Device
Green Lantern (Comic book turned into a movie)
Solved by Scott and Robert + UNCG

3.) Crimson Literary Symbol
The Scarlet Letter (Book)
Solved by Ian and Robert + UNCG

4.) Consumes, Stalks & Exits
Eats, Shoots, & Leaves (Book)
Solved by Ian and Robert

5.) Verified Falsehoods
True Lies (Movie)
Solved by Scott, Ian, and Robert

6.) The Small Royal Son
The Little Prince (Book)
Solved by Scott, Ian, and Robert

7.) Occupant Wickedness
Resident Evil (Movie)
Robert + UNCG actually answered 'Bad Company' for this one

8.) CRUSH
MASH or, as Scott pointed out, more correctly M*A*S*H (Television, although Scott also helpfully pointed out that the book and movie did not have the asterisks)
Solved by Scott and Robert + UNCG

9.) Searching for Kind Thoughts
Good Will Hunting (Movie)
This one was tricky, since goodwill is the synonym I used but is technically one word (and thus not the title of this film). Nevertheless, Robert+UNCG managed to get this one.

10.) Large Noise Conjecture
Big Bang Theory (Television)
Solved by Scott, Ian, and Robert + UNCG

11.) Contest of Feudal Seats of Power
Game of Thrones (Television)
Solved by Scott and Robert + UNCG

12.) The Windstorm
The Tempest (Shakespearean Play)
I was hoping people would realize there hadn't been any Shakespeare yet and guess this, but it was clearly too ambiguous a clue. Scott answered 'The Hurricane' (Movie) and Robert + UNCG answered 'Twister' (Movie).


* Ian used to be known around here as Cornucrapia, but he has recently embarked on an adventure teaching English in Korea, and has started a new blog to chronicle his experiences. It is well worth checking out.

Tuesday, June 15, 2010

Solutions to Puzzle Number 13: The Phantom Titles

Last week I released the prequel to my oblique title collection, Puzzle Number 13: The Phantom Titles. Although reviews pointed out that its plot and overall structure were weak in comparison to the original trilogy tetralogy, citing the lack of notability in the fourth part, awkward attempt at a romantic inclusion in the seventh, and blatantly obvious conclusion*, many still conceded that advances in computer technology** helped overcome notability weaknesses, and the brilliantly choreographed and scored wordplay of the penultimate part made the whole puzzle worth going through. Additionally, critics all agreed that at the least the whole thing wasn't about taxes and none of the solutions hinged on the outcome of a pod-race.

Solutions were sent in by Mitch, Sarah, Cornucrapia, Kim, and Kevin. The solutions are as follows:

1.) Epic Stories of the Collapse
Legends of the Fall (Movie)
Solved by Mitch, Sarah, Kim, and Kevin.

2.) Exponential Parkland Protectors
Power Rangers (Television)
Solved by Mitch, Kim, Cornucrapia, and Kevin. Sarah helped me test this one, so she was excluded from answering it.

3.) Firearms, Pathogens, and Carbon-Iron Alloys
Guns, Germs, and Steel (Book)
Solved by everyone who sent in solutions.

4.) Meeting with the Seventh Avatar of Vishnu
Rendezvous with Rama (Book)
Solved by Cornucrapia. Mitch, Sarah, and Kevin all managed to solve it with the help of Google and Wikipedia, and Kim managed to figure out that Rama was involved, but didn't know any titles that went with that.

5.) Fortified Domicile
Castle (Television)
Solved by Mitch, Sarah, Kim, and Kevin.

6.) Happiness
Glee (Television)
Solved by Mitch, Sarah, Kim, and Kevin. Sarah also pointed out that 7th Heaven could have been a valid possibility.

7.) Excellent Future Notions
Great Expectations (Book)
Solved by Mitch, Sarah, Kim, and Kevin.

8.) The Hilarity of Mistakes
The Comedy of Errors (Shakespearean Play)
Solved by Mitch, Sarah, Kim, and Kevin.

9.) No Sound from the Cowboy Film Forward Face
All Quiet on the Western Front (Book, also turned into a Movie)
Solved by everyone who sent in solutions.

10.) Ferric Guy
Iron Man (Film)
Solved by everyone who sent in solutions.

*Writer/director/producer Mozglubov tried to defend the obviousness of the conclusion by stating that such story elements were necessary "for the kids", but his argument was generally panned among critics.
**Google and Wikipedia

Tuesday, June 8, 2010

Solution to Puzzle Number 12: The Unpopular Code

So it turns out that code-breaking is not the most popular activity among my readers; Puzzle 12 was the first puzzle for which I received no solutions. For anyone who was curious about the code, though, the solution is as follows.

Messages were encoded according to the following steps:
1.) For all letters, convert to a number according to the alphabetic position (A -> 1, B -> 2, etc.)
2.) Subtract 12 from each number
3.) If a resulting number is less than or equal to zero, subtract one more (this gets rid of any zeros)
4.) Convert all positive numbers to their alphabetic equivalent (1 -> A, 2 -> B, etc.)
5.) For all negative numbers, take the absolute value and convert that to their alphabetic equivalent. Follow the letter with a (pseudo*)random integer.

Thus, the encoded message HH8L9, H1L9FA9 F4FH8M, E1CH can be decoded as follows:
H -> 8, 8+12 = 20 -> T
H8 -> -8, -8+13 = 5 -> E
L9 -> -12, -12+13 = 1 -> A
and so on, to reveal the original message TEA, EARL GREY, HOT

Since I had decided to make the category classic science fiction film and television, I went with the two messages that are most iconic in my mind of the genre:

Message 1
SPACE: THE FINAL FRONTIER. THESE ARE THE VOYAGES OF THE STARSHIP ENTERPRISE. ITS FIVE-YEAR MISSION: TO EXPLORE STRANGE NEW WORLDS, TO SEEK OUT NEW LIFE AND NEW CIVILIZATIONS, TO BOLDLY GO WHERE NO MAN HAS GONE BEFORE.

Message 2
A LONG TIME AGO IN A GALAXY FAR, FAR AWAY... STAR WARS

Thursday, February 18, 2010

Solutions to Puzzle Number 11

Well, it has been a week since the latest puzzle came out, so it is time for the solutions. I received puzzle responses from Scott, Robert, and Cornucrapia. I also would like to point out that Sarah impressively got the answer to 4 without any help from Google - who knew a physicist would be so awesome at zoology? Her solutions have not been listed below, however, because she lives with me and I am bad at not giving hints. I have reprinted the clues below with their solutions italicized below (and the media category in parentheses).

1.) At an Unknown Location
Lost (Television)
Solved by Scott and Robert

2.) The Manner in which I Became Acquainted with Your Most Recent Female Progenitor
How I Met Your Mother (Television)
Solved by Scott, Ian, and Robert

3.) The Misplaced Planet
The Lost World (Literature - I believe there is also a television show with the name, but I had Sir Arthur Conan Doyle's novel in mind).
Solved by Scott, Ian, and Robert

4.) Lampyridae
Firefly (Television)
Solved by Scott, Ian, and Robert

5.) Vigorously Cleans
Scrubs (Television)
Solved by Ian and Robert

6.) A Story About Two Population Centres
A Tale of Two Cities (Literature)
Solved by Scott, Ian, and Robert

7.) According to Your Preference
As You Like It (Literature - the obligatory Shakespeare title)
No one sent me a correct solution for this one.

8.) Personal Graphical Representation
Avatar (Movie)
Solved by Scott and Robert

9.) No Rural Region for Elderly Males
No Country for Old Men (Movie)
Solved by Scott, Ian, and Robert

10.) Overcook Announcement
Burn Notice (Television)
Solved by Scott and Robert

Well done to all the puzzle solvers.

Monday, November 23, 2009

Solution to Puzzle Number 10

I meant to post this yesterday, but I ended up getting delayed due to some unknown blogging error that would not let me upload images. Here is the solution to Puzzle Number 10: Tetris Shape Reconstruction. In the puzzle, I asked if there existed a unique colour assignment linking each of the given colours to one of the Tetris shapes for the following image:

To be entirely honest, I had originally intended there to be a solution. However, after posting the image I realised there was not, and the puzzle therefore ended up a little sneakier than I had originally intended. Robert and Scott both successfully spotted my sneakiness, while Paul fell for my (unintended) trap and successfully mapped all the shapes without realising that red could not be mapped to only the J or L shape. Sarah had intended to answer the puzzle, but I accidentally spoiled the answer for her before she even had a chance to give it a go.

One can quickly see that Green = I and Orange = T due to the isolated shapes in the bottom left. Likewise, it is clear that Purple = O and the blue at the top means Blue = J. Since I has already been mapped, one can rest assured that Yellow = Z, which leaves only two shapes and two colours. Cyan = S is a valid mapping, but Red needs to be both J and L in order to create the left-most red area. Due to the inconsistent chirality of the red shape, there is no possible mapping to the Tetris shapes.

Sunday, October 18, 2009

Solution to Puzzle Number 9

Sorry, I had intended to release these solutions earlier this weekend (along with a couple other posts that are partially finished), but then I came down with some sort of flu or cold. Right now I am coasting on the awesome powers of NeoCitran, but I think it might wear off soon.

Here are the solutions to Puzzle Number 9: Epic Word Scramble. I only received solutions for the puzzle from one person this time (Sarah), but she was quite impressive with her output and sent in two sets of solutions (one before any of the hints and one after both sets of hints). As a reminder, each set of letters came from an original message (thereby ensuring that a whole sentence could be formed with them), and hints were released to ideally lead someone to those original messages if unscrambling all the letters into an unplanned sentence proved too difficult.

1.) A A C G G H H H I I I L M N N N O O R S T T U W Y
Six words, one is a contraction.
(3'1) (4) (8) (2) (2) (5)?

The original sentence was: Who's that lounging in my chair?

Before the hints, Sarah did not actually have a sentence (it was rather a collection of disjointed words). I was debating whether or not to include that as a partial solution, but I currently cannot find the email, so that is making my decision for me.

Edit: Sarah re-sent me her set of words:
In naughty math showgirl icon

After the hints, Sarah sent in this partially sensible sentence (you have to imagine some extra punctuation, I think, around the 'ah'... and even then I'm not so sure about its meaning):
Him's grit wantonly in ah cough?

2.) A A A E E E E E E E E E F G H H H H I I N O O P P R R R R S S S S S T T T T T V Y
Eight words, none are contractions.
(5) (3) (3) (7) (2) (3) (8) (10).

The original sentence was: These are the voyages of the starship Enterprise.

Sarah had much more luck with the second set of letters, sending this message before any hints were released:
Hie Ho! Here a gritty vet pets sheep ass for earnest.

Following the hints, she submitted this (with the caveat that one must assume Aeehi is a name):
Aeehi try the passage to the freshest perversion.

As Sarah pointed out, I'm not sure the hints actually made the puzzle any easier. I will try to make the next puzzle a mathematically oriented one to make up for this one.

Friday, August 7, 2009

Solution to Puzzle Number 8

I am back safely in Canada and dealing with jet-lag, laundry, and the need to study for my upcoming exams. However, I still have a few puzzle solutions that need to be posted, so here are the solutions to puzzle number eight. This set of oblique titles had quite a few responses, so I will list all of the puzzle solvers underneath each solution.

1.) Every Canine Travels to Space
The movie All Dogs Go to Heaven.
This title was solved by: Scott, Sarah, Cornucrapia, Regan, Robert, Jesse, and my cousin Kevin

2.) Strange Peeper
The television show Queer Eye.
This title was solved by: Scott, Kevin

3.) The Soricidae Domestication
The play The Taming of the Shrew by William Shakespeare.
This title was solved by: Scott, Sarah, Cornucrapia, Regan, Jesse, Kevin

4.) Stopping Device, Inventory, And a Pair of Wooden Containers Giving off Vapour
The movie Lock, Stock, and Two Smoking Barrels.
This title was solved by: Scott, Sarah, Cornucrapia, Regan, Jesse, Kevin

5.) Ritual Starvation and Feeling Enraged
The movie Fast and Furious. I also accepted The Fast and the Furious (the original movie in the series) and any combination of articles between the two.
This title was solved by: Scott, Regan, Robert, Jesse, Kevin

6.) The Sightless Horologist
The book The Blind Watchmaker by Richard Dawkins.
This title was solved by: Scott, Sarah, Cornucrapia, Regan, Robert, Jesse, Kevin

7.) Story Breakers
The television show Myth Busters.
This title was only solved by Kevin.

8.) Conflict Cudgel
The movie and novel Fight Club (with the novel written by Chuck Palahniuk).
This title was solved by: Scott, Sarah, Cornucrapia, Robert, Jesse, Kevin
Additionally, Regan sent in the solution of Warhammer, which also works fairly well (although it is primarily a title from table-top and computer games).

9.) Maritime Marauders of the West Indies: The Profanity of the Dark Mollusk Bead
The movie Pirates of the Caribbean: The Curse of the Black Pearl.
This title was solved by: Scott, Sarah, Cornucrapia, Regan, Robert, Jesse, Kevin

10.) The Quiet Equine Speaker
The movie and novel The Horse Whisperer (with the novel written by Nicholas Evans).
This title was solved by: Scott, Sarah, Cornucrapia, Robert, Jesse, Regan, Kevin

Wednesday, July 29, 2009

Solution to Puzzle Number 7

Here are the solutions to Puzzle Number 7: Molecular Tagging. To briefly recap, the object of the puzzle was to determine whether a set of four molecules of type A, which could form a single bond type with up to three other such molecules, was the most effective alphabet for molecular tagging, or whether it was instead a set of three molecules of type B, which could form up to two polar bonds (of opposite polarity) with up to two other B molecules. Scott successfully solved this puzzle, although there were some hiccoughs along the way as he and I hammered out the details of what I was exactly asking for (the hiccoughs in no way reflect badly on Scott's talents as a puzzle solver - they were all due to ambiguities in my puzzle writing). So, congratulations to Scott not only for solving the puzzle, but also for helping me work out improvements in the puzzle presentation.

The first stage in solving this puzzle is to move past the chemical presentation of the problem and recognize that it is really a combinatorics problem with two types of graphs. If each molecule is treated as a node in a larger network of molecules (networks of four nodes for type A and three nodes for type B), then the type A networks are undirected graphs and, due to the polarity of the bonds, type B networks can be viewed as directed graphs.
Type A network with all bonds

Type B network with all bonds

A cursory look at the graphs reveals that each has 64 total configurations (each bond can either be present or not and each graph has 6 bonds, yielding 2^6 = 64 configurations). However, there are two major constraints that are not taken into account by such a cursory examination: the graphs must be connected, and there is no vertex labeling, which means we must also eliminate graphs which are isomorphically the same (which basically means they are equivalent networks through some rotation, either of the whole network or about some of the bonds). Once all unconnected and isomorphically identical networks have been eliminated, we are left with a kind of molecular alphabet for each network type. As Scott pointed out in his solution, selecting between the alphabets requires the additional unstated assumption that the cost of bond activation and subsequent reading of the bond's presence and (if applicable) polarity is the same for each molecule type (an assumption which Scott pointed out was "a laughable claim indeed"... sometimes I think he's a little too clever for his own good). While Scott was correct that such an assumption might be stretching the bounds of what is a reasonable hypothetical problem, for the purposes of this puzzle we can assume those costs are negligibly different and concentrate on which molecular alphabet is capable of encoding more information.

While there may be an elegant way of mathematically determining the number of isomorphically distinct graphs with a set number of nodes, these networks are small enough that it is also possible to do an exhaustive analysis by hand. Doing such an analysis leads to the discovery that, despite an equal number of total graph configurations, the B networks have more than double the number of isomorphically distinct structures (there are six isomorphically distinct connected A networks and thirteen isomorphically distinct connected B networks). Thus, molecule B is the best choice for your company to invest in.
The six isomorphically distinct connected A networks


The 13 isomorphically distinct connected B networks

Thursday, July 16, 2009

Solution to Puzzle Number Six

Here are the solutions to Puzzle Number 6: Star Media Quotations. For those who have forgotten, the puzzle involved a set of ten quotations from various television shows and movies with 'star' in the title. The puzzle was to come up with what show or movie it was from, who said the quotation, to whom, and what the context was. I received partial solutions from Sarah, Robert, and Scott.

1.) "I'll make it up to him next year; I promise."
From Star Wars: A New Hope, this was said by Uncle Owen to Aunt Beru after Uncle Owen tells Luke he has to stick around for the harvest rather than go to the academy.

Sarah and Robert both correctly identified this quotation, although neither managed to name Aunt Beru.

2.) "There are four lights!"
From Star Trek: The Next Generation, this was said by Captain Jean-Luc Picard to his Cardassian torturer. Picard had been captured by the Cardassians after being lured into a trap, and his torturer began to mess with his head by insisting that he was being shown five lights when in fact there were only four. He would then ask Picard how many lights there were, and cause him immense pain if Picard answered "Four". When Picard was finally released, he took a moment to bellow that sentence at his torturer, thereby reminding viewers that Picard is awesome, defiant, and all around the coolest captain.

Sarah, Robert, and Scott all successfully managed to identify this quotation. Oddly enough, though, both Sarah and Robert thought that the Cardassian was demanding he say there were three lights, and Scott couldn't remember the number of lights (the reason I say that was odd is because, to me, the number of lights is a very distinct part of the scenario).

3.) "He is as clumsy as he is stupid. General, prepare your troops for a ground assault."
From Star Wars: The Empire Strikes Back, this is Darth Vader letting General Veers know that he has very little esteem for a certain Admiral Ozzle, and more than likely Admiral Ozzle is about to die a rather unpleasant death by asphyxiation. The Imperial fleet was at that moment preparing to attack the Rebel base in the Hoth System, and they came out of light speed too close to the planet (thus letting the rebels detect them and activate their energy shield).

Sarah had the most complete answer on this one, although she was unable to name General Veers (that, after all, would be an immense display of geekdom). Scott knew it was Vader, but he couldn't place the scene.

4.) "Welcome home, Mr. President."
From Battlestar Galactica, this was said by Chief Tyrol to Gaius Baltar as Tyrol brought Baltar out of a trance by placing a pistol against his head. The remark was followed by Tyrol pistol whipping Baltar into unconsciousness. Baltar had been under the care of the cylons following the retreat from New Caprica, and in this way he was brought into custody by the colonial forces.

No one managed to get this one. I was actually worried it would be too vague, but at the same time I figured any line with "Frak" in it would be too obvious.

5.) "Yub yub."
From Star Wars: Return of the Jedi, this was said on a number of occasions by several small furry critters called Ewoks native to the forest moon of Endor. As it was said several times, whom it was being said to and the context have multiple answers. Probably the one that stands out the most is when Leia first meets her Ewok friend and he is beckoning her to follow him back to his home.

Sarah is the only one who got this one (I think a large part of that is due to her predilection for small furry critters, but she is also clearly a competent Star Wars authority as well).

6.) "your basic hedonistic predilection for a rhythmic stroking of your fur, to demonstrate affection,"
From Star Trek: The Next Generation, this is an excerpt from Lt. Commander Data performing his Ode to Spot. As this was a performance, I was less concerned about who the audience was, although it did include Geordi, Worf, Picard, Riker, Troi, and some unnamed people who suffered from hairstyles transplanted out of the 80s.

Scott did an amazing job on this one, going into remarkable detail on the context and audience. He remembered that Worf, Picard, Riker, and Troi were all there, and that the point of the scene (other than showcasing Data's socially awkward awsomeness) was that Riker was unusually sleepy. He nods off during the poem, Troi pokes him awake, and, thinking the poem is over, he starts clapping in the middle.

7.) "I've lost the fellatus to speak properly."
From Stargate: SG1, this was said by Colonel Jack O'Niell to the other members of his team in the briefing room (and, presumably, to the General, although I cannot remember exactly... nor can I find it on the internet just now).

Sarah and Scott both got this one, although, like me, both of them were not entirely sure who he said it to. Also, both Sarah and Scott specified that it was O'Niell with two l's, cementing their claim to geekdom in the Stargate universe as well.

8.) "sometimes a cake is just a cake."
From Star Trek: The Next Generation, this was said by Counsellor Deanna Troi to Lt. Commander Data as the two of them contemplated cutting into a Data shaped cake that Troi had brought. The reason for the cake was that Data had been experimenting with dreaming and, after having a nightmare that featured Troi's head on a cake shaped like her body that people were eating, Data ended up stabbing her in the shoulder trying to attack an alien he was only vaguely aware of.

Scott and Sarah both got this one.

9.) "Hey, look! I'm an engineer! I can do math!"
From Stargate: Atlantis, this was said by Bill Nye the Science Guy to Dr. Rodney MacKay as Bill Nye and MacKay were trying to come up with a way to shut down an interdimensional rift that was threatening to freeze everyone to death.

No one managed to get this one, which I'm not entirely surprised at... I just thought it was funny that Bill Nye played himself in an episode of Stargate: Atlantis. Plus, as a former engineer-in-training turned scientist, I chuckled at the scientist/engineer squabble over whether engineers could do math.

10.) "I can arrange that. You could use a good kiss!"
From Star Wars: The Empire Strikes Back, this was said by Han Solo to Princess Leia Organa after she told him, "I'd sooner kiss a wookie." This was before the Imperial Forces attacked Hoth when Han was planning to take his leave to pay off Jabba the Hutt, and Leia was mad at him for leaving.

Sarah managed to get this one, while Robert successfully got the characters but wasn't able to place the context.

So, a trio of readers have displayed their science fiction biases (among my own biased selection... you will notice that all Star Wars quotations were from the original movies (as the dialogue from the new movies really isn't much worth quoting) and all the Star Trek quotations were from the Next Generation). As I said when I posted the puzzle, this was done predominantly from my own (possibly flawed) memory, so if you notice any mistakes please let me know and I will post corrections.

Friday, June 26, 2009

Solutions to Puzzle Number 5

This must have been a more challenging set of oblique titles, since no one successfully solved them all. I had several people say they would send me further solutions as they thought of them, but those solutions have not been forthcoming. Scott solved titles 1, 2, 6, 8, and 10. Robert solved 2, 6, 8, 9, and 10. jbrydle solved 4, 6, and 8-12. Oddly, it would seem that on the whole the even numbered titles were easier to solve than the odd ones. Oh well, here are the solutions to them all. Congratulations to those who solved some! I have added to each solution whether it was a movie, television show, or book, just in case someone has not heard of it before. I think there are a couple of the solutions that some of you may kick yourself for not getting.

1.) The Second Finisher: Day of Giving One's Opinion
Terminator 2: Judgment Day, movie

2.) The Correct Cost
The Price is Right, television show

3.) Thinking Something Grand is on the Way
Great Expectations, a novel by Charles Dickens

4.) Deities from the New World
American Gods, a novel by Neil Gaiman

5.) Leading up to a Base
Prelude to Foundation, a novel by Isaac Asimov

6.) Two Dozen
24, television show

7.) A Period of Time in Which a Certain Female Acted Naughty
When She Was Bad, apparently the title of a myriad of trashy novels

8.) Law Breaking and Retribution
Crime and Punishment, a novel by Fyodor Dostoyevsky

9.) The Vitis Fruits of Anger
The Grapes of Wrath, a novel by John Steinbeck

10.) Rhythmic Body Gyrations with Lupine Companions
Dances with Wolves, movie

11.) The Inexplicable Nocturnal Canine Event
The Curious Incident of the Dog in the Night-time, a novel by Mark Haddon

12.) The Ruler of the Outer Tent Linings
Lord of the Flies, a novel by William Golding

Saturday, June 13, 2009

Solution to Puzzle Number 4

I posted Puzzle Number 4 a few days ago. Very quickly, jbrydle, Kim, and Scott all sent me a correct list of solutions. So, adulations to them for being champions of puzzle solving! The solutions are as follows:

1.) Best Firearm
= Top Gun

2.) Martial Engagements of a Stellar Nature: A Recent Sentiment for a Positive Outcome
= Star Wars: A New Hope

3.) Foreigner Against Hunter
= Alien vs. Predator

4.) Growth Prevented By Legal Restraint
= Arrested Development

5.) Veritable Sanguine Fluid
= True Blood

6.) The Ruler of the Circles: The Monarch Comes Back
= The Lord of the Rings: Return of the King

7.) Visual Receptors of a Serpent
= Snake Eyes

8.) Famous Person Hike: Traveler
= Star Trek: Voyager

Saturday, April 18, 2009

Solution to Puzzle Number Three

It seems to have been enough time, now, for those who were going to send in solutions to have sent them. So, here is the solution to puzzle number three. The puzzle was solved by Scott, who once again first solved it himself and then wrote a computer program to power through and solve an optimal solution. I wondered if anyone would do that (I considered it myself to check my own solutions, but I decided it was too much work to figure out how to link in a dictionary database. Clearly, Scott is a little more computer-savvy than I), but I figured if somebody did do it, it would be Scott. Nice to know I was right...

Anyway, just as a reminder, the puzzle was to find a series of transitory words linking the following pairs:
1.) some -> curb
2.) bare -> bear
3.) dread -> pried
by changing one letter at a time.

For the first pair (some -> curb), Scott and I came up with the same solution, which is apparently one of three optimal solutions according to Scott's program:
some -> come -> core -> cure -> curb
The other two possible paths are:
some -> sore -> core -> cure -> curb
some -> sore -> sure -> cure -> curb

The second pair is a little more interesting, with Scott impressively coming up with one of two optimal solutions on his own (with the apparent help of a dictionary):
bare -> barm -> berm -> beam -> bear
Barm is the layer of yeast which floats on the top of fermenting alcohol, and berm is a bank of earth or other level surface set against a steep slope (like a terrace, if I understand correctly). Berm is also apparently a term used primarily in Ohio, Pennsylvania, and Indiana to refer to the shoulder of the road (which finally explains what word people were saying when I lived in western PA... four years and I never quite figured that out).
I had actually come up with the other optimal solution for this problem:
bare -> bark -> berk -> beak -> bear
but rejected it because I didn't think berk was a word. I guess I should have taken the time to look it up in a dictionary, because it apparently means a stupid person who is easily taken advantage of.

The third pair, both Scott and I again came up with the same solution, which in this case turns out to be non-optimal (his program came up with two optimal paths). The solution we came up with was:
dread -> tread -> triad -> tried -> pried
The two optimal solutions are:
dread -> dreed -> dried -> pried
dread -> dreed -> preed -> pried
I had never before heard both dreed and preed, but dreed is the past-tense of dree, which means to suffer or endure (it also is an adjective which means tedious or dreary). Preed is likewise the past-tense of pree, which means to try, test, or taste.

So, now my vocabulary has been expanded upon a little bit, and it is time for me to start thinking about puzzle number four.

Sunday, April 5, 2009

The Buffon Needle Problem: The Solution to Puzzle Number Two

I will admit, I have been a little disappointed by the lack of attempts to solve puzzle number two. So far, no one has attempted to send in solutions, either incorrect or correct. Rather than waiting around, I assume in vain, for people to send me attempts, I decided it was about time I posted what I find to be an elegant and fascinating solution.

To briefly reiterate the problem, one is trying to come up with an empirical estimate of π based on repeatedly dropping a rod of length L onto a floor with parallel floorboards separated by distance D. I have generated a quick diagram of the situation in Paint (this computer does not have any actual image editors on it other than Gimp which I am still learning how to use, so please forgive the rudimentary ugliness of the diagram), which also introduces the value of x which is the distance from the centre of the rod to the nearest floorboard edge.
Clearly, x can range from 0 to D/2. As one assumes a uniform probability for the position of the rod, the probability density function of x is 1/(D/2) = 2/D. Things are a little less clear when outlining the properties of the random variable θ, as the most obvious choice (for me) would be it can range from 0 to π. This will, however, cause problems later due to the properties of the sine function (namely that sin(0) = sin(π) = 0), so it is best to define θ as the measure of the acute angle. It can thus range from 0 to π/2, and, also assuming uniform probability, the probability density function of θ is 1/(π/2) = 2/π. Since θ and x are independent, the overall probability density function for the needle can be found by multiplying the two independent density functions together, yielding 4/πD.

Since we are interested in the number of times the rod crosses the lines between the floorboards, we need to determine when that happens. With a little bit of geometry, it is fairly clear that whenever x < (L/2)sinθ the rod crosses the floorboards. Thus, to find the expected fraction of crosses, we need to integrate the probability density function 4/πD over the two random variables, first integrating from 0 to (L/2)sinθ with respect to x and then from 0 to π/2 with respect to θ (if anyone knows how to write integrals in html, I would appreciate it if you could tell me). First, integrating 4/πD with respect to x from 0 to (L/2)sinθ results in 2Lsinθ/πD. Integrating this result with respect to θ from 0 to π/2 yields 2Lsin(π/2)/πD = 2L/πD.

Thus, the expected ratio the number of times the rod crosses the division between floorboards divided by the number of times it is dropped is 2L/πD. As one repeatedly drops the rod and counts the number of crosses, the value will converge to this expected value. Since the length of the rod and the distance between the floorboards is easily measurable, it is a simple computation to achieve an estimate for π.

This is actually a physical example of a branch of computational techniques known as Monte Carlo estimation in which a series of random or pseudorandom samples are used to estimate a result. I find it extremely fascinating, and I think it has a measure of profundity that should not be lightly dismissed. The fact that one is able to simply count a binary event and use that ratio to find an estimate for a much more complicated value is absolutely amazing (of course, it should be immediately obvious that one will never be able to find the actual value of π with this method as the estimate will always be a ratio of number of crosses over number of trials and thus will always be a rational number). Probability and statistics is an amazing branch of mathematics, and it is something I wish I were better at.

Sunday, March 8, 2009

Puzzle One Solution

It took me longer than I had planned to get around to posting this solution, but here it is. If you recall, puzzle number one was concerned with finding the starting pair of numbers from 0 to 9 which provided the most iterations before reaching zero of taking the new number pair from the digits of the product of the previous pair. While I invented this puzzle as an aid to falling asleep (in which case brute force mental computation was actually the desired outcome), I was curious to see if anyone would come up with an elegant solution based on numerical logic rather than simply trying every single combination. While Scott (whose blog I just discovered is not on my "Places of Interest" list... I could have sworn it was!) mentioned he did spend some time mentally contemplating the solution, both he and Wisefly ended up doing the same thing I did to confirm the answer - write a short computer program that simply tried every starting combination and looped through the iterations. Wisefly used Excel, Scott used python, and I used MatLab. If anyone is curious about the specific code used to find the solution, either leave a comment or send me an email and I can send you my .m file. Roughly, the pseudocode is as follows:
maxCount = 0, maxStart = 0
for i = 1 to 99
count = 1, x = floor(i/10), y = mod(i,10)
while(x*y > 0)
count++, iter = x*y
x = floor(iter/10), y = mod(iter,10)
end while
if(count > maxCount)
maxCount = count, maxStart = i
end if
end for

Of course, for some reason I cannot get white space to stick around even within block-quotes, so my pseudocode comes out looking like crap. Please forgive its lack of spacing. Also, if you are not used to my pseudocode (which is entirely possible), floor yields the rounded down integer value of the value passed to it (for example, floor(5/3) = 1) and mod is the modulus (or remainder) of the first number by the second (for example, mod(10,4) = 2).

Anyway, running the program yields the correct answer of 77 (or x = 7, y = 7) as your starting value. 7*7 = 49, 4*9 = 36, 3*6 = 18, 1*8 = 08, 0*8 = 0. Thus, there are five iterations before the value becomes 0. As was pointed out to me, this was a relatively straightforward puzzle when one wrote a computer program to solve it (and even without the computer program it was feasible to solve by some relatively simple number crunching). Wisefly suggested modifying the puzzle such that instead of being in base 10 (ie. taking starting integers from 0 to 9), it would be interesting to see what the results were for a base n system, where n is anything greater than 2 (taking a base 2 system yields the trivially obvious solution of both x = 1 and y = 1, as the three other starting choices go to 0 immediately). This is relatively easy to do by just replacing the values of 10 in the above code by n and running the for loop from i = 1 to n*n-1. One can then look at the results of this and see if some sort of pattern emerges which would allow one to pick the appropriate best starting digits for a given base n without having to resort to brute force methods. I have completed the modifications to my own program and run it for values from 2 to 6 without spotting any sort of discernable pattern. I do plan on doing some actual work this afternoon, so I have tabled this for now but might explore it in the future. If anyone decides to explore this themselves and comes up with some interesting ideas, feel free to send me your results.

Note: I made the mistake this time of not keeping an accessible list of those who solved the puzzle and sent me solutions. While I think it was just Wisefly and Scott, if my memory has failed me and I forgot someone, please send me an email or leave a disgruntled comment, and I will make the appropriate changes to this post.

Edit: Thanks to Paul's helpful comment, my pseudocode looks a little more readable now.