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...
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 a 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 a third sequence of numbers. In the same way, a fourth, fifth, sixth,...
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...
Write a class encapsulating the concept of a Student Employee, assuming that a student has the...
Write a class encapsulating the concept of a Student Employee, assuming that a student has the following attributes: last name, first name, id, array of hours worked weekly. Include a constructor, the accessors and mutators, and method toString. Also code the following methods: one returning the average weekly hours and a method to add the hours to the array of hoursWorked (this means creating a large array). Let this array store the weekly hours (not daily hours) worked for each...
Write a class encapsulating the concept of a student, assuming a student has the following attributes:...
Write a class encapsulating the concept of a student, assuming a student has the following attributes: a name, a Social Security number, and a GPA (for instance, 3.5). Include a constructor, the accessors and mutators, and methods toString and equals. Write a client class (test driver with main method) to test all the methods in your class (create 2 student objects, print the name, social security number and GPA of the 2 students, check if the two student’s GPA is...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT