20世纪科学界十大算法
数学十大创新计算方法

数学十大创新计算方法1. 蒙特卡洛方法蒙特卡洛方法是一种基于随机抽样的数值计算方法,被广泛应用于物理、工程、金融等领域。
该方法通过模拟随机过程,求解各种数学问题,如积分、最优化、概率等。
其主要优势在于能够处理复杂非线性问题,且易于并行化计算。
2. 有限元方法有限元方法是一种将连续问题离散化的数值计算方法,主要用于求解偏微分方程。
该方法将求解区域划分为若干个子区域,通过对子区域进行局部近似,建立有限元空间,从而得到全局近似解。
有限元方法在工程、物理、生物等领域具有广泛应用。
3. 谱方法谱方法是一种基于全局基函数的数值计算方法,主要应用于求解线性偏微分方程。
该方法将求解区域映射到谱空间,利用全局基函数展开解,从而获得高精度的数值解。
谱方法在气象、海洋、量子物理等领域具有显著优势。
4. 数值模拟方法数值模拟方法是通过计算机模拟实际问题,求解数学模型的一种方法。
该方法可以模拟各种复杂现象,如流体动力学、电磁场、生物分子动力学等。
数值模拟方法在科学研究、工程设计、医学等领域具有重要应用价值。
5. 机器方法机器方法是一种利用数据驱动的计算方法,通过从数据中得到模型参数,从而解决实际问题。
该方法在图像识别、语音识别、自然语言处理等领域取得了显著成果。
近年来,机器方法在数学计算领域也得到了广泛关注。
6. 优化方法优化方法是求解数学优化问题的一种方法,主要包括线性规划、非线性规划、整数规划等。
优化方法在生产、金融、物流等领域具有广泛应用,可以帮助人们找到最优解或近似最优解。
7. 符号计算方法符号计算方法是一种基于数学符号进行计算的方法,主要用于求解代数、微分等数学问题。
符号计算方法在数学、物理、计算机科学等领域具有重要应用。
8. 随机算法随机算法是一种基于随机过程的计算方法,主要用于求解复杂问题。
随机算法在理论计算机科学、密码学、统计学等领域具有广泛应用。
9. 并行计算方法并行计算方法是一种利用多处理器同时执行多个任务的方法,可以显著提高计算效率。
20世纪十大算法(英文版)

1from SIAM News , V olume 33, Number 4By Barry A. CipraAlgos is the Greek word for pain. Algor is Latin, to be cold. Neither is the root for algorithm , which stems instead from al-Khwarizmi, the name of the ninth-century Arab scholar whose book al-jabr wa’l muqabalah devolved into today’s high school algebra textbooks. Al-Khwarizmi stressed the importance of methodical procedures for solving problems. Were he around today,he’d no doubt be impressed by the advances in his eponymous approach.Some of the very best algorithms of the computer age are highlighted in the January/February 2000 issue of Computing in Science & Engineering , a joint publication of the American Institute of Physics and the IEEE Computer Society. Guest editors Jack Don-garra of the University of Tennessee and Oak Ridge National Laboratory and Fran-cis Sullivan of the Center for Comput-ing Sciences at the Institute for Defense Analyses put togeth-er a list they call the “Top Ten Algorithms of the Century.”“We tried to assemble the 10 al-gorithms with the greatest influence on the development and practice of science and engineering in the 20th century,” Dongarra and Sullivan write. As with any top-10 list, their selections—and non-selections—are bound to be controversial, they acknowledge. When it comes to picking the algorithmic best, there seems to be no best algorithm.Without further ado, here’s the CiSE top-10 list, in chronological order. (Dates and names associated with the algorithms should be read as first-order approximations. Most algorithms take shape over time, with many contributors.)1946: John von Neumann, Stan Ulam, and Nick Metropolis, all at the Los Alamos Scientific Laboratory, cook up the Metropolis algorithm, also known as the Monte Carlo method .The Metropolis algorithm aims to obtain approximate solutions to numerical problems with unmanageably many degrees of freedom and to combinatorial problems of factorial size, by mimicking a random process. Given the digital computer’s reputation fordeterministic calculation, it’s fitting that one of its earliest applications was the generation of random numbers.1947: George Dantzig, at the RAND Corporation, creates the simplex method for linear programming .In terms of widespread application, Dantzig’s algorithm is one of the most successful of all time: Linearprogramming dominates the world of industry, where economic survival depends on the ability to optimizewithin budgetary and other constraints. (Of course, the “real” problems of industry are often nonlinear; the useof linear programming is sometimes dictated by the computational budget.) The simplex method is an elegantway of arriving at optimal answers. Although theoretically susceptible to exponential delays, the algorithmin practice is highly efficient—which in itself says something interesting about the nature of computation.1950: Magnus Hestenes, Eduard Stiefel, and Cornelius Lanczos, all from the Institute for Numerical Analysisat the National Bureau of Standards, initiate the development of Krylov subspace iteration methods .These algorithms address the seemingly simple task of solving equations of the form Ax =b . The catch,of course, is that A is a huge n ´n matrix, so that the algebraic answer x =b /A is not so easy to compute.(Indeed, matrix “division” is not a particularly useful concept.) Iterative methods—such as solving equations ofthe form Kx i +1=Kx i +b –Ax i with a simpler matrix K that’s ideally “close” to A —lead to the study of Krylov subspaces. Named for the Russian mathematician Nikolai Krylov, Krylov subspaces are spanned by powers of a matrix applied to an initial “remainder” vector r 0=b –Ax 0. Lanczos found a nifty way to generate an orthogonal basis for such a subspace when the matrix is symmetric. Hestenes and Stiefel proposed an even niftier method, known as the conjugate gradient method, for systems that are both symmetric and positive definite. Over the last 50 years, numerous researchers have improved and extended these algorithms.The current suite includes techniques for non-symmetric systems, with acronyms like GMRES and Bi-CGSTAB. (GMRES and Bi-CGSTAB premiered in SIAM Journal on Scientific and Statistical Computing , in 1986 and 1992,respectively.)1951: Alston Householder of Oak Ridge National Laboratory formalizes the decompositional approachto matrix computations .The ability to factor matrices into triangular, diagonal, orthogonal, and other special forms has turnedout to be extremely useful. The decompositional approach has enabled software developers to produceflexible and efficient matrix packages. It also facilitates the analysis of rounding errors, one of the bigbugbears of numerical linear algebra. (In 1961, James Wilkinson of the National Physical Laboratory inLondon published a seminal paper in the Journal of the ACM , titled “Error Analysis of Direct Methodsof Matrix Inversion,” based on the LU decomposition of a matrix as a product of lower and uppertriangular factors.)1957: John Backus leads a team at IBM in developing the Fortran optimizing compiler .The creation of Fortran may rank as the single most important event in the history of computer programming: Finally, scientists The Best of the 20th Century: Editors Name T op 10 Algorithms In terms of w ide-spread use, George Dantzig’s simplexmethod is among the most successful al-gorithms of all time.Alston Householder2(and others) could tell the computer what they wanted it to do, without having to descend into the netherworld of machine code.Although modest by modern compiler standards—Fortran I consisted of a mere 23,500 assembly-language instructions—the early compiler was nonetheless capable of surprisingly sophisticated computations. As Backus himself recalls in a recent history of Fortran I, II, and III, published in 1998 in the IEEE Annals of the History of Computing , the compiler “produced code of such efficiency that its output would startle the programmers who studied it.”1959–61: J.G.F. Francis of Ferranti Ltd., London, finds a stable method for computing eigenvalues, known as the QR algorithm .Eigenvalues are arguably the most important numbers associated with matrices—and they can be the trickiest to compute. It’s relatively easy to transform a square matrix into a matrix that’s “almost” upper triangular, meaning one with a single extra set of nonzero entries just below the main diagonal. But chipping away those final nonzeros, without launching an avalanche of error,is nontrivial. The QR algorithm is just the ticket. Based on the QR decomposition, which writes A as the product of an orthogonal matrix Q and an upper triangular matrix R , this approach iteratively changes A i =QR into A i +1=RQ , with a few bells and whistles for accelerating convergence to upper triangular form. By the mid-1960s, the QR algorithm had turned once-formidable eigenvalue problems into routine calculations.1962: Tony Hoare of Elliott Brothers, Ltd., London, presents Quicksort .Putting N things in numerical or alphabetical order is mind-numbingly mundane. The intellectual challenge lies in devising ways of doing so quickly. Hoare’s algorithm uses the age-old recursive strategy of divide and conquer to solve the problem: Pick one element as a “pivot,” separate the rest into piles of “big” and “small” elements (as compared with the pivot), and then repeat this procedure on each pile. Although it’s possible to get stuck doing all N (N –1)/2 comparisons (especially if you use as your pivot the first item on a list that’s already sorted!), Quicksort runs on average with O (N log N ) efficiency. Its elegant simplicity has made Quicksort the pos-terchild of computational complexity.1965: James Cooley of the IBM T.J. Watson Research Center and John Tukey of PrincetonUniversity and AT&T Bell Laboratories unveil the fast Fourier transform .Easily the most far-reaching algo-rithm in applied mathematics, the FFT revolutionizedsignal processing. The underlying idea goes back to Gauss (who needed to calculate orbitsof asteroids), but it was the Cooley–Tukey paper that made it clear how easily Fouriertransforms can be computed. Like Quicksort, the FFT relies on a divide-and-conquerstrategy to reduce an ostensibly O (N 2) chore to an O (N log N ) frolic. But unlike Quick- sort,the implementation is (at first sight) nonintuitive and less than straightforward. This in itselfgave computer science an impetus to investigate the inherent complexity of computationalproblems and algorithms.1977: Helaman Ferguson and Rodney Forcade of Brigham Young University advance an integer relation detection algorithm .The problem is an old one: Given a bunch of real numbers, say x 1, x 2, ... , x n , are there integers a 1, a 2, ... , a n (not all 0) for which a 1x 1 + a 2x 2 + ... + a n x n = 0? For n = 2, the venerable Euclidean algorithm does the job, computing terms in the continued-fraction expansion of x 1/x 2. If x 1/x 2 is rational, the expansion terminates and, with proper unraveling, gives the “smallest” integers a 1 and a 2.If the Euclidean algorithm doesn’t terminate—or if you simply get tired of computing it—then the unraveling procedure at least provides lower bounds on the size of the smallest integer relation. Ferguson and Forcade’s generalization, although much more difficult to implement (and to understand), is also more powerful. Their detection algorithm, for example, has been used to find the precise coefficients of the polynomials satisfied by the third and fourth bifurcation points, B 3 = 3.544090 and B 4 = 3.564407,of the logistic map. (The latter polynomial is of degree 120; its largest coefficient is 25730.) It has also proved useful in simplifying calculations with Feynman diagrams in quantum field theory.1987: Leslie Greengard and Vladimir Rokhlin of Yale University invent the fast multipole algorithm .This algorithm overcomes one of the biggest headaches of N -body simulations: the fact that accurate calculations of the motions of N particles interacting via gravitational or electrostatic forces (think stars in a galaxy, or atoms in a protein) would seem to require O (N 2) computations—one for each pair of particles. The fast multipole algorithm gets by with O (N ) computations. It does so by using multipole expansions (net charge or mass, dipole moment, quadrupole, and so forth) to approximate the effects of a distant group of particles on a local group. A hierarchical decomposition of space is used to define ever-larger groups as distances increase.One of the distinct advantages of the fast multipole algorithm is that it comes equipped with rigorous error estimates, a feature that many methods lack.What new insights and algorithms will the 21st century bring? The complete answer obviously won’t be known for another hundred years. One thing seems certain, however. As Sullivan writes in the introduction to the top-10 list, “The new century is not going to be very restful for us, but it is not going to be dull either!”Barry A. Cipra is a mathematician and writer based in Northfield, Minnesota.James CooleyJohn Tukey。
世界著名的十大公式

世界著名的十大公式一、傅立叶变换在世界最伟大的十大公式中傅立叶变换对于不喜欢数学的朋友们来说可能就很难懂了,简单讲它的出现对数字频率领域有很大的推动作用,而且支持任何不规则信号的变换。
二、1+1=21+1=2这个公式和上一个相比较应该就是无人不知了吧,从幼儿园开始它就伴随着我们,简单好理解,它的出现在整个数学领域可以说是引起轰动了的呢!三、毕达哥拉斯定理毕达哥拉斯定理也就是我们数学学习生涯中常见勾股定理,如今有四百多种图形被毕达哥拉斯定理给证明了,是非常伟大又典型的解决图形问题的公式。
四、麦克斯韦方程组人们评价说,如果没有麦克斯韦方程组就没有现代社会的文明,整个方程也是完美到无可挑剔,可以说宇宙间的任何电磁用这个方程组都能很好的被解释。
五、欧拉公式这个欧拉公式从形式上看非常的巧妙,没有任何多余的“杂质”,数学家们评论说凡是第一眼爱上这个公式的人必定会成为数学家,可见该公式的伟大之处。
六、质能方程在世界最伟大的十大公式中质能方程著名的物理学家爱因斯坦提出来的,该公式很好的揭示了质量和能量之间的关系,也正是质能方程的出现才有了当今的原子弹,氢弹等。
七、德布罗意方程组德布罗意方程组揭示出了任何物质都是有粒子性和波动性的,让波长和能量等之间有了一个很好的关系解释,提出者也在1929年获得了诺贝尔奖。
八、圆的周长公式圆的周长公式,这个伴随着整个数学学习生涯,如果用圆的周长公式来说计算太阳系包起来的周长,误差的直径不到百万分之一。
九、牛顿第二定律牛顿第二定律可以说是当下物理学的核心公式,它的出现可以是标志着真正物理学研究的开始,学习上好多的方程也都要依靠牛顿第二定律导出来。
十、薛定谔方程在世界最伟大的十大公式中薛定谔方程可谓是经典中的经典,它的出现很好的揭示了力学中位移和速度的关系,如今该公式在物理学的应用极为广泛,影响力也很大。
20世纪十大算法

20世纪十大算法本世纪初,美国物理学会(American Institute of Physics)和IEEE计算机社团(IEEE Computer Society)的一本联合刊物《科学与工程中的计算》发表了由田纳西大学的Jack Dongarra和橡树岭国家实验室的Francis Sullivan联名撰写的“世纪十大算法”一文,该文“试图整理出在20世纪对科学和工程领域的发展产生最大影响力的十大算法”。
作者苦于“任何选择都将是充满争议的,因为实在是没有最好的算法”,他们只好用编年顺序依次列出了这十项算法领域人类智慧的巅峰之作——给出了一份没有排名的算法排行榜。
有趣的是,该期杂志还专门邀请了这些算法相关领域的“大拿”为这十大算法撰写十篇综述文章,实在是蔚为壮观。
本文的目的,便是要带领读者走马观花,一同回顾当年这一算法界的盛举。
1946蒙特卡洛方法在广场上画一个边长一米的正方形,在正方形内部随意用粉笔画一个不规则的形状,呃,能帮我算算这个不规则图形的面积么?蒙特卡洛(Monte Carlo)方法便是解决这个问题的巧妙方法:随机向该正方形内扔N(N是一个很大的自然数)个黄豆,随后数数有多少个黄豆在这个不规则几何形状内部,比如说有M个:那么,这个奇怪形状的面积便近似于M/N,N越大,算出来的值便越精确。
别小看这个数黄豆的笨办法,大到国家的民意测验,小到中子的移动轨迹,从金融市场的风险分析,到军事演习的沙盘推演,蒙特卡洛方法无处不在背后发挥着它的神奇威力。
蒙特卡洛方法由美国拉斯阿莫斯国家实验室的三位科学家John von Neumann(看清楚了,这位可是冯诺伊曼同志!),Stan Ulam和Nick Metropolis共同发明。
就其本质而言,蒙特卡洛方法是用类似于物理实验的近似方法求解问题,它的魔力在于,对于那些规模极大的问题,求解难度随着问题的维数(自变量个数)的增加呈指数级别增长,出现所谓的“维数的灾难”(Course of Dimensionality)。
[已整理]20世纪科学界十大算法
![[已整理]20世纪科学界十大算法](https://img.taocdn.com/s3/m/6bf2028e680203d8ce2f2419.png)
1962 快速排序算法
不少读者恐怕和我一样,看到“快速排序算法”(Quick Sort)这个条目时,心里的感觉是——“这可总算找到组织了”。相比于其他一些对程序员而言高深莫测的数学物理公式,快速排序算法真是我们朝夕相处的好伙伴——老板让你写个排序算法,如果你写出来的不是快速排序,你都不好意思跟同事打招呼。其实根本不用自己动手实现, 不论是ANSI C,C++ STL,还是Java SDK,天下几乎所有的SDK里都能找到它的某种实现版本。
话说回来,当年这帮开发Fortran的家伙真是天才——只用23500行汇编指令就完成了一个Fortran编译器,而且其效率之高令人叹为观止:当年在IBM 主持这一项目的负责人JohnBackus在数十年后,回首这段往事的时候也感慨,说它生成代码的效率“出乎了所有开发者的想象”。看来作为程序员,自己写的程序跑起来“出乎自己的想象”,有时候还真不一定是件坏事!
快速排序的平均时间复杂度仅仅为O(Nlog(N)),相比于普通选择排序和冒泡排序等而言,实在是历史性的创举。
1965 快速傅立叶变换
如果要评选对我们的日常生活影响最大的算法,快速傅立叶变换算法应该是当仁不让的总冠军——每天当拿起话筒,打开手机,听mp3,看DVD,用DC拍照 ——毫不夸张的说,哪里有数字信号处理,哪里就有快速傅立叶变换。快速傅立叶算法是离散傅立叶算法(这可是数字信号处理的基石)的一种快速算法,它有 IBM 华生研究院的James Cooley和普林斯顿大学的John Tukey共同提出,其时间复杂度仅为O(Nlog(N));比时间效率更为重要的是,快速傅立叶算法非常容易用硬件实现,因此它在电子技术领域得到极其广泛的应用。
1946 蒙特卡洛方法
在广场上画一个边长一米的正方形,在正方形内部随意用粉笔画一个不规则的形状,呃,能帮我算算这个不规则图形的面积么?蒙特卡洛(Monte Carlo)方法便是解决这个问题的巧妙方法:随机向该正方形内扔N(N 是一个很大的自然数)个黄豆,随后数数有多少个黄豆在这个不规则几何形状内部,比如说有M个:那么,这个奇怪形状的面积便近似于M/N,N越大,算出来的值便越精确。别小看这个数黄豆的笨办法,大到国家的民意测验,小到中子的移动轨迹,从金融市场的风险分析,到军事演习的沙盘推演,蒙特卡洛方法无处不在背后发挥着它的神奇威力。
风靡全球的十大算法

风靡全球的十大算法1 排序算法所谓排序,就是使一串记录,按照其中的某个或某些关键字的大小,递增或递减的排列起来的操作。
排序算法,就是如何使得记录按照要求排列的方法。
排序算法在很多领域得到相当地重视,尤其是在大量数据的处理方面。
一个优秀的算法可以节省大量的资源。
稳定的•冒泡排序(bubble sort)— O(n^2)•鸡尾酒排序(Cocktail sort,双向的冒泡排序) — O(n^2)•插入排序(insertion sort)— O(n^2)•桶排序(bucket sort)— O(n); 需要 O(k) 额外空间•计数排序(counting sort) — O(n+k); 需要 O(n+k) 额外空间•合并排序(merge sort)— O(nlog n);需要 O(n) 额外空间•原地合并排序— O(n^2)•二叉排序树排序(Binary tree sort)— O(nlog n)期望时间;O(n^2)最坏时间;需要 O(n) 额外空间•鸽巢排序(Pigeonhole sort)— O(n+k); 需要 O(k) 额外空间•基数排序(radix sort)—O(n·k); 需要 O(n) 额外空间•Gnome 排序— O(n^2)•图书馆排序— O(nlog n) withhigh probability,需要(1+ε)n 额外空间不稳定的•选择排序(selection sort)— O(n^2)•希尔排序(shell sort)— O(nlog n) 如果使用最佳的现在版本•组合排序— O(nlog n)•堆排序(heapsort)— O(nlog n)•平滑排序— O(nlog n)•快速排序(quicksort)—O(nlog n) 期望时间,O(n^2) 最坏情况;对于大的、乱数列表一般相信是最快的已知排序•Introsort—O(nlog n)•Patience sorting—O(nlog n+k) 最坏情况时间,需要额外的O(n+ k) 空间,也需要找到最长的递增子串行(longest increasing subsequence)不实用的•Bogo排序—O(n× n!) 期望时间,无穷的最坏情况。
20世纪最伟大的十大算法

二、1947 单纯形法
❖[1947: George Dantzig, at the RAND Corporation, creates the simplex method for linear programming.]
❖1947年,兰德公司的,Grorge Dantzig, 发明了单纯形方法。 单纯形法,此后成为了线性规划学科的重 要基石。
❖ 1950年:美国国家标准局数值分析研究所的,马 格努斯Hestenes,爱德华施蒂费尔和科尼利厄斯 的Lanczos,发明了Krylov子空间迭代法。
❖Krylov子空间迭代法是用来求解形如Ax=b 的方程, A是一个n*n 的矩阵,当n充分大时,直接计算变得 非常困难,而Krylov方法则巧妙地将其变为 Kxi+1=Kxi+b-Axi的迭代形式来求解。
❖线性规划作为运筹学(operation research) 的一部分,成为管理科学领域的一种重要 工具。
❖ 而Dantzig提出的单纯形法便是求解类似线 性规划问题的一个极其有效的方法。
三、1950 Krylov子空间迭代法
❖[1950: Magnus Hestenes, Eduard Stiefel, and Cornelius Lanczos, all from the Institute for Numerical Analysis at the National Bureau of Standards, initiate the development of Krylov subspace iteration methods.]
❖ 所谓线性规划,简单的说,就是给例如a1*x1+b1*x2+c1*x3>0),求一个给定的目 标函数的极值。
世界十大经典算法

世界十大经典算法世界十大经典算法算法是计算机科学中非常重要的概念,它是一种解决问题的方法和步骤的描述。
以下是世界上广泛应用且被业界认可的十大经典算法: 1. 二分查找算法(Binary Search Algorithm):在有序数组中查找目标元素的算法。
通过将目标元素与数组中间元素进行比较,可以将搜索范围缩小一半,从而提高搜索效率。
2. 快速排序算法(Quick Sort Algorithm):一种基于分治法的排序算法。
它通过选择一个基准元素,将数组分为两个子数组,其中一个子数组的元素都小于等于基准元素,另一个子数组的元素都大于等于基准元素,然后递归地对子数组进行排序。
3. 归并排序算法(Merge Sort Algorithm):一种基于分治法的排序算法。
它将数组分成两个子数组,然后递归地对子数组进行排序,并将排序好的子数组合并成一个有序的数组。
4. 广度优先搜索算法(Breadth-First Search Algorithm):用于图遍历的一种算法。
它从图的某个顶点开始,逐层遍历其邻接顶点,直到遍历完所有顶点。
广度优先搜索常用于寻找最短路径或解决迷宫等问题。
5. 深度优先搜索算法(Depth-First Search Algorithm):用于图遍历的一种算法。
它从图的某个顶点开始,沿着一条路径一直向下遍历,直到无法继续为止,然后回溯到上一个没有遍历完的邻接顶点,继续遍历其他路径。
深度优先搜索常用于生成迷宫、图的连通性问题等。
6. Dijkstra算法(Dijkstra's Algorithm):用于求解单源最短路径问题的一种算法。
它根据权重赋值给每条边,计算出从源节点到其他节点的最短路径。
7. 动态规划算法(Dynamic Programming Algorithm):一种基于分治法的优化算法。
动态规划在问题可分解为重叠子问题时,通过保存子问题的解,避免重复计算,从而提高算法效率。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
20世纪科学界十大算法
本世纪初,美国物理学会(American Institute of Physics)和IEEE计算机社团 (IEEE Computer Society)的一本联合刊物《科学与工程中的计算》发表了由田纳西大学的Jack Dongarra和橡树岭国家实验室的Francis Sullivan 联名撰写的“世纪十大算法”一文,该文“试图整理出在20世纪对科学和工程领域的发展产生最大影响力的十大算法”。
作者苦于“任何选择都将是充满争议的,因为实在是没有最好的算法”,他们只好用编年顺序依次列出了这十项算法领域人类智慧的巅峰之作——给出了一份没有排名的算法排行榜。
有趣的是,该期杂志还专门邀请了这些算法相关领域的“大拿”为这十大算法撰写十篇综述文章,实在是蔚为壮观。
本文的目的,便是要带领读者走马观花,一同回顾当年这一算法界的盛举。
1946 蒙特卡洛方法
在广场上画一个边长一米的正方形,在正方形内部随意用粉笔画一个不规则的形状,呃,能帮我算算这个不规则图形的面积么?蒙特卡洛(Monte Carlo)方法便是解决这个问题的巧妙方法:随机向该正方形内扔N(N 是一个很大的自然数)个黄豆,随后数数有多少个黄豆在这个不规则几何形状内部,比如说有M 个:那么,这个奇怪形状的面积便近似于M/N,N越大,算出来的值便越精确。
别小看这个数黄豆的笨办法,大到国家的民意测验,小到中子的移动轨迹,从金融市场的风险分析,到军事演习的沙盘推演,蒙特卡洛方法无处不在背后发挥着它的神奇威力。
蒙特卡洛方法由美国拉斯阿莫斯国家实验室的三位科学家John von Neumann(看清楚了,这位可是冯诺伊曼同志!),Stan Ulam 和 Nick Metropolis 共同发明。
就其本质而言,蒙特卡洛方法是用类似于物理实验的近似方法求解问题,它的魔力在于,对于那些规模极大的问题,求解难度随着问题的维数(自变量个数)的增加呈指数级别增长,出现所谓的“维数的灾难”(Course of Dimensionality)。
对此,传统方法无能为力,而蒙特卡洛方法却可以独辟蹊径,基于随机仿真的过程给出近似的结果。
最后八卦一下,Monte Carlo这个名字是怎么来的?它是摩纳哥的一座以博彩业闻名的城市,赌博其实是门概率的高深学问,不是么?
1947 单纯形法
单纯形法是由大名鼎鼎的“预测未来”的兰德公司的Grorge Dantzig发明的,它成为线性规划学科的重要基石。
所谓线性规划,简单的说,就是给定一组线性(所有变量都是一次幂)约束条件(例如a1*x1+ b1*x2+c1*x3>0),求一个给定的目标函数的极值。
这么说似乎也太太太抽象了,但在现实中能派上用场的例子可不罕见——比如对于一个公司而言,其能够投入生产的人力物力有限(“线性约束条件”),而公司的目标是利润最大化(“目标函数取最大值”),看,线性规划并不抽象吧!线性规划作为运筹学(operation research)的一部分,成为管理科学领域的一种重要工具。
而Dantzig提出的单纯形法便是求解类似线性规划问题的一个极其有效的方法,说来惭愧,本科二年级的时候笔者也学过一学期的运筹学,现在脑子里能想起的居然只剩下单纯形法了——不过这不也正说明
了该方法的简单和直观么?
顺便说句题外话,写过《万历十五年》的黄仁宇曾说中国的传统是“不能从数目字上管理”,我们习惯于“拍脑袋”,而不是基于严格的数据做决定,也许改变这一传统的方法之一就是全民动员学习线性规划喔。
1950Krylov子空间迭代法
1951 矩阵计算的分解方法
50年代初的这两个算法都是关于线性代数中的矩阵计算的,看到数学就头大的读者恐怕看到算法的名字已经开始皱眉毛了。
Krylov子空间叠代法是用来求解形如Ax=b 的方程,A是一个n*n 的矩阵,当n充分大时,直接计算变得非常困难,而Krylov方法则巧妙地将其变为Kxi+1=Kxi+b-Axi的迭代形式来求解。
这里的K(来源于作者俄国人Nikolai Krylov姓氏的首字母)是一个构造出来的接近于A的矩阵,而迭代形式的算法的妙处在于,它将复杂问题化简为阶段性的易于计算的子步骤。
1951年由橡树岭国家实验室的AlstonHouseholder提出的矩阵计算的分解方法,则证明了任何矩阵都可以分解为三角、对角、正交和其他特殊形式的矩阵,该算法的意义使得开发灵活的矩阵计算软件包成为可能。
1957 优化的Fortran编译器
说实话,在这份学术气息无比浓郁的榜单里突然冒出一个编译器(Compiler)如此工程化的东东实在让人有“关公战秦琼”的感觉。
不过换个角度想想,Fortran 这一门几乎为科学计算度身定制的编程语言对于科学家(尤其是数学家,物理学家)们实在是太重要了,简直是他们形影不离的一把瑞士军刀,这也难怪他们纷纷抢着要把票投给了它。
要知道,Fortran是第一种能将数学公式转化为计算机程序的高级语言,它的诞生使得科学家们真正开始利用计算机作为计算工具为他们的研究服务,这是计算机应用技术的一个里程碑级别的贡献。
话说回来,当年这帮开发Fortran的家伙真是天才——只用23500行汇编指令就完成了一个Fortran编译器,而且其效率之高令人叹为观止:当年在IBM 主持这一项目的负责人JohnBackus在数十年后,回首这段往事的时候也感慨,说它生成代码的效率“出乎了所有开发者的想象”。
看来作为程序员,自己写的程序跑起来“出乎自己的想象”,有时候还真不一定是件坏事!
1959-61 计算矩阵特征值的QR算法
又是一个和线性代数有关的算法,学过线性代数的应该还记得“矩阵的特征值”吧?计算特征值是矩阵计算的最核心内容之一,传统的求解方案涉及到高次方程求根,当问题规模大的时候十分困难。
QR算法把矩阵分解成一个正交矩阵(什么是正交矩阵?!还是赶紧去翻书吧!)与一个上三角矩阵的积,和前面提到的 Krylov 方法类似,这又是一个迭代算法,它把复杂的高次方程求根问题化简为阶段性的易于计算的子步骤,使得用计算机求解大规模矩阵特征值成为可能。
这个算法的作者是来自英国伦敦的J.G.F. Francis。
1962 快速排序算法
不少读者恐怕和我一样,看到“快速排序算法”(Quick Sort)这个条目时,
心里的感觉是——“这可总算找到组织了”。
相比于其他一些对程序员而言高深莫测的数学物理公式,快速排序算法真是我们朝夕相处的好伙伴——老板让你写个排序算法,如果你写出来的不是快速排序,你都不好意思跟同事打招呼。
其实根本不用自己动手实现, 不论是ANSI C,C++ STL,还是Java SDK,天下几乎所有的SDK里都能找到它的某种实现版本。
快速排序算法最早由Tony Hoare爵士设计,它的基本思想是将待排序列分为两半,左边的一半总是“小的”,右边的一半总是“大的”,这一过程不断递归持续下去,直到整个序列有序。
说起这位Tony Hoare爵士,快速排序算法其实只是他不经意间的小小发现而已,他对于计算机贡献主要包括形式化方法理论,以及ALGOL60 编程语言的发明等,他也因这些成就获得1980 年图灵奖。
快速排序的平均时间复杂度仅仅为O(Nlog(N)),相比于普通选择排序和冒泡排序等而言,实在是历史性的创举。
1965 快速傅立叶变换
如果要评选对我们的日常生活影响最大的算法,快速傅立叶变换算法应该是当仁不让的总冠军——每天当拿起话筒,打开手机,听mp3,看DVD,用DC 拍照 ——毫不夸张的说,哪里有数字信号处理,哪里就有快速傅立叶变换。
快速傅立叶算法是离散傅立叶算法(这可是数字信号处理的基石)的一种快速算法,它有 IBM 华生研究院的James Cooley和普林斯顿大学的John Tukey共同提出,其时间复杂度仅为O(Nlog(N));比时间效率更为重要的是,快速傅立叶算法非常容易用硬件实现,因此它在电子技术领域得到极其广泛的应用。
1977 整数关系探测算法
整数关系探测是个古老的问题,其历史甚至可以追溯到欧几里德的时代。
具体的说:
给定—组实数X1,X2,...,Xn,是否存在不全为零的整数a1,a2,...an,使得:a1x1 +a2x2 + . . . + a n x n = 0 这一年BrighamYoung大学的Helaman Ferguson 和Rodney Forcade解决了这一问题。
至于这个算法的意义嘛,呃,该算法应用于“简化量子场论中的Feynman图的计算”——太深奥的学问拉!
1987 快速多极算法
日历翻到了1987 年,这一年的算法似乎更加玄奥了,耶鲁大学的Leslie Greengard和Vladimir Rokhlin提出的快速多极算法用来计算“经由引力或静电力相互作用的N 个粒子运动的精确计算——例如银河系中的星体,或者蛋白质中的原子间的相互作用”,天哪,不是我不明白,这世界真是变得快!。