Show that the Bellman-Ford algorithm, when run on the constraint graph for a system Ax b of difference constraints, minimizes the quantity (max {x i } min {x i }) subject to Ax b. Explain how this...
Prove that matrix inverses are unique, that is, if B and C are inverses of A, then B = C.
Revise the program in Listing 21.7. If a keyword is in a comment or in a string, don?t count it. Pass the Java file name from the command line. Assume that the Java source code is correct and line...
Write a short Java method, inputAllBaseTypes, that inputs a different value of each base type from the standard input device and prints it back to the standard output device.
Write a GUI application that lets the user enter a file name in the text field and press the Enter key to display its binary representation in a text area. The user can also modify the binary code...
Write a program that can dynamically change the font of a text in a label displayed on a stack pane. The text can be displayed in bold and italic at the same time. You can select the font name or...
Define the following methods in MyList and implement them in MyAbstractList: Write a test program that creates two MyArrayLists, list1 and list2, with the initial values {"Tom", "George", "Peter",...
Describe a way to use recursion to compute the sum of all the elements in an nn (two-dimensional) array of integers.
Write a recursive method that will output all the subsets of a set of n elements (without repeating any subsets).
Give a recursive definition of a singly linked list class that does not use any Node class.
Let H be a heap storing 15 entries using the array-based representation of a complete binary tree. What is the sequence of indices of the array that are visited in a preorder traversal of H? What...
Draw the binary tree representation of the following arithmetic expression: (((5+2) (21))/((2+9)+((72)1)) 8).
Write a program that takes as input a fully parenthesized, arithmetic expression and converts it to a binary expression tree. Your program should display the tree in some way and also print the value...
Linda claims to have an algorithm that takes an input sequence S and produces an output sequence T that is a sorting of the n elements in S. a. Give an algorithm, isSorted, that tests in O(n) time if...
Suppose we are given two sequences A and B of n elements, possibly containing duplicates, on which a total order relation is defined. Describe an efficient algorithm for determining if A and B...
Modify GraphView in Listing 28.6 to add a new data field tree with a set method. The edges in the tree are displayed in red. Write a program that displays the graph in Figure 28.1 and the DFS/BFS...
Draw a simple, connected, undirected, weighted graph with 8 vertices and 16 edges, each with unique edge weights. Illustrate the execution of the Prim-Jarnik algorithm for computing the minimum...
Let G be an undirected graph with n vertices and m edges. Describe an O(n+m)-time algorithm for traversing each edge of G exactly once in each direction.
Create a sample XML document and DTD for the exchange of student transcript data. Use your college transcript as a sample.
Explain and contrast the differences and similarities between the DBA and DA.
Describe the activities that are typically associated with the design and implementation services of the DBA technical function. What technical skills are desirable in the DBA's personnel?
Using SQL statements, give some examples of how you would use the data dictionary to monitor the security of the database.
The square of a directed graph G = (V, E) is the graph G 2 = (V, E 2 ) such that (u, ) E 2 if and only G contains a path with at most two edges between u and . Describe efficient algorithms for...
Can edge list E be omitted from the adjacency matrix representation while still achieving the time bounds given in Table 14.1? Why or why not? Edge List | Adj. List O(1) 0(1) O(n) O(m) O(m) O(m) Adj....
Repeat Exercise R-14.28 for Figure 14.11 illustrating the Floyd-Warshall algorithm. Repeat Exercise Describe the meaning of the graphical conventions used in Figure 14.9 illustrating a DFS traversal....
Many system architects base their IT system designs on an n-tier architecture, where n is a number with value 2 or greater. Explain the difference between a single-tier architecture and an n-tier...
The definition of an operating system specifies two primary purposes served by the operating system. What are they?
Describe the contents and format of a free space bitmap.
Design a survey form of your own. Fill it out as it might have been completed during the database design forHenry Books. For any questions you have too little information to answer, make a reasonable...
Use a TextArea, and its setText() and append() methods to write an application that allows the user to select options for a dormitory room. Use CheckBoxes for options such as private room, Internet...
In what common situation is the document returned by a Web server created after the request is received?
The Donut Shoppe sells four varieties of doughnuts: Glazed ($1.05), Sugar ($1.05), Chocolate ($1.25), and Filled ($1.50). It also sells regular coffee ($1.50) and cappuccino ($2.75). The store...
If the strName variable contains the string Sharon Kelper, which of the following changes the contents of the variable to the string Sharon P. Kelper? a. strName = strName.Insert(6, " P.") b. strName...
Which of the following statements assigns the first four characters in the strItem variable to the strWarehouse variable? a. strWarehouse = strItem.Assign(0, 4) b. strWarehouse = strItem.Assign(1, 4)...
If the strWord variable contains the string crispy, which of the following statements assigns the letter s to the strLetter variable? a. strLetter = strWord.Substring(3) b. strLetter =...
Which of the following statements changes the contents of the strZip variable from 60521 to 60461? a. strZip = strZip.Insert(2, "46") strZip = strZip.Remove(4, 2) b. strZip = strZip.Remove(2) strZip...
Which of the following statements changes the contents of the strSocSec variable from 000-11-2222 to 000112222? a. strSocSec = strSocSec.Remove("") b. strSocSec = strSocSec.RemoveAll("") c. strSocSec...
Which of the following statements generates a random integer from 1 to 25 (including 25)? a. intNum = randGen.Next(1, 25) b. intNum = randGen.Next(1, 26) c. intNum = randGen(1, 25) d. intNum =...
Which of the following statements enables the btnClear control? a. btnClear.Enabled() b. btnClear.Enabled = Yes c. btnClear.Enabled = True d. btnClear.Enable = True
In this exercise, you modify the Password application from this chapters Apply lesson. Use Windows to make a copy of the Password Solution folder. Rename the copy Modified Password Solution. Open the...
In this exercise, you modify the Password application from this chapters Apply lesson. Use Windows to make a copy of the Password Solution folder. Rename the copy Password Solution-Index. Open the...
The strNames array contains 100 elements. Which of the following statements assigns the number 99 to the intLastSub variable? a. intLastSub = strNames.Length b. intLastSub = strNames.GetUpperBound(0)...
Which of the following declares a two-dimensional array that has four rows and three columns? a. Dim decNums(2, 3) As Decimal b. Dim decNums(3, 4) As Decimal c. Dim decNums(3, 2) As Decimal d. Dim...
The intNums array is declared as follows: Dim intNums() As Integer = {10, 5, 7, 2}. Which of the following blocks of code correctly calculates the average value stored in the array? The intTotal...
What must be done to text before it can be animated?
Write an HTML document to create a form that collects favorite popular songs, including the name of the song, the composer, and the performing artist or group. This document must call one PHP script...
Which of the following assigns the number 0 to each element in a two-row, four-column Integer array named intSums? a. For intRow As Integer = 0 To 1 For intCol As Integer = 0 To 3 intSums(intRow,...
Which of the following returns the highest column subscript in a two-dimensional array named decPays? a. decPays.GetUpperBound(1) b. decPays.GetUpperBound(0) c. decPays.GetUpperSubscript(0) d....
Explain why the callback function is written as an anonymous function in the request phase function.
How are beans used by JSP applications?
Consider the calculation of roots of an equation z N = where N 1 is an integer and = e j a nonzero complex number. (a) First verify that there are exactly N roots for this equation and that they...
The geometric series
Consider a signal x(t) = 4cos(2t) defined for < t < . For the following values of the sampling period T s generate a discretetime signal x(n) = x(nT s ) = x(t) t=nTs . (i) T s = 0.1, (ii) T s =...
While walking down a dark alley, Ben Bit diddle encounters a two input gate with the transfer function shown in Figure 1.48. The inputs are A and B and the output is Y. A Figure 1.48 Two-Input DC...
Build a 32-bit synchronous Up/Down counter. The inputs are Reset and Up. When Reset is 1, the outputs are all 0. Otherwise, when Up = 1, the circuit counts up, and when Up = 0, the circuit counts...
Implement the following functions using a single 16 3 ROM. Use dot notation to indicate the ROM contents. (a) X = AB +BCD + AB (b) Y = AB +BD (c) Z = A +B+ C + D
2 Implement the functions from Exercise 5.51 using a 4 8 3 PLA. You may use dot notation.
Give three examples from the MIPS architecture of each of the architecture design principles: (1) simplicity favors regularity (2) make the common case fast (3) smaller is faster (4) good design...
Explain how the following program can be used to determine whether a computer is big-endian or little-endian:? li $t0, 0XABCD9876 Sw $t0, 100( $0) lb $s5, 101($0)
Write an HDL module for the soda machine dispenser from Exercise 3.26. Data from problem 3.26 You have been enlisted to design a soda machine dispenser for your department lounge. Sodas are partially...
In less than one page, describe four everyday activities that exhibit temporal or spatial locality. List two activities for each type of locality, and be specific.
Repeat Exercise 8.9 for the following repeating sequence of lw addresses (given in hexadecimal) and cache configurations. The cache capacity is still 16 words. 74 A0 78 38C AC 84 88 8C 7C 34 38 13C...
Using a diagram similar to Figure 7.52, show the forwarding and stalls needed to execute the following instructions on the pipelined MIPS processor.? add $t0, $s0, $s1 sub $t0, $t0, $s2 $t1, 60( $t0)...
Write a SQL statement to display all columns of all rows of PET. Do not use the asterisk (*) notation. PET_OWNER ( OwnerID , OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail) PET ( PetID ,...
The James River Jewelry Project Questions are available online for Appendix D, which can be downloaded from the textbook?s Web site: www.pearsonhighered.com/kroenke . The solutions for these...
Write a SQL statement to display the breed and type of all pets. PET_OWNER ( OwnerID , OwnerLastName, OwnerFirstName, OwnerPhone, OwnerEmail) PET ( PetID , PetName, PetType, PetBreed, PetDOB,?...
Write an SQL statement to display the OwnerLastName, OwnerFirstName, PetName, PetType, PetBreed, and AverageLifeExpectancy for pets with a known PetBreed. PET_OWNER ( OwnerID , OwnerLastName,...
Show that the summation ENog, i] is O(n log n)
Show that the summation . You may assume that n is a power of 2. E log2(n/i)] is O(n)
In Chapter 14, you created an interactive GUI version of Carlys Catering. Now, rewrite the program using JavaFX and Scene Builder. Allow the user to enter the number of guests for an event into a...
In Chapter 14, you created an interactive GUI version for Sammys Seashore Rentals. Now, rewrite the program using JavaFX and Scene Builder that allows the user to enter a rental time in hours into a...
Order the following list of functions by the big-Oh notation. Group together (for example, by underlining) those functions that are big-Theta of one another.
Which of the following is not an E-R model relationship? a. Some-to-many b. One-to-one c. One-to-many d. Many-to-many
Why are functions in this chapter referred to as single-row functions?
Whats the name of the table provided by Oracle 11g for completing queries that dont involve a table? a. DUMDUM b. DUAL c. ORAC d. SYS
Create and execute SQL statements to perform the following actions, using the JustLee Books database: 1. Create a new user account. The account name should be a combination of your first initial and...
Describe the structure and pseudocode for an array-based implementation of an index-based list that achieves O(1) time for insertions and removals at index 0, as well as insertions and removals at...
Give an O(n)-time algorithm for computing the depth of all the nodes of a tree T, where n is the number of nodes of T.
Suppose you are given the array A = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], and you then perform the binary search algorithm given in this chapter to find the number 8. Which numbers in the array A...
Suppose you work for a computer game company, which is designing a first person shooting game. In this game, players stand just outside of a circular playing field and shoot at targets inside the...
Perform a similar analysis for method Loop3 shown in Algorithm 1.21. Algorithm Loop1(n): s-0 for i + 1 to n do s-s+i Algorithm Loop2(n): p-1 for i - 1 to 2n do p-p.i Algorithm Loop3(n): p-1 for i +1...
How many walls were erased to construct the maze in Figure 7.3, not counting the start and finish walls? Figure 7.3
Let A be a collection of objects. Describe an efficient method for converting A into a set. That is, remove all duplicates from A. What is the running time of this method?
Sports announcers are expected to keep talking during a broadcast of a sporting event even when there is nothing actually happening, such as during half-time. One common way to fill empty time is...
Another problem of interest in percolation theory is to determine the threshold probability where a liquid will permeate a porous material. One way to model this is to consider the barriers between...
Suppose we have 20 singleton sets, numbered 0 through 19, and we call the operation union(find(i),find(i + 5)), for i = 0, 1, 2,..., 14. Draw a picture of a tree-based representation of the sets that...
Provide an example instance of the fractional knapsack problem where a greedy strategy based on repeatedly choosing as much of the highest-benefit item as possible results in a suboptimal solution.
Suppose we are given a set of tasks specified by pairs of the start times and finish times as T = {(1, 2),(1, 3),(1, 4),(2, 5),(3, 7),(4, 9),(5, 6),(6, 8),(7, 9)}. Solve the task scheduling problem...
Suppose that the coins of the fictional country of Combinatoria come in the denominations, d 1 , d 2 ,...,d k , where d 1 = 1 and the other d i values form a set of distinct integers greater than 1....
Sally is hosting an Internet auction to sell n widgets. She receives m bids, each of the form I want k i widgets for d i dollars, for i = 1, 2,...,m. Characterize her optimization problem as a...
Tamarindo University and many other schools worldwide are doing a joint project on multimedia. A computer network is built to connect these schools using communication links that form a free tree....
Show that every language L in P is polynomial-time reducible to the language M = {5}, that is, the language that simply asks whether the binary encoding of the input is equal to 5.
Show how to construct a Boolean circuit C such that, if we create variables only for the inputs of C and then try to build a Boolean formula that is equivalent to C, then we will create a formula...
Consider the problem DNF-DISSAT, which takes a Boolean formula S in disjunctive normal form (DNF) as input and asks whether S is dissatisfiable, that is, there is an assignment of Boolean values to...
Suppose the football coach for the Anteaters has heard about your abilities to solve challenging problems and has hired you to write a computer program that can decide which of their many trophies to...
Draw an example of a graph with 10 vertices and 15 edges that has a clique of size 6.
Given a set P of n points, design an efficient algorithm for constructing a simple polygon whose vertices are the points of P.
Show how to modify the KMP string pattern matching algorithm so as to find every occurrence of a pattern string P that appears as a substring in T, while still running in O(n + m) time. (Be sure to...
Using only the instructions shown in Figure 1-10, create an algorithm that displays the average of four numbers. Be sure to indent the instructions appropriately. calculate the average by dividing...
A program uses a char variable named department and two double variables named salary and raise. The department variable contains one of the following letters (entered in either uppercase or...