Question

In: Computer Science

In math class, a student has written down a sequence of 16 numbers on the blackboard....

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.

Solutions

Expert Solution

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..!!


Related Solutions

In math class, a student has written down a sequence of 16 numbers on the blackboard....
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 se‐ quence. This results in a second sequence of 16 numbers. Below each number of the second se‐ quence, a third student writes down how many times that number occurs in the second se‐ quence. This results in a third sequence of numbers. In the same way, a...
There are 16 students in a class. Each student has either a bicycle or a tricycle. There are exactly 37 wheels altogether.
There are 16 students in a class. Each student has either a bicycle or a      tricycle. There are exactly 37 wheels altogether. How many bicycles do the students have?
The class Person, uploaded on Blackboard with Lab 5, only has methods to set and print...
The class Person, uploaded on Blackboard with Lab 5, only has methods to set and print the name of a person. Redefine the class Person to include the following operations: Set the last name only Set the first name only Set the middle name Check whether a given last name is the same as the last name of this person Check whether a give first name is the same as the first name of this person Check whether a given...
Treena is a personable student in Mr. Jordan's math class. Mr. Jordan can see that Treena...
Treena is a personable student in Mr. Jordan's math class. Mr. Jordan can see that Treena is popular with her peers. He regularly sees her conversing animatedly with her friends in the cafeteria and before and after school. She does well in class also. Her homework is always on time and is usually well done. Her scores on tests generally range from 85 to 100%. She regularly volunteers to work problems on the board or to answer questions in class....
A Java question. You are given a Student class. A Student has a name and an...
A Java question. You are given a Student class. A Student has a name and an ArrayList of grades (Doubles) as instance variables. Write a class named Classroom which manages Student objects. You will provide the following: 1. public Classroom() a no-argument constructor. 2. public void add(Student s) adds the student to this Classroom (to an ArrayList 3. public String hasAverageGreaterThan(double target) gets the name of the first student in the Classroom who has an average greater than the target...
Write a class encapsulating the concept of a Student, assuming that the Student has the following...
Write a class encapsulating the concept of a Student, assuming that the Student has the following attributes: the name of the student, the average of the student, and the student’s GPA. Include a default constructor, an overloaded constructor, the accessors and mutators, and methods toString() and equals(). Also include a method returning the letter grade base on the following range for the average: Average Range Letter Grade 90-100 A 85-89   B+ 80-84 B 75-79 C+ 70-74 C 65-69 D+ 60-64...
Write a class encapsulating the concept of a Student, assuming that a student has the following...
Write a class encapsulating the concept of a Student, assuming that a student has the following attributes: last name, first name, id, array of grades. Include a constructor, the accessors and mutators, and method toString. Also code the following methods: one returning the GPA using the array of grades (assuming each grade represents a course grade and all courses have the same number of credit hours) and a method to add a course grade to the array of grades (this...
If the value of an asset that has been written down later increases, to what extent...
If the value of an asset that has been written down later increases, to what extent may the related gain be recognized? None of the gain may be recognized. Up to the amount of the original loss. Up to the fair market value of the asset. No remeasurements may be recognized. Inputs to income models include which of the following? adjusting cash flows and the discount rate in the same calculation actual cash flows time value of money using a...
Intercultural Communication. A college professor has a new student from China in the class. The student...
Intercultural Communication. A college professor has a new student from China in the class. The student does not speak English fluently. Name and discuss three cultural factors that might influence classroom interaction
The sequence of numbers 0.85, 0.97, 0.48, 0.62 and 0.60 has been generated. a- Use the...
The sequence of numbers 0.85, 0.97, 0.48, 0.62 and 0.60 has been generated. a- Use the Kolmogorov - Smirnov test with α = 0.05 to determine if the hypothesis that the numbers are uniformly distributed on the interval [0, 1] can be rejected ? b- Would your conclusion change if we had 0.59 instead of the middle random number 0.48?Why?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT