1004 Words5 Pages

Assignment #2
1) Improve the result from problem 4 of the previous assignment by showing that for every e> 0, no matter how small, given n real numbers x1,...,xn where each xi is a real number in the interval [0, 1], there exists an algorithm that runs in linear time and that will output a permutation of the numbers, say y1, ...., yn, such that ∑ ni=2 |yi - yi-1| < 1 + e. (Hint: use buckets of size smaller than 1/n; you might also need the solution to problem 3 from the first assignment!) 2) To evaluate FFT(a0,a1,a2,a3,a4,a5,a6,a7) we apply recursively FFT and obtain FFT( a0,a2,a4,a6) and FFT(a1,a3,a5,a7). Proceeding further with recursion, we obtain FFT(a0,a4) and FFT(a2,a6) as well as FFT(a1,a5) and FFT(a3,a7). Thus, from bottom up, FFT(a0,a1,a2,a3,a4,a5,a6,a7)*…show more content…*

Given any input (a0,a1,a2,…a2n-1 describe the permutation of the leaves of the recursion tree. (Hint: write indices in binary and see what the relationship is of the bits of the ith element of the original sequence and the ith element of the resulting permutation of elements as they appear on the leaves on the recursion tree.) 3) Timing Problem in VLSI chips. Consider a complete balanced binary tree with n = 2k leaves. Each edge has an associate positive number that we call the length of this edge (see picture below). The distance from the root to a leaf is the sum of the lengths of all edges from the root to this leaf. The root sends a clock signal and the signal propagates along the edges and reaches the leaf in time proportional to the distance from the*…show more content…*

The organizers of the party want it to be a fun party, and so have assigned a ‘fun’ rating to every employee. The employees are organized into a strict hierarchy, i.e. a tree rooted at the president. There is one restriction, though, on the guest list to the party: an employee and their immediate supervisor (parent in the tree) cannot both attend the party (because that would be no fun at all). Give an algorithm that makes a guest list for the party that maximizes the sum of the ‘fun’ ratings of the guests. 6) Cutting Sticks You have to cut a wood stick into several pieces. The most affordable company, Analog Cutting Machinery (ACM), charges money according to the length of the stick being cut. Their cutting saw allows them to make only one cut at a time. It is easy to see that different cutting orders can lead to different prices. For example, consider a stick of length 10 m that has to be cut at 2, 4, and 7 m from one end. There are several choices. One can cut first at 2, then at 4, then at 7. This leads to a price of 10 + 8 + 6 = 24 because the first stick was of 10 m, the resulting stick of 8 m, and the last one of 6 m. Another choice could cut at 4, then at 2, then at This would lead to a price of 10 + 4 + 6 = 20, which is better for us. Your boss demands that you design an algorithm to find the minimum possible cutting cost for any given stick. 7) Interleaving of Strings For bit strings X = x1 ... xm

Given any input (a0,a1,a2,…a2n-1 describe the permutation of the leaves of the recursion tree. (Hint: write indices in binary and see what the relationship is of the bits of the ith element of the original sequence and the ith element of the resulting permutation of elements as they appear on the leaves on the recursion tree.) 3) Timing Problem in VLSI chips. Consider a complete balanced binary tree with n = 2k leaves. Each edge has an associate positive number that we call the length of this edge (see picture below). The distance from the root to a leaf is the sum of the lengths of all edges from the root to this leaf. The root sends a clock signal and the signal propagates along the edges and reaches the leaf in time proportional to the distance from the

The organizers of the party want it to be a fun party, and so have assigned a ‘fun’ rating to every employee. The employees are organized into a strict hierarchy, i.e. a tree rooted at the president. There is one restriction, though, on the guest list to the party: an employee and their immediate supervisor (parent in the tree) cannot both attend the party (because that would be no fun at all). Give an algorithm that makes a guest list for the party that maximizes the sum of the ‘fun’ ratings of the guests. 6) Cutting Sticks You have to cut a wood stick into several pieces. The most affordable company, Analog Cutting Machinery (ACM), charges money according to the length of the stick being cut. Their cutting saw allows them to make only one cut at a time. It is easy to see that different cutting orders can lead to different prices. For example, consider a stick of length 10 m that has to be cut at 2, 4, and 7 m from one end. There are several choices. One can cut first at 2, then at 4, then at 7. This leads to a price of 10 + 8 + 6 = 24 because the first stick was of 10 m, the resulting stick of 8 m, and the last one of 6 m. Another choice could cut at 4, then at 2, then at This would lead to a price of 10 + 4 + 6 = 20, which is better for us. Your boss demands that you design an algorithm to find the minimum possible cutting cost for any given stick. 7) Interleaving of Strings For bit strings X = x1 ... xm

Related

## Executive Summary: Security Trading: Algorithmic Dealer Simulation

953 Words | 4 PagesMechanically how is your strategy different than your best strategies in 4a Strategy 6 : Inventory Management in Price Cutoffs = 10 could be improved with a small tweak on the preloaded strategy. The cutoff could be reduced from 10 to say 5-6. Why does the change in 5a work better? With the tweaked strategy 6, the reduced cut-off will ensure that the inventory be cut down quickly when the overnight volatility and order processing costs are relatively high. The bid-ask spread is also a cost to the dealer.

## Exercises from E-Text Week 5 Res341

517 Words | 3 PagesHaving a bell-shaped curve means it is normally distributed, and the central limit theorem does a good job at estimating the mean when you are dealing with a lot of variables. Sample size has everything to do with the central limit theorem, because the more samples you have the more the mean is going to be easily predicted. The more samples you have the more the central limit theorem is coming into play. 8.46 A random sample of 10 miniature tootsie rolls was taken from a bag. Each piece weighed on a very accurate scale.

## Pythagorean Theorem Essay

518 Words | 3 PagesStep 1) Identify the legs and the hypotenuse of the right triangle. | The legs have length '14' and 48 are the legs. The hypotenuse is X. See Picture | The hypotenuse is red in the diagram below: Steps 2 and 3 | Step 2) Substitute values into the formula (remember 'c' is the hypotenuse) | A2 + B2 = C2 142 + 482 = x2 | Step 3) Solve for the unknown | | Problem 2) Use the Pythagorean theorem to calculate the value of X. Round your answer to the nearest tenth.

## Eco550 Mt Essay

1482 Words | 6 PagesAnswer Selected Answer: 30 berries and 5 apples is an efficient level of production. Correct Answer: 30 berries and 5 apples is an efficient level of production. • Question 6 10 out of 10 points Reducing _____ the benefits available to the buyer and seller and might also enable them to make exchanges that

## On Quine Quine-Mccluskey Method

1552 Words | 7 Pages3. 3. Generate all the PIs of f, {Pj} Generate all the Generate all the minterms of f, {mi} Generate all the Build the Boolean constraint matrix B, where Bij iis 1 if s Boolean mi∈ Pj and is 0 otherwise 4. Solve the minimum column covering problem for B 4. Solve ENEE 644 2 Example: Quine-McCluskey Method Example: Quine f(w,x,y,z) = x’y’ + wxy + x’yz’ + wy’z wxy x’y’ x’z’ wx’y’z’ 1 1 w’x’y’z 1 w’x’y’z’ 1 wxyz 1 wxyz’ wxz wyz’ wy’z 1 1 1 {x’y’, x’z’,wxy, wxz}, {x’y’, x’z’,wxy, wy’z}, {x’y’, x’z’,wxz, wyz’}.

## Math 1310 Assignment 2.1

1316 Words | 6 PagesReview Problems for Exam #3 - Math 111B Exam #3 will cover Sections 5.2 – 5.6 (Inverse Functions, Exponential and Logarithmic Functions) • Be able to identify when a function has an inverse function and be able to find that inverse • Identify an exponential function, solve problems involving exponential applications • Identify a logarithmic function, solve problems involving logarithmic functions and applications • Use logarithmic properties to condense or expand logarithmic expressions as needed • Solve exponential and logarithmic equations • Create an exponential model based on data points and use that model to predict behavior 1. Describe verbally the inverse of the statement. Then express both the statement and its inverse symbolically as a function and its inverse. “Take the cube root of x and add 1.” 2. Determine if the following functions are one-to-one: a) [pic] b) [pic] c) d) e) 3.

## It 104 Unit 3

605 Words | 3 PagesWrite assignment statements that perform the following operations with the variables a, b, and c. a) Adds 2 to a and stores the result in b * b=a+2 b) Multiplier b times 4 and stores the result in a * a=b*4 c) Divides a by 3.14 and stores the result in b * b=a/3.14 d) Subtract 8 from b and stores the result in a * a=b-8 4. Assume the variables result, w, x, y, and z are all integers, and that w=5, x=4, y=8, and z=2. What value will be stored in result in each of the following statements? a) Set result = x + y * 12= x + y b) Set result = z + 2 * 4=z * 2 c) Set result = y / x * 2=y / x d) Set result =y – z * b=y – z 5. Write a pseudocode statement that declares the variable cost so it can hold real numbers.

## Case Study of Scotiabank

3340 Words | 14 PagesTask A Question 1 A budget line is a line that shows the total expenditure or the combination of two products that yields the same level of expenditure. It indicates the rate at which one good is exchanged for another good in the market. Table 1.0 Budget Line Product A 20 18 16 14 12 10 8 6 4 2 0 1 2 3 4 5 6 7 8 9 10 11 12 Product B Source: (The Author 2014) 1|Page The budget line (blue line) shows that with an income of $100, a consumer can purchase up to 20 units of product A and up to 10 units of product B. If the price of B increases by 10%, then: Income = $100.00 Product A $5.00 per unit Product B $11.00 per unit The consumer can purchase 20 units of A and 9 units of B (green line) the utility or satisfaction of product A will be higher than B as shown by red curve. Consumers would normally spend on the higher utility and in this instance that product is product A.

## Financial Polynomials Essay

414 Words | 2 PagesP(1+r/2)(1+r/2) Next step is to multiply the squared quantity. P(1+(r/2)+(r/2)+(r2/4)) Then carry out FOIL. P(1+(2r/2)+(r2/4)) Combine like terms. P+(2Pr/2)+(Pr2/4) Distribute P throughout the trinomial 4P+4Pr+Pr2 Simplified. 4 Now, unlike traditional polynomials, the one used above is not in descending order of the variables.

## Ib Math Sl Probability Exam Questions

2151 Words | 9 PagesSL Probability 1 IB Exam Questions Worksheet 1 SL Probability 1 IB Exam Questions 1. The following probabilities were found for two events R and S. P( R) = a) 1 4 1 , P(S | R) = , P(S | R ' ) = 3 5 4 Copy and complete the tree diagram on the right. b) Find the following probabilities. i) ii) iii) P( R∩S ) . P( S ) .

### Executive Summary: Security Trading: Algorithmic Dealer Simulation

953 Words | 4 Pages### Exercises from E-Text Week 5 Res341

517 Words | 3 Pages### Pythagorean Theorem Essay

518 Words | 3 Pages### Eco550 Mt Essay

1482 Words | 6 Pages### On Quine Quine-Mccluskey Method

1552 Words | 7 Pages### Math 1310 Assignment 2.1

1316 Words | 6 Pages### It 104 Unit 3

605 Words | 3 Pages### Case Study of Scotiabank

3340 Words | 14 Pages### Financial Polynomials Essay

414 Words | 2 Pages### Ib Math Sl Probability Exam Questions

2151 Words | 9 Pages