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

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

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,

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.

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