Monday, April 21, 2014

The Fundamental Strategy taught by the game of Nim: The Victory Node

,

Matches are commonly used to play Nim.
Nim is an old strategy game popularized in 16th century Europe, and purportedly played in China. The game is simple, and can be played with simple objects, often using stones or matches. The game is played by laying out lines of objects and taking turns taking objects away. You take objects away by choosing a line, and then taking as many objects from that line as you want. The goal is to force the opponent to take the last object. Its best explained through an example:


For example.


The game begins by laying out stones in two lines:

****
***
  1. The first player chooses one of the lines (top or bottom), and can take AS MANY stones as he wants from it. (in this case, he can take anywhere from 1-4 stones). Let's say he takes 2 stones.

    Here's how the board looks like this:
    **
    ***
  2. Next, the second player does the same. He selects a line, and takes as many stones as he wants. Let's say he chooses line 2, and takes 1 stone.

    The board now looks like this:
    **
    **
  3.  It returns to the first player, who takes 1 stone

    Board:
    *
    **
  4. The second player takes BOTH stones from the bottom

    Board:
    *
  5. The first player is forced to take the last stone, and loses.

The Fundamental Strategy

At its core, the game of Nim is a mathematical one, and guarantees victory if you don't make mistakes and have the right board positioning.

It is not a competitive back-and-forth game at all. Allow me to demonstrate:
Say we have a board position like this:
*
**
We might recognize this as the scenario in our example earlier. The ratio of beads is 1:2. And this board position basically guarantees victory for the person whose turn it is. Supposing that the person plays it our right.

By taking both stones on the bottom line, it forces the opponent to take the final bead. Of course, you can still lose if you take only 1 stone, or the top line stone, but that would be a mistake.

Let's expand this, and look at a "losing situation"
**
**
Lets call this the 2:2 board position. If you have this scenario, it is near impossible to win if your opponent knows what he is doing. Lets look at your options (note that both lines are the same, so it doesn't really matter which line you choose)
  1. Taking 1 bead makes it so that you give the opponent the 1:2 ratio board position discussed above. 
  2. Taking 2 beads allows your opponent to take 1 bead, and forces you to lose.
Let's go one more step forward and see if we recognize a pattern:
 ***
**
Lets call this the 3:2 board position. This is also a board position where you are guranteed to win if you play it out right. Why? Because it builds off what have established with the 2:2, and 1:2 board set up. 

By taking away 1 stone, you force your opponent into a 2:2 board position, which is a guaranteed lose if you play it right.

And so on....4:4 is a loss, 5:4 is a win, 5:5 is a loss, etc.

There are also games of Nim with multiple lines, but I don't want to get too far into those ideas as of yet.

What does this Mean?

I didn't write this article to talk about the method of winning Nim, there are mathematical equations and methods which better describe that. I wrote it out to highlight a fundamental goal behind strategy and strategic interaction: The point where all that matters is your own execution of the strategy.

I call these points "Victory Nodes". As once you are in that position, the only thing that matters is not making mistakes- your opponents actions don't matter so long as you respond appropriately. The victory nodes are different from straight out winning because you can still make a mistake, but are important to note because they are often able to forecast victory long before it actually occurs.

A good strategist makes note of these potential Victory Nodes and tries to drive the position of the game towards it, and then sweeps up victory in one fell swoop.

In essence, a victory node is a point in which your success depends solely on yourself, and is not dependent on your opponent making a non-optimal move or a mistake.

In other words, to use a victory node:

You win by putting yourself in a position where your opponent's actions won't produce victory if you respond correctly. All that matters is your own execution of the strategy.

Of course, with everything, it is often easier said than done.
Read more →

Sunday, April 13, 2014

Debunking Sherlock Holmes Myths: "Deductive Reasoning"

,
"How often have I said to you that when you have eliminated the impossible, whatever remains, however improbable, must be the truth?"

     Sherlock Holmes, The Sign of the Four, ch. 6 (1890)
As with many Holmesian fanatics, the first time we heard the term "deduce" was while reading a Sherlock Holmes story. Prior to that, I had never heard the word before; so I quickly learned to associate the term "deduce" with Sherlock Holmes, as if it was something unique and central to him and his method.

It was many years later that I discovered that in fact there was an entire segment of Formal Logic devoted to studying "Deductive Reasoning". Being the Holmesian fanatic I was, (and being lured in by the image of a Holmes silhouette in the description) I embarked on a quest to master the skills of Deduction.

This image was placed in the description of "Deductive Reasoning".


However, to my dismay I realized something that shattered my reality; The "deduction" that I had always associated with Holmes wasn't utilized by the consulting detective at all!

Allow me to demonstrate what I mean.

Logic and Deductive Reasoning

Lets start by giving you a basic rundown of formal logic.

In logic, Deductive Reasoning is known as the "top-down" approach (as opposed to Inductive, which is a bottom- up approach). You basically start from general premises or categories, and you work your way down to a specific conclusion.

For instance, the most famous example is the "Socrates is a man" syllogism. It goes like this:

(P)All men are mortal
(P)Socrates is a man
-------------
(C)Socrates is mortal
You can think of it like this.We have a group of people called "men" and we know a variety of qualities that all people within that group share: they are mortal, they have a Y chromosome, etc. If we are told that Socrates is a person within that group, then we know that he shares the traits of the group- i.e. that he's mortal and has a Y chromosome.

(This method is different from Inductive Reasoning)

This method reasoning to a conclusion is actually very different from Holmesian Deduction

Holmesian Deduction


Holmesian Deduction is a bit different, and really draws from the word "deduce", which implies to subtract. In a way, Holmesian Deduction is all about shaving off the excess until you're left with the essential pieces.

The way that Holmes utilizes his deduction is quite simple: He prepares a number of possibilities in his head, and then tests them. The possibilities which are impossible or don't fit, are eliminated. The process continues until he is left with a single possibility that, no matter how improbable, must be the case.

Essentially, this is how Holmes solves his cases: He collects the facts from various sources, such as visiting the scene or talking to witnesses, and creates a list of possible solutions- and then he tests them one at a time using logic, visual simulation, or experiments. It is in fact, the scientific method as applied to crime solving.

Holmes' True Method

So what method does Holmes ACTUALLY use? Is there are formal logic version of his method. Well, essentially there are two major forms of formal reasoning in "Induction" and "Deduction". But there are somewhat less well known forms of logic as well. Such as Abduction.

Abductive Reasoning is a form of reasoning that goes from Observation to Hypothesis. It observes a situation, say a crime scene, and brings up several hypothesis that are sufficient for causing the crime. For instance, lets say we have this scenario:

Observation:
  • There was a cookie place on the table in front of three sugar-loving children. Red, Blue, and Green. The cookie must be eaten if touched. 
  • The cookie is now gone.
Hypothesis:
  • You can abduce (create hypothesis) that:
    • "Red may have eaten the cookie"
    • "Blue may have eaten the cookie"
    • "Green may have eaten the cookie"
To the many Holmesians out there, this might not look like the method of "deduction" that you have come to be aware of; It doesn't seem to have the "subtracting" of possibilities that I put down as core to Holmesian deduction. However, lets revisit it upon discovering some new information.

We return to the scene and find out some new information:
Red was asleep at the time of the cookie eating. 
In essence, we have added another point to our observations, and as such, the possible hypotheses have changed as well.

Here are the new hypothesies:
Observation: The cookie is missing. It could only have been eaten by one of the three children. Red was asleep at the time the cookie was eaten.

Hypotheses: "Blue may have eaten the cookie", "Green may have eaten the cookie".
As you can see, when we reevaluate the abduction with new information, we are essentially eliminating possibilities, just like how Holmes eliminates possibilities upon receiving new information. In essence "eliminating the impossible until only left with only one possibility".

Conclusion

Holmes' method doesn't resemble deductive reasoning at all. Instead, it's much more similar to a form of reasoning known as "Abductive Reasoning".




Read more →

Wednesday, April 9, 2014

5 minute Logic Tutorial: Deductive Reasoning and Inductive Reasoning

,
Alright, here's a 5 minute Logic tutorial on Deductive Reasoning and Inductive Reasoning. In formal Logic, these are the two main methods of reasoning.

  1. Deduction- Top-down approach
  2. Induction- Bottom-up approach
The "top" refers to a group or category
The "bottom" refers to an individual or particular instance


You should be able to pick it up as you read on.

Deductive Reasoning

In logic, Deductive Reasoning is known as the "top-down" approach. You go from general qualities of a group to say things about specific instances of that group.

For instance, the most famous example is the "Socrates is a man" syllogism. It goes like this:

(P)All men are mortal
(P)Socrates is a man
-------------
(C)Socrates is mortal
You can think of it like this. We have a group of people called "men" and we know a variety of qualities that all people within that group must share: they are mortal, they have a Y chromosome, etc. If we are told that Socrates is a person within that group, then we know that he must share the traits of the group- i.e. that he's mortal and has a Y chromosome.

This is different from Sherlock Holmes' Deduction (Abduction).

Inductive Reasoning

Inductive Reasoning is known as the "bottom-up" approach. It goes from a specific instance (or individual) to reaching grand conclusions about the group they belong to.

For instance, lets say we have Johan, who is a man from country XYZ. If Johan is a smoker and we say that all people from country XYZ are smokers, then we are using induction. Induction.

As you can see, very common use of this is in Stereotyping, where we take qualities from specific instances (in this case, Johan's smoking) , and assume that it applies to all the people of the group the person belongs to (assume that everyone from country XYZ are smokers).

Induction tends to be the riskier and more dangerous form of reasoning.


Read more →

Sunday, April 6, 2014

18 Cryptograms of Western University (Part 3/Final)

,
Recently, it appears that the code has essentially been "cracked". I am essentially just making this post in order to conclude what happened.

The article can be found here

According to the article, it wasn't actually a "code" at all, but rather a sort of social art experiment. While 121 letters were hidden a few years ago, it seems they have only had widespread attention at this point.

The result may not be especially exciting for the code-breaker, or armchair detective, but I suppose it has its own merits. After all, our analysis had suggested that the text wasn't very carefully formatted, suggesting that the attempt wasn't to deliver the entire message. Additionally, there was the oddity of giving several of the same letter (content wise) with nigh negligible differences. Essentially it suggested the idea that there wasn't much to find in the letter content.

However, I was hoping that they were trying to make a point with the objects and the pictures they chose.

I hope that I hear from the creator of this at some point. I'm not especially interested in tracking them down, but I would be interested in hearing their reasoning for choosing to do the things they did.

Until then, Happy Sleuthing.
Read more →

Wednesday, April 2, 2014

The Interesting Effects of Suey Park and PETA- The Benefits of Appearing Mad

,
Craziness works.

Her twitter feed. 36K in tweets with 21k in followers.
For those of you who are aware of US pop news, you may have heard about the twitter debacle with #CancelColbert and the twitter sensation Suey Park. Suey Park created a campaign to cancel "The Colbert Show" after a twitter account called "The Colbert Report" posted something she considered to be horribly offensive and racist. Her tweet has exploded, and now the entire internet seems to be aware of her and have come to the consensus that she is crazy.

And yet, I believe her presence is actually quite positive for supporting the cause of rights for people of color (or I guess Asian Americans, It's hard to pinpoint what she stands for).

I'm not here to debate whether she is right or not. I'm not even here to analyze her goals and intentions. Instead, i'm here to talk about the effect she has as a highly vocal and highly visible figure. One could actually consider her to be a lot like PETA.

As you'll soon see, both Suey Park and PETA have a sort of "martyr" effect for the causes they support. They take the negative rapport and stir up a great deal of attention for their cause. Since their causes tend to be something that people are either neutral about or agree with, it reaps all the benefits of the attention without also being tied to the negative press.

Let's talk a little about these two groups.

PETA and "All publicity is good publicity"

PETA (standing for People for the Ethical Treatment of Animals), for those who aren't aware, is an animal rights activist group. They are well known for their extremely controversial rallies and demonstrations. They are almost always found in the news and the public consciousness given how outlandish their actions and demands are. They are also known to be especially confrontational.

PETA is very single minded in the way
it tries to advertise its cause
PETA is known for using shocking imagery, such as violent and bloody images directed toward children. They often utilize images and methods that stir an emotional response rather than arguments.

When the Mayor of New York, Rudy Giuliani was diagnosed with prostate cancer, they ran an ad of him in a "got milk?" style advertisement, substituting the catch-phrase with "got prostate cancer?" in order to try and associate prostate cancer with milk.

They don't really pull their punches, and are very opportunistic. In the case of some fishermen being bitten by sharks, they ran an ad that said "payback is a bitch, go vegan" to the outrage of the victim's families.

Given all this, its hardly a surprise that PETA has a reputation for being crazy.

The wiki page has more.

As far as their cause goes. I believe that the idea of "animal rights" is generally not scoffed at, nor really solely associated with PETA. In fact, I would say that people consider PETA to be the "insane animal rights activists group", with the knowledge that there are several less crazy ones. The fact that their cause and PETA itself can be separated is quite important.

Suey Park's Craziness

Again, i'm not here to talk about Suey Park as a person. There have been an absurd number of articles judging her arguments and character already, such as this one. Instead i'll just mention some of the effects of her actions.

The 23 year-old has over 21,000 twitter followers with her "Ching Chong Ding Dong Foundation for the sensitivity for Orientals". So every one of her tweets has a large audience. When she posted the #cancelcolbert hashtag as a call to arms, the whole phenomena took off; it exploded partly because of her large following, partly because it was related to Colbert(who was well known) , and partly because it seemed like a CRAZY thing to say.

Extreme views draw attention. If this just said "Everyone can be racist", it wouldn't
draw nearly as much attention.
It's pretty important to acknowledge the craziness of what she said, as it really did lead to the post exploding. The internet is a large place with enormous amounts of information floating around. If your comments or opinions are normal or standard, they won't stand out. The opinions that everyone notices are the ones that are different, and often extreme. Suey Park's opinion was very extreme, and that's why it ended up becoming a phenomena.

Her subsequent comments and rather stormy appearance on a Huffington Post interview has caused the internet to go into a frenzy. The consensus of many bloggers and commenters on Reddit is that she is crazy.

You'd think this would set back the cause she fights for. On the contrary, it brings attention to the cause, and attention that is often neutral. Being "against racism" is something people in the US are all supportive of, and since Suey Park doesn't solely embody that cause, it will gain a lot of neutral or good attention. I find it doubtful that anyone will say "I'm for the mistreatment of people of color because I hate Suey Park".

What are the Effects?

The fact of the matter is that PETA and Suey Park bring a lot of attention to their causes. They are both similar in that they have gained attention by utilizing confrontational and "crazy" means. However, the attention is positive for the causes they stand behind since the causes tend to be things that people are either neutral or supportive of.

It looks a little like this:

  1. Act Crazy
  2. Craziness gets attention
  3. Attention goes to speaker
  4. Attention drips down into cause (to a lesser degree)
  5. Negative association with speaker develops
  6. No negative association with cause because cause is non-controversial
Result: 
  • Negative association with speaker
  • Lots of attention for Speaker
  • Lots of attention for Cause
Cause gains from Crazy speaker


Requirments


But there are very specific requirements that must be in place before this can work


  1. It works because Suey Park and PETA are not only only proponents of their cause, they just tend to be the most famous and the most visible due to their outlandish actions and words. So they can be called the crazy ones out of a group.
  2. It works because their causes are not especially controversial. People are not especially against "animal rights" nor really against "anti-racism". There's not really a debate happening about whether or not racism is good, its accepted that it is a negative thing at this point.
Essentially, people are not saying "I will now support Racism because I think Suey Park is crazy". They are more likely to say something along the lines of "I think Suey Park is crazy, and I feel sorry for the people who are actually trying to fight racism because she makes them look bad".


It works because the attention the crazy person gets will bleed onto their cause, while the notoriety will really only affect the speaker. Remember that those two requirements must be in play though, being crazy for attention isn't always a good thing- bad reputations can easily destroy businesses and careers.
Read more →

Saturday, March 29, 2014

The 18 Cryptograms of Western University (Part 2)

,
I found some time to think about the cryptograms since my last post. Apparently, there has been another found since then, putting the number to 19. Granted, I don't want to have to constantly rename it, so i'll keep it at 18 cryptograms for now.
The purported 19th page


The key fact I decided to consider was the fact that there are really only 4 letters- The Leaf letter, The Gem letter, the Feather Glass, and the Feather Table.The Importance of the picture over the content


To prove my point:
Here are the endings of two Gem pages. Notice how the symbols
are exactly the same. The only difference is that there are significantly
fewer symbols on the page on the right. The letters I listed above are
the ones with the MOST symbols and otherwise identical content.

Every other letter is just a variation of those letters with less content. Which makes me wonder why they exist in the first place. Why would you release letters without the full content? If you were writing a message to someone and sent them multiple, why would you send some that didn't have the full message?

There seems to be two plausible explanations for that:

  1. The missing symbols are supposed to highlight something
  2. The final symbols are not as important as the picture choice

Why Explanation 1 is probably wrong

Now, for the first explanation, this would mean that there was intentional effort spent trying to make sure that certain symbols vanished from the back. This means, it was not simply because they were formatted out. 

Here's how I tested it. I went on google and searched for the name of the objects such as "Box", "Table", and "Glass". Most of the pictures that showed up were essentially identical to the ones that were seen on many of the letters.
The 9th image on the first page is quite familiar.
The very first image appears to be the same one we find on our letters

From there, I decided to copy the image and scale it without changing the dimensions of it (the ratio between width and height stayed the same). And I proceeded to superimpose it onto our letters with a bit less opacity.

I matched the sizes of the boxes together. The whiter segment
is the boundaries of the original image
I superimposed the table onto the table. The sizes match and the
super-white parts determine the original boundaries of the image

So what does this mean?

Well as you can see, the Box image has lines of 6 symbols long beside it. While the Table image has lines of 7 symbols next to it. Additionally, the start between the symbols and the boundaries are the same in both images. 

Supposing google is where they got the images, it would mean that the author did not change the dimensions after acquiring the image. They may have scaled it, but they kept the dimensions the same.

Conclusion

Given that all the images with feathers had 7 full lines. It appears that the author scaled the images so that the height would allow for 7 full lines. However, the author did not care to deal with the width of the images.

That might not sound like much of a big deal, but that could be deceptive. It suggests that the author did not try to tweak the image's boundaries to make it so that an exact number of symbols was deleted. So for the author, the last few symbols didn't really matter. 

Instead there were two things that could have mattered more:
  1. The first 7 lines for the feathers staying intact (Added note: this is not the case for gems, nor leaves: see below)
  2. Having an image there, and keeping its width dimensions (ratio wise)

I should also make a note of something. Compare these two images
Look at the bottom of the glass. Notice how the one on the right
is slightly rounder than the one of the left? Also notice how it is
also more skinny and widens toward the lip?
What you'll notice is that the two images aren't the same. Well, the second image is one of the first hits you find on google. It's actually NOT where the author got his image. Unfortunately I haven't been able to locate where the author found his image as of yet.

The third image on google is NOT the image used by the author

The Interesting Case of Gems

I performed the same process of superimposing the pictures I found on google over the images on the letters to see if the boundaries had changed. While it became quite clear that the author had tried to scale the pictures in the feather image so that they were the same height (allowing for 7 full lines), it was a bit different for gems.

The Box superimposition was as expected
However, this one was different
The Gem box told a different story. Given the boundaries of the picture, it is very plausible that the document decided that it couldn't finish the 7th line. However, given that, the author did not attempt to remedy it (despite being so close). Which suggests that the 7 line may not have mattered so much for the author at all.

I couldn't find the images for leaves to test yet.

What does Explanation 2 suggest?

We've essentially established that the author didn't really care to bother keeping the last few symbols in the letter. Given that, what can we learn from that?

If the symbols were simply pushed out by the pictures, then it suggests that having the picture with its original height to width ratio is more important than having the full content of the symbols.

This suggests that the complete content of the letter (symbol-wise) is not actually the most important part of letter(after all, the author has no qualms or cares about getting rid of the last few symbols), and that perhaps the picture is meant to convey much more. 
However, it should be noted that all the colored symbols still exist. So perhaps they have some significance, and perhaps there is still something to be learned from the text before the final colored symbol.
I'll ponder it a bit more.
Read more →

Wednesday, March 26, 2014

The 18 Cryptograms of Western University (Part 1)

,
There has been an interesting mystery brewing in Western University of  London, Ontario. 18 pages filled with strange symbols have been found slipped in the middle of various textbooks in the political science and economics department library. Given a puzzle like this, I couldn't find it in myself to turn it down.
Page 14 of 18

A First Look

I suggest taking a look at the letters if you are interested in reading further.

You can find the album of the letters here.

Here are a few facts that are immediately noted:

  • The letters appeared to all be found in the poli-sci and economics library
  • Each letter is placed in an envelope and accompanied by an object
  • Each letter has an image on the bottom of the page
  • There is a web address leading to a url: "000xyz.blog.ca"- seems to be a blank page

A Deeper Look (Framing the Problem)

Here are a few facts that are realized after looking a little deeper
  • There are only 3 objects: Feather, Leaf, and Gem
  • There are only 6 pictures: Pillow, Vase, Glass, Frame, Box, and Table
  • Someone has pointed out that there are 40+ symbols, which suggests that it might not translate directly into English (with an alphabet of 26 with a numeric bonus of 10 symbols)
Given that I began to wonder if the objects and pictures denoted anything. So I began to compare the pages with the same object to one another. I quickly found that many of the pages were actually quite similar, and in fact, many of them were identical.

For instance, Pages 3 and 4 both had Feathers for their objects, with different pictures at the bottom:
  • Page 3 had an Orange Feather, and a Glass picture
  • Page 4 had a Green Feather, and a Table picture. 
I found that the two pages had the exact same content except for the last few symbols. I decided to perform the same task with the same object and the same picture:
  • Page 4 had an Orange Feather, and a Glass picture
  • Page 8 had a Pink Feather, and a Glass picture
To my pleasant surprise, the two pages appeared to be completely identical in content. The formatting was entirely the same. I felt like I was onto something, and tested it with a few others.
  • Page 11 has the same object and picture as 4 and 8, and is identical to them
  • Page 12 has the same object and picture as 3 and 7, and is identical to them
  • Page 16 has the same object and picture as 3, 7, and 12, and is identical to them
This leads me to the hypothesis:

The object identifies the content of the letter, while the picture within it determines a version of the letter with slight formatting differences. This is given the fact that all letters with the same object and picture were identical.

I wondered if there was a connection between just the pictures. So I double checked it by looking at letters with the different objects, but the same picture:
  • Page 13 has a Gem and a Box
  • Page 17 has a Feather and a Box
The two letters were entirely different. Which suggested that there was no immediately obvious connection between the letters with the same letter and different objects. 

Granted this, I decided to look at the list of letters with similar content (letters with the same objects) and looked at how they compared:
  • Gems
    • Glass pictures have 2 more symbols than Vase pictures and Frame pictures
    • Box pictures have 6 fewer symbols than Vase pictures
    • Table pictures have the same number as Glass pictures
  • Feathers
    • Glass pictures have 2 more symbols than Table pictures
    • Table and Glass pictures have different content (different endings after the last feather symbol)
    • Box pictures have 5 fewer symbols than Glass pictures
  • Leaves
    • Pillow pictures and Vase pictures are the same content wise, but have different formatting
This means the number of symbols :
  • Gems
    • Glass/Table> Vase/Frame>Box
  • Feathers
    • Glass>Table>Box
  • Leaf
    • Pillow=Vase
Given this, if we want to see the full content of the letters, we simply need to look at these (you don't have to look at ALL of them from the list):
  • Leaf Pillow or Vase- Pages 1, or 18
  • Gem Glass or Table- Pages 6 or 14
  • Feather Glass: Pages 3, 7, 12, or 16
  • Feather Table: Pages 4, 8, or 11

So Far

We have yet to try and apply any cryptography to it, but have noted a few things of interest such as the categorization system, and a few other qualities. It also brings out many questions that very well may bring us towards understanding what the writer (or writers as it may be) were attempting.

I'm a firm believer that solving a problem consists of finding the right questions to ask. So at this point in time, we can begin to take a look at some of the questions that have arisen from this scenario. 
  • Why so many of the same letters and so few of others? 
  • Why make so many variations of each letter (content wise), when they essentially share the same content?
  • Why make variations of each letter at all?
  • Is there extra meaning behind the objects and the pictures?
  • Is there meaning behind the location and place they were found?
  • Could any of them been copycats and fakes?
  • Are the colored symbols supposed to mean?
These questions may not be the typical cryptography approach, but may shed some light on the mystery as a whole. After all, in order to break a code, you have to have the information and know the secret. Given that, some of these questions may enlighten us on what it is we may need to know.

I'm going to brew on it a bit more before writing a second part
EDIT: Part 2 can be found here

If you want another source, I suggest going here. Its the blog of the professor who has first hand access to the knowlege
Read more →