Explore BrainMass
Share

# Algorithms

### Rows in a Query

If you had two tables, each with 3 items: Table_Mike: ITEM: Bread Milk Eggs Table_Kristy: ITEM: Cereal Butter Eggs And performed a UNION, how many rows would the resulting query have?

### Few questions related to packet loss, different fixed playout delays and jitter.

Answer the following questions based on the enclosed figure. [a] Explain why the packets received curve (step line) looks different from the packets-generated curve. [b] Suppose that packets are played right away as they are received, identify the points where jitter is most obvious. [c] What would happen to the point ind

### Magic Matrix Numbers

Magic matrix A N*N matrix is called a magic matrix if it is filled with numbers in {1.. N^2} and sum of the values in all rows, columns are equal. Supposing an odd N, we are planing to describe how to create such a matrix. Example of such a matrix is as following:

### Disk Tracks Traversed Using Algorithms

Calculate and compare the number of disk tracks traversed using FCFS, SSTF, SCAN, and LOOK algorithms for the series of disk track service requests given below. At the time the first request arrives in the disk request queue, the read/write head is at track 50, moving toward the outer (lower-numbered) tracks. (Hint: Each track o

### Probabilities

Probabilities 1.) A taxicab was involved in a fatal hit-and-run accident at night. Two cab companies, The Green and The Blue, operate in the city. You are told that: ? 85% of the cabs in the city are Green and 15% are Blue ? A witness identified the cab as Blue The court tested the reliability of the witness under the same c

### Compute checksums of a given bit pattern, using "single parity bit" and "two-dimensional parity" schemes.

Suppose that the information content of a packet is the bit pattern 1111000010100101 and an even parity is being used [a] What would be the checksum field in a single parity bit scheme? [b] What would be the value of the checksum field for the case of a two-dimensional parity scheme? Your answer should be such that a minim

### Dijkstra?s Shortest Path Algorithm

Consider the following network. a) With the indicated link costs, use Dijkstra?s shortest path algorithm to compute the shortest path from E to all network nodes. Show how the algorithm works by computing a table. b) Eliminate node A, and redo the problem starting from node B. Please refer to the attachment to view the

### Automata and Computability (A136)

Show that ANFA is NL-complete.

### Floating point numbers and Two's complement

Do we use Two's complement results with floating point math operations?

### a low order bit

What name is used to describe the bit of lowest magnitude within a byte or bit string?

### Automata and Computability

Describe the error in the following fallacious "proof" that P &#61625; NP. Consider an algorithm for SAT: "On input &#61542;, try all possible assignments to the variables. Accept if any satisfy &#61542;." This algorithm clearly requires exponential time. Thus SAT has exponential time complexity. Therefore SAT is not in P.

### Automata and Computability (A128)

Show that the function K (x) is not a computable function.

### Automata and Computability

Show that the PCP is undecidable over a binary alphabet, that is, over the alphabet &#61669; = {0,1}.

### Create an expense report for a company's sales force

Create an expense report for a company's sales force, then save it. To view these instructions while you work in Excel, do either of the following: Print this page of instructions or move back and forth between this page and Excel by clicking each application's button on the Windows taskbar Retrieve Expense Report, save it o

### Payroll Swing Applet - CalcPay

Create a payroll Swing applet named CalcPay that allows the user to enter two double values?hours worked, and an hourly rate. When the user clicks a JButton, gross pay is calculated. There is another JButton for clicking so that federal withholding tax is subtracted from gross pay based on the following table: Income \$

### Explaining Substring Commands

Point 5: Please explain VAL(MID\$(i\$, i, j)) Point 4: If I am going backwards down the string, then how do I pick up all the substrings since the string is read left to right? This is in the context of the following solution: 1 i\$ = "37540" 'input string 2 FOR i = 1 TO LEN(i\$) 'loop from 1 to the length of the input

### Spending on Products to Maximize Sales

See attached file for full problem description.

### Bit Setting in the Control Field of a HDLC Information Frame

A transmission system is communicating using an HDLC Frame format. Furthermore it is using the Asynchronous Balanced Mode (ABM) configuration. At the moment the receiver is sending an Information Frame to the transmitter. This is the 6th sequential message it is sending and it is acknowledging receipt of the 6th sequential me

### Asymptotically tight bounds on lg(n!)

Obtain asymptotically tight bounds (Big-Oh and Big-Omega) on lg(n!) without using Stirling's approximation. Instead, evaluate these using the expansion of lg(n!) as a summation.

### Show that "q^2 + (n-q-1)^2" achieves a maximum over q = 0, 1, ..., n-1 when q = 0 or q = n-1.

Show that "q^2 + (n-q-1)^2" achieves a maximum over q = 0, 1, ..., n-1 when q = 0 or q = n-1.

### Relative Speed of Ripple Carry Adders

Calculate the relative speed of a 64-bit adder using ripple carry only, a ripple carry of 4-bit groups that use carry lookahead, and a ripple carry of 16-bit groups that use carry lookahead. Use the simulator located at the following url: http://www.ecs.umass.edu/ece/koren/arith/simulator/ Also explain, what is relative spee

### Program dealing with structs

See attached file for full problem description.

### In the telephone network, the most significant difference between a digital cross-connect system and a digital local switch is

In the telephone network, the most significant difference between a digital cross-connect system and a digital local switch is: a. the switching speed b. the number of inputs and outputs c. the manner in which connections are established d. the physical location (ie. the same or different buildings)

### probability of a Line in a Switch Board

Consider a (n x k) crossbar switch with k < n. Suppose the probability of a line being in use is p. What is the probability that the switch is blocked for the next caller? a. 1-(1-p)^(n-k) b. (n!/(k!*(n-k)!))*p^k c. (p^k)*(1-p)^(n-k) d. Sum(j=1,k)((n!/(j!*(n-j)!))*p^j

### What is "in-line processing"?

What is "in-line processing"?

### Output for values

4. Consider the following program in Pascal with static scope: program main (input, output); var i, j, k, m: integer; procedure Q (var i: integer; m: integer); begin i := j + 1; m := k + 1; writeln (i, j, k, m); end procedure P(var i: integer; j: integer); var k: integer; procedure S(i: integer) begin i := k + 3; m

### Extend and include relationships

I require assistance in describing in my own terms the difference between the extend and include relationships with an example.

### binary subtraction and division

Example problem: 1001/10101010 I am expecially having problems subracting with there is a borrow involved.

### Bitwise sum

Write a C program that prompts user for two integers and then prints the sum of the wo numbers. Please dont use any arthemetic opoerators anywhere. just bitwise-and, bitwise-or bitwise-xor, <<(left shift) and >>(right shift)

### function that prints the average for each student in class

#define CLASS_SIZE struct student{ chair*last-name: int studrent_id: char grade: }; in another file we write #include"cl_info.h" int main (void) { struct student temp, class[CLASS_SIZE}; ....... assign values to members temp.grade="A" temp.last_name="Bushker"; temp.student_id=590017;