Search This Blog

Thursday, 28 March 2013

Fibonacci sequence

Fibonacci and the Golden ratio


A very famous sequence in mathematics is the Fibonacci sequence:

0,1,1,2,3,5,8,13,21,34,55,89,144,.....

The sequence was first published by Leonardo of Pisa, known as Fibonacci, in 1202.

Each term in this sequences arises from summing the two previous terms in the sequence with the first two elements of the sequence always defined as 0 and 1.

For example:
2 = 1 + 1
3 = 2 + 1
5 = 3 + 2
...
144 = 89 + 55

The sequence also has another special property which is that as the terms get bigger and bigger the last term divided by the one before gives an approximation of the Golden ratio.

The Golden ratio is roughly equal to: 1.618

We can see from the sequence above that the second term over the first gets closer and clser to this magic number:
21/13 = 1.61538
34/21 =1.619047
144/89 = 1.1617977 which is very close to the Golden ratio.

This ratio appears a lot in art, architecture and even music as it is meant to be a particularly pleasing ratio to look at or to hear.

Can Netflix save the film industry?


What can the film industry do to save itself from piracy?

Piracy has been a huge issue associated with the rise of the internet. With Napster it became very easy to download music files launching the music industry into chaos. If they could get their content online for free why would they buy a track legally again? But with the rise of services like itunes and spotify, offering cost effective legal alternatives, the industry has bounced back. Now its the film industry is in trouble can they learn some lessons from what happened with the music industry?

I don't think the TV and film empires using their economic status to force the government to pass laws and close down websites, like what happened with pirate bay, is the right step forward. I think they instead need to be researching and inversting in a way to allow people to pay for a quick, easy and legal access to their content. This is where I think Netflix, and other similar services, could come in with their already large base of users. If the latest films were on these services at the same time as they came out on Blu-ray then they could persuade a lot of people from illegally downloading online onto the service and the films creator would get a share in the profits that they wouldn't of seen otherwise.

Also, they really need to recognise that it is no longer a viable option to release a show in the US months before it is released in other parts of the world. With the internet there is the possibility to watch it at the time that it is airing in the United States and a lot of people will watch the show illegally rather than wait months to watch it legally. Again an internet service like Netflix could help give a legal option and a chance for everyone to be happy they are not missing out.

Wednesday, 27 March 2013

I fucking love science



Described as "The lighter side of science" the blog I fucking love science has become very popular on facebook with over 4 million followers. It is great to see someone who is passionate about their subject create something so interesting it is read by so many people.
Find the facebook page here.

Tuesday, 26 March 2013

Cesar encryption

MBIZDYQBKZRI

 

One of the simplest forms of cryptography is Cesar encryption. This form of cryptographygets its name from Julius Cesar as it is said that the Roman emperor was the one who invented it.

The encryption involves using numbers to represent the 26 letters of the alphabet with 0-A, 1-B,...up to 25-Z.

A key is then chosen which is a number between 1 and 25. This is then added to the numeric version of the message if we want to encrypt the message or subtracted if we have a message we want to decrypt.

If the resulting number is less than 0, or more than 25, then 26 is added, or subtracted, respectively until the number is between 0 and 25. This is written as mod 26 but this just really means the remainder when divided by 26.

These numbers are then translated back into letters to form the encrypted message.

For example if I wanted to encrypt the word maths, using the key 5, this would be done by:

Text message: M A T H S
Numeric message: 12 0 19 7 18
Plus 5 mod 26
Encrypted numeric message: 17 5 24 12 23
Encrypted text message: R F Y M X

For an example of how to decrypt a message; to decrypt the title of this blog post using the key 10 would be done by:
Encrypted text message: M B I Z D Y Q B K Z R I
Encrypted numeric message: 12 1 8 25 3 24 16 1 10 25 17 8
Minus 10 mod 26
Decrypted numeric message: 2 17 24 15 19 14 6 17 0 15 7 24
Decrypted text message: C R Y P T O G R A P H Y

Can you decrypt the message R C S Q C A using this method with the key equal to 8?

Wednesday, 20 March 2013

The internship


See the trailer for the new film the internship here

The fact that they are now making films based around Google shows how hugely important this company has become in our everyday lives.

Friday, 15 March 2013

Another logic puzzle

5 houses puzzle


There is a claim that less than 2% of the world's population can solve this intriguing
problem (with or without using a computer).

Can you?

1. There are five houses.
2. The Englishman lives in the red house.
3. The Spaniard owns the dog.
4. Coffee is drunk in the green house.
5. The Ukrainian drinks tea.
6. The green house is immediately to the right of the ivory house.
7. The Sun reader owns snails.
8. The Guardian is read in the yellow house.
9. Milk is drunk in the middle house.
10. The Norwegian lives in the first house.
11. The man who reads the Express lives in the house next to the man with the fox.
12. The Guardian is read in the house next to the house where the horse is kept.
13. The Mirror reader drinks orange juice.
14. The Japanese reads The Times.
15. The Norwegian lives next to the blue house.

Who drinks water? Who owns the zebra?

In the interest of clarity, it must be added that each of the five houses is painted
a different colour and is on one side of a straight road, and their inhabitants are
of different national extractions, own different pets, drink different beverages and
read different newspapers. One other thing, in statement 6, right means your right.

Thursday, 14 March 2013

Letter frequency analysis

etaoinsrhldcumfpgwybvkxjqz 

 

What is letter frequency analysis?

 

It is the study of statistically how often each letter in the alphabet occurs in different languages.

The heading is the list (from left to right) of the most frequently occuring letters in the English language.

Find the list of frequencies of letters in dfferent languages (including klingon, naturally) here

What uses does this have?

This has applications in the mathematical field of cryptography as some encryptions can be broken by noticing that some letters occur more than others in certain languages. Then, using the frequency analysis statistics, you can discover the encryption key and then break the decrypt the message.

Wednesday, 13 March 2013

Can you spot the pattern?

Can you see the pattern in the following list of numbers?

0,1,1,2,3,5,8,13,21,34,55,89,144...

To see what this pattern see the Fibonacci blog post

Monday, 11 March 2013

Maths is everywhere


A really interesting brochure about how much variety a degree in mathematics can have for your future career can be found here

Saturday, 9 March 2013

Learn to code for free


Havard lecturer David J. Malan (pictured above) has decided to put up some of his computer science lectures online freely available to everyone. He is a very intelligent and engaging speaker and watching these lectures would be a great way to get an introduction coding.

Watch the first episode here

Wednesday, 6 March 2013

Choose a door

What's the problem?


Suppose you are a contestant on a game show and you have to pick one of three doors. Behind two doors are goats (or anything else you don't want to receive) and behind the the other door is a car (or something else you want). You are asked to pick a door and you get to keep whatever is behind that door.

 If you pick a door at random (call them door 1, door 2 and door 3) the laws of probability state you have a 1/3 chance of having picked the door with the car behind it.

Now suppose the game takes a turn. The game show host opens one of the two doors you didn't pick and shows you that there is a goat behind it. You are then given the option of changing your pick of doors.

Should you switch?


Purely mathematically, the laws of probability state that you should swtich your choice of door.

Simple intuition may tell you that the new probabilities of the car being behind each door are 1/2 however this does not take into account the fact that the game show host has information that you do not-the position of the goats.

In mathematics the probability of winning the car if you stick with your original choice of door stays 1/3.

To see why switching is better consider the case when you have picked door 1:
  • If the car is behind door 1; the host will open either door 2 or door 3 and reveal a goat and if you switch you will receive a goat.
  • If the car is behind door 2; the host will open door 3 and show you a goat. You switch to door 2 and you win the car.
  • If the car is behind door 3; the host will open door 2 and show you a goat you will switch and you will win the car.
Each of these three outcomes has probability 1/3 and as you win the car in two of the cases the probability of winning the car is 2/3. As this probability is higher you should always switch your door to increase your odds of winning the car.