Today is the "Pi DAY". We have dedicated special dates to celebrate various reasons. And March 14 (or in numbers 3-14) is the day dedicated to celebrate the mathematical constant "Pi". The representation of this date consists the first three digits of the mathematical constant "Pi". Thus it is selected as the "Pi" day. It is a day celebrated by mathematics lovers and probably a day hated by maths haters.
Pi Day Google Doodle
There are sites specially designed to celebrate this day such as http://www.piday.org/. And it contains useful information about the constant "Pi". Alternatively another day is celebrated as the "Pi" approximation day which fall on July 22nd (22/7) which represents the widely used approximation value of "Pi".
As humans we tend to own everything. When dividing something among people we need to own a fair portion, if not a bigger portion. Thus problems regarding dividing has become the source of many conflicts, wars and sometimes crimes. Cake Cutting problem is an interesting thing in mathematics which deals with dividing a cake between several people such that each person is fully satisfied with the piece he gets.The generalized dividing problem is also known as the fair division problem and there are several algorithms to solve this. This problem is very much associated with real life problems.
Basics
Before solving the problem of fair division the word "Fair" should be defined properly. Fair can mean two things. The first condition is everyone should be satisfied, that the piece they got is at least an equal portion of the total resources. That is, if the resource is divided between n people each person should feel that they have received at least 1/n portion. The other condition is that every person should feel that no one has received more than himself. In other words everyone should feel that they received the largest part. Satisfying the first condition is less problematic than the second. Thus sometimes the dividing problem is limited to satisfy only the first condition. Yet the human behavior demands not only the first condition but also the second condition should be satisfied so that everyone is happy about the division of the resource. The problems which mandate the second condition is also known as Envy Free division. Also the criteria to decide the value of each portion is important. In the simplest case the value of each piece is based on its size. But in complex (and practical) cases the value of each piece will be different to each participant. One participant may value a piece of cake with more icing on it while one prefer a piece with cherries. Even under these conditions the definition of fair will help us to tackle the fair division problem easily.
Simplest Case
The simplest case is the division of a cake between two people. This can be easily solved using the divide and choose method. In this scenario one person divide the cake into two pieces which he thinks that is fair. The other person gets the chance to select a piece he like. The other piece is left to the first person. As the first person initially divided the cake in to two fair parts he gets a fair portion. Although second person do not agree with the division of the cake in to two as fair he gets the chance to select any piece. Thus he will also be satisfied with the piece he gets.
The Case of Three
The next case is the division of a cake between three people. There are several methods to solve this fair division problem for three people. Almost all these methods can be generalized to solve problems containing more than three people.The divide and select approach which was used for two person case can not be extended to solve this. And there are solutions which seems plausible but proved wrong when thoroughly analyzed. Let's now analyze one such incorrect approach. Let the three people be named as A,B and C. This solution includes following steps.
A cuts the cake in to two pieces where he thinks one is 1/3 and the other is 2/3 of the cake.
B cuts the 2/3 part of the cake in to two fair pieces.
C chooses any piece he likes.- So C is satisfied
Then A chooses.
Finally B chooses.
Now lets analyze the above solution. Since C selects first, clearly C is satisfied. If C has chosen a piece that is cut by B then A can select the initial piece he cut. If C has selected the initial piece cut by A, then A can select one of the pieces cut by B. As A initially divided in to 1/3 and 2/3 parts, at least one piece cut by B should be 1/3. So A is satisfied in any case. The problem is with B. If B thinks the initial cut by A is not fair (ie. The smaller piece is larger than 1/3 of the cake) B is only satisfied with that piece. Thus if that piece is selected by A or C then B is left unsatisfied. Thus the solution given here is not correct.
There are few things in the world that I hate too much. One such thing is to prove a stupid computer that I am really a human , not a bot. The way we have to prove it, is so much annoying. Most of the time we have to read some distorted letters and enter them to a text box. This text is called a "CAPTCHA". "CAPTCHA" stands for "Completely Automated Public Turing test to tell Computers and Human Apart". This is a kind of Turing test. Instead of administrated by a human and targeted at a machine "Captcha" is administrated by a machine and targeted for a human. The "Captcha"s are used for variety of purposes. The main purpose is to stop spams and automated votes in voting systems. Most of the time we encounter these while registering to a website or posting a comment on a blog post. Also sometimes we have to fill a "Captcha" if we incorrectly entered a password several times.
But I feel this has become a very annoying thing to most people. Some of the "Captcha"s are really unreadable. It is interesting to know whether there are any data available on the time that is wasted due to these "Captchas". Thus the balance between the security and the user friendliness should be maintained by carefully selecting when to use "Captcha"s and their hardness to solve .
JavaCV is a set of wrapper classes used for openCV. Using javaCV any C code used for Image Processing can be converted in to a java code. For a person who have an expertise knowledge on java and a little knowledge on C, javaCV will be very useful as he only have to worry about the logic of the code not the syntax. Following is a guide to install and configure javaCV in netbeans or eclipse environment.
Install Microsoft Visual C++ Microsoft Visual C++ 2010 Redistributable Package (x86) or Microsoft Visual C++ 2010 Redistributable Package (x64) (If your system is 64 bit)
Download opencv 2.4.0 OpenCV windows SuperPack version 2.4.0
Note- Opencv 2.4.1 does not work with this. It gives a linking error.
Extract opencv to C:
Set up environment variables
64-bit version of the JDK: C:\opencv\build\common\tbb\intel64\vc10\;C:\opencv\build\x64\vc10\bin\;
32-bit version of the JDK: C:\opencv\build\common\tbb\ia32\vc10\;C:\opencv\build\x86\vc10\bin\; ”.
Download and extract javacv Link. This contains 8 jar files
When creating projects add those jar files to the libraries folder
In netbeans right click Libraries and select ”add JAR/folder” and select above jar files.
In eclipse right click the project folder and select properties. Select “java build path” and select the Libraries tab and add the required jar files.
Check the following code. This captures an image from the web cam.
"O Holy Night," also known as Minuit, Chrétiens (Midnight, Christians) or Cantique de Noël.The original French lyrics were written by Placide Cappeau (1808-1877) and the melody was composed by Adolphe Adam (1803-1856) who composed the score for the ballet Giselle. The song was first performed in 1847 during a Christmas Eve mass in Roquemaure. It was later translated from French to English by John Sullivan Dwight (1813-1893).
This Christmas carol was played live over the radio on December 24, 1906. The Christmas radio show was broadcasted by Reginald Fessenden from Brant Rock, Massachusetts.
Source: www.christmas-lyrics.org
Oh holy night, the stars are brightly shining
It is the night of our dear Savior's birth
Long lay the world in sin and error pining
Till He appeared and the soul felt it's worth
A thrill of hope, the weary world rejoices
For yonder breaks a new and glorious morn
Fall on your knees
Oh, hear the angel voices
Oh, night divine
Oh, night when Christ was born
Oh, night divine
Oh night, oh night divine
Truly He taught us to love one another
His law is love and His gospel is peace
Chains, shall He break for the slave is our brother
"The end of the world on December 2012" , probably the most feared and widely discussed thing these days. This has been probably aggravated by the recent natural disasters faced by the world such as hurricane Sandy. Though there are no scientific evidence to suggest the end of the world on 2012 most of the people reluctant to accept it as just a myth.
They claim the Maya calender ends on December 21st 2012. So whats the big deal ? Calenders do need to have an end. In fact every thing do need to have a beginning and an end. The Maya calendar starts from 3114 BC . Does that mean that the world started or began on 3114 BC ? not really. The years 3114 BC and 2012 were the years where Mayans had to remove their old calenders and get a new calender. Just as we change our calenders on January 1st. The only difference is Mayan calender was so huge and one calender was enough for massive number of generations (Calender making would not have been a prosperous business in Mayan culture). They may have further extend their calender if they had more space and time to write the calender. Similar problems of running out of space for keeping the time occurs even in the modern world. The Year 2038 problem is one example. This will occur on January 19th 2038.The reason is that we use 32 bit integers to represent the date objects in computers and digital systems. In these systems the date is represented as the number of seconds since January 1st 1970. The maximum integer that can be represented by 32 bit representation is 2147483647. This is the number of seconds up to January 19th 2038. So effectively our digital calenders ends on 2038. So will the world end on January 19th 2038 ? May be in the future when a more civilized and developed society finds about this conflict, they may fear that the world ends on that day.
Although this 19th January 2038 does not physically end the world, many problems will arise in digital systems. Almost all the systems now been used would not be able to perform date calculations. The day will be reset to Friday 13th December 1901 after 2038 causing many problems. The solution is to increase the number of bits used to represent a date in digital systems. But this will introduce backward compatible problems with current software architectures. So still a universal solution have not been found. But probably in the near future people with come up with many plausible solutions and there is no need to fear about the end of the world, unless we dig our own grave due to wars and environment pollution. http://en.wikipedia.org/wiki/Year_2038_problem
The inaugural session of SLPL finished yesterday with "Uva Next" crowning as the champions in a rain shortened match. Although the final was highly affected with rain the thrill of a final was never lost mostly due to the unbelievable batting cameos by Mathews and Dilshan Munaweera. Probably the use of the "Duckworth-Lewis Method" in this match would not that fair to both the teams. But as per the performances of the teams I believe "Uva Next" deserved to be the champions after beating in form "Wayamba" convincingly in the semifinals. As in the half way stage it is also important to look at the performances of the teams and individual players.
The main target behind the SLPL was to improve the cricketing skills of the local players and giving them a chance to perform with international players. Some of the players performed very well and some failed to take the maximum use of their chance. Some senior players such as T.M. Dilshan and Mahela regained their form through SLPL while players like Ajantha Mendis gained their way to the national team once again through SLPL. Mathews showcased his captaincy skills and his improved consistency as a finisher.
Akila Dananjaya and Dilshan Munaweera have been the finds of the tournament. Both of them earned a place in the squad for the World T20.
Munaweera surpassed Mathews as the highest run-getter in the tournament by 1 run in the final. Probably this should earn him a place in the starting 11 in the T20 world cup. Though Akila Dananjaya performed well in the early stages he was attacked severly in the final matches he played. Thus I think he should improve more before getting a Sri Lankan cap.
Dinesh Chandimal and Thissara Perera were among the disappointments of the tournament. As the next generation of the Sri Lankan cricket a lot were expected from them. Also Bhanuka Rajapaksha failed miserably during the SLPL. The performance of local bowlers were also below par.
Undoubtedly Pakistan players are the most benefited international players from this tournament. Most of the Pakistan players took part in this SLPL and they performed well in their respective SLPL teams and most of them got the chance to be in the playing 11. Players like Kamran Akmal made this a chance to regain their form and earn a place in their national teams. Also the experience they got from playing in World T20 venues will be very useful.
Another disappointment was the failure of retired players. Jayasuriya and Muralitharan was totally out of form. Surprisingly Muralitharan remains at the bottom of the best bowlers list. He failed to take a wicket in his four appearances for Uthura Rudras and leaked 8 runs per over. His performance probably affected Uthura and they lost their first four games in a row.
The most disturbing thing about SLPL is not the failures of upcoming players nor the success of foreign players, but the success of Sri Lankan players who have failed repeatedly at the international level. Their success induce a fear in the minds of Sri Lankan supporters. Fortunately despite the cameo played by Kapugedara against Ruhuna , he failed to secure a place on national team for the T20 world cup.
Basnahira and Uthura were the main disappointments of the tournament. Although they had good teams the performance was well below par. And Wayamba was the chokers of the tournament.They outplayed all other teams in the league stage but choked in the semifinal. They had a very good team balance which can play on par with any other club team in the world and they would have a realistic chance to win the Champions League if they got selected. Missing Kamran Akmal in the semi finals due to national duty dented their chance of winning the semifinal.
The SLPL started with lot of controversies. This was expected to start last year. But due to intervention of India it was postponed. Even in this edition no Indian players took part. Also the expected foreign stars decided to stay away from it at the last moment. And some players leaved SLPL at the halfway stage citing different reasons. But yet I think it helped Sri Lanka to uncover the next generation of cricketers. Also Hope that "UVA NEXT" will perform well at the upcoming Champions League in October.