演算法課程大綱
A. 200分懸賞急用英譯漢
這幾個的確句型有些長,翻譯習慣也可以參照一下別人的,反正今天好象回答你的人好多.
-------------------------------
overview
The order of growth of the running time of an algorithm, defined in Chapter 2, gives a simple
characterization of the algorithm's efficiency and also allows us to compare the relative
performance of alternative algorithms. Once the input size n becomes large enough, merge
sort, with its Θ(n lg n) worst-case running time, beats insertion sort, whose worst-case running
time is Θ(n2). Although we can sometimes determine the exact running time of an algorithm,
as we did for insertion sort in Chapter 2, the extra precision is not usually worth the effort of
computing it. For large enough inputs, the multiplicative constants and lower-order terms of
an exact running time are dominated by the effects of the input size itself.
When we look at input sizes large enough to make only the order of growth of the running
time relevant, we are studying the asymptotic efficiency of algorithms. That is, we are
concerned with how the running time of an algorithm increases with the size of the input in
the limit, as the size of the input increases without bound. Usually, an algorithm that is
asymptotically more efficient will be the best choice for all but very small inputs.
概要
演算法運行時間的成長次序, 被定義在第二章里, 給演算法的特性一個簡單的描述並允許我們把它與供選擇的演算法進行比較。一旦輸入大小n變得足夠大, 合並排序法, 以Θ(nlgn) 最差運行時間,來檢驗最差運行時間是Θ(n2)的插入排序。雖然我們有時能確定演算法確切的運行時間, 但如同在第二章里我們為了插入排序,而努力計算額外精確度通常並沒有價值。為了足夠大的投入, 常數和一具體運行時間的低秩序期限的積由投入規模本身所控制.
當投入規模大到足夠確定相關命令運行時間的情況下, 我們應該學習漸進效率演算法。即,當輸入大小的增加沒有限制,我們就要考慮怎樣計算運行時間的增長變化,就像輸入大小有限制的時候那樣。通常, 除了非常小的輸入,漸進演算法是更加高效率的演算法,將是最佳的選擇。
This chapter gives several standard methods for simplifying the asymptotic analysis of
algorithms. The next section begins by defining several types of "asymptotic notation," of
which we have already seen an example in Θ-notation. Several notational conventions used
throughout this book are then presented, and finally we review the behavior of functions that
commonly arise in the analysis of algorithms.
本章講述了演算法漸進分析的幾種簡化方法。下一部分將首先定義幾種「漸進符號」,在這些符號中我們已經見過的如Θ符號。還將給出本書中通篇出現的幾種符號約定。最後我們將重溫一下出現在演算法分析中的常用函數的特性。
3.1 Asymptotic notation The notations we use to describe the asymptotic running time of an algorithm are defined in
terms of functions whose domains are the set of natural numbers N = {0, 1, 2, ...}.
Such notations are convenient for describing the worst-case running-time function T (n), which is
usually defined only on integer input sizes.
It is sometimes convenient, however, to abuse asymptotic notation in a variety of ways.
For example, the notation is easily extended to the domain of real numbers or, alternatively, restricted to a subset of the natural numbers. It is important, however, to understand the precise meaning of the notation so that when it is
abused, it is not misused. This section defines the basic asymptotic notations and also
introces some common abuses.
3.1 漸進法
我們用來描述連續運行時間演算法的一種記數法,其定義是:函數項的域值為自然數N={0,1,2,…}。
這種記數法在描述最簡單的連續時間函數T(n)是方便的,因為它的輸入范圍通常僅取整數。它有時是方便的,然而,我們需要用比較多的方式來描述不規則漸進記法。例如,記法很容易在實數域內取值,或者交替地限定在自然數的一個子集內。盡管記數法重要,但我們需要了解其精確涵義,以便函數不規則時它沒有被誤用。本節定義了基本的漸進記法並且介紹一些一般的不規則函數。
B. python中有哪些簡單的演算法,看了黑馬和中公的課程大綱,有推薦的不
編程語言和演算法沒有必然關系,
如果是實現的演算法,一般都是第三方庫方式,比如數據分析用到很多演算法
如果是方法論的演算法,比如貪心,分治之類的就更沒有具體實現了
Python裡面有的演算法恐怕就是排序了,timsort