Traditional Culture Encyclopedia - Weather inquiry - Classical logic problems of logic problems

Classical logic problems of logic problems

1. Four people sit in a row in the dentist's waiting room. Miss Brown is next to Miss Green, but Miss Brown is not behind Mr Jones, and Mr Jones is not behind Mr Jill. Who is next to Mr. Jill?

Answer: Miss Brown.

The boss of a company has a huge commercial cold storage, which is full of excellent steaks. One night, a thief opened the door of the cold storage and stole a whole truck of steaks.

Three suspects were summoned. Every suspect is a well-known habitual thief, and he can find a car full of people who buy steaks. Their statement is as follows. Among them, each suspect made two true and two false statements.

A: 1. Any day is a good day for thieves; 2. A car steak can't find a buyer; I took it away with my motorcycle; I saw that C stole it.

B: 1。 I can't drive a truck; 2. What I said is not all true; 3. I am innocent; Everything a said is true.

C: 1. Everything I said is false; 2. I can drive a truck; 3. We are all innocent; 4.a has a buyer who sells stolen goods.

Can you tell who the thief is?

Answer: c

Xiao Wang, Xiao Li and Xiao Zhang are going to climb the mountain. The weather forecast says it may rain today. Around the weather forecast, three people argued endlessly.

Xiao Wang. "It may rain today, but it doesn't rule out that it won't rain today. Let's climb the mountain.

Xiao Li: "It may rain today, which means it will rain today. Let's not climb the mountain. "

Xiao Zhang: "It may rain today, which just shows that it is not inevitable that it will not rain today. Whether you want to climb the mountain or not is up to you. "

Which of the three people has a correct understanding of the weather forecast?

Answer: Xiao Wang and Xiao Zhang are right, but Xiao Li is wrong.

4. There may be p or q people attending a dinner party (p and q are given coprime integers). A big cake was prepared for the dinner party. How many pieces must this cake be divided into at least (each piece is not necessarily equal in size) so that the cake can be divided equally in the presence of P or Q people?

Answer: at least the cake should be cut into P+Q- 1 pieces. Let's assume that the cake is rectangular. First, we divide the cake into p equal parts with P- 1 parallel lines parallel to a pair of sides. Divide the cake into q equal parts with another q- 1 parallel line in the same direction. Then cut the cake into (P- 1)+(Q- 1) = P+Q-2 pieces, and cut the cake into P+Q- 1 pieces. This cutting method obviously meets the requirements.

It will be proved that the number of blocks of P+Q- 1 cannot be reduced any more. To this end, we construct a graph with p+q vertices. In the first case, P vertices represent P visitors, and in the second case, Q vertices represent Q visitors. Everyone agreed to use the edge of the picture to represent the cut pieces of the cake. The two vertices connected by each edge are the guests who eat pieces in two cases. According to the requirements of the topic, for two types of visitors, all the chess pieces are divided into equal weight P piles or equal weight Q piles, which are shared by the guests. In the constructed graph, there must be a chain between any two vertices. Otherwise, connected branches with vertices will not be connected with other vertices. Suppose this connected branch contains multiple vertices 1/p in the first case and multiple vertices 1/q in the second case. Obviously, a < p, B < Q. This part of the cake contained in the connected branch can be divided into A cake share and B cake share among two kinds of visitors. Therefore: a/p=b/q, where a

Finally, we point out that a connected graph with p+q vertices has at least p+q- 1 edges. Therefore, the number of blocks of P+Q- 1 cannot be reduced.

It is said that there is a village in the world with 1000 old ladies. Every day, each of them will tell all their acquaintances what they heard yesterday, and any news will be gradually known by the old ladies in the village. Excuse me, if you want to let eight bitches in the village know a news within 10 days, how many bitches need to tell the news at the same time?

Answer: According to the topic, any two bitches A and Z in the village must have an acquaintance chain, that is, A knows B, B knows C, …, Y knows Z, otherwise Z will not know the message sent to B, which contradicts the topic. We will only consider such an acquaintance chain, in which each member only appears once. If a member M appears twice in the chain, that is, it contains a closed chain M-N-… M, we can cut off the connection between M and N, and delete the part of N-… M from the original whole chain, leaving this chain. Then from the assumption that there is no closed chain, it is inferred that there is only one acquaintance chain between any two residents A and Z, because if there are two chains A-B' … Y'-Z and A-B-… Y-Z, because the acquaintance relationship is symmetrical, there is a closed chain A-B-… Y-Y-… B'-A, which contradicts the assumption. Obviously, we only need to prove the problem, and we don't need the closed-chain hypothesis.

The number of all members of the acquaintance chain connecting the two bitches mentioned above is called the "distance" between the two bitches. You can choose two bitches, X and R, who have the largest distance. Let's study the acquaintance chain that connects them: X-A 1-A2-…-Ak-Y ①.

Let k≤l9 (that is, the number of people in the chain does not exceed 2 1). Consider a moderate Am(k (when k is even, m=( 1/2)k or (1/2) k+1; When k is an odd number, m=( 1/2) (k+ 1), and its distance to both ends of the chain is less than half of the chain length plus 1, that is, less than or equal to (k+2)+1≤ (1/2).

Am-B 1-B2-… Bn-Z ②

If Bl is not AM-L, it is a chain from X to Z.

X-A 1-… Am-Bn-Z ③

If B 1 is not Am+l, there is a chain from z to y.

Z-Bn-… B 1-Am-… Ak-Y ④

Chain from x to y (1)

X-Al-A-M-A-K-Y

Compared with ③, it only changed from Am to ②, and ④ just changed from Am to the other way around. Since ① is the longest chain, and the distance from Am to both ends does not exceed 1 1, the length of ②, that is, the distance from A m to Z does not exceed 1 1. So, if you tell A m something, it will be the longest.

Let k≥20, then take A 10 as the above A m and tell her the news. According to the above argument, as long as A 1 1 is not passed, the length of the chain starting from A 1 1 should not exceed 65438. A 1...A9) and A 10 are separated, and the remaining eight bitches are only1000-1. The acquaintance chain from A 10 to the other eight bitches, after A 1 1, is no longer there. Because every bitch with A 10 has a chain that doesn't pass through A 1 1, it is impossible to have a chain that passes through A 1 1. That is to say, among the remaining bitches, there is an acquaintance chain from A 1 1 to every other bitch, thus making this chain from A 1 1.

Every time the above methods are carried out, you can tell the news to a gossip, so that at least 1 1 people will know the news within 10 days. Since1000 =11× 89+ 21,89+will be performed at most.