In: Computer Science
In math class, a student has written down a sequence of 16 numbers on the blackboard. Below each number, a second student writes down how many times that number occurs in the sequence. This results in the second sequence of 16 numbers. Below each number of the second sequence, a third student writes down how many times that number occurs in the second sequence. This results in the third sequence of numbers. In the same way, a fourth, fifth, sixth, and seventh student each construct a sequence from the previous one. Afterward, it turns out that the first six sequences are all different. The seventh sequence, however, turns out to be equal to the sixth sequence. Give one sequence that could have been the sequence written down by the first student. Explain which solution strategy or algorithm you have used.
There are Multiple solutions exist for this problem,see one solution below.
I am solving this problem by using my strategy ,see below
One possible solution is,0 1 2 2 4 4 4 4 8 8 8 8 8 8 8 8. (On the black board)
Written by the First student 0 1 2 2 4 4 4 4 8 8 8 8 8 8 8 8.
2nd student >> 1 1 2 2 4 4 4 4 8 8 8 8 8 8 8 8
3rd student >> 2 2 2 2 4 4 4 4 8 8 8 8 8 8 8 8
4th student >> 4 4 4 4 4 4 4 4 8 8 8 8 8 8 8 8
5th student >> 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8 8
6th student >> 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
7th student >> 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
Observe the sequence written by the 6th and 7th students are same.
Explanation:
There are also other starting solutions for this problem based on the sequence that we taken initially ,we proceed further.
In each correct solution,The second sequence should consist of twice the number 1 ,twice the number 2,four times the number 4,and eight times the number 8.
Thank you..!! please do upvote..!!