Share
Explore BrainMass

# Algorithms

### Cryptography: substitution-permutation network

Consider the following 2x2 s-box x | S(x) ---|------- 0 | 3 1 | 1 2 | 0 3 | 2 Consider 2-round SPN (substitution-permutation network) with a block length of 4 bits. If the key mixing is done using a mod-4 addition operation before each round and after the last round, determine the ciphertext corres

### VLookup and Excel

Use the VLOOKUP function in the formula to determine gallons per hour based on the type of plane, then multiply the result by the number of flying hours to compute the amout of fuel for each flight. The table for VLOOKUP function extends over three columns. Use the fuel required from part (a) to compute the additonal requirem

### Write a Bash script to concatenate the argument lists and output the resulting list.

Write a Bash script to concatenate the argument lists and output the resulting list. Final list should not include any argument that is a sub-list of the entire list. The script should not leave any redundant elements in the concatenated list, and it should maintain the order of the elements in the input. Examples below give a b

### (ref2) Integer Range for one byte word in various representation.

A given microprocessor has words of one byte. What is the smallest and largest integer that can be represented in the following representations? a. Unsigned b. Sign-magnitude c. Ones complement d. Twos complement e Unsigned packed decimal f. Signed packed decimal

### Top Down, Stepwise refinement

Using top-down, stepwise refinement, create an algorithm for making toast, frying eggs, baking a cake, or ordering pizza. How might algorithms be beneficial in your future profession?

### IEEE 32-Bit Floating Point Format to Decimal Conversion

Convert the following IEEE 32-bit floating-point format values into decimal. a. 1 1000 0011 110 0000 0000 0000 0000 0000 b. 0 0111 1110 101 0000 0000 0000 0000 0000 c. 0 1000 0000 000 0000 0000 0000 0000 0000.

### (ref10) Two's Complement Arithmetic

Calculate in two's complement: a. 11 1000 -11 0011 b. b.1100 1100-10 1110 c. c.1111 0000 1111 - 1100 1111 0011 d. d. 1100 0011-1110 1000

### CLS on heads or tails program

I also need to fill in the missing part of the code In MS-DOS, the command to clear the screen is cls; in UNIX, it is clear. Try the command so that you understand its effect. Modify the heads_or_tails program so that the screen is cleared at the beginning of the program. Use the function call system ("cls") or system ("clear")

### Algorithms - Design and Analysis Fundamentals

A. Design a recursive algorithm whose input is a decimal integer and whose output is the binary representation of the input. b. Design a recursive algorithm that computes the reverse of the result in (a) - that is, converts a binary integer to its decimal equivalent.

### Algorithms

Trace the action of the algorithm NaiveGCD for the following input pairs. a. (24,108) b. (23,108) c. (89,144) d. (1953,1937) Exercise 1.8: Repeat Exercise 1.7 for the algorithm EuclidGCD.

### Algorithms

For a general positive integer n, show that the left-to-right binary method for computing requires between log2n and 2log2n multiplications. Textbook: Algorithms: Sequential, Parallel, and Distributed

### 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

### 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.

### 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 \$

### 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

### 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)

### 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.

### 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)