Sunday, 16 December 2012

Very hard puzzle

Be The First To Comment
98% of the people are incapable of solving this


Variations of this riddle appear on the net from time to time. It is sometimes attributed to Albert Einstein and it is claimed that 98% of the people are incapable of solving it. Some commentators suggest that Einstein created such puzzles not to test out intelligence but to get rid of all the students who wanted him as an advisor. It is not likely that there is any truth to these stories. Whereever this comes from, it is a nice riddle.
Let us assume that there are five houses of different colors next to each other on the same road. In each house lives a man of a different nationality. Every man has his favorite drink, his favorite brand of cigarettes, and keeps pets of a particular kind.
  • The Englishman lives in the red house.
  • The Swede keeps dogs.
  • The Dane drinks tea.
  • The green house is just to the left of the white one.
  • The owner of the green house drinks coffee.
  • The Pall Mall smoker keeps birds.
  • The owner of the yellow house smokes Dunhills.
  • The man in the center house drinks milk.
  • The Norwegian lives in the first house.
  • The Blend smoker has a neighbor who keeps cats.
  • The man who smokes Blue Masters drinks bier.
  • The man who keeps horses lives next to the Dunhill smoker.
  • The German smokes Prince.
  • The Norwegian lives next to the blue house.
  • The Blend smoker has a neighbor who drinks water.

The question to be answered is: Who keeps fish?
This is a simple constraint satisfaction problem. Let us start by defining a regular language that consists of all the possible solutions for the puzzle. We need five basic variables: Color of the house, Nationality of the owner, and his favorite Drink, Cigarette, and Pet. We define each variable as the language of the possible values of the variable.

  • define Color [blue | green | red | white | yellow];
  • define Nationality [Dane | Englishman | German | Swede | Norwegian];
  • define Drink [bier | coffee | milk |tea | water];
  • define Cigarette [Blend | BlueMaster | Dunhill | PallMall | Prince];
  • define Pet [birds | cats | dogs | fish | horses];

The next concept to define is that of a House. Let us construe it as a concatenation of the five terms defined above:

define House [Color Nationality Drink Cigarette Pet];

With five variables each taking one of five possible values, this gives quite a number of possible households, 5x5x5x5x5 = 3125, to be exact. A road with five houses next to each other, House^5, provides an astronomical number of possible combinations of colors, nationalities, drinks, cigarettes and pets.

To solve Einstein’s puzzle, we represent each of the fifteen constraints as a regular language and intersect these languages with the initial set of all possibilities. If all goes well, at the end we will know who keeps fish. For example, we can interpret The Englishman lives in the red house. as $[red Englishman]. This constraint is trivial to encode because in our representation of a house, the color and the nationality are adjacent. The second costraint, The Swede keeps dogs could be represented as $[Swede Drink Cigarette dogs] but we will choose a less verbose formulation, $[Swede ~$Pet dogs], that does not explicitly list the variables that separate Nationality and Pet. The fifteen constraints are shown below.


define C1 $[red Englishman];
    # The Englishman lives in the red house. 
define C2 $[Swede ~$Pet dogs];
    # The Swede keeps dogs. 
define C3 $[Dane tea];
    # The Dane drinks tea. 
define C4 $[green ~$Color white];
    # The green house is just to the left of the white one. 
define C5 $[green ~$Drink coffee];
    # The owner of the green house drinks coffee. 
define C6 $[PallMall birds];
    # The Pall Mall smoker keeps birds. 
define C7 $[yellow ~$Cigarette Dunhill];
    # The owner of the yellow house smokes Dunhills. 
define C8 [House^2 ~$Drink milk ~$Drink House^2];
    # The man in the center house drinks milk. 
define C9 [? Norwegian ?*];
    # The Norwegian lives in the first house. 
define C10 $[Blend ? ~$Pet cats | cats ~$Cigarette Blend];
    # The Blend smoker has a neighbor who keeps cats. 
define C11 $[horses ~$Cigarette Dunhill | Dunhill ? ~$Pet horses];
    # The man who keeps horses lives next to the Dunhill smoker. 
define C12 $[bier BlueMaster];
    # The man who smokes Blue Masters drinks bier. 
define C13 $[German ~$Cigarette Prince];
    # The German smokes Prince. 
define C14 $[Norwegian ~$Color blue | blue ? ~$Nationality Norwegian];
    # The Norwegian lives next to the blue house. 
define C15 $[Blend ~$Drink water | water ? ~$Cigarette Blend];
    # The Blend smoker has a neighbor who drinks water.

All that we need to do to solve the problem is to impose the constraints on the row of five houses by intersection. The solution below is almost correct.

define Solution [House^5 & C1 & C2 & C3 &C4 & C5 &
C6 & C7 & C8 & C9 & C10 &
C11 & C12 & C13 & C14 & C15];

The result is a network with five paths. In four of the solutions nobody keeps fish and the German keeps the
same kind of pet as someone else. We need one final constraint, presupposed by the question Who keeps fish?:

define C16 $fish;
    # There is someone who keeps fish.

With C16 added, only one solution remains. To make it easier to see, we compose the solution with the transducer that adds some prose around the pieces along the one remaining path:

define Describe [House -> "In the " ... .o.
Color -> ... " house " .o.
Nationality -> "the " ... " " .o.
Drink -> "drinks "... ", " .o.
Cigarette -> "smokes "... "s,\n and " .o.
Pet -> "keeps " ... ".\n"] ;

We can now see the solution.
regex [Solution .o. Describe];
76 states, 75 arcs, 1 path.
xfst[2]: print lower-words
  •   In the yellow house the Norwegian drinks water, smokes Dunhills, and keeps cats. 
  •   In the blue house the Dane drinks tea, smokes Blends, and keeps horses. 
  •   In the red house the Englishman drinks milk, smokes PallMalls, and keeps birds. 
  •   In the green house the German drinks coffee, smokes Princes, and keeps fish. 
  •   In the white house the Swede drinks bier, smokes BlueMasters, and keeps dogs.



In short, it’s the German who keeps fish.

Monday, 22 October 2012

Free Unlimited Calling Trick For Android and Iphone

1 Comment

Make free calls all over India via Android/Iphone.

Just Download application for free from Android market, install it and make free calls all over country.
It works in many countries including India.

The name of the application is CrowdCall.

Download the application from the below link

http://market.android.com/search?q=pname:com.socialdial.crowdcall.app
Step 1.Download and install the application (Crowdcall)

Step 2. After installing open the app and enter ur own phone number.

Step 3. After that open it and enter ur frend's number or any other u r goign to call

Step 4. After entering someones mobile number u will receive an unknown call. Pick up the call and listen to and press "1" when instructed.

Stwp 5. After that dont disconnect call..during that process the person u r calling will receive call and after receiving call that person also have to press 1

Step 6. Enjoy free calling

Sunday, 21 October 2012

Whonix: Operating system

Be The First To Comment

Whonix is an anonymous general purpose operating system based on Virtual Box, Ubuntu GNU/Linux and Tor. By Whonix design, IP and DNS leaks are impossible. Not even malware with root rights can find out the user's real IP/location.

Whonix consists of two machines, which are connected through an isolated network. One machine acts as the client or Whonix-Workstation, the other as a proxy or Whonix-Gateway, which will route all of the Whonix-Workstation's traffic through Tor. This setup can be implemented either through virtualization and/or Physical Isolation.


Whonix advantages:
  • All applications, including those, which do not support proxy settings, will automatically be routed through Tor.
  • Installation of any software package possible.
  • Safe hosting of Hidden services possible.
  • Protection against side channel attacks, no IP or DNS leaks possible^3^ To test for leaks, see LeakTests.
  • Advantage over Live CD's: Tor's data directory is still available after reboot, due to persistent storage. Tor requires persistent storage to save it's Entry Guards.
  • Java / JavaScript / flash / Browser Plugins / misconfigured applications cannot leak your real external IP.
  • Whonix does even protect against root exploits (Malware with root rights) on the Workstation.
  • Uses only Free Software.
  • Building Whonix from source is easy.
  • Tor+Vidalia and Tor Browser are not running inside the same machine. That means that for example an exploit in the browser can't affect the integrity of the Tor process.
  • It is possible to use Whonix setup in conjunction with VPNs, ssh and other proxies. But see Tor plus VPN/proxies Warning. Everything possible, as first chain or last chain, or both.
  • Loads of Optional Configurations (additional features / Add-Ons) available.
  • Best possible Protocol-Leak-Protection and Fingerprinting-Protection.

 

© 2011 Web Chiller - Designed by Surender and Ramesh | ToS | Privacy Policy | Sitemap

About Us | Contact Us | Write For Us