Pages

Friday, June 28, 2013

Fight - A Haiku !


Source: Google images
{
       It starts to end up
       The problem
       Either temporarily 
       Or permanently ...
       And finally it ends !
               the fight ..!           
                                                       }

Wednesday, June 26, 2013

For you !




Poem of the sweetest 
Never happened to write 
Even not 'about' you sweety !
But with you ! for you  ! and 
When only for you !
Without words 
On your heart - Through
Your magical eyes !

Here in solitary reading them 
With your most beautiful replies !
Am I living or loving ?
Near or Far - You are
My fulfillment forever !


hcpu ! hcpu ! hcpu ! 
Let my breath take this
Secret unto You Sweet Heart !

Friday, November 30, 2012

A Warrior to The Fourier Series !



Today I identified a funny teacher in me. My younger brother Thileepan had been preparing for his semester exam. He found  it difficult to go through the so-called Fourier Series. He approached me to help him out. I started going through the stuffs that I had learned/studied exactly 6 years back in my bachelor. I could see the difference in grasping now and then clearly. Though I dived into computer science , I still could pick up the differentiation and the long 'S' , integration. 

After gone through the stuffs, I asked him to sit and clearly decided not to preach the same in the book. The way the lesson started was really due to the impact of the Tamil Historical Novel - Mannan Magal[1]. Just by day before yesterday I finished reading the novel. The hero, Karikalan, brave and wise warrior of Chozha Emperor stayed in my heart.

"Thileep now you are in trouble that you should attack the Fourier Series  in 2 days you have got.  What you need is strong weapon(s), conditions suitable for attacking and finally a strategy to attack". He answered 'No'  for the questions I have shot: " Periodic functions?, Continuous functions? , functions?". Now I realized why he complained  his mathematics teacher ;-) 

I casually listened all his "Nos" which I thought really make him comfort. Then without explaining what is function, cts., function , etc. straightaway jumped into battle field. "Dear brother here is your weapon: Euler's Formula , this is perfect and sufficient conditions to attack : Dirichlet's conditions and finally apply this strategy : Bernoulli's formula" . He then ensured that he understood the main idea. 

What was remaining? Fundamental stuffs and tricks and tips. Started helping him to understand functions , continuous, discontinuous,  periodic functions with diagrams. I tricked him with a test : " When y = mx + c , where m is the only constant then y = f ( ? )". He did answered correctly " f ( x, c ) since y changes w.r.t x and c as well ".  Then discussed left , right limits to explain discontinuous functions. Then the importance of intervals and period. Then after explained about why on earth we need Fourier series asked him to start solving simple problems.

As I expected Integration and Trigonometry attacked him back. So now problem by problem he is asked to learn the tricks for integrating and for using trigonometry formulas. I saw him happy !  Me too happy !

But still lot to go through and also there are people who will only understand when we teach bottom to top. Nature of the problem also influence a lot. Teaching is not that easy truly. It is student's responsibility to understand his very own philosophy  of understanding. Then how teacher teach will not bother him a much.

  - Peramanathan Sathyamoorthy




 

Saturday, March 17, 2012

Binary Multiplication - Can we do it better?

It was exciting working on the assignments of the course "Algorithms and Data structures II " this spring. As we kick started the first assignment we finished the first assignment so early, but for the problem of 'binary multiplication' we had many versions and I also had another fresh idea which is so efficient. As the deadline got closure I didn't tried out that idea. 

The idea is inspired from Vethic Mathematics(Nikhilam Sutra-Nikhilam Navataścaramam Daśatah-subtract all from 9 and the last from 10) and the corresponding algorithm explained in [1]. The time complexity is really depends upon the ratio of zeros and ones of the smaller multiplicand unlike most of the other algorithms. 

Before we go into actual problem let me briefly explain Nikhilam Sutra (Sutra means Formula in India). Let us multiply these two numbers 98 and 99. First step is to find the common base(power of 10 close the multiplicands) which is 100 here. This is how the sutra works:

   98         -  2
   99         -  1
-----------------
   100-2-1 | 02
= 9702
-----------------

But it is easy to see this in simple algebra. For the base x the multiplicands A,B can be written as (x - a)  and (x - b). Hence,
 A*B  = (x - a)*(x - b) 
                                                 = x^2 - (a+b) *x + a*b = x(x-a-b) + a*b.
In the same way, if A,B are greater than base then

 A*B   = (x + a)*(x + b) 
                     = x^2 + (a+b) *x + a*b 
             = x(x+a+b) + a*b 
         = x(A+b) + a*b

When the multiplicands are binary numbers the base x is of form 2^n. In the above formula multiplication of deficiencies from the base(a*b) is making us to think the possibility of recurrence in binary number system. Let us now multiply these 2 binary numbers recursively 111 and 111. Here base is 2^2 = 100


Base : 2^2 = 100                       Base: 2 = 10
-----------------------               -------------------------------------
   111 - 11                                    11    - 1
    +       *                          ==>      +       *
   111 - 11                                    11    - 1
------------------------               -------------------------------------
   100*(111+11)+ 1001     <==    10*(11+1) + 1 = 1000 + 1 = 1001
   101000 + 1001
= 110001
-------------------------
Here is the python implementation:



def binary_mult(a,b):


    # Helper Primitive Operations
    lenA = len(a)
    lenB = len(b)
    if lenA >= lenB:
        maxPart = a
        minLen = lenB
        minPart = b[1:]
    else:
        maxPart = b
        minLen = lenA
        minPart = a[1:]


    # Base Cases
    if lenA == 1:
        return b if a[0] == 1 else lenB*[0]
    elif lenB == 1:
        return a if b[0] == 1 else lenA*[0]
    
    # Divide , conquer and combine 
    else:
                        
        cLeft      = binary_add(maxPart,minPart)+[0]*(minLen-1)        
        aNew, bNew = new_parts(maxPart,minPart)        
        cRight     = binary_mult(aNew, bNew)
        c          = binary_add(cLeft,cRight)
        
    return c

As you can see above, the left most part of final product is given by cLeft which is simply the binary addition(x(A+b)).  Then new_parts(maxPart,minPart) is responsible for subtracting the base from both of the multiplicands(as base is always of the form 10[00...], one can implement this subroutine more efficient than trivial subtraction and you can remove all front zeros which is the result of subtraction - ex: for 1100011 * 100010 Base 1: 100000 , Base 2 : 10. It implies that despite bit length if the multiplicands have many contiguous zeros we get the result so faster !!!). Then cRight is recursively calculate the deficiency multiplications(a*b). Finally c does return the result.


I would like to dedicate this article to my teachers Pierre, Joseph, Nikos here in Uppsala University who helped me all the way whenever I was in trouble. Thanks a lot TAs :)


[1].A Generalized Recursive Algorithm for Binary Multiplication based on Vedic Mathematics

Friday, September 9, 2011

A Problem from Real World !



I am back to Tech after a long summer vocation. It is been 2 weeks, courses are going fine. But those are tough and exciting to do. Among them I feel Constraint Programming very close to the heart. 

Now, I wanna give you a problem.

Let us consider there are 7 tourist sites nominated in a competition and there are 7 judges to select which one is best. Wondering .. what is the problem ? wait and consider these constraints as well. Few judges are so busy people that they don't have time to analyse all 7 sites in time and few are expecting more money that  is not affordable. So finally it is decided to have 3 judges for each city such that each judge is allocated only 3 sites and each site pair is analysed exactly one common judge, so now constant jury , constant load , equity well enforced. Result will be surely convincing , right ?

Constant jury : Every site is tested by equal number of judges (3 judges here)
Constant load: Every judge tests equal number of cities (3 cities here, 3 is just coincidence-need not be 3)
Equity: Every site pair has 1 common judge

Try Solving it. It is really fun. Just use a table of  7x7 (Sites x Judges) and try allocating and you are free to use all kind of reasoning,send me the answer to:
peramanathan.sathyamoorthy.3805@student.uu.se or fill the
table here Solution Table



Now, there are many real world problems like this we have to solve everyday. Small size problems may be solvable manually, what if we want to generalize, Do you think typical software programmers will implement this successfully? You know it is very hard problem for powerful computers either. That is where Intelligent Algorithms play their part. Yes, you heard it right, Intelligent Algorithms.


All algorithms that is totally predictable in some sense  and can only do nothing more than the day it is implemented are stupid. However, the programmer who wrote those algorithms can be considered intelligent. There are algorithms which are intelligent enough to evolve, learn and sensitive to changes. Those big fishes swimming in Artificial Intelligence ocean, interested people go and catch some fishes.




Constraint Programming (CP) shows it's intelligence by using propagators and searching strategies. Propagators which are implemented as constraints actually deleting all non possible values and provides reduced solution space. So now using suitable searching techniques, the solution may be found quickly. Are you Sudoku solver? How do you solve it? These algorithms are also reasoning using constraints.Most exciting thing about these algorithms is it uses multi-cores of recent computers to search solutions in parallel.I will write more about CP in coming posts ...


Meet you again ...!



Sunday, May 8, 2011

Youtube Playlist to Khan's Academy

Hobby to Profession 

Are you lack in fundamentals and is it making you work more or your analysis end up in poor results? Need  cups of fundas to taste? Just hit Khan Academy. America's most loved "Khan", Salman Khan, an American Educator from Bengal, produced more than 2200 videos which covers all necessary fundas right from mathematics to biology. What are you waiting for ? Try out few !




I feel now , nothing is waste of time !  If we involved sincerely and without expectation , we will get a benefit when we don't expect. 



Indo-American Research to crack the Indus Valley Script !




Surprise Meeting

After Long time, Prem and Vivek met each other. Vivek is unique and very much involved and keen observer of social events and consistent collector cum reader of variety of Articles , specially related to scientific research about Tamil and Education. He is big fan of  E.V.R too ! 

Prem :   How about visiting my room, just a stone's throw from here.
Vivek:   With pleasure ! (started walking and continued their talk)
........
Vivek:   Do you know recently an Article is published 
             "Entropic Evidence for Linguistic Structure in the Indus Script" ?
Prem:   This is  not the question to me. What is so special?
Vivek:  US - Indian team of computer scientists and Mathematicians very closely proved
             the Hypothesis that Indus Valley Script is another natural language may not be
            a logo symbolic.
Prem:   Interesting Bro !
Vivek:  I didn't complete my brother. It is more close to Old Tamil Scripts you know ! Specially, the 
            scripts are very close Sangam Era Tamil Poems [Etthuthokai:எட்டுத்தொகை ]
Prem:   It is really sweet news ! But you are forgetting , you are Ecology Student !


.... (Their conversation faded like a sun set, Vivek was by that time pointing Prem that Authors are
      all Brahmins and given credited to them and dragged the topic to U.V.Saminatha Iyer, for his 
     fabulous work and efforts in bringing Palm Leaves Tamil Sanga Literature into printing , despite
    being a fan of E.V.R, Periyar  ) ...


Brief Technical Details for Scientific Readers:


Original intention of the paper is not to prove Tamil's classiness. Their approach is to find whether the Indus Script is just logo symbolic[non-linguistic] or alpha-symbolic[linguistic]. Already the Egyptian symbols are cracked and decoded. But Indus Valley remained as mystic not anymore !

In the field of computer science, this research comes under Machine learning Techniques, very significant subset of Artificial Intelligence. It is one of my favorite subject here. Optimizers it is really very institutive and very relevant to us.  

Mathematics behind the screen are include: Statistics and Conditional probability
Finally , the paper is here.

Also.The jewels in the box of treasure (Links)



                                                                    - Peramanathan Sathyamoorthy

Since Thanks to :
Mr.Vivek Babu, Masters Student, Dept. of Ecology, Uppsala University, Sweden
(For having discussed these topics and shred few related links)



Thursday, May 5, 2011

Ergonomics and Repetitive Strain Injuries !

Discussion at Tables

 Ergonomics

Bala was sipping a cup of Ginger Tea and not seem to be enjoying as he was attracted by his newly bought smart phone. He was staring at his phone constantly. He didn't notice that his friend wiki arrived and sitting in front  him. 

Wiki: Hello Bala ! (Waving his hand and disturbed Bala's staring )
Bala: Hello.. ! Sorry my friend ! I am afraid that I will become addict to this mobile !
Wiki: Why not? It did with many already !
Bala: I don't want to be, one of it's victim ! (He fondled his back-neck out of little pain )

Television was turned on and interrupted their conversation. To their surprise it was very  relevant to what they have discussed. Here is what they watched.

Live on TV



                                          (play list of 4 videos)


Today it is impossible to live without electronic devices. If you decided not to depend on machines, it will be the greatest challenge you ever faced. Your mobile phone number is identifying you though you are the owner!
I come to the point. How many of us taking care in handling devices properly. You work hard and be assert to your concern, the question is have you aware that you are actually working as a evil against you and you are really feeding the evil to grow in your very body and in mind. To put it simple, I say, you are earning to spend all your money to recover back yourself from pains and stresses.

Improper postures and positioning of devices in a long run will cause really serious problems. Some of the Repetitive Strain Injuries will lead to surgery. Read More at this wiki page.


Don't be a machine in front of machines, try to manage yourself and give breaks while working. I experienced and realized it is sometimes really hard to give a break when we are doing something important or interesting. I believed that giving break would result in finishing work lately, but it is not true. Try for 2 days with proper breaks, you will really feel the difference. 

Don't say that you don't have time. It simply means that you are not interested in taking care of yourself. Let your work be heavy , you can still find time if you decided. Your natural intelligence always there with you to help.

Meet you again !

                                                                                 -  Peramanathan Sathyamoorthy


Sources :
Ergonomic Picture from Wikipedia

Sincere Thanks to:
Mr. Balakumar, Research Scholar , NIT, Trichy (For given me an idea of Ergonomics)