Top Selling Computer science Questions

Use Rices theorem, which appears in Problem 5.28, to prove the undecidability of each of the following languages. Aa. INFINITE TM = {M| M is a TM and L(M) is an infinite language}. b. {M| M is a TM... Modify the algorithm shown earlier in Figure 1-5 so that it gives a 25% discount if the customer buying a TV is an employee of the store; all other customers buying a TV should receive a 15%... Jacob Weinstein wants a program that displays his savings account balance at the end of the month, given the beginning balance, total deposits, and total withdrawals. a. Using the chart shown earlier... When you execute the CompareLoopTimes program shown in Figure 6-29, you will occasionally see a negative number output when the nanoseconds values retrieved fall in different seconds. Modify the... Write regular expressions to capture the following. (a) Strings in C. These are delimited by double quotes ("), and may not contain newline characters. They may contain double-quote or backslash... Expanding on Example 1.25, trace an interpretation of the gcd program on the inputs 12 and 8. Which syntax tree nodes are visited, in which order? Example 1.25 Many interpreters use an annotated... Basic results from automata theory tell us that the language L = a n b n c n = , abc, aabbcc, aaabbbccc, . . . is not context free. It can be captured, however, using an attribute grammar. Give an... Write a while loop that uses an explicit iterator to accomplish the same thing as Exercise 7.3. Exercise 7.3. Write a for-each loop that calls the addInterest method on each BankAccount object in a... Compound interest means that you add the interest (say, 2%) to a starting balance (say, $100) for a period of time (say its a year) to get a new balance ($102.00 in this example). During the next... Modify the program in the previous exercise so that it reads the name of the file from the keyboard. Previous exercise Write a program that will write the Gettysburg Address to a text file. Place... Some software engineers believe that all imported entities should be qualified by the name of the exporting program unit. Do you agree? Support your answer. What would be gained if Java allowed stack-dynamic objects as well as heap-dynamic objects? What would be the disadvantage of having both? Write a program that produces a Caesar cipher of a given message string. A Caesar cipher, or rotation cipher, is formed by rotating each letter of a message by a given amount. For example, if you... Describe the issue of how closely the parameters of an overriding method must match those of the method it overrides. Write an interactive program that reads lines of input from the user and converts each line into Pig Latin. Pig Latin is English with the initial consonant sound moved to the end of each word,... Consider the following sorted array of integers. When a binary search is performed on this array for each of the following integer values, what indexes are examined in order? What result value is... Write a method called interleave that accepts a queue of integers as a parameter and rearranges the elements by alternating the elements from the first half of the queue with those from the second... What is the output of code corresponding to the following pseudocode? Declare Q[10,10] As Integer Declare R, C, As Integer 1; R What is the output of code corresponding to the following pseudocode if the user inputs 2, 3, 4, 5? = 0 Write Sums [Count] Set Count = Count - 1 End While Write a program that reads a Celsius degree in a double value from the console, then converts it to Fahrenheit, and displays the result. The formula for the conversion is as follows: fahrenheit = (9... Write a method called fromCounts that converts an ArrayIntList of counts into a new ArrayIntList of values as follows. Assume that the list stores a sequence of integer pairs that each pair indicates... Write a program that displays the dimensions of a letter-size (8.5 11 inches) sheet of paper in millimeters. There are 25.4 millimeters per inch. Use constants and comments in your program. In this exercise, you code an application that displays a grade based on the number of points entered by the user. The grading scale is shown in Figure 9-44. Open the VB2015\ Chap09\Perez... Write a program that prompts the user to enter the center coordinates, width, and height of two rectangles from the command line. The program displays the rectangles and a text indicating whether the... Discuss attribute semantics as an informal measure of goodness for a relation schema. What does the term unnormalized relation refer to? How did the normal forms develop historically from first normal form up to Boyce-Codd normal form? The Buffon Needle Experiment. The following experiment was devised by Comte Georges-Louis Leclerc de Buffon (17071788), a French naturalist. A needle of length 1 inch is dropped onto paper that is... When are two sets of functional dependencies equivalent? How can we determine their equivalence? Discuss how NULLs are treated in comparison operators in SQL. How are NULLs treated when aggregate functions are applied in an SQL query? How are NULLs treated if they exist in grouping attributes? Use the Internet to find three examples of corporate mission statements. Use BPMN to depict Hoosier Burgers inventory control system from Figure 7-15 as a business process model. Figure 7-15 Invoices Counts STOCK SUPPLIER ON HAND 1.0 2.0 Update Inventory Update Inventory... Consider this situation: The faculty at a university (FACULTY entity) can also be part of Board of Studies (BOARD entity). Is there a weak entity here? Why? Consider a database system for a baseball organization such as the major leagues. The data requirements are summarized as follows: The personnel involved in the league include players, coaches,... Consider the entity sets and attributes shown in the following table. Place a checkmark in one column in each row to indicate the relationship between the far left and far right columns. a. The left... Consider the EER design for the GRADE_BOOK database that was modeled using a tool like ERwin or Rational Rose in Laboratory Exercise 4.28. Using the SQL schema generation feature of the modeling... Convert the following decimal numbers into binary, using the method shown in Figure 1.6. (a) (20) 10 (b) (100) 10 (c) (129) 10 (d) (260) 10 (e) (10240) 10 Convert (857) 10 857 + 2 = 428 2 214 - 2 107... Design one sample data entry screen for a hotel registration system using the data entry guidelines provided in this chapter (Table 11-6). Support your design with arguments for each of the design... Modify the implementation of class Scores so that at most maxEnt/2 of the scores can come from any one single player. The value 137.68 can be held by a variable of type _____________. a. Int b. Short c. Double d. Byte Yummy Catering provides meals for parties and special events. Write a program that prompts the user for the number of guests attending an event and then computes the total price, which is $35 per... Several AI winters, or rapid collapses in levels of economic and academic activity (and media interest) associated with AI, have occurred. Describe the causes of each collapse and of the boom in... How do you think the theory of innovation diffusion can be applied to Elon Musks idea of underground tunnels and car elevators? When resulting in mostly intangible benefits, how would you rank a projects priority level against other projects with quantifiable outcomes? How can technical innovations or other innovations drive... In Section 7.1 we showed a digital system with three registers, R1 to R3, and we designed a control circuit that can be used to swap the contents of registers R1 and R2. Give an ASM chart that... List advantages and disadvantages for each of the System Development approaches discussed in the chapter. Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that prompts the user for the number of minutes the user rented a... Describe the essentials functions of Chief Information Officers in organizations. Assume the elevator of the Disney Tower of Terror E follows a Markovian process and has m floors at which it can stop. In the dead of night, you install a sensor S at the top of the shaft that gives... Consider a naive Bayes classifier with two features, shown below. We have prior information that the probability model can be parameterized by and p, as shown below: We have a training set that... Find the z-transform of the number sequence generated by sampling the time function e(t) = t every T seconds, beginning at t = 0 . Can you express this transform in closed form? Draw a truth table for the circuit in Figure P2.40 and explain what it does. FIGURE P2.30 A B P R C The temperature of a steel sphere with initial temperature \(T_{0}\) submerged in water with temperature \(T_{i}\) is governed by the initial-value problem \[R C \dot{T}+T=T_{i}, \quad T(0)=T_{0}\]... Write stubs for all the constructors and methods in the Student class of Figures 8.2a and 8.2b. Each stub should print the constructor or method name followed by the passed-in values of all... (a) Write, as a series, the z-transform of the number sequence generated by sampling the time function e(t) = t every T seconds, beginning at t = 0 . Can you express this transform in closed form?... 1. Write the specification for an ADT SquareMatrix. (A square matrix can be represented by a two-dimensional array with N rows and N columns.) You may assume a maximum size of 50 rows and columns.... Ocean water is processed in a desalinization plant on the coast and transported by a pipeline to a city water plant 60 km inland as shown in Figure P6.23. Fresh water flows in the horizontal pipeline... Section 1.10 cites as a pitfall the utilization of a subset of the performance equation as a performance metric. To illustrate this, consider the following two processors. P1 has a clock rate of 4... Aside from the smart cell phones used by a billion people, list and describe four other types of computers. Consider three diff erent processors P1, P2, and P3 executing the same instruction set. P1 has a 3 GHz clock rate and a CPI of 1.5. P2 has a 2.5 GHz clock rate and a CPI of 1.0. P3 has a 4.0 GHz... If the current value of the PC is 0x1FFFf000, can you use a single branch instruction to get to the PC address as shown in Exercise 2.39? Exercise 2.39 Write the MIPS assembly code that creates the... Assume 185 and 122 are signed 8-bit decimal integers stored in sign-magnitude format. Calculate 185 + 122. Is there overflow, underflow, or neither? Calculate the time necessary to perform a multiply using the approach described in the text (31 adders stacked vertically) if an integer is 8 bits wide and an adder takes 4 time units. Based on your answers to 3.38 and 3.39, does (1.666015625 10 0 1.9760 10 4 ) + (1.666015625 10 0 -1.9744 10 4 ) = 1.666015625 10 0 (1.9760 10 4 + -1.9744 10 4 )? If the bit pattern 00C000000 is placed into the Instruction Register, what MIPS instruction will be executed? Based on your answers to 3.35 and 3.36, does (3.41796875 10 -3 6.34765625 10 -3 ) 1.05625 10 2 = 3.41796875 10 -3 (6.34765625 10 -3 1.05625 10 2 )? Write a Java class that extends the Progression class so that each value in the progression is the absolute value of the difference between the previous two values. You should include a default... Give an implementation of the size( ) method for the SingularlyLinkedList class, assuming that we did not maintain size as an instance variable. Describe in detail how to swap two nodes x and y (and not just their contents) in a singly linked list L given references only to x and y. Repeat this exercise for the case when L is a doubly linked... Show that if d(n) is O( f (n)) and e(n) is O(g(n)), then the product d(n)e(n) is O( f (n)g(n)). Describe an algorithm for finding both the minimumand maximum of n numbers using fewer than 3n/2 comparisons. Describe an implementation of the positional list methods addLast and addBefore realized by using only methods in the set {isEmpty, first, last, before, after, addAfter, addFirst}. Draw the AVL tree resulting from the insertion of an entry with key 52 into the AVL tree of Figure 11.13b. 4 62 44 78) 50 88 48 54 T4 T2 (b) Our implementation of the treeSearch utility, from Code Fragment 11.3, relies on recursion. For a large unbalanced tree, it is possible that Javas call stack will reach its limit due to the recursive... Assuming the input to the sorting problem is given in an array A, describe how to implement the insertion-sort algorithm using only the array A and at most six additional (base-type) variables. Hillary claims that a postorder traversal of a heap will list its keys in nonincreasing order. Draw an example of a heap that proves her wrong. Draw an arithmetic expression tree that has four external nodes, storing the numbers 1, 5, 6, and 7 (with each number stored in a distinct external node, but not necessarily in this order), and has... Had the queue of the previous problembeen an instance of the ArrayQueue class, from Code Fragment 6.10, with capacity 30 never exceeded, what would be the final value of the instance variable f? Suppose an initially empty queue Q has performed a total of 32 enqueue operations, 10 first operations, and 15 dequeue operations, 5 of which returned null to indicate an empty queue. What is the... Given a sequence S of n elements, on which a total order relation is defined, describe an efficient method for determining whether there are two equal elements in S. What is the running time of your... Describe and analyze an efficient method for removing all duplicates from a collection A of n elements. List some application-layer protocols mentioned in this chapter Assume a system uses five protocol layers. If the application program creates a message of 100 bytes and each layer (including the fifth and the first) adds a header of 10 bytes to the data unit,... How many point-to-point WANs are needed to connect n LANs if each LAN should be able to directly communicate with any other LAN? What are some of the factors that determine whether a communication system is a LAN or WAN? Identify the five components of a data communications system. What is the maximum number of characters or symbols that can be represented by Unicode? For each of the following four networks, discuss the consequences if a connection fails. a. Five devices arranged in a mesh topology b. Five devices arranged in a star topology (not counting the hub)... Compare the telephone network and the Internet. What are the similarities? What are the differences? The minimum number of columns in a datagram network is two; the minimum number of columns in a virtual-circuit network is four. Can you explain the reason? Is the difference related to the type of... A path in a digital circuit-switched network has a data rate of 1 Mbps. The exchange of 1000 bits is required for the setup and teardown phases. The distance between two parties is 5000 km. Answer... What is the difference between omnidirectional waves and unidirectional waves? Using Figure 7.9, tabulate the attenuation (in dB) of a 2.6/9.5 mm coaxial cable for the indicated frequencies and distances. Table 7.6 Attenuation for 2.6/9.5 mm coaxial cable dB at 1 KHz dB at 100... Two channels, one with a bit rate of 190 kbps and another with a bit rate of 180 kbps, are to be multiplexed using pulse-stuffing TDM with no synchronization bits. Answer the following questions: a.... Find the bandwidth for the following situations if we need to modulate a 5-KHz voice. a. AM b. FM ( = 5) c. PM ( = 1) A corporation has a medium with a 1-MHz bandwidth (lowpass). The corporation needs to create 10 separate independent channels each capable of sending at least 10 Mbps. The company has decided to use... Which characteristics of an analog signal are changed to represent the lowpass analog signal in each of the following analog-to-analog conversions? a. AM b. FM c. PM Define analog-to-analog conversion. What are the two components of a signal when the signal is represented on a constellation diagram? Which component is shown on the horizontal axis? Which is shown on the vertical axis? Which characteristics of an analog signal are changed to represent the digital signal in each of the following digital-to-analog conversions? a. ASK b. FSK c. PSK d. QAM If the power at the beginning of a 1 Km 2.6/9.5 mm coaxial cable is 200 mw, what is the power at the end for frequencies 1 KHz, 10 KHz, and 100 KHz? Use the results of Problem P7-4.
Showing 2700 - 2800 of 5000