




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Material Type: Exam; Class: Survey of Info Technology; Subject: Computer Science; University: Siena College; Term: Fall 2003;
Typology: Exams
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Name:_____________________________________________________ Using a Huffman-coding-like scheme compress the following text: beth_beyer_buys_brueggers_bagels Show your solution by answering the following questions: First, how many bits would it take to store the text message without using compression? Answer ___________bits Next, list each symbol in descending order of frequency (most frequent to least frequent) Symbol Frequency e 6 b 5 _ 4 g 3 r 3 s 3 y 2 u 2 l 1 a 1 t 1 h 1 Use the following tree and pick the most appropriate encoding for each symbol. Note: there are several correct ways to pick the encoding such that the original message is efficiently compressed. Just try not to pick an inefficient encoding. What binary encoding did you select for the symbol ‘e’ Answer 0 What binary encoding did you select for the symbol ‘a’ Any 6 digit encoding Using the coding you selected, how many bits will it take to store the compressed message? Answer 125 bits
0 1 0 1 0 1 0 1 0 1 0 1 e b _ g r s y u l a t h
Name:_____________________________________________________ Give an example of a general scenario where a text file can not be compressed? If the symbol counts are uniform If the file contains all 256 ascii symbols If the file is very small, encoding the tree will take up more space than the compressed file Given the following encoding tree, encode the following message? she_sells Show the binary encoding in the table below: 0 0 0 1 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 0 1 0 0 0 Is this the tree above the most efficient way to encode the following message? she_sells_sea_shells_at_the_sea Obviously the answer is no! Suggest at least one change to the tree that would make the encoding more efficient. For extra credit, instead of suggesting one change, try drawing a more efficient encoding tree below. The ‘e’ and the ‘h’ should be swapped.
s h l a e (^) o t _
Name:_____________________________________________________ Given the following code: function MsgBox (textstring) { alert (textstring); } MsgBox is (a) A Function Name (b) A Variable (c) Both (d) Neither (Circle one answer) alert is (a) A Function Name (b) A Variable (c) Both (d) Neither (Circle one answer) textstring (a) A Function Name (b) A Variable (c) Both (d) Neither (Circle one answer) Write the html code to create two buttons. The first button is named “okbutton” and should look like this: The second button is named “cancelbutton” and should look like this: When the okbutton is clicked the function “doit( )” should be called. When the cancelbutton is cliced the function “stopit( )” should be called. Note you only need to write the two HTML tags that create the two buttons. Answer:
Name:_____________________________________________________ Give examples of at least five different methods that were used in lab 8
Name:_____________________________________________________
Name:_____________________________________________________ Describe the basic difference between Client-side processing vs. Server-side processing. In client side processing, the user’s computer actually performs the work. The raw data is sent to the user’s computers, and the user’s computer does the work to produce a finished document. In server side processing, the server (web server or application server) performs the processing. The finished information (usually a webpage) is transmitted to the user. Describe the advantages of using client-side processing in terms of efficiency? Client-side processing doesn’t bog down the server with processing for multiple users. For a site like ebay there could be millions of users connected at one time. Describe a basic scenario or example where server-side processing is necessary. Server-side processing is absolutely required for retrieving data from a central database, or for updating global information (i.e., information available for all users).