A DATA-PARALLEL ALGORITHM FOR MINIMUM-WIDTH TREE LAYOUT AND ITS PROOFS

合集下载

扫题出答案软件

扫题出答案软件

扫题出答案软件【篇一:软件工程试题和答案】软件开发的各种资源中,(b )是最重要的资源。

a开发工具b方法 c硬件环境d人员2、软件的复杂性是( a ),它引起人员通信困难、开发费用超支、开发时间超时等问题。

a固有的b人为的 c可消除的d不可降低的3、原型化方法是用户和软件开发人员之间进行的一种交互过程,适用于( a )系统。

a需求不确定的b需求确定的 c管理信息d决策支持4、单元测试的测试用例主要根据( d )的结果来设计。

a需求分析b源程序 c概要设计d详细设计5、(a)是软件生存期中的一系列相关软件工程活动的集合,它由软件规格说明、软件设计与开发、软件确认、软件改进等活动组成。

a软件过程b软件工具 c软件生存周质量保证d软件工程6、( a )意味着一个操作在不同的类中可以有不同的实现方式。

a多态性b类的复用c封装7、软件测试计划开始于需求分析阶段,完成于( d )阶段。

a需求分析b软件设计 c软件实现d软件测试8、在软件生存周期的瀑布模型中一般包括计划、( c )、设计、编码、测试、维护等阶段。

a可行性分析 b需求采集 c需求分析 d问题定义9. 软件需求分析阶段的测试手段一般采用( c )。

a总结b阶段性报告 c需求分析评审d不测试10. ( c )是把对象的属性和操作结合在一起,构成一个独立的对象,其内部信息对外界是隐蔽的,外界只能通过有限的接口与对象发生联系。

a多态性b继承 c封装d消息11. 软件测试是为了( b )而执行程序的过程。

a纠正错误b发现错误 c避免错误d证明正确12. 在结构化分析方法中,(c)表达系统内部数据运动的图形化技术。

a数据字典b实体关系图 c数据流图d状态转换图13. 软件工程的基本要素包括方法、工具和( a )。

a过程b软件系统 c硬件环境d人员14. turbo pascal是( a)软件。

a、系统软件b、人工智能c、事务软件d、应用软件15、选择结构的复杂性比顺序结构的复杂性要(b )。

数学专业英语 第2章课后答案

数学专业英语 第2章课后答案

2.12.比:ratio 比例:proportion 利率:interest rate 速率:speed 除:divide 除法:division 商:quotient 同类量:like quantity 项:term 线段:line segment 角:angle 长度:length 宽:width高度:height 维数:dimension 单位:unit 分数:fraction 百分数:percentage3.(1)一条线段和一个角的比没有意义,他们不是相同类型的量.(2)比较式通过说明一个量是另一个量的多少倍做出的,并且这两个量必须依据相同的单位.(5)为了解一个方程,我们必须移项,直到未知项独自处在方程的一边,这样就可以使它等于另一边的某量.4.(1)Measuring the length of a desk, is actually comparing the length of the desk to that of a ruler.(3)Ratio is different from the measurement, it has no units. The ratio of the length and the width of the same book does not vary when the measurement unit changes.(5)60 percent of students in a school are female students, which mean that 60 students out of every 100 students are female students.2.22.初等几何:elementary geometry 三角学:trigonometry 余弦定理:Law of cosines 勾股定理/毕达哥拉斯定理:Gou-Gu theorem/Pythagoras theorem 角:angle 锐角:acute angle 直角:right angle 同终边的角:conterminal angles 仰角:angle of elevation 俯角:angle of depression 全等:congruence 夹角:included angle 三角形:triangle 三角函数:trigonometric function直角边:leg 斜边:hypotenuse 对边:opposite side 临边:adjacent side 始边:initial side 解三角形:solve a triangle 互相依赖:mutually dependent 表示成:be denoted as 定义为:be defined as3.(1)Trigonometric function of the acute angle shows the mutually dependent relations between each sides and acute angle of the right triangle.(3)If two sides and the included angle of an oblique triangle areknown, then the unknown sides and angles can be found by using the law of cosines.(5)Knowing the length of two sides and the measure of the included angle can determine the shape and size of the triangle. In other words, the two triangles made by these data are congruent.4.(1)如果一个角的顶点在一个笛卡尔坐标系的原点并且它的始边沿着x轴正方向,这个角被称为处于标准位置.(3)仰角和俯角是以一条以水平线为参考位置来测量的,如果正被观测的物体在观测者的上方,那么由水平线和视线所形成的角叫做仰角.如果正被观测的物体在观测者的下方,那么由水平线和视线所形成的的角叫做俯角.(5)如果我们知道一个三角形的两条边的长度和对着其中一条边的角度,我们如何解这个三角形呢?这个问题有一点困难来回答,因为所给的信息可能确定两个三角形,一个三角形或者一个也确定不了.2.32.素数:prime 合数:composite 质因数:prime factor/prime divisor 公倍数:common multiple 正素因子: positive prime divisor 除法算式:division equation 最大公因数:greatest common divisor(G.C.D) 最小公倍数: lowest common multiple(L.C.M) 整除:divide by 整除性:divisibility 过程:process 证明:proof 分类:classification 剩余:remainder辗转相除法:Euclidean algorithm 有限集:finite set 无限的:infinitely 可数的countable 终止:terminate 与矛盾:contrary to3.(1)We need to study by which integers an integer is divisible, that is , what factor it has. Specially, it is sometime required that an integer is expressed as the product of its prime factors.(3)The number 1 is neither a prime nor a composite number;A composite number in addition to being divisible by 1 and itself, can also be divisible by some prime number.(5)The number of the primes bounded above by any given finite integer N can be found by using the method of the sieve Eratosthenes.4.(1)数论中一个重要的问题是哥德巴赫猜想,它是关于偶数作为两个奇素数和的表示.(3)一个数,形如2p-1的素数被称为梅森素数.求出5个这样的数.(5)任意给定的整数m和素数p,p的仅有的正因子是p和1,因此仅有的可能的p和m的正公因子是p和1.因此,我们有结论:如果p是一个素数,m是任意整数,那么p整除m,要么(p,m)=1.2.42.集:set 子集:subset 真子集:proper subset 全集:universe 补集:complement 抽象集:abstract set 并集:union 交集:intersection 元素:element/member 组成:comprise/constitute包含:contain 术语:terminology 概念:concept 上有界:bounded above 上界:upper bound 最小的上界:least upper bound 完备性公理:completeness axiom3.(1)Set theory has become one of the common theoretical foundation and the important tools in many branches of mathematics.(3)Set S itself is the improper subset of S; if set T is a subset of S but not S, then T is called a proper subset of S.(5)The subset T of set S can often be denoted by {x}, that is, T consists of those elements x for which P(x) holds.(7)This example makes the following question become clear, that is, why may two straight lines in the space neither intersect nor parallel.4.(1)设N是所有自然数的集合,如果S是所有偶数的集合,那么它在N中的补集是所有奇数的集合.(3)一个非空集合S称为由上界的,如果存在一个数c具有属性:x<=c对于所有S中的x.这样一个数字c被称为S的上界.(5)从任意两个对象x和y,我们可以形成序列(x,y),它被称为一个有序对,除非x=y,否则它当然不同于(y,x).如果S和T是任意集合,我们用S*T表示所有有序对(x,y),其中x术语S,y属于T.在R.笛卡尔展示了如何通过实轴和它自己的笛卡尔积来描述平面的点之后,集合S*T被称为S和T的笛卡尔积.2.52.竖直线:vertical line 水平线:horizontal line 数对:pairs of numbers 有序对:ordered pairs 纵坐标:ordinate 横坐标:abscissas 一一对应:one-to-one 对应点:corresponding points圆锥曲线:conic sections 非空图形:non vacuous graph 直立圆锥:right circular cone 定值角:constant angle 母线:generating line 双曲线:hyperbola 抛物线:parabola 椭圆:ellipse退化的:degenerate 非退化的:nondegenerate任意的:arbitrarily 相容的:consistent 在几何上:geometrically 二次方程:quadratic equation 判别式:discriminant 行列式:determinant3.(1)In the planar rectangular coordinate system, one can set up aone-to-one correspondence between points and ordered pairs of numbers and also a one-to-one correspondence between conic sections and quadratic equation.(3)The symbol can be used to denote the set of ordered pairs(x,y)such that the ordinate is equal to the cube of the abscissa.(5)According to the values of the discriminate,the non-degenerate graph of Equation (iii) maybe known to be a parabola, a hyperbolaor an ellipse.4.(1)在例1,我们既用了图形,也用了代数的代入法解一个方程组(其中一个方程式二次的,另一个是线性的)。

k-medoids 聚类公式字母公式

k-medoids 聚类公式字母公式

k-medoids 聚类算法是一种常用的基于距离的聚类方法,它主要用于将数据集中的数据点划分为若干个类别,使得同一类别内的数据点之间的相似度较高,不同类别之间的相似度较低。

与k-means 算法不同的是,k-medoids 算法使用代表性的数据点(medoids)来代表每个类别,从而使得对噪声和异常值更加稳健。

在k-medoids 聚类算法中,我们首先需要确定聚类的数量k,然后从数据集中随机选择k个数据点作为初始的medoids。

接下来的步骤是不断地迭代,直至收敛为止。

具体的迭代过程如下:1. 初始化:随机选择k个数据点作为初始的medoids。

2. 分配数据点:对于每个数据点,计算它与各个medoids 的距离,并将其分配到距离最近的medoids 所代表的类别中。

3. 更新medoids:对于每个类别,选择一个新的medoids 来代表该类别,使得该类别内所有数据点到新medoids 的距离之和最小。

4. 判断收敛:检查新的medoids 是否与旧的medoids 相同,若相同则停止迭代,否则继续进行迭代。

在k-medoids 聚类算法中,距离的计算可以使用各种不同的距离度量方式,例如欧氏距离、曼哈顿距离等。

对于大规模的数据集,k-medoids 算法可能会比k-means 算法更具有优势,因为它在每次迭代时只需要计算medoids 之间的距离,而不需要计算所有数据点之间的距离,从而可以减少计算量。

k-medoids 聚类算法是一种有效且稳健的聚类方法,它在处理一些特定情况下可以取得比k-means 更好的聚类效果。

通过对数据进行有效的分组和分类,k-medoids 聚类算法在数据挖掘和模式识别领域具有广泛的应用前景。

K-medoids clustering algorithm is a widely used distance-based clustering method for partitioning the data points in a dataset into several categories, in which the similarity of data points within the same category is relatively high, while the similarity between different categories is relatively low. Unlike the k-means algorithm, the k-medoids algorithm uses representative data points (medoids) to represent each category, making it more robust to noise and outliers.In the k-medoids clustering algorithm, the first step is to determine the number of clusters, denoted as k, and then randomly select k data points from the dataset as the initial medoids. The following steps involve iterative processes until the algorithm converges.The specific iterative process is as follows:1. Initialization: randomly select k data points as the initial medoids.2. Data point assignment: for each data point, calculate its distance to each medoid and assign it to the category represented by the nearest medoid.3. Update medoids: for each category, select a new medoid to represent the category, so that the sum of the distances from all data points in the category to the new medoid is minimized.4. Convergence check: check whether the new medoids are the same as the old medoids. If they are the same, stop the iteration; otherwise, continue the iteration.In the k-medoids clustering algorithm, various distance metrics can be used for distance calculation, such as Euclidean distance, Manhattan distance, etc. For large-scale datasets, the k-medoids algorithm may have advantages over the k-means algorithm because it only needs to calculate the distance betweenmedoids at each iteration, rather than calculating the distance between all data points, which can reduce theputational workload.In conclusion, the k-medoids clustering algorithm is an effective and robust clustering method that can achieve better clustering results than the k-means algorithm in certain situations. By effectively grouping and classifying data, the k-medoids clustering algorithm has wide application prospects in the fields of data mining and pattern recognition.Moreover, the k-medoids algorithm can be further extended and applied in various domains, such as customer segmentation in marketing, anomaly detection in cybersecurity, and image segmentation inputer vision. In marketing, k-medoids clustering can be used to identify customer segments based on their purchasing behavior, allowingpanies to tailor their marketing strategies to different customer groups. In cybersecurity, k-medoids can help detect anomalies by identifying patterns that deviate from the norm in network traffic or user behavior. Inputer vision, k-medoids can be used for image segmentation to partition an image into different regions based on similarity, which is useful for object recognition and scene understanding.Furthermore, the k-medoids algorithm can also bebined with other machine learning techniques, such as dimensionality reduction, feature selection, and ensemble learning, to improve its performance and scalability. For example, using dimensionality reduction techniques like principalponent analysis (PCA) can help reduce theputational burden of calculating distances in high-dimensional data, while ensemble learning methods like boosting or bagging can enhance the robustness and accuracy of k-medoids clustering.In addition, research and development efforts can focus on optimizing the k-medoids algorithm for specific applications and datasets, such as developing parallel and distributed versions of the algorithm to handle big data, exploring adaptive and dynamic approaches to adjust the number of clusters based on the data characteristics, and integrating domain-specific knowledge or constraints into the clustering process to improve the interpretability and usefulness of the results.Overall, the k-medoids clustering algorithm is a powerful tool for data analysis and pattern recognition, with a wide range of applications and potential for further advancements andinnovations. Its ability to handle noise and outliers, its flexibility in distance metrics, and its scalability to large-scale datasets make it a valuable technique for addressing real-world challenges in various domains. As the field of data science and machine learning continues to evolve, the k-medoids algorithm will likely remain an important method for uncovering meaningful insights fromplex data.。

2024年9月GESP编程能力认证C++等级考试八级真题试卷(含答案)

2024年9月GESP编程能力认证C++等级考试八级真题试卷(含答案)

2024年9月GESP 编程能力认证C++等级考试八级真题试卷(含答案)一、单选题(每题2分,共30分)。

1.下面关于C++类和对象的说法,错误的是()。

A. 类的析构函数可以为虚函数。

B. 类的构造函数不可以为虚函数。

C. class 中成员的默认访问权限为private 。

D. struct 中成员的默认访问权限为private 。

2.对于一个具有n 个顶点的无向图,若采用邻接矩阵表示,则该矩阵的大小为()。

A. 2n n B. n ×nC. (n-1)×(n-1)D. (n+1)×(n+1)3.设有编号为A 、B 、C 、D 、E 的5个球和编号为A 、B 、C 、D 、E 的5个盒子。

现将这5个球投入5个盒子,要求每个盒子放一个球,并且恰好有两个球的编号与盒子编号相同,问有多少种不同的方法()。

A. 5B. 120C. 20D. 604.从甲地到乙地,可以乘高铁,也可以乘汽车,还可以乘轮船。

一天中,高铁有10班,汽车有5班,轮船有2班。

那么一天中乘坐这些交通工具从甲地到乙地共有多少种不同的走法()。

A. 100B. 60C. 30D. 175.题n 个结点的二叉树,执行释放全部结点操作的时间复杂度是()。

A. O(n)B. O(n log n)C. O(log n)D. O(2n )6.在一个单位圆上,随机分布n 个点,求这n 个点能被一个单位半圆周全部覆盖的概率()。

nA.1-n21B.2n1C.n1D.n27.下面pailie函数是一个实现排列的程序,横线处可以填入的是()。

#include <iostream>using namespace std;int sum =0;void swap(int & a, int & b){int temp =a;a =b;b =temp;}void pailie(int begin, int end, int a[]){if(begin ==end){for(int i =0;i < end;i++)cout << a[i];cout << endl;}for(int i =begin;i < end;i++){__________ // 在此处填入选项。

UniversityofWisconsin-Madison(

UniversityofWisconsin-Madison(

University of Wisconsin-Madison(UMW)周玉龙1101213442 计算机应用UMW简介美国威斯康辛大学坐落于美国密歇根湖西岸的威斯康辛州首府麦迪逊市,有着风景如画的校园,成立于1848年, 是一所有着超过150年历史的悠久大学。

威斯康辛大学是全美最顶尖的三所公立大学之一,是全美最顶尖的十所研究型大学之一。

在美国,它经常被视为公立的常青藤。

与加利福尼亚大学、德克萨斯大学等美国著名公立大学一样,威斯康辛大学是一个由多所州立大学构成的大学系统,也即“威斯康辛大学系统”(University of Wisconsin System)。

在本科教育方面,它列于伯克利加州大学和密歇根大学之后,排在公立大学的第三位。

除此之外,它还在本科教育质量列于美国大学的第八位。

按美国全国研究会的研究结果,威斯康辛大学有70个科目排在全美前十名。

在上海交通大学的排行中,它名列世界大学的第16名。

威斯康辛大学是美国大学联合会的60个成员之一。

特色专业介绍威斯康辛大学麦迪逊分校设有100多个本科专业,一半以上可以授予硕士、博士学位,其中新闻学、生物化学、植物学、化学工程、化学、土木工程、计算机科学、地球科学、英语、地理学、物理学、经济学、德语、历史学、语言学、数学、工商管理(MBA)、微生物学、分子生物学、机械工程、哲学、西班牙语、心理学、政治学、统计学、社会学、动物学等诸多学科具有相当雄厚的科研和教学实力,大部分在美国大学相应领域排名中居于前10名。

学术特色就学术方面的荣耀而言,威斯康辛大学麦迪逊校区的教职员和校友至今共获颁十七座诺贝尔奖和二十四座普立兹奖;有五十三位教职员是国家科学研究院的成员、有十七位是国家工程研究院的成员、有五位是隶属于国家教育研究院,另外还有九位教职员赢得了国家科学奖章、六位是国家级研究员(Searle Scholars)、还有四位获颁麦克阿瑟研究员基金。

威斯康辛大学麦迪逊校区虽然是以农业及生命科学为特色,但是令人注目,同时也是吸引许多传播科系学子前来留学的最大诱因,则是当前任教于该校新闻及传播研究所、在传播学界有「近代美国传播大师」之称的杰克·麦克劳(Jack McLauld)。

计算机专业英语测试题及答案

计算机专业英语测试题及答案

计算机专业英语测试题一、词汇测试题(每小题1分,共20分)(一).Translate the following words and expressions into Chinese (共10分,每题1分)1.Cyber cafe2.microcomputer3.ROM4.Object-oriented programming5.utility program6.system specification7.database administrator8.modulator-demodulator9.client/server model10.spreadsheet program(二).Translate the following terms or phrases from Chinese into English (共10分,每题1分)1.中央处理器2.广域网3.超级计算机4.电子商务5.计算机安全6.计算机文化7.网站8.域名9.数据库管理系统10.软件工程二、完型填空题(每空1分,共20分)Fill in each of the blanks with one of the words given in the list following each paragraph, making changes if necessary:1. Computer hardware is the involved in the of a computer and consists of the that can be physically handled. The function of these components is typically divided into three main categories: , , and . Components in these categories connect to , specifically, the computer’s central unit (CPU), the electronic that provides the computational ability and control of the computer, via wires or circuitry called bus.microprocessors component processing functionoutput equipment input circuitry storage2.In the relational model, data is organized in two-dimensionalcalled . There is no or structure imposed on the data. The tables or relations are, however, related to each other. The database management system (RDBMS) the data so that its external is a of relation or tables. This does not mean that data is stored as tables: the physical of the data is independent of the way in which the is logically organized.hierarchical set organize relational relationdata storage view network table三、英译汉题(每题10分,共20分)Translate the following passage from English into Chinese:1.The field of computer science has grown rapidly since the1950s due to the increase in their use. Computer programs have undergone many changes during this time in response to user need and advances in technology. Newer ideas in computing such as parallel computing, distributed computing, and artificial intelligence, have radically altered the traditional concepts that once determined program form and function. In parallelcomputing parts of a problem are worked on simultaneously by different processors, and this speed up the solution of the problem. Another type of parallel computing called distributed computing use CPUs from many interconnected computers to solve problems. Research into artificial intelligence (AI) has led to several other new styles of programming.2.High-level languages are commonly classified asprocedure-oriented, functional, objected-oriented, logic languages. The most common high-level languages today are procedure-oriented languages. In these languages, one or more related blocks of statements that perform some complete function are grouped together into a program module, or procedure, and given a name such as “procedure A”. If the same sequence of operations is needed elsewhere in the program, a simple statement can be used to refer back to the procedure. In essence, a procedure is just a mini-program. A large program can be constructed by grouping together procedures that perform different tasks.四、汉译英题(20分)最著名的互联网例子是因特网。

Analyzing the Scalability of Algorithms

Analyzing the Scalability of Algorithms

Analyzing the Scalability ofAlgorithmsAlgorithms are essential tools used in various fields such as computer science, data analysis, and machine learning. The scalability of algorithms refers to their ability to handle increasing amounts of data or growing computational demands efficiently without compromising performance. In this article, we will delve into the concept of scalability of algorithms and discuss various factors that influence it.One of the key factors that affect the scalability of algorithms is the input size. As the amount of data increases, the algorithm should be able to process it within a reasonable time frame. The efficiency of an algorithm can be measured in terms of its time complexity, which describes how the running time of the algorithm grows with the size of the input. Algorithms with a lower time complexity are more scalable as they can handle larger inputs without a significant increase in processing time.Another important factor to consider is the space complexity of an algorithm. Space complexity refers to the amount of memory or storage space required by the algorithm to solve a problem. As the input size grows, the algorithm should not consume an excessive amount of memory, as this can lead to performance degradation or even failure to complete the computation. Algorithms with lower space complexity are more scalable as they can operate efficiently even with limited memory resources.Moreover, the structure and design of an algorithm can greatly impact its scalability. Algorithms that are well-structured and modularized are easier to scale as they can be optimized or parallelized to improve performance. Additionally, the choice of data structures and algorithms used within the main algorithm can influence its scalability. For example, utilizing efficient data structures such as arrays or hash tables can improve the scalability of the algorithm by reducing the time and space required for processing.Furthermore, the scalability of algorithms can also be affected by external factors such as hardware limitations or network constraints. Algorithms that are designed towork in a distributed system or parallel computing environment are more scalable as they can distribute the workload across multiple processing units. However, algorithms that rely on a single processor or have high communication overhead may not scale well when faced with increasing computational demands.In conclusion, analyzing the scalability of algorithms is crucial for ensuring optimal performance in handling large datasets or complex computational tasks. Understanding the factors that influence scalability, such as time complexity, space complexity, algorithm structure, and external constraints, can help developers and researchers design and implement scalable algorithms. By considering these factors and optimizing the algorithm accordingly, we can improve efficiency, reduce resource consumption, and achieve better performance in various applications.。

电大尺寸目标电磁散射的并行FVTD计算

电大尺寸目标电磁散射的并行FVTD计算

电大尺寸目标电磁散射的并行FVTD计算许勇;黄勇;余永刚【摘要】Numerical simulation of real military objects′ electromagnetic scattering at high frequency bands is ordinary corresponding to the electromagnetic field calculation for electrically large objects.This simulation can be computationally expensive with large storage and calculation works when high precision numerical algorithm is used.To ensure high computational precision, we programed a finite volume time domain (FVTD)solver pmbRCS3d based on body-fitted multi-blocks grids,which computes the Maxwell equations of electromagnetism directly.In order to handle the massive calculation work due to huge number of grids,a parallel MPI programing technique was used together with careful design of the grid partition, load balance, data communication, and parallelization. The pmbRCS3d software was applied successfully to calculate the electromagnetic scattering field and the bi-station RCS of an L-band electrically large flying-wing shape.The results show that the developed pmbRCS3d software has stable and robust characteristic and can be used for the RCS calculation of higher frequency band objects.%实际目标的高频电磁散射模拟属于电大尺寸目标电磁计算问题,其高精度数值计算通常伴随着大存储量和大计算量的沉重负担.为保证高精度数值计算,构建了直接求解电磁学麦克斯韦方程组,采用贴体多块结构网格的时域有限体积法(FVTD)解算器.为解决大规模网格带来的大计算量问题,则采用MPI并行编程,进行网格多进程分割、负载平衡以及进程通信设置和程序并行化处理,成功地对电大尺寸飞翼外形进行了L波段双站电磁散射场和雷达截面(RCS)计算.结果表明pmbRCS3d这一并行高精度电磁散射模拟软件具有稳定和鲁棒特性,适合进一步应用于目标更高频段电磁散射计算.【期刊名称】《空气动力学学报》【年(卷),期】2017(035)006【总页数】4页(P797-800)【关键词】麦克斯韦方程组;时域有限体积法(FVTD);并行计算;L波段;雷达截面(RCS)【作者】许勇;黄勇;余永刚【作者单位】中国空气动力研究与发展中心计算空气动力学研究所,四川绵阳621000;中国空气动力研究与发展中心计算空气动力学研究所,四川绵阳 621000;中国空气动力研究与发展中心计算空气动力学研究所,四川绵阳 621000【正文语种】中文【中图分类】O441.4飞行器气动/隐身优化设计需要发展快速高效、高精度电磁数值方法,但是复杂外形目标的电磁散射包含了镜面散射、边缘绕射、爬行波等多种复杂现象,准确模拟非常困难。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

layout algorithm. The third section proves that the layout algorithm satisfies the aesthetic standard. It is also shown that the layout calculated by the algorithm has the minimum width. Section 4 attempts to establish guidelines for the formulation and the proof of data-parallel algorithms. The last section concludes this paper and discusses related work. 2. A data-parallel tree-layout algorithm We assume that a tree is represented by a linkedlist data structure. Each node contains a pointer to its parent and a pointer to each of its children. The level of a node is the level of its parent plus one; the root is on level one. Nodes on the same level are called cousins of one another. Cousins are a generalized notion of siblings. Each node is assigned a processor, which is responsible for calculating the node’s position. We also assume that there are sufficient processors and hardware links between the processors. The algorithm needs to determine the placement of the nodes. The placement of nodes is determined by the vertical and horizontal coordinates. The tree is drawn upside down, that is, the root is at the top and descendants are drawn below ancestors. We ignore the sizes of the nodes in the algorithm; however, we will show the way to accommodate nodes’ sizes later. Since the distance between adjacent levels are a constant, the vertical coordinate of a node is simply the level of the node times the constant. Therefore, it suffices to compute the horizontal coordinates of nodes. Before presenting the algorithm, we define a new operation: δ(a , b ) = b if b≠ ; is a special value δ(a , b ) = a if b = , where different from any integer. It can be verified that δ is an associative operation. Then we define that 1 i i ∆ j =1 g j = g 1 and ∆ j =1 g j = δ (g 1, ∆ j =2 g j ) for i >1 (that is, i ∆ j =1 g j = δ (g 1, δ(g 2, . . . , δ(gi −1, gi ) . . . ) )). The ∆ operation is to find the value of the nearest nonleft cousin or of itself. The tree-layout algorithm consists of two phases. Both phases proceed level by level: The first phase proceeds from the bottom level to the root; the second from the top level to the bottom level. Consider a level s . Let n 1, n 2, n 3, . . . be the nodes on level s , from left to right. Each node ni contains fourteen variables ai , bi , ci , di , ei , f i , gi , hi , ki , li , mi , pi , qi , and ri . During the
A DATA-PARALLEL ALGORITHM FOR MINIPROOFS
WUU YANG Computer and Information Science Department, National Chiao-Tung University, HsinChu, Taiwan, R.O.C.
It employs fine-grained and massive parallelism that exists in some kinds of applications. The applications include line drawing in computer graphics, VLSI design and circuit simulation, finite difference, and computer vision [7]. Trees are a common data structure widely used in computer sciences. For instance, the class hierarchy of an object-oriented programming systems and directories of file systems are usually organized into tree structures. Sometimes, the tree structures are more comprehensible when they are drawn on a piece of paper or on the computer screen. The tree-layout problem is to compute the coordinates of nodes of a tree. The layout is constrained to meet certain aesthetic standards [1] so that the tree, when drawn on a piece of paper, appeals to human understanding. Different aesthetic standards may be employed. In this paper, the standard is that (1) nodes on the same level (the level of a node will be defined in the next section) should be drawn on the same horizontal line; (2) nodes on the same level should be separated from one another by a distance of at least two units (the choice of two units can be changed to arbitrary distance); and (3) the horizontal coordinate of a node must be equal to the mean of the horizontal coordinates of its leftmost and rightmost children. Applications of the layout algorithm include class browsers, graphic user interfaces of file managers, and software analysis [3]. Correctness of an algorithm cannot be overemphasized. Usually, a formal and rigorous proof of correctness must accompany a newly developed algorithm. There have been many research results related to correctness proofs for sequential algorithms. By contrast, relatively less results are available concerning the correctness proofs for parallel algorithms. Among the published dataparallel algorithms, some of them are too obvious to deserve a proof; others are too complex. Few of them come with a rigorous proof. The treelayout algorithm strikes a nice balance between the two extremes: It entails a rigorous proof in a few pages. We take this opportunity to study its proof. It is hoped that lessons learned from studying its proof could be valuable for researchers who attempt to establish a style of the formulation and the proof of general data-parallel algorithms in the future. The remainder of this paper is organized as follows: The next section presents the data-parallel
相关文档
最新文档