Showing posts with label Maths. Show all posts
Showing posts with label Maths. Show all posts

Sunday, June 16, 2013

ISBN Number

Being a software Engineer or a computer science students everyone would have came across the term Error Detection Code or Technique which is widely used.

Recently I just came to know the technique used in ISBN number system to handle errors.

ISBN is International Standard Book Number which is used to identify each book uniquely. We had 10 digit ISBN format number developed by ISO, now we currently using 13 digit ISBN number format which is compatible with EAN-13

Now let us just look only on how the error detection is done in ISBN 10 digit format.Consider the below image



2-1234-5680-2 is the ISBN 10 digit format, here the last digit 2 is the check digit, the numbers before that represents various parameters like Group, Publisher, Title.

The magic number used here for Error Detection is 11. Yes it is 11.

Lets see how it is done,

( N1*10 + N2 * 9 +........ + N9*2 + N10 * 1 ) mod 11 = 0, N10 is the check digit which would be chose accordingly so that the end of the expression inside the bracket always results as a multiple of 11.

N10 is anynumber between 0 -10, but incase of 10 we use X - Roman equivalent to denote 10 so that ISBN remains 10 digit.

 = 2 * 10 + 1 * 9 + 2 * 8 + 3 * 7 + 4 * 6 + 5 * 5 + 6 * 4 + 8 * 3 + 0 * 2 + 2 * 1

= 20 + 9 + 16 + 21 + 24 + 25 + 24 + 24 + 0 + 2

= 165

= 165 mod 11 =  0

Monday, July 5, 2010

Reason Why? I Love Maths - Part 1

        I love Maths not as Subject for scoring marks, but for the way it has taken shape. Only lovers of Maths can appreciate things so-called Encryption. Similarly, some interesting facts about Maths.
      
        I believe this is some super power. To show humans that everything is inter-related and nothing is stand-alone. Maths can be seen in nature, as usually i blabber the artists and mathematician of ancient times made it clear " MATHS IS EVERY WHERE".

       Have any one heard of something called golden ratio.If not,Here it is

Expressed algebraically:


The definition is the ratio of the sum of the quantities to the larger quantity is same as the ratio of larger quantity to smaller quantity.
The golden ratio is often denoted by the Greek letter phi (Φ or φ).
 The golden ratio is an irrational mathematical constant, approximately 1.6180339887. The value of phi used is 1.618.

Significance of 1.618:


Hope  everyone knew Fibonacci series, our class guys wont forget( Every lab this will be the first program we do write).

Even then,
Fibonacci numbers are: 0,1,1,2,3,5,8,13,21,34,55,89,....

Just compute the ratio of larger number to smaller one,

1/0 = undermined.
1/1 = 1
2/1 = 2
3/2 = 1.5
5/3 = 1.6666
8/5 = 1.6
13/8 = 1.625
21/13 = 1.61538.

so it seems that the value gets stable approx 1.618...

Golden Rectangle:


When we equate this separately, we will get phi^2 - phi -1 = 0.

Solving the quadratic equation, we get phi = 1.618......

The rectangle that have sides ratio as 1:1.618 is called Golden Rectangle.

The golden rectangle is shown below:

We can see the breadth is 1 units and  length is 1 + sqrt(5) / 2 (which equals 1.618).
So breadth : length = 1 : 1.618.

Golden ratio in Nature:


Click the pic to see animated view...
           


This is also golden rectangle, but u try finding it?





Golden Spiral is a logarithmic spiral whose growth factor b is related to golden ratio.Specifically, a golden spiral gets wider( or further from its origin) by a factor of j for every quarter turn it makes.

                                           A Nautilus shell reveals golden spiral




 Coming back to my Da Vinci, as told he is also a mathematician. So his paintings do portrays this Golden rectangle.

The Vetruvian Man and Monalisa :





In architect too,



The fact that golden ratio exist in human hand,in nature, in animal. Golden ratio is only 0.000.. percent of maths concepts, think of entire maths relation with nature and humans. Unimaginable.