Thursday, November 13, 2014

Binary Numbers, ASCII and the Flight of the Conchords

The binary numeration system is base 2, so the only possible digits are 0 and 1.  This system is used extensively in computer programming.  For example, the ASCII system converts letters to binary numbers.

http://en.wikipedia.org/wiki/ASCII

The letter A is represented by 65, which is 64 + 1 in terms of powers of 2:

65 = 1 (64) + 0(32) + 0(16) +0(8) + 0(4) + 0(2) +1(1) = 1000001.

B is given by 66, C is 67, etc.

The Flight of the Conchords have a binary solo in their song Robots:

https://www.youtube.com/watch?v=CTjolEUj00g

Wednesday, October 22, 2014

Logic Puzzles: Knights and Knaves

There are some fun (and often frustrating) logic puzzles that involve knights and knaves.  Knights always tell the truth, and knaves always lie.  Here is a sample of a puzzle:

There are three people (Alex, Brook and Cody), one of whom is a knight, one a knave, and one a spy.

The knight always tells the truth, the knave always lies, and the spy can either lie or tell the truth.

Alex says: "Cody is a knave."
Brook says: "Alex is a knight."
Cody says: "I am the spy."

Who is the knight, who the knave, and who the spy?

This comes from the website  http://www.mathsisfun.com/puzzles/knights-and-knaves.html (which includes a solution).  The website is a great source for other logic puzzles.

Here is an image that relates to work we have done in class.  Patrick says "I am a knight and Quin is a knight".  Quin says "Patrick is not a knight".  The first row of the table would be if they are both knights, but then this contradicts what Quin says.  The second row is when Patrick is a knight and Quin is a knave.  This row contradicts their statements.  The third row is when Patrick is a knave and Quin is a knight.  This does NOT contradict their statements.  The fourth row is when they are both knaves, but then Quin's statement would be true which is a contradiction.  So only the third row works, Patrick is a knave and Quin is a knight.

http://i.ytimg.com/vi/8NjjOA0SSUs/maxresdefault.jpg

Knights and Knaves puzzles are so popular that they even have their own wikipedia page:
http://en.wikipedia.org/wiki/Knights_and_Knaves

Here is a video showing how to solve a knights and knaves problem:
https://www.youtube.com/watch?v=tQr7D92Plck

They are great ways to frustrate your friends :)

Monday, October 6, 2014

Different Kinds of Infinity

Two sets are equivalent if the elements from one set can be put in one-to-one correspondence with the elements of another.  For example, if A = {a,b,c} and B = {1,2,3}, then the sets are not equal but they are equivalent, we could match a with 1, b with 2, and c with 3.  For finite sets, you just need to check the cardinalities.  If n(A)=n(B) then A and B are equivalent.

What about infinite sets?  Things get really interesting :)

The naturals {1,2,3,...} are said to be countably infinite.  We can show that this set is equivalent to the evens {2,4,6,...} (seems a bit counter-intuitive, but infinite sets are pretty cool that way).  We can also show that it is equivalent to the integers {..., -2, -1, 0, 1, 2, 3, ...}.  Any set that can be shown to be equivalent to the naturals is countably infinite.  Are all infinite sets countable?  Nope.  The reals are not, and Cantor's diagonal proof is an example of some beautiful mathematics (we will talk about it in class).
Here is a link to more math about infinite sets: http://www.trottermath.net/personal/infinity.html

And here is a link to a really cool video by Vi Hart about the different infinities:
How many kinds of infinity are there?
Proof some infinities are bigger than others



Tuesday, September 30, 2014

Well-defined sets and the Barber Paradox

For a set to be well-defined, an object must be in the set or not in the set.  For example, the set of rugby players at StFX is well-defined.  The set of good rugby players at StFX is not well-defined because the notion of "good" is up for debate, it is subjective.  We want to avoid situations like that.

There is a famous paradox about a barber that also illustrates what can happen if a set is not well-defined.

Youtube video about Barber paradox

Website explaining the Barber Paradox

Sunday, September 14, 2014

Units Digt in Powers of 7 question

I didn't do the best job of explaining this example in class so I thought I would try to explain a similar example that will hopefully make things a bit clearer.

Question: Find the units digit of 7 raised to the 362.

Solution:

First- figure out what the question is asking.  7 raised to the 362 means 7 times itself 362 times, so you can't do that on a calculator.  The "units digit" is just asking what digit is in the ones position.

Devise a plan.  Look for patterns in powers of 7.

Carry out the plan: 

7^0 = 1, 7^1 = 7, 7^2 = 49, 7^3 = 343
7^4 = 2401, 7^5 = 16,807, 7^6 = 117,649, 7^7 = 823,543

We notice that the units digit follows a pattern: 1, 7, 9, 3, 1, 7, 9, 3,...
The patterns repeats itself in blocks of 4.

362 divided by 4 is 90.5.  360 is the closest multiple of 4 to 362 that is also smaller than 362.

So the units digit of 7^360 is 1 (because it is the first in the block of four)

The units digit of 7^361 is 7 (because it is the second in the block of 4)

The units digit of 7^362 is 9 (because it is the third in the block of 4) [and this is the final solution]

Note: there is no way to check our solution because a calculator won't give a number this big.


Monday, September 8, 2014

First Post!

Okay, this is going to be a pretty feeble attempt to get the ball rolling.  Tomorrow I will mention that we use deductive reasoning when we apply Pythagoras' theorem to solve for a length in a specific right triangle.  For example, if we know that a right triangle has sides with length 12 and 5, then the hypotenuse must have length = 13 because 12^2 + 5^2 = 13^2.  The real reason I want to mention this is because of something cool I learned earlier this year.  The Flatiron Building in New York City is a right triangle, and its sides are in the proportions 12-5-13.  The Museum of Mathematics in NYC held an event on Dec 5, 2013 (12-5-13) to demonstrate this.  They even used glow-sticks!  Here are two links about it:

Pythagorazing the Flatiron

Glow Sticks Prove Math Theorem

I went to New York this summer and of course had to go to the Museum of Math MoMath, it was awesome.  It is just off Broadway, and I could see the Flatiron Building as I walked to the museum from the subway station.  Considering how large New York is, that is pretty cool.   One of my research areas is fractal trees, and the museum had a fun activity that turned me into a fractal tree.