Thursday, July 26, 2012


There is a country consisting of N cities, just built. So, now you must build roads for the cities. Each road is a two-way path joining two cities. The way it works is, in one turn, you must choose two cities, and if there is no road between them, build a road, else, leave it as it is. What is the estimated number of turns required to build the roads such that there is a way from every city to every other city?

Courtesy : Aakash rao NS

Sunday, July 22, 2012

Divisor - Nim

Alice and Bob are back in gaming. This time it is with numbers. They take a jar containing all the numbers from 1 to n. The game goes on like this. Alice starts the game, she picks a number x from numbers in the jar. Then, she removes all the divisors of x (including x). Alice and Bob repeat the steps without replacement. The player to draw the last number wins. Who will win the game (in terms of n if it depends on n) ?

Courtesy : Vinod