Salesman Native or visitor problem

Salesman Native or visitor problem

In an Island the natives lie and visitors speak truth. A man wants to know whether a salesman beside him in a bar is a native or visitor. He asked him to ask a woman beside him whether she is a native or visitor. He replied “she says she is a visitor”. Then he knew that the salesman is a native or visitor. Salesman is in which category, native or visitor?
Solution:
two cases are the woman can be a native or a visitor..
a) if she is a native then she should have lied saying she is a visitor which is reported truly.. so the salesman is a visitor
b) if she is a visitor then she should have told the truth and again the truth is reported so salesman is a visitor..
so the salesman can only be a visitor

Comments

HTML/JAVASCRIPT

Popular posts from this blog

Teradata SQL Assistant Shortcuts

How to List All Tables in Oracle, MySql, Teradata, DB2 and PostgreSQL