Sunday, February 1, 2009

Demystifying certain Infinite Geometric Series

Don't be scared by the term 'Infinite Geometric Series'. The intention of this post is quite the opposite, to demystify it.

Most of us must have studied about the geometric progressions in our school. That is you take some number (a) & then multiply it with another one (r). Then you keep repeatedly multiplying them with more rs & generate a series of numbers.

For example: 2, 6, 18, 54, 162, so on... (a=2, r=3)

The series gets interesting when you consider an r which is a small fraction, something less than one.
For example: 1/3, 1/9, 1/27, 1/81, so on...( a=1/3, r=1/3)

This diagram displays a geometric progression ...Image via Wikipedia


What is interesting about it, you may ask. It is that the number starts diminishing as the series progresses. What an irony, it is not a "progression" then isn't it? Anyway, the point is that when you add up all the numbers in this series, you wont end up with a large number like infinity. Instead, you'll end up with a much more small and manageable number. In other words, they say, the series converges (when r is fractional, less than one).

1/3 + 1/9 + 1/27 + 1/81 + so on... = 1/2 (0.5)


1/2 is certainly a small and manageable number compared to infinity. I can hear you asking, but how is that so ? How do you say sum of that series results into 1/2 ?

You can pick up a math book on geometric progressions and look up the formula (and if you are keen the proof as well) to sum up a series like that. But I dont want to get into that route, lets demystify it...

Image via WikipediaIf   of a cake is to be added to   of a cake, ...


One evening, Venkat brought home a small cake while returning from work. He has two sons - Ajay and Jay. He decided to give them both an equal share of that cake. But being a math teacher , Venkat decided to use this as an oppurtunity to teach his sons something about sum of infinite geometric series. He first cut the cake into three equal pieces & gave one each to Ajay and Jay. He had one piece left, which he then cut again into three more equal pieces & gave one each to Ajay & Jay. But there was one piece remaining again, guess what he did with that? Yeah, you got it. He cut that into three more equal pieces & gave one each to Ajay and Jay. He repeated this many many times until there was no cake left (well, almost!)

Then, he asked his elder son Ajay "What share of the original cake did you eat?"

To which, Ajay replied "First, I ate 1/3rd of the cake, then 1/9th of it, then 1/27th of it and so on.."

Then, he asked his younger son Jay the same question.

Jay replied "See Dad, you brought a cake. Only myself and Ajay have eaten all of it. Both of us ate equal shares. So, we both must have eaten half-of-it each."

Venkat just said "Both of you are correct!"

Hope you see the point!!
Reblog this post [with Zemanta]

The Latin Square Count Challenge

When I started to learn about latin squares, there was this question about them to which I have not found an answer yet:

How many Latin Squares are there of size n ?

I am not asking for a tabulated listing of different sizes & the count of latin squares for each of those sizes. With fast computers available today, I guess, programmers & others have used brute force approach to get the count (by trying out combinations one after another programatically) for considerably large sizes. Instead, what I am looking for is an elegant, closed, algebraic formula (involving n, the size).
I dont know if it is a tough job or whether no one is interested in solving it. Atleast, I have not found a solution yet. Besides, one may ask what's the use of it after all.
Forget the count for now, can someone atleast prove the following for me...

There are more latin squares of size n+1 than those of size n

Though it looks obvious, a rigid mathematical proof eludes me.
Reblog this post [with Zemanta]

Sudoku Solver

Have you solved sudokus? If you have, then you'd know how it is usually done... At the beginning, when you started solving them, you probably started with a guess and check approach, which gradually must have solidified into a few basic rules unconsciously into your head that you apply repeatedly until you have solved the whole grid.

Atleast, thats what happened in my case. Being a programmer that I am, the challenge had to be elevated to the next fun level...to extract those rules & put them into a program.

Here is what I ended up with - a sudoku solving program.
Download "Solve Sudoku"
Reblog this post [with Zemanta]