Algorithm 1-1: algorithm analysis

Source: Internet
Author: User
Why algorithm analysis?


The analysis algorithm can provide the performance of the pre-Attention algorithm, which is better than that of the embedding algorithm, ensure the correctness of the algorithm, and understand the theoretical basis of the algorithm.


Example of successful Algorithms


Discrete Fourier transformation. If the brute force method is used, the complexity of the algorithm is n ^ 2. If FFT is used, the complexity of O (n logn) can be realized.

N-body simulation: the complexity can be reduced to n logn using the Barnes-hut algorithm.


By the way, we will send a dazzling figure of N-body simulation.



Barnes-hut Algorithm



Algorithm Analysis Steps


  1. Observe the characteristics of the problem and the expected results

  2. Based on the observed results, if

  3. Use cases that may occur if pre-commit is used

  4. Check whether the pre-Attention result is consistent with the observed features.

  5. Verify it repeatedly until it is consistent with the observed feature


Algorithm analysis principles


  • Lab must be repeated

  • If you must be able to deny

Related Article

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.