(10 points) This question is about the Misra-Gries algorithm. The elements in the stream come from...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
(10 points) This question is about the Misra-Gries algorithm. The elements in the stream come from the range [1,8]. Use k = 5. Run the Misra-Gries algorithm on the following stream (in left-to-right order). 7, 3, 1, 1, 5, 2, 7, 5, 3, 5, 8, 1, 5, 4, 4, 2, 1, 6, 8, 7, 6, 8, 7, 5, 7, 2, 5, 4, 5, 8, 4, 5, 1, 1, 5, 2, 7, 1, 2, 1, 3, 4 (a) Draw the table A and show its current content (including the elements in the table and their counts) after seeing each element in the stream. (b) Draw a table that shows the true frequencies and estimated frequencies (according to the Misra- Gries algorithm) of the values in the range [1,8]. Your table should be updated after seeing each element in the stream. (10 points) This question is about the Misra-Gries algorithm. The elements in the stream come from the range [1,8]. Use k = 5. Run the Misra-Gries algorithm on the following stream (in left-to-right order). 7, 3, 1, 1, 5, 2, 7, 5, 3, 5, 8, 1, 5, 4, 4, 2, 1, 6, 8, 7, 6, 8, 7, 5, 7, 2, 5, 4, 5, 8, 4, 5, 1, 1, 5, 2, 7, 1, 2, 1, 3, 4 (a) Draw the table A and show its current content (including the elements in the table and their counts) after seeing each element in the stream. (b) Draw a table that shows the true frequencies and estimated frequencies (according to the Misra- Gries algorithm) of the values in the range [1,8]. Your table should be updated after seeing each element in the stream.
Expert Answer:
Answer rating: 100% (QA)
Sure lets start with part a by drawing the table A and updating it after seeing each el... View the full answer
Related Book For
Posted Date:
Students also viewed these programming questions
-
A regular language is a language that can be defined by a regular expression. 0 2 . 1 Complete the unshaded cells of Table 1 to show which of the statements about regular languages are true and which...
-
Let A, B be sets. Define: (a) the Cartesian product (A B) (b) the set of relations R between A and B (c) the identity relation A on the set A [3 marks] Suppose S, T are relations between A and B, and...
-
when taking a lead role for supplier selection can often help Multiple select question. establish supplier quality standards. determine price. develop the engineering specifications. set conditions...
-
Van Den Borsh Corp. has annual sales of $50,735,000, an average inventory level of $15,012,000, and average accounts receivable of $10,008,000. The firm's cost of goods sold is 85% of sales. The...
-
Sanchez Computer Center, continued. At the end of September, Tony took a complete inventory of his supplies and found the following: 5 dozen " screws at a cost of $8.00 a dozen 2 dozen " screws at...
-
Consider the wine quality of young red wines data in Table B.19. For the purposes of this exercise, ignore regressor $x_{1}$. Perform a thorough residual analysis of these data. What conclusions do...
-
Breakeven point, what-if analysis Premier Products, Inc., is considering replacing its existing machine with a new and faster machine that will produce a more reliable product and will turn around...
-
you are evaluating two investments: the first investment requires %100,00 initial investment and promises $30,00 in year 1, $50,00 in year 2 and $40,00 in year 3. The second investment requires...
-
At April 30, partners capital balances in YBG Company are: Younger $30,000, Beyer $16,000, and Giger $10,000. The income-sharing ratios are 5:3:2, respectively. On May 1, the YBGE Company is formed...
-
q 4 plz dont skip sny ans make it clear to understand Summer Company holds assets with a fair value of \( \$ 119,000 \) and a book value of \( \$ 97,000 \) and liabilities with a book value and fair...
-
Projects are chosen to be part of an organizational portfolio based on their ability to help the organization achieve its goals. Once chosen, it is important that projects are successful, or an...
-
How organizations use testing in their diversity strategy. Use this to guide you: "Organizations use testing as a device for ensuring they hire the right person, as a tool for helping employees...
-
Describe your business starting with: Business Name Type of business (either manufacturing a product or offering a service) Describe the product or service of your business (this is a detailed...
-
Consider the following environment of a university. There are academic departments. Each department has a chairperson. Each department offers a set of courses. Some courses are currently offered....
-
Analysis and reflection activity. In this module I ask you to reflect on the traits that define Steve Jobs' management style and to give your opinion on what the qualities of a good manager are. In...
-
1. How can crime be a form of adaptation to ones environment? Why would an individual choose such a form of adaptation over others that might be available? 2. Which perspective is better supported by...
-
For all of the following words, if you move the first letter to the end of the word, and then spell the result backwards, you will get the original word: banana dresser grammar potato revive uneven...
-
Go to the LearnChemE screencast link for Chapter 13 (http://www.umich.edu/~elements/6e/13chap/learn-cheme-videos.html). (a) View one of the screencast 5- to 6-minute video tutorials and list two of...
-
Use the reaction data in Problem P6-11B and the molar flow rate algorithm to carry out the following problems: a. Calculate the CSTR volume to achieve 80% of the equilibrium conversion for an equal...
-
Show that for a first-order reaction A B the exit concentration maximum mixedness equation dCAd=kCA+E(A)1-F(A)(CA-CAO) (P17-3.1) is the same as the exit concentration given by the segregation model...
-
Calculate (in terms of a single ket state and no operators) exp{ila a+ B(a+a)]}|a). (8.108)
-
Can one have a picture in which operators don't evolve in time other than the Schrdinger picture?
-
Use the Sommerfeld method for a particle in one dimension with a quartic potential, instead of a quadratic one, \(V(x)=\lambda x^{4}\). What is the resulting reduced equation, and can you describe...
Study smarter with the SolutionInn App