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

  What is the alternate hypothesis

We will test to determine if there evidence of an improvement on the final examination, at the 1% significance level. What is the alternate hypothesis?

  Measurable data-independent and dependent variables

What will be measurable data in this case and (assume a survey will be conducted and or data can be obtain). What will be at least two independent variables and one dependent variable. (and assuming they are consistent with the collected data)

  Write a sentence that interprets the p value

Is the study result statistically significant? Write a sentence that interprets the p value of 0.03 in relation to the study results. Use 0.03 in your sentence.

  Prepare new performance report for september using flexible

Prepare a new performance report for September using the flexible budget approach. (Note: Even though some of these costs might be classified as direct costs rather than as overhead, the flexible budget approach can still be used to prepare a flex..

  Hypothesis for population variances

We want to test the hypothesis that the population variances are equal.

  Doug needs to construct a 98 confidence interval for the

doug needs to construct a 98 confidence interval for the mean diameter of 3 inch schedule 40 drain pipe. he samples 25

  Assume we want to be 95 confident that the sample

many states are carefully considering steps that would help them collect sales tax on items purchased through the

  The probability that a university graduate will be offered

the probability that a university graduate will be offered no jobs within a month of graduation is estimated to be 5.

  Null hypothesis and alternate hypothesis

The report will be structured as follows: Section: For each question provide: The null hypothesis, The alternate hypothesis, The test statistic chosen (including which test), The critical value and decision rule and The P-value

  Normal distribution-mean

If the loss of weight of customers at the end of their first month is normally distributed with a mean of 6.7lbs and a standard deviation of 0.81lbs

  Example of independent samples or dependent samples

A university president randomly selects 10 tenured faculty from the College of Arts and Sciences and 10 ten- ured faculty from the College of Business. Each faculty member is then asked to rate his or her job satisfaction on a scale of 1 (very d..

  What is the upper control limit of three standard deviations

The standard deviation of the overall process is known to be 0.17 ounces. What is the upper control limit of 3 standard deviations?

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