Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

5 persons (called as A, B, C, D, and E) go out fishing, and collect all the fishes in one basket. In the second

5 persons (called as A, B, C, D, and E) go out fishing, and collect all the fishes in one basket. In the 

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)

Step by Step Solution

3.38 Rating (154 Votes )

There are 3 Steps involved in it

Step: 1

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... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions