Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Statistics and Probability Expert

Implement this algorithm as a procedure reduce-terms that takes two term lists n and d as arguments and returns a list nn, dd, which are n and d reduced to lowest terms via the algorithm given above. Also write a procedure reduce-poly, analogous to add-poly, that checks to see if the two polys have the same variable. If so, reduce-poly strips off the variable and passes the problem to reduce-terms, then reattaches the variable to the two term lists supplied by reduce-terms.
b. Define a procedure analogous to reduce-terms that does what the original make-rat did for integers:

2157_kk.jpg

and define reduce as a generic operation that calls apply-generic to dispatch to either reduce-poly (for polynomial arguments) or reduce-integers (for scheme-number arguments). You can now easily make the rational-arithmetic package reduce fractions to lowest terms by having make-rat call reduce before combining the given numerator and denominator to form a rational number. The system now handles rational expressions in either integers or polynomials. To test your program, try the example at the beginning of this extended exercise:

1279_kk.jpg

See if you get the correct answer, correctly reduced to lowest terms. The GCD computation is at the heart of any system that does operations on rational functions. The algorithm used above, although mathematically straightforward, is extremely slow. The slowness is due partly to the large number of division operations and partly to the enormous size of the intermediate coefficients generated by the pseudo divisions. One of the active areas in the development of algebraic-manipulation systems is the design of better algorithms for computing polynomial GCDs.62.

Statistics and Probability, Statistics

  • Category:- Statistics and Probability
  • Reference No.:- M91766661

Have any Question?


Related Questions in Statistics and Probability

To what extent does the client hold a responsibility for

To what extent does the client hold a responsibility for the success of their financial plan?

What is the maximum that should be invested in a project at

What is the maximum that should be invested in a project at time zero if the inflows are estimated at $10,000 annually for three years, and the cost of capital is 9%?

For an environmental group it is known that 75 of their

For an environmental group, it is known that 75% of their door-to-door solicitations result in a donation of some kind. Find the probability that... (Hint: first determine what is a 'success' and what is a 'failure' base ...

On the ballot illinois voters had the option to select yes

On the ballot, Illinois voters had the option to select "yes" or "No" when asked if the state's minimum wage should be increased from $8.25 to $10 an hour by January 1, 2015. Before the actual voting date, a survey with ...

You are considering an investment in a 40-year security the

You are considering an investment in a 40-year security. The security will pay $25 a year at the end of each of the first three years. The security will then pay $30 a year at the end of each of the next 20 years. The no ...

Industries recently commissioned management consultants to

Industries recently commissioned management consultants to estimate an appropriate rate for investment projects with the same risk as the firm. Unfortunately, part of the report was lost, and you have been asked to calcu ...

Light travels at 186283 miles every second how many feet

Light travels at 186,283 miles every second. How many feet per hour does light travel? Round one decimal place if necessary.

Leprosy also called hansens disease is a disease produced

Leprosy, also called Hansen's disease, is a disease produced by infection with a bacterium called Mycobacterium leprae. It has a long incubation period (time between getting infected and developing the disease), usually ...

A bottle of water is supposed to have 12 ounces the

A bottle of water is supposed to have 12 ounces. The bottling company has determined that 98% of bottles have the correct amount. Which of the following describes a binomial experiment that would determine the probabilit ...

A major car manufacturer wants to test a new engine to

A major car manufacturer wants to test a new engine to determine if it meets new air pollution standards. The mean emission μ of all engines of this type must be approximately 18 parts per million of carbon. If it is hig ...

  • 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