Rewrite the grammar of Arithlang to avoid having to duplicate the common form ExpExp+.
You are the latest contestant on Monty Halls game show, which has undergone a few changes over the years. In the game, there are n closed doors: behind one door is a car (U(car) = 1000), while the...
Use anonymous FTP to connect to ftp.rfc-editor.org (directory innotes), and retrieve the RFC index. Also retrieve the protocol specifications for TCP, IP, and UDP.
One queue implementation discussed in this chapter dedicated an unused cell before the front of the queue to distinguish between a full queue and an empty queue. Write another queue implementation...
For each code sequence below, state whether it must stall, can avoid stalls using only forwarding, or can execute without stalling or forwarding. Sequence 1 Inst0,0(3t) add $t1, $t0, sto Sequence 2...
(a) A sinusoid with a frequency of 2 Hz is applied to a sampler/zero-order hold combination. The sampling rate is 10 Hz. List all the frequencies present in the output that are less than 50 Hz. (b)...
The state diagram in Figure P2.51 describes a system with states A, B, and C. The system is initialized in State A. The state transition notation x/yz indicates that an input x causes a transition in...
One technique for limiting fault current is to place reactance in series with the generators. Such reactance can be modeled in PowerWorld Simulator by increasing the value of the generator's positive...
lw is the instruction with the longest latency on the CPU from Section 4.4. If we modified lw and sw so that there was no offset (i.e., the address to be loaded from/stored to must be calculated and...
Right before your function f from Exercise 2.34 returns, what do we know about contents of registers $t5, $s3, $ra, and $sp? Keep in mind that we know what the entire function f looks like, but for...
Using a table similar to that shown in Figure 3.6, calculate the product of the hexadecimal unsigned 8-bit integers 62 and 12 using the hardware described in Figure 3.5. You should show the contents...
Consider the inheritance of classes from Exercise R-2.12, and let d be an object variable of type Horse. If d refers to an actual object of type Equestrian, can it be cast to the class Racer? Why or...
The use of null values in a map is problematic, as there is then no way to differentiate whether a null value returned by the call get(k) represents the legitimate value of an entry (k,null), or...
Assume that a private internet requires that the messages at the application layer be encrypted and decrypted for security purposes. If we need to add some information about the encryption/decryption...
Byte-stuff the following frame payload in which E is the escape byte, F is the flag byte, and D is a data byte other than an escape or a flag character. DEDDF D D E|ED F|D
Assume a new character-oriented protocol is using the 16-bit Unicode as the character set. What should the size of the flag be in this protocol?
A multiple access network with a large number of stations can be analyzed using the Poisson distribution. When there is a limited number of stations in a network, we need to use another approach for...
Consider the circuit-switched network in Figure 1.13. Recall that there are 4 circuits on each link. Label the four switches A, B, C, and D, going in the clockwise direction. a. What is the maximum...
Compute the fraction of the bandwidth that is wasted on overhead (headers and re-transmissions) for protocol 6 on a heavily loaded 50-kbps satellite channel with data frames consisting of 40 header...
What is the first principle we discussed in this chapter for protocol layering that needs to be followed to make the communication bidirectional?
We mentioned that two types of networks, datagram and virtual-circuit, need a routing or switching table to find the output port from which the information belonging to a destination should be sent...
Suppose you are to design a LAN for a company that has 100 employees, each given a desktop computer attached to the LAN. What should be the data rate of the LAN if the typical use of the LAN is shown...
In an 802.11 network, three stations (A, B, and C) are contending to access the medium. The contention window for each station has 31 slots. Station A randomly picks up the first slot; station B...
Assume that the network in Figure 20.34 uses distance-vector routing with the forwarding table as shown for each node. Figure 20.34 If each node periodically announces their vectors to the neighbor...
Assume a router using RIP has 10 entries in its forwarding table at time t 1 . Six of these entries are still valid at time t 2 . Four of these entries have been expired 70, 90, 110, and 210 seconds...
Write a program to simulate the sending-site FSMs for the simple protocol (Figure 23.18). Figure 23.18 FSMS for the simple protocol Request came from application. Packet arrived. Make a packet and...
In a connection, the value of cwnd is 3000 and the value of rwnd is 5000. The host has sent 2000 bytes, which have not been acknowledged. How many more bytes can be sent?
Repeat Example 25.4 using the service of TCP.
Explain how a UDP client program (Table 25.13) sleeps until the response comes from the server. Table 25.13 A simple UDP client program 1 import java.net.*; 2 import java.io.*: 3. 4 public class...
Write a statement in Java to create a socket address bound to InetSocketAddress and the TELNET server process.
You think that a computer with the domain name aCollege.edu has several IP addresses. Write a statement in Java to create an array of InetAddress objects associated with this host.
Which clause is required in a SELECT statement? a. WHERE b. ORDER BY c. GROUP BY d. FROM e. all of the above
Which of the following queries creates a Cartesian join? a. SELECT title, authorid FROM books, bookauthor; b. SELECT title, name FROM books CROSS JOIN publisher; c. SELECT title, gift FROM books...
Which functions can be used to convert the letter case of character values?
Which of the following functions cant be used to convert the letter case of a character string? a. UPPER b. LOWER c. INITIALCAP d. All of the above can be used for case conversion.
Which of the following is a valid SQL statement? a. SELECT TRUNC (ROUND (125.38, 1), 0) FROM dual; b. SELECT ROUND (TRUNC (125.38, 0) FROM dual; c. SELECT LTRIM(LPAD (state, 5, ' '), 4, -3, "*") FROM...
JustLee Books has a problem: Book storage space is filling up. As a solution, management is considering limiting the inventory to only those books returning at least a 55% profit. Any book returning...
Which of the following SELECT statements lists only the book with the largest profit? a. SELECT title, MAX (retail-cost) FROM books GROUP BY title; b. SELECT title, MAX (retail-cost) FROM books GROUP...
Which of the following is correct? a. A group function can be nested inside a group function. b. A group function can be nested inside a single-row function. c. A single-row function can be nested...
Which of the following SELECT statements lists the highest retail price of all books in the Family category? a. SELECT MAX (retail) FROM books WHERE category = 'FAMILY'; b. SELECT MAX (retail) FROM...
Which of the following is not a valid statement? a. You must enter the ALL keyword in a group function to include all duplicate values. b. The AVG function can be used to find the average calculated...
Determine the average profit generated by orders in the ORDERS table.
Which of the following is a valid SELECT statement? a. SELECT order# FROM orders WHERE shipdate = SELECT shipdate FROM orders WHERE order# = 1010; b. SELECT order# FROM orders WHERE shipdate =...
Which of the following statements is valid? a. SELECT title FROM books WHERE retail < (SELECT cost FROM books WHERE isbn = '9959789321'); b. SELECT title FROM books WHERE retail = (SELECT cost FROM...
In which of the following situations is using a subquery suitable? a. When you need to find all customers living in a particular region of the country b. When you need to find all publishers who have...
Which of the following statements is correct? a. The IN comparison operator cant be usedwith a subquery that returns only one row of results. b. The equals (=) comparison operator cant be used with a...
Given the following query, which statement is correct? SELECT order# FROM orders WHERE order# IN (SELECT order# FROM orderitems WHERE isbn = '9959789321'); a. The statement doesnt execute because the...
In a wireless office environment, all calls are made between 8 am and 5 pm over the period of 24 hours. Assuming the number of calls to be uniformly distributed between 8 am and 5 pm, find the pdf of...
A receiver is tuned to 1 GHz transmission and receives signals with Doppler frequencies ranging from 10 Hz to 50 Hz when moving at a speed of 80 km/hr. What is the fading rate?
Explain carefully the purpose and use of the sequence number and acknowledgment number in connection-oriented communications. Create a multi packet example that illustrates exactly how these packets...
Skype uses super nodes, which do more work than ordinary P2P nodes. How do you think nodes become super nodes? There is nothing in the text that will help you with this question. Think broadly in...
Give a counterexample to the conjecture that if a directed graph G contains a path from u to , and if u.d < .d in a depth-first search of G, then is a descendant of u in the depth-first forest...
For the system in Part 1, consider the state variables v 1 (t) = y(t) v 2 (t)=y(t) + y(t) x(t) (a) Obtain the matrix A 2 and the vectors b 2 and c T 2 for the state and the output equations that...
A discrete-time IIR system is represented by the following difference equation y[n] = 0.15y[n2]+x[n], n 0 where x[n] is the input and y[n] is the output. (a) To find the impulse response h[n] of the...
Use the whois service at the American Registry for Internet Numbers (http://www.arin.net/whois) to determine the IP address blocks for three universities. Can the whois services be used to determine...
Assume a UNIX i-node requires a block of 60 bytes. How many disk blocks can be accessed using just direct, single, and double indirect indexing, as shown in Figure 17.9? Figure 17.9 file file...
Professor Gekko has always dreamed of inline skating across North Dakota. He plans to cross the state on highway U.S. 2, which runs from Grand Forks, on the eastern border with Minnesota, to...
The input of an LTI continuous-time system with impulse response h(t) = u(t) u(t 1) is (a) Find the output y(t) of the system using the convolution integral. (b) If T = 1, obtain and plot the system...
The SDLC used in this text is based on what adaptive SDLC?
Write pseudocode agent programs for the goal-based and utility-based agents. The following exercises all concern the implementation of environments and agents for the vacuum-cleaner world.
This exercise explores the differences between agent functions and agent programs. a. Can there be more than one agent program that implements a given agent function? Give an example, or show why one...
The most basic circuitry-level computer language is ____________. a. Machine language b. Java c. High-level language d. C++
Write a program that declares named constants to represent the number of inches, feet, and yards in a mile. Also declare a variable to represent a number of miles and assign a value to it. Compute...
Write an interactive version of the InchesToFeet class that accepts the inches value from a user. Save the class as InchesToFeetInteractive.java.
Suppose that you have created a program with only the following variables. int x = 2; int y = 3; Suppose that you also have a method with the following header: public static void mathMethod(int x)...
In Java, the value of (14 > 7) is ____________. a. True b. False c. 14 d. 7
What is the output of the following code segment? t = 0; if(t > 7) System.out.print("AAA"); System.out.print("BBB"); a. AAA b. BBB c. AAABBB d. Nothing
Assuming a variable f has been initialized to 5, which of the following statements sets g to 0? a. if(f > 6 || f == 5) g = 0; b. if(f < 3 || f > 4) g = 0; c. if(f >= 0 || f < 2) g = 0; d. All of the...
Assume that the population of Mexico is 128 million and that the population increases 1.01 percent annually. Assume that the population of the United States is 323 million and that the population is...
To create a String object, you can use the keyword ____________ before the constructor call, but you are not required to use this format. a. object b. create c. new d. char
The term that programmers use to describe objects that cannot be changed is ____________. a. Irrevocable b. Nonvolatile c. Immutable d. Stable
If you declare an array as follows, how do you indicate the final element of the array? int[] num = new int[6]; a. num[0] b. num[5] c. num[6] d. Impossible to tell
Write, compile, and test a class that uses the command window to display the following statement about comments: Program comments are nonexecuting statements you add to a file for documentation.Also...
Modify the Comments.java program in Exercise 10 so that the statement about comments is displayed in a dialog box. Save the class as CommentsDialog.java. Data from Exercise 10. Write, compile, and...
From 1925 through 1963, Burma Shave advertising signs appeared next to highways all across the United States. There were always four or five signs in a row containing pieces of a rhyme, followed by a...
Create an application that contains an enumeration that represents the days of the week. Display a list of the days, and then prompt the user for a day. Display business hours for the chosen day....
Create a class named CollegeCourse that includes data fields that hold the department (for example, ENG), the course number (for example, 101), the credits (for example, 3), and the fee for the...
Create a file that contains a line of your favorite song lyric. Use a text editor such as Notepad, and save the file. Copy the file contents, and paste them into a word-processing program such as...
Perform the following operations. Include your answers in hexadecimal. A6 16 OR 31 16 ; F7A 16 AND D80 16 ; 36 16 2A 16
Perform the following arithmetic operations in binary using 6 bits. Assume all numbers are signed decimal. Use twos complement arithmetic. Indicate if there is any overflow. a. 14 +8 b. 07 +(-7)...
In this exercise, you learn how to use the Items collections Insert, Remove, and RemoveAt methods. Open the Items Collection Solution.sln file contained in the VB2017\Chap05\Items Collection Solution...
Design a combinational circuit for a BCD to seven-segment code converter that will input a BCD number and output it on a seven segment commonanode display. The code converter will only display the...
Implement a digital circuit to increment (for Cin = 1) or decrement (for Cin = 0) a 4-bit signed number by 1 generating outputs in twos complement form. Note that Cin is the input carry to the full...
Design a 4-bit arithmetic unit as follows: Assume that A and B are 4-bit numbers. S 0 1 F A plus B A plus 1
Design an arithmetic logic unit to perform the following functions: Use multiplexers, binary adders, and gates as needed. Assume that A and B are 4-bit numbers. Draw a logic circuit. S 0 0 1 1 So 0 1...
Use SQL to define the following view: StudentID StudentName Letersky 38214 Altvater 54907 54907 Altvater Aiken 66324
Consider the following normalized relations for a sports league: TEAM(TeamID, TeamName, TeamLocation) PLAYER(PlayerID, PlayerFirstName, PlayerLastName, PlayerDateOfBirth, PlayerSpecialtyCode)...
Consider the following two relations for Millennium College: STUDENT(StudentID, StudentName, CampusAddress, GPA) REGISTRATION(StudentID, CourseID, Grade) Following is a typical query against these...
The Is Married To relationship in Figure 2-12a would seem that is, until time plays a role in modeling data. Draw a data model for the PERSON entity type and the Is Married To relationship for each...
Write an HDL module for the circuit in Exercise 3.32. Data from problem 3.32 Repeat Exercise 3.31 for the FSM shown in Figure 3.73. Recall that the s and r register inputs indicate set and reset,...
Open the VB2017\Chap12\FixIt Solution\FixIt Solution.sln file. Start the application. Click the Grade radio button, type the letter a in the Grade box, and then click the Display button. The...
Another definition for the finite difference is the backward difference: ( 1 [x(nT s )]=T s approximates the derivative of x(t)). (a) Indicate how this new definition connects with the finite...
Write a program that prompts the user to enter the minutes (e.g., 1 billion), and displays the number of years and days for the minutes. For simplicity, assume a year has 365 days. Here is a sample...
Write a program that prompts the user to enter three cities and displays them in ascending order. Here is a sample run: Enter the first city: Chicago JEnter Enter the second city: Los Angeles JEnter...
Write a method that finds the number of occurrences of a specified character in a string using the following header: public static int count(String str, char a) For example, count("Welcome", 'e')...
Write a program that reads in ten numbers and displays the number of distinct numbers and the distinct numbers separated by exactly one space (i.e., if a number appears multiple times, it is...
Suppose you save $100 each month into a savings account with the annual interest rate 5%. So, the monthly interest rate is 0.05 / 12 = 0.00417. After the first month, the value in the account becomes...
The Eight Queens problem is to find a solution to place a queen in each row on a chessboard such that no two queens can attack each other. Write a program to solve the Eight Queens problem using...
Write a recursive method that displays a string reversely on the console using the following header: public static void reverseDisplay(String value) For example, reverseDisplay("abcd") displays dcba....
Let Ax b be a system of m difference constraints in n unknowns. Show that the Bellman-Ford algorithm, when run on the corresponding constraint graph, maximizes n 1=1 x i subject to Ax b and x i 0...