Monday, September 10, 2007

Matrix Search

Big O Notation: The symbol O is used to describe an asymptotic upper bound for the magnitude of a function in terms of another, usually simpler, function.

Mathematically, you can define that f(n) is O(g(n)) then the following should hold.
1) f(n)< c * g(n) for all n > m.

Or may be better would that you search it out or may have again wikipedia

Challenge!!
I have a matrix say of n X m size. Each of its column and row are sorted independently. Would you able to Boggle your mind to get up with any algorithm, any damn idea that sounds safely interesting that you are able to search an item with utmost efficiency in terms of both space and time.

*Mark your answers with subject as “Matrix Solution”

Sikander Vs Soldier

Paradox- dictionary meaning follows as a statement that is seemingly contradictory or opposed to common sense and yet is perhaps true

One of the famous paradoxes is about a lawyer and one of his trainees.
One day a law student approached the famous lawyer and asks him to give him training, but this student did not have enough money to pay him. The lawyer proposed him that he can do his training but should pay the money whenever he will win his first case. The student agreed and took the training but after that he never fought any case. Now, the lawyer sued his student putting his points like:
1) If I win then I am the right person to get the money for training.
2) And if I loose then student will be winner and he should pay me as per the promise.
But the student also put his argument as:
1) If I win then I should not pay.
2) And if I loose then as per promise I should not pay.

Now put your argument, where is the conflict?
For more, you can look http://en.wikipedia.org/wiki/Paradox


A quite interesting story this is too!!
Long- long ago when Sikander won over Porous, he arrested all his soldiers and announce to them that every POW (prisoner of war) has to state a sentence and if it’s a true statement then he will slewed by sword or if it’s false then he would hung up till death.
You know, what happened! One of the POW left alive.

Challenge!! Can you dare thought what he might have said, boggle??


*Mark your answers with subject as “Solider thoughts”