Election-counting algorithm

Assignment Help Basic Computer Science
Reference no: EM131291646

In the 2003 California gubernatorial recall election, the ballot contained 135 candidates, including people with various listings for their current job, including "actor," "comedian," and even "adult film actress." The winner was the actor-businessman Arnold Schwarzenegger, who got over 48% of the vote. Suppose we have the election results from such an election, with a large number, n, of candidates, and the only tool we can use to determine the winner is to encode the names of all the candidates using the Huffman coding algorithm, based on the number of votes each candidate got in this election. Suppose further that a friend of yours is guessing that if the winning candidate gets more than 40% of the votes, then his or her name will be encoded with a single bit. Prove that this conjecture is true and analyze the running time of this election-counting algorithm.

Reference no: EM131291646

Questions Cloud

Input file and creates an output file : In this assignment you will create a program(s) that uses an input file and creates an output file. Your program will use an input file "MathInput.csv" which has sets of instructions and numbers (separated by a comma) to perform math operations.
What is purchase price it gets from the vendor : MGT 303:Determine the optimal number of bolts for the plant to purchase and the time between orders.What is the annual holding cost and setup (ordering) cost for this item? What is the total cost (holding + setup)?
Rti interrupts to keep time : Write a program that sends 1000 characters of data stored in an array from the DB-12 board to the PC every second via the SCI1 port. Use RTI interrupts to keep time.
Positive social change-an evolving perspective : Write a 3- or 4-paragraph essay in which you briefly analyze the importance and feasibility of working toward social change - Describe how your perspective has evolved or changed through this course and how you believe it will continue to evolve ..
Election-counting algorithm : Suppose further that a friend of yours is guessing that if the winning candidate gets more than 40% of the votes, then his or her name will be encoded with a single bit. Prove that this conjecture is true and analyze the running time of this elect..
Maximum number of friends : Show that your relative's greedy algorithm may not always result in the maximum number of friends being invited to your party.
Is an actor inside or outside the automation boundary : In use case modeling, is an actor inside or outside the automation boundary? Do you think that use cases would be more significant if the responses were computer generated versus the results being the response of a user?
Explain what social change means to you : Explain what social change means to you as a Walden doctoral candidate. What experiences from the course most influenced your understanding?Explain what in qualitative research you would like to know more about as a result of taking this course.
How to recognize the future when it lands on you : 1. Howard Rheingold's "How to Recognize the Future When It Lands on You" AND/ORNicholas Negroponte's "Creating a Culture of Ideas (Key Term Essays)

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Would you like to play this game every day

Would you like to play this game every day?

  Four stages that vista went through in implementation

Read about the four stages that VistA went through in the implementation transition. Imagine the ways that HIM professionals may have been involved in these stages. Choose one of these stages and discuss how the HIM Director at one VA hospital cou..

  Difference between mass surveillance and targeted surveillan

What is the difference between mass surveillance and targeted surveillance?

  How long it would take to find all solutions to the problem

Implement the backtracking algorithm for the n-queens problem in the language of your choice. Run your program for a sample of n values to get the numbers of nodes in the algorithm's state-space trees.

  The design discipline continues the modeling process

The design discipline continues the modeling process by creating new models and expanding or refining business and requirements models. However, the purpose and nature of modeling changes.Though problematic with respect to updated releases of integra..

  Problem regarding the program life cycle

The process to develop software takes more than writing Visual Basic code. Software developers use the seven (7) steps of the Program Development Life Cycle. Select the two (2) steps that you believe are the most important in the cycle. Provide ex..

  Marketing communications planning

Managing and coordinating the complete communications practice calls for thorough marketing communications planning. It is important to identify the added value of an inclusive plan that assesses the tactical roles of an assortment of communicatio..

  What is propulsive efficiency

Is the effect of turbine and compressor irreversibilities of a turbojet engine to reduce the fuel consumption rate?

  Problems a team may encounter during a project life cycle

Discussion, consider some of the problems a team may encounter during a project life cycle: Question: What are some of the typical problems a project team may encounter during a project's life cycle?

  Describe how to change the typeface for each

Describe how to change the typeface for each of the following: text in an Alice dialog balloon or thought bubble, Alice 3D text, and text displayed by the Alice print instruction.: text in an Alice dialog balloon or thought bubble, Alice 3D text, ..

  Find last ant to fall off the rod

Find last ant to fall off the rod - Output a single integer which is the index (lower index in case two ants are falling simultaneously in the end) of the last ant to fall off.

  Do they state the same requirements with the same emphasis

Compare and contrast the code with the NSPE code (see Appendix), selecting three or four specific points to discuss. Do they state the same requirements with the same emphasis?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd