Three logical tasks, solved by the supercompiler JScp    

 

russian.htm - russian text,

fish - task of A.Einstein,

agent007 - task about the agents,

recnumb task about recursive numbers.

The task 1. The task of A.Einstein   fish

There are 5 houses in 5 different colors.  In each house lives a man with a different nationality.  The 5 owners drink a certain type of beverage, smoke a certain brand of cigar, and keep a certain pet.  No owners have the same pet, smoke the same brand of cigar or drink the same beverage.

The question is: "Who owns the fish?"

Hints:

 

The task 2. The task about the agents. agent007

The chief of intelligence, where agent 007 serves, has invented the scheme of relative shadowing of the agents

The Agent 001 watches the agent, who watches the Agent 002.

The Agent 002 watches the agent, who watches the Agent 003.

The Agent 003 watches the agent, who watches the Agent 004.

The Agent 004 watches the agent, who watches the Agent 005.

The Agent 005 watches the agent, who watches the Agent 006.

The Agent 006 watches the agent, who watches the Agent 007.

The Agent 007 watches the agent, who watches the Agent 001.

All went normally until the Agent 008 appeared. In this case it became impossible for the chief to make up the similar scheme of relative shadowing for eight agents.

1. What scheme of relative shadowing was at first (whom each agent watches)?

2. Why is the 8 agents scheme impossible?

 

The task 3. The task about recursive numbersrecnumb

Find such a 10-digit number, in which the first digit is equal to the amount of zeros in this number. The second digit is equal to the amount of units in this number, and so on. The tenth digit equals to the amount of nines in this number.

For example, the number 6 210 001 000 . It has 6 zeros, 2 units, 1 digit two, 1 digit six. There is no other digits.

The task is extended for n-digit  numbers.

The answer to this task is quite curious.

n =2  - no solutions,

n = 3 - no solutions,

n = 4  - two solutions - 1210 and 2020,

n = 5  - one solution - 21200,

n = 6  - no solutions,

n = 7  - one solution - 3211000,

n > 7 - one solution -

n-4 , 2 , 1 , 0 , ... , 0 , 1 , 0 , 0 , 0 .

fish - task of A.Einstein, agent007 - task about the agents, recnumbtask about recursive numbers.