1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
eimsori [14]
3 years ago
5

Here's the same compressed text that you saw on the last level, but now we also see the size of the original, uncompressed text.

On the previous level you reconstructed the text by tracing back through the dictionary. Now we're going to think about if this is a "good" compression rate.
Compressed Dictionary: bu the Compressed text size: 17 bytes Dictionary size: 26 bytes Total: 43 bytes Original text size: 58 bytes
In the text box below, answer the following two questions:
What is the compression rate? The compression rate says by how much the text was compressed from the original as a percentage. Don't forget that the compressed version of the text is the compressed text size + dictionary size. (see note below)
Is this a "good" compression rate? Why or why not?
(NOTE: to calculate, the compression rate is slightly different than simply stating the compressed size as a fraction of the original. It's just opposite sides of the same coin. For example: if you find the compressed text + dictionary size is 70% of the original, that means the text was compressed by 30%.)
Computers and Technology
1 answer:
SSSSS [86.1K]3 years ago
3 0

Answer and Explanation:

The compression rate says by how much the text was compressed from the original as a percentage. Don't forget that the compressed version of the text is the compressed text size + dictionary size.

From the given picture:

compressed text size = 17 bytes

dictionary size = 26 bytes

compressed text size + dictionary size = 17 + 26 = 43 bytes

original test size = 58 bytes

compression rate as percentage = (43 / 58) * 100 = 74.14% ( rounded to two decimal )

Space savings = 100 - compression rate

= 100 - 74.14 = 25.86%

Is this a "good" compression rate? Why or why not?

Compression data is a heuristic problem. It’s hard to say the exact compression rate that is good or bad. If you feel satisfied by ~ 26% of compression, then it is a good compression rate.

The compression rate above frees up 26% space for you, so that you can put additional information

without losing information. In that way it is a good compression rate.

You might be interested in
"Unicorn designs Inc., a software company, requires its employees to wear a specific color every day of the week. The colors for
marishachu [46]

Answer:

Organizational culture

Explanation:

Organizational culture is a system of shared assumptions, values, and beliefs, which governs how people behave in organizations. These shared values have a strong influence on the people in the organization and dictate how they dress, act, and perform their jobs.

8 0
3 years ago
Read 2 more answers
When should you use the Reply All function when replying to an email
Dmitrij [34]
When the email was sent as a group email 

5 0
3 years ago
Read 2 more answers
This program will store roster and rating information for a soccer team. Coaches rate players during tryouts to ensure a balance
aksik [14]

Answer:

import java.util.Scanner;

public class TeamRoster {

  public static void main(String[] args) {

     Scanner scan = new Scanner(System.in);

     int[][] players = new int[5][2];

     boolean keepAlive = true;

     char input;

     

     for (int i = 0; i < 5; i++) {

        System.out.println("Enter player " + (i+1) + "'s jersey number: ");

        players[i][0] = scan.nextInt();

        if( players[i][0] >= 0 && players[i][0] < 100 ) {

             System.out.println("Enter player number less than 100");

               System.out.println("Enter player " + (i+1) + "'s rating: ");

               players[i][1] = scan.nextInt();

               if ( players[i][1] >= 1 && players[i][1] <10 ) {

                     System.out.println();

               }    else {

                     System.out.println("Enter player " + (i+1) + "'s rating: ");

                     players[i][1] = scan.nextInt();

               }

     }

     }

     System.out.println();

     outputRoster(players, 0);

     

     while (keepAlive) {

        outputMenu();

        input = scan.next().charAt(0);

        if (input == 'q') {

           keepAlive = false;

           break;

        } else if (input == 'o') {

           outputRoster(players, 0);

        } else if (input == 'u') {

           System.out.println("Enter a jersey number: ");

           int jerseyNum = scan.nextInt();

           System.out.println("Enter a new rating for the player: ");

           int newRating = scan.nextInt();

           for (int l = 0; l < 5; l++) {

              if (players[l][0] == jerseyNum) {

                 players[l][1] = newRating;

              }

           }

        } else if (input == 'a') {

           System.out.println("Enter a rating: ");

           int rating = scan.nextInt();

           outputRoster(players, rating);

        } else if (input == 'r') {

           System.out.println("Enter a jersey number: ");

           int jerseyNum = scan.nextInt();

           boolean exists = true;

           for (int l = 0; l < 5; l++) {

              if (players[l][0] == jerseyNum) {

                 System.out.println("Enter a new jersey number: ");

                 players[l][0] = scan.nextInt();

                 System.out.println("Enter a rating for the new player: ");

                 players[l][1] = scan.nextInt();

              }

           }

           

        }

     }

     

     return;

  }

   

  public static void outputRoster(int[][] players, int min) {

     System.out.println(((min>0) ? ("ABOVE " + min) : ("ROSTER")));

     int item = 1;

     for (int[] player : players) {

        if (player[1] > min) {

           System.out.println("Player " + item + " -- Jersey number: " + player[0] + ", Rating: " + player[1]);

        }

        item++;

     }

     System.out.println();

  }

   

  public static void outputMenu() {

     System.out.println("MENU");

     System.out.println("u - Update player rating");

     System.out.println("a - Output players above a rating");

     System.out.println("r - Replace player");

     System.out.println("o - Output roster");

     System.out.println("q - Quit\n");

     System.out.println("Choose an option: ");  

  }

}

Explanation:

The program is written in Java.

It is a bit straightforward.

The Scanner module is declared and used to collect input from the user.

The program prompts the user for each player jersey then rating.

All five players details are collected.

The program shows the output of all the entries.

5 0
3 years ago
network consisting of computers and other devices that are eithrr fully or partially connected to each other
tekilochka [14]

The answer is a Mesh topology. This method connects every device to each other device in the network. A wired full-mesh topology is not as common as it is impractical and highly expensive. A partial mesh topology offers redundancy if one of the connections goes down and usually uses a connecting medium such as a router to eliminate cables and expensive PCI NIC's.

8 0
3 years ago
5 examples of a linear motion in object.
NNADVOKAT [17]

An example of linear motion is an athlete running 100m along a straight track. Linear motion is the most basic of all motion. ... Neglecting the rotation and other motions of the Earth, an example of linear motion is the ball thrown straight up and falling back straight down.


3 0
3 years ago
Other questions:
  • Which of the following should be considered when conducting an audience analysis ?
    13·2 answers
  • Examples of apps include pop-up windows, validation of webform inpts and images that change when a cursor passes over them
    12·1 answer
  • Implement the function:
    6·1 answer
  • Which of the selections below is not a benefit of imaging the computers on your network? There are fewer licensing fees because
    11·1 answer
  • An IP address in the form 197.169.100.1 is called a(n) ________. dotted quad encryption key random number sequential access numb
    7·1 answer
  • Computer Science uses the power of ______________ to solve problems.
    10·1 answer
  • Write a method named lastIndexOf that accepts an array of integers and an * integer value as its parameters and returns the last
    15·1 answer
  • Perceptron simplest definition
    14·1 answer
  • What is the extension of a Microsoft access database 2013​
    7·2 answers
  • How is information processed within a<br> motherboard between the hard drive, CPU and RAM,
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!