Ask Math Expert


Home >> Math

1) The following function written in pseudocode accepts INCOME as a variable and outputs the TAX corresponding to that income.

FUNCTION TAX (INCOME)

1. IF (INCOME > 60000) THEN

a. TAXDUE ← 15000

2. ELSE

a. IF (INCOME > 30000) THEN

1. TAXDUE ← 5000

b. ELSE

1. TAXDUE ← INCOME × 0.08

3. RETURN (TAXDUE)

What would the pseudocode output with an input of:

a) 23000?

b) 64000?

c) 47000?

2) Suppose that the array X consists of real numbers X[1], X[2], the array Y consists of the real numbers Y[1], Y[2], and the array Z consists of the real numbers Z[1], Z[2]. What does the following algorithm compute?

1. LSUM ← 0

2. FOR I = 1 THRU 2

a. LSUM ← LSUM + (X[I])(Y[I])(Z[I])

This problem is similar to problem A.5.

3) Consider the following algorithm; assume N to be a positive integer.

1. X ← 0

2. Y ← 0

3. WHILE (X < N)
a. X ← X+2
b. Y ← Y+X
4. Y ← Y/N

What will this algorithm compute when N = 2? N = 5? This problem is similar to example 7.

Section 1.4 Homework

1) Write m as qn+r, with 0 < r < n for parts a) through c).

a) m = 75, n = 13

b) m = 13, n = 75

c) m = 44, n = 11

2) Write the integer as a product of powers of primes.

a) 179

b) 244

3) Find the greatest common divisor d of the integers 58 and 124, and write d as s(58) + t(124). Write out all of the steps. This problem is similar to examples 5 and 6 and problems 1.4.6-1.4.9.

4) Use the fact that GCD(a,b)•LCM(a,b)=ab to compute the least common multiple of 58 and 124, LCM(58,124). This problem is similar to problems 1.4.10-1.4.13.

5) If f is the mod-5 function, compute each of the following:

a) f(13) + f(19)

b) f(13+19)

c) f(278)

6) Use Bacon's code to create a dummy message for ABANDON. For the sake of simplicity, use bold font for 0 and regular font for 1. This problem is similar to examples 15 and 16 and problem 1.4.45.

1) Prove that 3+6+9+?+3n = (3n(n+1))/2

Here is a general outline you can use.

1. Basis step. Prove P(1)

2. Induction step.

a. Write out P(k) by replacing "n" with "k" in the original equation.

b. Now, we must look at P(k+1). To do this, modify your P(k) expression from part 2a by adding the "k+1"st term to the left hand side and replace "k" with "k+1" on the right hand side. This is what we need to show.

c.Using the assumption that P(k) is true, replace the "1 through k" portion on the left hand side of the P(k+1) equation you wrote in part 2b.

d. If necessary, multiply away any constant denominators in the new P(k+1) formulation.

e. Multiply out the left-hand side and the right-hand side to establish the equality.

Math, Academics

  • Category:- Math
  • Reference No.:- M91576381
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Math

Questions -q1 prove the following identitiesa sinx y sinx

Questions - Q1. Prove the following identities a. sin(x + y) + sin(x - y) = 2 sin x cos y b. sec(x - y) = cos(x + y)/(cos 2 x - sin 2 y) c. tan 2 x - sin 2 x = (tan x sin x) 2 Q2. Solve the following equations for x ∈ [0 ...

Maths assignment - 1 analysis of a data setusing a

Maths Assignment - 1. Analysis of a data set Using a continuous data set you are requested to collect in the types of data and gathering data section, perform a statistical analysis on your data. You have opportunities t ...

Questions - provide solution to the following questionsq1

Questions - Provide solution to the following questions: Q1. Evaluate the following: ∫xsin3xdx Q2. If , then for what value of α is A an identity matrix? Q3. The line y = mx + 1 is a tangent to the curve y 2 = 4x. Find t ...

Assessment taskpractical investigation- question 1 requires

Assessment Task Practical Investigation - Question 1 requires selecting reference points from the graph. It is expected that each student will choose different reference points to other students. Take note of the criteri ...

1 suppose that n 10088821 is a product of two distinct

1. Suppose that n = 10088821 is a product of two distinct primes, and Φ(n) = 10082272. Determine the prime factors of n. 2. It is easy to show that the converse of Fermat's Theorem does not hold; i.e., the congruence a n ...

Assignment -question 1 let t and or 0 1 be a boolean

Assignment - Question 1. Let (T, ∧, ∨,', 0, 1) be a Boolean Algebra. Define ∗ : T × T → T and o : T × T → T as follows: x ∗ y := (x ∨ y)' x o y := (x ∧ y)' (a) Show, using the laws of Boolean Algebra, how to define x ∗ y ...

Assignment - provide solution to the following questionsq1

Assignment - Provide solution to the following questions: Q1. Evaluate the following: ∫xsin3x dx Q2. If , then for what value of α is A an identity matrix? Q3. The line y = mx + 1 is a tangent to the curve y 2 = 4x. Find ...

Question 1 what is the nth order approximation using taylor

Question: 1. What is the nth order approximation using Taylor series? 2. What is Error Propagation? 3. Please explain what the total numerical error is? Please illustrate how the change of step size will affect the total ...

Mathematics- algebraic geometry problemlet k denotes an

Mathematics- Algebraic Geometry Problem Let K denotes an algebraically closed field and let P 1 be constructed as in Example 5.5(a) in Gathmanns notes, i.e. P 1 is the gluing of X 1 = A 1 and X 2 = A 1 along  the open su ...

Mathematics- algebraic geometry problemlet k denotes an

Mathematics- Algebraic Geometry Problem Let K denotes an algebraically closed field and let P 1 be constructed as in Example 5.5(a) in Gathmanns notes, i.e. P 1 is the gluing of X 1 = A 1 and X 2 = A 1 along  the open su ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As