5 persons (called as A, B, C, D, and E) go out fishing, and collect all...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
5 persons (called as A, B, C, D, and E) go out fishing, and collect all the fishes in one basket. In the second day, the person A first wakes up. He discards one fish, and the rest fishes are exactly divided into 5 groups. Then, A takes away one group of fishes, and leaves the rest 4 groups. Then, person B wakes up, and he takes the left 4 groups of fishes as all the fishes remain. Similarly, he discards one fish, and the rest finishes can still be exactly divided into 5 groups. Then, C, D and E all repeat the same process: (1) discard one fish from the current number of fishes he saw, (2) divide the rest fishes (after discarding one fish) exactly into 5 groups, and take away one group. Everytime after discarding one fish, the rest fishes can exactly be divided into 5 groups. • What is the smallest number of fishes that meets the requirement? Write a C programs to find the result by using iteration. (1 mark) .Write another C program to solve the above question by using recursion. (1 mark) • What is the smallest number of fishes that meets the requirement, when the number of people is 3 and 4, respectively? Use your program to find out. (1 mark) • Intuitively, to find the smallest number of the fishes, the number of fish that the last person sees should be minimized. For example, when the number of people is N, the last person should always see N+1 fishes. Please use a specific case to prove that such intuitive conclusion is not correct, and explain why. (1) mark) 5 persons (called as A, B, C, D, and E) go out fishing, and collect all the fishes in one basket. In the second day, the person A first wakes up. He discards one fish, and the rest fishes are exactly divided into 5 groups. Then, A takes away one group of fishes, and leaves the rest 4 groups. Then, person B wakes up, and he takes the left 4 groups of fishes as all the fishes remain. Similarly, he discards one fish, and the rest finishes can still be exactly divided into 5 groups. Then, C, D and E all repeat the same process: (1) discard one fish from the current number of fishes he saw, (2) divide the rest fishes (after discarding one fish) exactly into 5 groups, and take away one group. Everytime after discarding one fish, the rest fishes can exactly be divided into 5 groups. • What is the smallest number of fishes that meets the requirement? Write a C programs to find the result by using iteration. (1 mark) .Write another C program to solve the above question by using recursion. (1 mark) • What is the smallest number of fishes that meets the requirement, when the number of people is 3 and 4, respectively? Use your program to find out. (1 mark) • Intuitively, to find the smallest number of the fishes, the number of fish that the last person sees should be minimized. For example, when the number of people is N, the last person should always see N+1 fishes. Please use a specific case to prove that such intuitive conclusion is not correct, and explain why. (1) mark)
Expert Answer:
Answer rating: 100% (QA)
Youve provided an image of a complex question pertaining to a scenario where a group of people go fishing and then follow a specific ritual to discard and divide the fish they catch The problem essent... View the full answer
Related Book For
Smith and Roberson Business Law
ISBN: 978-0538473637
15th Edition
Authors: Richard A. Mann, Barry S. Roberts
Posted Date:
Students also viewed these programming questions
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
A rectangular plate lying on the xy plane has sides 2 in the x direction and in the y direction, thickness h in direction z, and is made of a material with Young's modulus E, Poisson's ratio v, and...
-
What is a proxy? What must be included in the proxy material submitted to security holders?
-
Codner Corporation stock currently sells for $64 per share. The market requires a 10 percent return on the firms stock. If the company maintains a constant 4.5 percent growth rate in dividends, what...
-
Provide examples of qualified audit reports which the auditor could use as part of the reporting process.
-
Deloise Company purchased a new machine on October 1, 2012, at a cost of $90,000. The company estimated that the machine has a salvage value of $8,000. The machine is expected to be used for 70,000...
-
Use the following financial information to find the entry you would make on an income statement for COST OF GOODS SOLD for the year ended December 31, 2011: Gross Sales, $180,000; Sales Returns and...
-
Using the predictions made by the model on the "Prediction data (this year, active donors)" data set, if the Gabriel Hansen Foundation did not change its direct marketing strategy at all, and sent...
-
3. Complete the following table. [20 pts] LEGV8 assembly instructions Format (R/V/D) Rm/Imm/ Rd/ Opcode Rn Addr Rt Encoding 1000 1011 0000 0101 ADD X16, X15, X5 R 1120 5 15 16 0000 0001 1111 0000...
-
When i run chrome driver in cucumber in ecliap i am receiving this error "only local connections are allowed error in selenium" i am sending all my project pic solve the error *** 0.0 .q.# Problems @...
-
The input to a LTI DTS is given below (a) Show that if h(n) is a FIR oflength L points, y(n+5)= y(n) for all n>L-1(b) Plot one cycle of output after output has reached aperiodic steady state in the...
-
Fill out this Goods and Services Tax / Harmonized Sales Tax (GST/HST) Return Working Copy Do not use this working copy to file your retum or to make payments at your financial institution Nara...
-
II. Vital Capacity Calculate and record Gail's predicted vital capacity using the correct formula: Male Female Equations for Predicted Vital Capacity (Kory, Hamilton, Callahan: 1960) What is Gail's...
-
A hail storm caused nearly golf-ball sized hail to fall on a house. The hailstones were nearly spherical, with a diameter of roughly 3.7 cm and a weight of 24 g. a. Draw a free body diagram of the...
-
A very long straight wire has charge per unit length 1.4410-10C/m. question: At what distance from the wire is the magnitude of the electric field equal to 2.45 N/C? Use 8.85x10-12c/(N*m) for the...
-
Create an appropriate display of the navel data collected in Exercise 25 of Section 3.1. Discuss any special properties of this distribution. Exercise 25 The navel ratio is defined to be a persons...
-
The Giant Development Company undertakes a massive real estate venture to sell 9,000 one-acre unimproved lots in Utah. The company advertises the project nationally. Arrington, a resident of New...
-
David Diersen filed a complaint against the Chicago Car Exchange (CCE), an automobile dealership, alleging that the CCE fraudulently furnished him an inaccurate odometer reading when it sold him a...
-
International Distributing Export Company (I.D.E.) was organized as a corporation on September 7, 2004, under the laws of New York and commenced business on November 1, 2004. I.D.E. formerly had been...
-
Explain how the three aspects of todays changing work environmentdigital transformation, working at home versus commuting, and new generations of the workforceare impacting job design.
-
Explain the difference between value-added and non-value-added activities in a process and provide examples.
-
Research and write a short onetwo page paper on recent advances in robotics and their applications.
Study smarter with the SolutionInn App