Thursday, 2 May 2013

Kaprekar's constant, a math magic trick


When I browse through Recreational Mathematics in CHS Maths Class, I came across with a comment, mentioning the number 6174 has its special feature and properties. So, driven by curiosity, I googled the number 6174 and eventually found out how 6174 works as Karprekar constant (the detail about karprekar constant will be discussed below). It turns out that Kaprekar constant is a mathematical magic trick which is quite interesting, and I will teach you about rules of this game of Kaprekar below.

6174 is a Karprekar constant named after Indian Mathematician D R Karprekar. These are 4 steps in this Kaprekar game which make the number 6174 distinctive from other numbers. Here they go:

1.Take any four-digit number, at least two different digits (leading zero is allowed). (e.g., 0110, 2378, 1220,   0022, 0997 etc)
2.Arrange the digits in ascending order then in descending order to get two different four-digit numbers (adding leading zero if necessary). 
3.Now, (Bigger four-digit number) - (Smaller four-digit number) Subtraction of smaller number from the greater number obtained.
4.Repeat steps 2 and 3 from the final answer obtained in the previous step three.

This is where the miracle of mathematics happens!!! The above process, known as Karprekar's routine, will eventually lead you to the number 6174, in at most 7 times iterations (repetitions). This is the magic of maths!!! The miracle, the wonder, and the beauty of maths.

However, the only condition of four-digit number which does not lead to 6174 is repdigit (ie, 1111, 2222, 3333, 4444, ...). These repdigits will eventually lead to zero at the first step 3 process itself. So, here are some examples and workings for proof of Karprekar's constant:

Once 6174 is reached, the process will continue yielding 7641 – 1467 = 6174. For example, choose 3524:
5432 – 2345 = 3087    8730 – 0378 = 8352    8532 – 2358 = 6174 (3 iterations)

All other four-digit numbers eventually reach 6174 if leading zeros are used to keep the number of digits at 4:
2111 – 1112 = 0999                      9990 – 0999 = 8991 (rather than 999 – 999 = 0)   (leading zero is aloowed)                 9981 – 1899 = 8082                      8820 – 0288 = 8532                8532 – 2358 = 6174  (5 iterations)

9831 reaches 6174 after 7 iterations:
9831 – 1389 = 8442                      8442 – 2448 = 5994            9954 – 4599 = 5355                     5553 – 3555 = 1998 9981 – 1899 = 8082       8820 – 0288 = 8532 (rather than 882 – 288 = 594)         8532 – 2358 = 6174 (7 iterations)

8774, 8477, 8747, 7748, 7487, 7847, 7784, 4877, 4787, and 4778 reach 6174 after 4 iterations:
8774 – 4778 = 3996         9963 – 3699 = 6264        6642 – 2466 = 4176       7641 – 1467 = 6174  (4 iterations) 

http://mathworld.wolfram.com/KaprekarRoutine.html  for a more technical view of this Kaprekar's Constant.

Resource: donsteward.blogspot.com

A complete route to Kaprekar's Constant, from Wikipedia

Hope you enjoyed!!!

7 comments: