Rational-arithmetic package to use generic operations

Assignment Help Basic Statistics
Reference no: EM131042174

Modify the rational-arithmetic package to use generic operations, but change make-rat so that it does not attempt to reduce fractions to lowest terms. Test your system by calling make-rational on two polynomials to produce a rational function

416_kk.jpg
Now add rf to itself, using add. You will observe that this addition procedure does not reduce fractions to lowest terms. We can reduce polynomial fractions to lowest terms using the same idea we used with integers: modifying make-rat to divide both the numerator and the denominator by their greatest common divisor. The notion of greatest common divisor'' makes sense for polynomials. In fact, we can compute the GCD of two polynomials using essentially the same Euclid's Algorithm that works for integers.60 The integer version is

2483_kk.jpg

where remainder-terms picks out the remainder component of the list returned by the term-list division operation div-terms that was implemented in exercise 2.91.
exercise 2.91. A univariate polynomial can be divided by another one to produce a polynomial quotient and a polynomial remainder. For example,

1844_kk.jpg

Division can be performed via long division. That is, divide the highest-order term of the dividend by the highest-order term of the divisor. The result is the first term of the quotient. Next, multiply the result by the divisor, subtract that from the dividend, and produce the rest of the answer by recursively dividing the difference by the divisor. Stop when the order of the divisor exceeds the order of the dividend and declare the dividend to be the remainder. Also, if the dividend ever becomes zero, return zero as both quotient and remainder. We can design a div-poly procedure on the model of add-poly and mul-poly. The procedure checks to see if the two polys have the same variable. If so, div-poly strips off the variable and passes the problem to div-terms, which performs the division operation on term lists. Div-poly finally reattaches the variable to the result supplied by div-terms. It is convenient to design div-terms to compute both the quotient and the remainder of a division. Div-terms can take two term lists as arguments and return a list of the quotient term list and the remainder term list. Complete the following definition of div-terms by filling in the missing expressions. Use this to implement div-poly, which takes two polys as arguments and returns a list of the quotient and remainder polys.

1198_kk.jpg

Reference no: EM131042174

Questions Cloud

Statistics and some regression results : Here are some statistics and some regression results using GSS2006 data:
How they are described in buddhism : What are two differences between how virtues are described by Aristotle versus how they are described in Buddhism?
What are the null and alternative hypotheses : Car manufacturers are concerned about meeting new government regulations on fuel efficiency. Audi knows that their average mile per gallon (mpg: 16-38) of their entire line of automobiles in 2000 was 27.93 and their current line of automobiles (N..
What ways is food and eating connected to ideas of home : How and in what ways is food and eating connected to ideas of home and homeliness? You may also like to start with the course readings (Week 4 in particular), but your essay should involve some independent research and thinking beyond these.
Rational-arithmetic package to use generic operations : Modify the rational-arithmetic package to use generic operations, but change make-rat so that it does not attempt to reduce fractions to lowest terms. Test your system by calling make-rational on two polynomials to produce a rational function
State your null and alternative hypotheses : Various studies indicate that approximately 11% of the world's population is left handed. You think this number is actually higher. You take an SRS of 212 people and find that 27 of them are left handed. Test your claim at the 5% significance leve..
How they are described in buddhism : What are two differences between how virtues are described by Aristotle versus how they are described in Buddhism?
Question regarding the unemployment compensation : A previous poll found that "433 of the 1548 randomly-selected adults questioned felt that unemployment compensation should be extended an additional six months while the country is in its current economic downturn
Find the probability that the sample mean : SAT verbal scores are normally distributed with a mean of 430 and a standard deviation of 120 (based on data from the College Board ATP). If a sample of 35 students are selected randomly, find the probability that the sample mean is above 480.

Reviews

Write a Review

Basic Statistics Questions & Answers

  Statistics-probability assignment

MATH1550H: Assignment:  Question:  A word is selected at random from the following poem of Persian poet and mathematician Omar Khayyam (1048-1131), translated by English poet Edward Fitzgerald (1808-1883). Find the expected value of the length of th..

  What is the least number

MATH1550H: Assignment:  Question:     what is the least number of applicants that should be interviewed so as to have at least 50% chance of finding one such secretary?

  Determine the value of k

MATH1550H: Assignment:  Question:     Experience shows that X, the number of customers entering a post office during any period of time t, is a random variable the probability mass function of which is of the form

  What is the probability

MATH1550H: Assignment:Questions: (Genetics) What is the probability that at most two of the offspring are aa?

  Binomial distributions

MATH1550H: Assignment:  Questions:  Let’s assume the department of Mathematics of Trent University has 11 faculty members. For i = 0; 1; 2; 3; find pi, the probability that i of them were born on Canada Day using the binomial distributions.

  Caselet on mcdonald’s vs. burger king - waiting time

Caselet on McDonald’s vs. Burger King - Waiting time

  Generate descriptive statistics

Generate descriptive statistics. Create a stem-and-leaf plot of the data and box plot of the data.

  Sampling variability and standard error

Problems on Sampling Variability and Standard Error and Confidence Intervals

  Estimate the population mean

Estimate the population mean

  Conduct a marketing experiment

Conduct a marketing experiment in which students are to taste one of two different brands of soft drink

  Find out the probability

Find out the probability

  Linear programming models

LINEAR PROGRAMMING MODELS

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd