Fortune Telling Collection - Fortune-telling birth date - What is the answer to the egg question in the intelligence test?
What is the answer to the egg question in the intelligence test?
Intelligence test 1: egg problem
Fun intelligence test, the owner of the egg doesn't know how many eggs are in the basket. Clever, can you help the master find the answer?
At the market, a peasant woman sells her eggs in a basket. A young man on a bicycle accidentally bumped into her basket, which turned over and broke the egg. The young man wanted to compensate her for the loss and asked. How many eggs are there in the basket? I can't remember the correct number. The peasant woman replied,? However, I know that when I take two or three, four, five and six eggs out of the basket, there will always be one left in the basket, but when I take seven eggs out, there will be none left in the basket.
How many eggs are there in the basket?
Clever boy, can you tell the farmer how many eggs are in her basket?
Intelligence Test 2: Counting Eggs
An old lady went to the market with a basket of eggs. I was knocked down by a cyclist on the road, and all my eggs were broken. The cyclist picked up the old lady and said, how many eggs did you bring? I'll pay you back. ? The old lady said:? I don't know the total. When we picked up eggs from the henhouse, we picked up five and finally picked up another one. Yesterday, my old man checked it again. He counted four and finally there was one. I counted it again this morning. It's three, and there's one more. ? The cyclist calculated in his heart and lost the egg money at the market price. How many eggs did the old lady bring?
Look at the answer
Turning this problem into a math problem is: there is a number, whether it is divided by 3, 4 or 5, the result is 1. Find this number. In other words: there is a number, negative 1 can be divisible by 3, 4 and 5 at the same time. Obviously, any common multiple of 3, 4 and 5 plus 1 is the solution of this problem. The smallest solution is 6 1, followed by 12 1, 18 1 and so on. In the question, an old lady is carrying a basket, and there can't be many eggs, which can be considered as 6 1.
Intelligence test 2: throwing eggs
Just give you two eggs, which can go up to the 100 floor. I want to know the hardness of the eggs. Eggs may be hard or fragile. If the egg doesn't break when it falls from the M layer, but it breaks when it falls from the m+ 1 layer, then the hardness of the egg is M. You need to find this M and the minimum number of tests in the worst case. (classic egg problem)
A: Computer students may exchange the first egg for method of bisection (O(logN)), then exchange the second incremental search for linear search (O(N)), and finally end up with linear search, because you can't determine the highest level when using the second egg. So the question becomes how to use the first egg to reduce linear search.
So if the first egg breaks at the highest point, we have to throw x- 1 time. We have to throw the first egg from the height of X. Now, if the first egg doesn't break the first time, if the first egg breaks the second time, we have to throw the second egg x-2 times. If 16 is the answer, I need to throw 16 times to find the answer. Let's see if we can throw it from 16 floor. First, throw it from 16 floor. If it is broken, we will try all the floors below it from 1 to 15. If it's not broken, we can still throw 15 times, then we will throw it from the 32nd floor (16+ 15+ 1). The reason is that if it breaks on the 32nd floor, we can try to throw the second egg 14 times from 17 to 3 1 (a total of 16 times). If the 32nd floor is not broken, we still have 13 vote, and so on:
1+ 15 16 If it is broken at 16, the second egg should be thrown from 1 to 15 at worst.
1+ 14 3 1 If it is broken on the 3 1 floor, the second egg should be thrown from the 17 floor to the 30th floor 14 times.
1 + 13 45 .....
1 + 12 58
1 + 1 1 70
1 + 10 8 1
1 + 9 9 1
1+8 100 finally, we can finish it easily because we have enough time to finish the task.
From the above table, we can see that the best one will need a linear search in the last step.
The above law can be written as: (1+p)+(1+(p-1))+(1+(p-2))+...+(1+0) > =/.
Let 1+p=q, and the above formula becomes q (q+1)/2 >; The answer to = 100 and 100 is q= 14.
Throw the first egg from the 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99, 100 floor until it breaks, and then start throwing the second egg. The worst case is only 14 times.
When there is only one egg, to be on the safe side, we can only start from the first layer and test it layer by layer to see if the egg has been broken. This is the most accurate, but it takes the longest. If we know in advance that the highest landing point of this egg is between the 30 th and 75 th floors, we only need to try 45 times at most to know the result. Now we have two eggs in our hands. According to the above analysis, the reasonable strategy is to determine a smaller floor range with the first egg, and then try it layer by layer with the second egg in this range.
For example, let the first egg be tested every five layers. When it hits a certain floor, it means that the width of 4 floors is determined (why 4 floors? If the egg is not broken on the fifth floor and broken on the 10 floor, then we only need to know the results of the egg on the sixth, seventh, eighth and ninth floors. At this time, try the second egg layer by layer, and you can find out the height of the just-unbroken egg with fewer times.
It should be noted that if you want to leave a smaller test width for the second egg, you should shorten the test span of the first egg. Therefore, the number of attempts has increased. In order to determine the appropriate span and make the sum of the total number of tests as small as possible, we can take the following measures.
Let the span be L, the number of attempts of the first egg is [100/L], and the number of attempts of the second egg is L- 1, so the total number of attempts is [100/L]+L- 1. According to this formula, we can list the following table:
It can be seen that we only need to choose a width between 8- 13, and the total number of attempts can be 19.
But the question is, is this already the optimal strategy? Is there a better way?
Yes The above method fixes the test span of the first egg, and if we change it flexibly, we can make the total number of attempts less. First, we choose to drop the first egg from the 14 floor. If it is broken, we will throw the second egg layer by layer from 1 layer, and try 14 times at most to get the answer. If it's not broken, then we'll go to 13 floor and drop the first egg for the second time on the 27th floor. At this time, if the egg is broken, we only need to test with the second egg at most 12 times between 15 and 26 floors, plus two attempts of the first egg, or 14 times. Class, reduce the test span in turn. If the egg is tenacious enough, then the floors where we left the first egg are 14, 27, 39, 50, 60, 69, 77, 84, 90, 95, 99 and the last 100 respectively. Because every time the first egg tries again, the maximum number of times the second egg needs to try is reduced once, so the maximum number of total attempts is always the same, keeping at 14 times. In this way, we only need no more than 14 attempts to find out the answer. Is there a better strategy? Interested readers can think for themselves.
Intelligence Test 3: Selling Eggs
The great poet Bernier Ketov is the author of the first collection of Russian mathematical brainstorming topics. According to some "information" provided by this topic itself, the year of creation of this topic is determined as 1869, and this year is not indicated in the manuscript. Let's introduce a topic written by a poet to readers in the form of a novel. The original title is "Cleverly Solving Strange Problems".
Once, a woman selling eggs sent her three daughters to the market to sell 90 eggs. She gave 10 eggs to the cleverest eldest daughter, 30 to the second daughter and 50 to the youngest daughter, and said to them:
"You discuss first, and after you set the price, you must always stick to the same price and never give in. But I hope the boss can use her wisdom. Even if she sells her 10 eggs at the price you agreed in advance, she earns as much as her second sister sells her 30 eggs. If she helps her second sister sell those 30 eggs, she earns as much as her third sister sells those 50 eggs. The buying price and selling price of the three of you must be consistent with each other.
In addition, I hope the price you sell is not less than 65,438+00 cents per 65,438+00 eggs, which is 90 cents for 90 eggs, which is 30 Ahlden. "Now interrupt Bernier Ketov and let the readers think independently: How did the three girls accomplish the task?
answer
Bainier Ketov's story ends like this:
This topic is really nerve-racking. On the way to the market, three girls walked and discussed. Later, two girls and three girls asked their elder sister for advice. Sister wanted to think and said:
"Sisters, we have sold ten eggs and ten eggs. This time we don't do this, but sell seven eggs and seven eggs. Every seven eggs, we set a price for each one, and all three of us have to follow mom's instructions. Yes, not a penny! What do you think of selling one Ahlden at a time? "
"That's too cheap." The second girl said.
"But after we sell seven eggs, we will raise the price of the remaining eggs! I noticed that no one else sells eggs in the market today except the three of us, so no one will lower our price. Then, the price of the remaining valuables will naturally go up as long as someone is in urgent need and there is not much left. We just want to earn it back with the remaining eggs. "
"So, what's the price of the remaining eggs?"
"Each egg sells for three dollars. Give me the money. This is the price. Buyers who are eager to get the eggs in the pot will pay this price. "
"It's a bit too expensive." The two girls talked again.
"What's the matter," elder sister replied, "are our eggs too cheap for seven dollars? The two just cancel each other out. "
Everyone agreed.
When they arrived at the market, the three sisters sat down to sell their eggs. The men and women who bought things saw that eggs were so cheap that they all ran to Third Girl. Her 50 chickens and fleas were robbed almost at once: she made 7 copies and sold 7 Ahlden, with one egg left in the basket. Two girls had 30 eggs, 7 of which were sold to 4 customers, and 2 eggs were left in the basket, earning 4 Ahlden. Big sister sold seven eggs, earned an Ahlden, and left three eggs.
At this time, a female chef came to the market. She was ordered by the housewife to buy eggs. Her task is to buy ten eggs. It turns out that housewives' sons like to eat fried eggs when they come back to visit relatives. The cook wandered around the market, but all the eggs were sold out. There are only six eggs left in the three stalls selling eggs: one stall has only one, another stall has only two, and another stall has only three. All right, let's buy all these! It is conceivable that the first stall where a female chef ran with three eggs was the stall of the eldest sister. The female chef asked:
"How much are these three eggs?"
The man replied, "Three Ahlden and one."
"What's the matter with you? Are you crazy? " The female chef said.
The other man said, "Suit yourself. You don't sell it for a penny. That's all. "
The cook ran to the booth, where there were only two eggs in the basket. "What's the price?"
"Three Ahlden one. There is no price, the eggs are sold out. "
"How much is this egg?" The cook asked three girls.
The man replied, "Three Ahlden."
There's nothing the chef can do about it. I have to buy eggs. "Give me all the remaining eggs!"
So the cook gave the big girl nine yuan and bought her three eggs. Together with the original Ahlden, the older girl sold ten Ahlden. Two girls sold six gold coins for two eggs, plus four gold coins for four eggs before, so they sold ten gold coins altogether. Three girls sold three eggs left over from Ahlden, and seven Ahlden, who had sold seven eggs, got ten Ahlden.
When the three sisters came home, they each gave their mother ten dollars.
Guess you like:
1.20 17 IQ test questions and answers
2. Mensa IQ test questions international standard IQ test questions
3. Classic intelligence test questions
4. What is the normal IQ? How much IQ is a high IQ?
5. Standard IQ test questions and answers
6. IQ test questions and answers
- Related articles
- The fortune teller said I should do more good deeds _ What does the fortune teller mean by saying I should do more good deeds?
- Dad, dad, dad, who's the ghost?
- How to calculate the income of Yu 'ebao in Alipay? What is the income of 7000 yuan a day that I put in?
- Is the doll really unlucky?
- Oriental Fortune Telling _ Dong Fangshuo Fortune Telling
- Where does Fuchang Village belong?
- Dreaming of his wife being killed by his partner.
- Comprehensive exploration. In order to carry forward the local culture of Zhangzhou, the school literature society has carried out the folk activities of "Nuo culture". Please join them.
- In the Eastern Han Dynasty, the founding emperor Liu Xiu made outstanding achievements. Why did his son rebel four times?
- What about the surrounding facilities of Zhumadian Binjiang Capital Community?