Summary of problems solved by SiC exercises (1.45)

Source: Internet
Author: User

Exercise 1.45 is a summary of many previous exercises on fixed points.


This topic reviews the fixed point search method we used in Section 1.3.3. When looking for the fixed point of Y-> x/y, this transformation itself does not converge, an average damping is required.


For the transformation y-> X/(y ^ 2), it can also be reduced by an average damping.


However, one average damping is not enough for the four equations. That is to say, for a transformation like y-> X/(y ^ 3), one average damping is insufficient to converge, two Average damping measures are required.


The question follows the abstract principle and requires us to perform multiple tests to find out how many times the average damping is required for the transformation like y-> X/(y ^ N.


First, let's look at the rules we know,

Y-> X/(y ^ 1) requires one average damping.

Y-> X/(y ^ 2) requires one average damping.

Y-> X/(y ^ 3) requires two average damping times.


I guess it will require n/2 average damping?

Of course we can't simply guess it. We need to test it several times.


To facilitate the test, I wrote the following method:



(define (n-rt x n try-average-time)  (fixed-point ((repeat average-damp try-average-time) (lambda (y)  (/ x (fast-expt y (- n 1)) ) )) 1.0))


In this way, you can randomly specify the n and the corresponding average damping times, and test from five equations to see if the test results match my guess.


The test found that my guess is too unreliable. The test found that the, and equations can all achieve convergence through two average damping times.


Continue to guess (lg n) times. To tell the truth, I guess the degree of mathematics sensitivity before it reaches (LG N) times, after reading the results of many tests, some online students can locate (lg n.


Of course, this time I guessed it.


The final method I write is as follows:


(define (final-n-root x n)  (define (nth-root n)    (n-rt x n (lg n)))  (nth-root n))


The above method calls the previously defined N-RT process for testing, but simply uses (lg n) to calculate the average number of times of damping.


Summary of problems solved by SiC exercises (1.45)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.