Top Selling Computer science Questions

Which of the following are true? (Choose two.) A. One line needs to be changed for this code to compile. B. Two lines need to be changed for this code to compile. C. Three lines need to be changed... Open the Electricity Solution.sln file contained in the VB2017\Chap09\Electricity Solution folder. Open the monthlyBills.txt file. Each of the 12 numbers in the file represents the cost of... In this exercise, you modify the Grade Calculator application from this chapters Apply lesson. Use Windows to make a copy of the Grade Solution folder. Rename the copy Grade Solution-Intermediate.... Assume a program requires the execution of 50 106 FP instructions, 110 106 INT instructions, 80 106 L/S instructions, and 16 106 branch instructions. The CPI for each type of instruction is 1, 1,... The results of the SPEC CPU 2006 bzip2 benchmark running on an AMD Barcelona has an instruction count of 2.389E12, an execution time of 750 s, and a reference time of 9650 s. 1. Find the CPI if the... Assume a color display using 8 bits for each of the primary colors (red, green, blue) per pixel and a frame size of 1280 1024. a. What is the minimum size in bytes of the frame buff er to store a... Another pitfall cited in Section 1.10 is expecting to improve the overall performance of a computer by improving only one aspect of the computer. Consider a computer running a program that requires... Th e table below shows 32-bit values of an array stored in memory. Address .............Data 24 ..........................2 38 ..........................4 32 ..........................3 36... Consider the following MIPS loop: 1. Assume that the register $t1 is initialized to the value 10. What is the value in register $s2 assuming $s2 is initially zero? 2. For each of the loops above,... Translate the following loop into C. Assume that the C-level integer i is held in register $t1, $s2 holds the C-level integer called result, and $s0 holds the base address of the integer MemArray.... What is 4365 - 3412 when these values represent signed 12-bit octal numbers stored in sign-magnitude format? The result should be written in octal. Show your work. Assume 151 and 214 are signed 8-bit decimal integers stored in twos complement format. Calculate 151 + 214 using saturating arithmetic. The result should be written in decimal. Show your work. Calculate (3.984375 10 - 1 + 3.4375 10 -1 ) + 1.771 10 3 by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 (and also described in the... Calculate (3.41796875 10 -3 6.34765625 10 -3 ) 1.05625 10 2 by hand, assuming each of the values are stored in the 16-bit half precision format described in Exercise 3.27 (and also described in... Give three different examples of a single Java statement that assigns variable, backup, to a new array with copies of all int entries of an existing array, original. Consider the following loop. Assume that perfect branch prediction is used (no stalls due to control hazards), that there are no delay slots, and that the pipeline has full forwarding support. Also... This exercise is intended to help you understand the relationship between forwarding, hazard detection, and ISA design. Problems in this exercise refer to the following sequence of instructions, and... Order the following functions by asymptotic growth rate. This exercise examines the accuracy of various branch predictors for the following repeating pattern (e.g., in a loop) of branch outcomes: T, NT, T, T, NT 1. What is the accuracy of always-taken and... Show that n is O(nlogn). In this exercise we compare the performance of 1-issue and 2-issue processors, taking into account program transformations that can be made to optimize for 2-issue execution. Problems in this... This exercise explores energy efficiency and its relationship with performance. Problems in this exercise assume the following energy consumption for activity in Instruction memory, Registers, and... In Section 5.2 we prove by induction that the number of lines printed by a call to drawInterval(c) is 2 c 1. Another interesting question is how many dashes are printed during that process. Prove by... Describe a recursive algorithmfor computing the n th Harmonic number, defined as H n = n k=1 1/k. Media applications that play audio or video files are part of a class of workloads called streaming workloads; i.e., they bring in large amounts of data but do not reuse much of it. Consider a video... Describe a recursive algorithm for finding the maximum element in an array, A, of n elements. What is your running time and space usage? Bob built a website and gave the URL only to his n friends, which he numbered from 1 to n. He told friend number i that he/she can visit the website at most i times. Now Bob has a counter, C, keeping... Th is Exercise examines the single error correcting, double error detecting (SEC/DED) Hamming code. 1. What is the minimum number of parity bits required to protect a 128-bit word using the SEC/DED... In this exercise, we will examine how replacement policies impact miss rate. Assume a 2-way set associative cache with 4 blocks. To solve the problems in this exercise, you may find it helpful to... For a high-performance system such as a B-tree index for a database, the page size is determined mainly by the data size and disk performance. Assume that on average a B-tree index page is 70% full... Give a justification of the running times shown in Table 7.1 for the methods of an array list implemented with a (nonexpanding) array. Suppose you are given an array, A, containing n distinct integers that are listed in increasing order. Given a number k, describe a recursive algorithm to find two integers in A that sum to k, if... Consider the set of keys K = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15}. a. Draw a (2,4) tree storing K as its keys using the fewest number of nodes. b. Draw a (2,4) tree storing K as its keys using the... The dining philosophers problem is a classic problem of synchronization and concurrency. The general problem is stated as philosophers sitting at a round table doing one of two things: eating or... The operation get(k) for our multimap ADT is responsible for returning a collection of all values currently associated with key k. Design a variation of binary search for performing this operation on... What is the expected running time of the methods for maintaining a maxima set if we insert n pairs such that each pair has lower cost and performance than one before it? What is contained in the... Although keys in a map are distinct, the binary search algorithm can be applied in a more general setting in which an array stores possibly duplicative elements in nondecreasing order. Consider the... Consider the following variant of the findIndex method of the SortedTableMap class, originally given in Code Fragment 10.11: Does this always produce the same result as the original version? Justify... Explain how the k largest elements from an unordered collection of size n can be found in time O(nlogk) using O(k) auxiliary space. Suppose two binary trees, T 1 and T 2 , hold entries satisfying the heap-order property (but not necessarily the complete binary tree property). Describe a method for combining T 1 and T 2 into a... Bill claims that a preorder traversal of a heap will list its keys in nondecreasing order. Draw an example of a heap that proves him wrong. At which positions of a heap might the largest key be stored? Let the rank of a position p during a traversal be defined such that the first element visited has rank 1, the second element visited has rank 2, and so on. For each position p in a tree T, let... Give an O(n)-time algorithm for computing the depths of all positions of a tree T, where n is the number of nodes of T. What are the minimum and maximum number of internal and external nodes in an improper binary tree with n nodes? Repeat the previous problem using the deque D and an initially empty stack S. Previous problem Suppose you have a deque D containing the numbers (1,2,3,4,5,6,7,8), in this order. Suppose further that... Consider an initially empty memory cache consisting of four pages. How many page misses does the FIFO algorithm incur on the following page request sequence: (2,3,4,1,2,5,1,3,5,4,1,2,3)? A company named RT&T has a network of n switching stations connected by m high-speed communication links. Each customers phone is directly connected to one station in his or her area. The engineers... Given an n-node complete binary tree T, rooted at a given position, consider a directed graph G having the nodes of T as its vertices. For each parent-child pair in T, create a directed edge in G... Let G be an undirected graph whose vertices are the integers 1 through 8, and let the adjacent vertices of each vertex be given by the table below: vertex adjacent vertices... Suppose we represent a graph G having n vertices and m edges with the edge list structure. Why, in this case, does the insertVertex method run in O(1) time while the removeVertex method runs in O(m)... Suppose S is a sequence of n values, each equal to 0 or 1. How long will it take to sort S with the merge-sort algorithm? What about quick-sort? If the outermost while loop of our implementation of quickSortInPlace (line 9 of Code Fragment 12.6) were changed to use condition left < right, instead of condition left /** Sort the subarray S[a.b]... Can we use a splay tree to sort n comparable elements in O(nlogn) time in the worst case? Why or why not? In the ring topology in Figure 1.7, what happens if one of the stations is unplugged? Figure 1.7 Repeater Repeater Repeater |Repeater Repeater Repeater We need to have a space-division switch with 1000 inputs and outputs. What is the total number of crosspoints in each of the following cases? a. Using a single crossbar. b. Using a multi-stage switch... Figure 8.27 shows a switch (router) in a datagram network. Find the output port for packets with the following destination addresses: a. Packet 1: 7176 b. Packet 2: 1233 Output Destination address... Define spread spectrum and its goal. List the two spread spectrum techniques discussed in this chapter. Which of the three multiplexing techniques is common for fiber-optic links? Explain the reason. In the analog hierarchy of Figure 6.9, find the overhead (extra bandwidth for guard band or control) in each hierarchy level (group, supergroup, master group, and jumbo group). Figure 6.9 48 kHz 12... Find the total number of channels in the corresponding band allocated by FCC. a. AM b. FM How many bits per baud can we send in each of the following cases if the signal constellation has one of the following number of points? a. 2 b. 4 c. 16 d. 1024 Draw the constellation diagram for the following cases. Find the peak amplitude value for each case and define the type of modulation (ASK, FSK, PSK, or QAM).The numbers in parentheses define the... What is the number of bits per baud for the following techniques? a. ASK with four different amplitudes b. FSK with eight different frequencies c. PSK with four different phases d. QAM with a... Calculate the bit rate for the given baud rate and type of modulation. a. 1000 baud, FSK b. 1000 baud, ASK c. 1000 baud, BPSK d. 1000 baud, 16-QAM What is the total delay (latency) for a frame of size 5 million bits that is being sent on a link with 10 routers each having a queuing time of 2 s and a processing time of 1 s. The length of the... Repeat Problem P4-3 for the 2B1Q scheme, but use the following data streams. a. 0000000000000000 b. 1111111111111111 c. 0101010101010101 d. 0011001100110011 Problem 4-3 Draw the graph of the NRZ-L... A signal with 200 milliwatts power passes through 10 devices, each with an average noise of 2 microwatts. What is the SNR? What is the SNRdB? A file contains 2 million bytes. How long does it take to download this file using a 56-Kbps channel? 1-Mbps channel? We measure the performance of a telephone line (4 KHz of bandwidth). When the signal is 10 V, the noise is 5 mV. What is the maximum data rate supported by this telephone line? A signal has passed through three cascaded amplifiers, each with a 4 dB gain. What is the total gain? How much is the signal amplified? A TV channel has a bandwidth of 6 MHz. If we send a digital signal using one channel, what are the data rates if we use one harmonic, three harmonics, and five harmonics? What does the Nyquist theorem have to do with communications? A periodic composite signal with a bandwidth of 2000 Hz is composed of two sine waves. The first one has a frequency of 100 Hz with a maximum amplitude of 20 V; the second one has a maximum amplitude... What is the bandwidth of a signal that can be decomposed into five sine waves with frequencies at 0, 20, 50, 100, and 200 Hz? All peak amplitudes are the same. Draw the bandwidth. Given the following periods, calculate the corresponding frequencies. a. 5 s b. 12 s c. 220 ns In the previous problem, assume Alice cannot find a direct flight from the Los Angeles to the Chicago. If she needs to change flights in Denver, a. Find the end-to-end addresses in this scenario. b.... Figure 9.7 shows a system as either a host or a router. What would be the actual entity (host or router) of system A and B in each of the following cases: Figure 9.7 a. If the link is the first one... Bit-stuff the following frame payload: 00011111110011111010001111 111110000111 In the traditional Ethernet protocol (Chapter 13), the frames are sent with the CRC. If the frame is corrupted, the receiving node just discards it. Is this an example of a Simple Protocol or the... Define piggybacking and its benefit. Compare and contrast HDLC with PPP. In Example 11.4 (Figure 11.13) how many frames are in transit at the same time? Figure 11.13 Sending node Receiving node Network Network Data-link Data-link Legend Packet Frame 0 Start the timer.... In the previous problem, we found that the probability of a station (in a G-station network) successfully sending a frame in a vulnerable time is P = e 2G for a pure Aloha and P = e G for a slotted... Stations in an slotted Aloha network send frames of size 1000 bits at the rate of 1 Mbps. What is the vulnerable time for this network? In a pure Aloha network with G = 1/2, how is the throughput affected in each of the following cases? a. G is increased to 1. b. G is decreased to 1/4. There are only three active stations in a slotted Aloha network: A, B, and C. Each station generates a frame in a time slot with the corresponding probabilities p A = 0.2, p B = 0.3, and p C = 0.4... Assume that there are only two stations, A and B, in a bus CSMA/CD network. The distance between the two stations is 2000 m and the propagation speed is 2 10 8 m/s. If station A starts transmitting... Referring to the CRC-8 polynomial in Table 10.7, answer the following questions: a. Does it detect a single error? Defend your answer. b. Does it detect a burst error of size 6? Defend your answer.... Show how the Fletcher algorithm (Figure 10.18) attaches weights to the data items when calculating the checksum. Figure 10.18 Notes Start L: Left 8-bit checksum R: Right 8-bit checksum R=L= 0 D;:... In CRC, we have chosen the generator 1100101. What is the probability of detecting a burst error of length a. 5? b. 7? c. 10? Referring to the CRC-8 in Table 5.4, answer the following questions: a. Does it detect a single error? Defend your answer. b. Does it detect a burst error of size 6? Defend your answer. c. What is... In CRC, which of the following generators (divisors) guarantees the detection of a single bit error? a. 101 b. 100 c. 1 A category of error detecting (and correcting) code, called the Hamming code, is a code in which d min = 3. This code can detect up to two errors (or correct one single error). In this code, the... If we want to be able to detect two-bit errors, what should be the minimum Hamming distance? In a codeword, we add two redundant bits to each 8-bit data word. Find the number of a. valid codewords. b. invalid codewords In a block code, a dataword is 20 bits and the corresponding codeword is 25 bits. What are the values of k, r, and n according to the definitions in the text? How many redundant bits are added to... What is the definition of a linear block code? How does a single-bit error differ from a burst error? The word protocol is often used to describe diplomatic relations. How does Wikipedia describe diplomatic protocol?
Showing 3500 - 3600 of 5000