第1章粒计算的艺术-theDepartmentofComputerScience-University

合集下载

计算机文化(全英)_Chapter01

计算机文化(全英)_Chapter01

Chapter 1: Computers and Digital Basics
15
1
SECTION
B
Digital Devices
Computer Basics Personal Computers, Servers, Mainframes, and Supercomputers PDAs, Smartphones, and Portable Media Players Microcontrollers
Chapter 1: Computers and Digital Basics
8
1 The Digital Revolution
Digital electronics use electronic circuits to represent data Today, digital electronic devices include computers, portable media players such as iPods, digital cameras and camcorders, cell phones, radios and televisions, GPSs, DVD and CD players, e-book readers, digital voice recorders, and handheld gaming consoles
– – – – A. B. C. D. World War I The roaring twenties World War II The 1960s
7
Chapter 1: Computers and Digital Basics
1 The Digital Revolution

《人工智能及其应用》第01章只是分享

《人工智能及其应用》第01章只是分享
符号操作系统任务及功能:辨认相同的符号和区别不同的符号
6种基本功能
(1)输入符号(input); (2)输出符号(output); (3)存储符号(store); (4)复制符号(copy); (5)建立符号结构:通过找出各符号间的关系,在符号系统中形成符 号结构; (6)条件性迁移(conditional transfer):根据已有符号,继续完成活动 过程。
文学志 南京信息工程大学计软学院 2010年2月
1.2.1 智能信息处理系统的假设
人类的认知行为具有不同的层次
认知生理学
研究认知行为的生理过程,主要研究人的神经系统(神经元、中枢神经系统 和大脑)的活动,是认知科学研究的底层。
认知心理学
研究认知行为的心理活动,主要研究人的思维策略,是认知科学研究的顶层。
but the flesh is weak”翻译成俄语,然后再翻译回来时竟变成了“酒是好 的,肉变质了”,即英语句子为“The wine is good but the meat is spoiled”. 以人工智能为目标的3个研究小组
在神经生理学方面,研究发现人脑由1011~1012个神经元组成,在现有技术条件 下用机器从结构上模拟人脑是根本不可能的。
文学志 南京信息工程大学计软学院 2010年2月
三大学派对人工智能发展历史的不同看法
符号主义
认为人工智能源于数理逻辑。符号主义仍然是人工智能的主流派。这个学派的 代表有纽厄尔、肖、西蒙和尼尔逊(Nilsson)等。
连接主义
认为人工智能源于仿生学,特别是人脑模型的研究。
行为主义
认为人工智能源于控制论。这一学派的代表作首推布鲁克斯(Brooks)的六足行 走机器人,它被看做新一代的“控制论动物”,是一个基于感知-动作模式的模 拟 昆虫行为的控制系统。

第1章粒计算的艺术-theDepartmentofComputerScience-University

第1章粒计算的艺术-theDepartmentofComputerScience-University

第1章粒计算的艺术姚一豫 (Yiyu Yao)Department of Computer Science, University of ReginaRegina, Saskatchewan, Canada, S4S 0A2E-mail: yyao@cs.uregina.cahttp://www2.cs.uregina.ca/~yyao/1.1引言粒计算(Granular Computing)是一门飞速发展的新学科。

它融合了粗糙集、模糊集以及人工智能等多种理论的研究成果。

在短短十年的发展中,我们已经见证了它对科学及计算机科学的作用和影响。

诸多学者就粒计算的基本理论和方法做了大量工作(见本章参考文献),但为粒计算下一个正式的、精确的、并且能够广为接受的定义仍然是一件困难的事情。

虽然如此,我们仍然可以从问题求解及实践中提取出一些通用的理论和基本要素[1]。

我们对粒计算的描述是建立在对它的直觉认识上的:粒计算是研究基于多层次粒结构的思维方式、问题求解方法、信息处理模式,及其相关理论、技术和工具的学科。

在中国,粒计算的研究已引起众多学者的关注与兴趣。

本书的附录比较全面地收录了近年在国内期刊发表的粒计算方面的文章。

包括,基于商空间理论的粒计算模型[2],模糊商空间及粒计算的商闭包空间模型(张钹和张铃等) [3,4,5,6];粒计算的覆盖模型,粗糙集与粒计算的交叉问题的研究(张文修等)[7,8];粒、规则与例外的关系(王珏等) [9,10,11,12];粒计算的理论、模型与方法的探讨(苗夺谦等) [13,14,15,16,17,18];基于Dempster-Shafer理论和粗糙集的近似和知识约简(吴伟志等) [19, 20,21,22];几种基于覆盖粗糙集的粒计算模型(祝峰和王飞跃)[23,24,25];粒逻辑及其归结原理(刘清等) [26,27,28,29,30];基于关系的粒计算模型,粒化思想在图像的纹理识别上的应用(史忠植等) [31,32,33,34];基于相容关系的粒计算模型,粒计算在进化计算、机器学习中的应用(王国胤等) [35,36,37,38,39];使用粒计算进行知识获取的方法(梁吉业和李德玉) [40];基于泛系理论的粒计算模型(李永礼和林和等) [41,42,43];使用粒分析来描述、刻画粒计算的思考(李凡长);等等。

计算机科学与技术专业要学的课程(中英文对照)

计算机科学与技术专业要学的课程(中英文对照)

计算机科学与技术专业Specialty in Computer Science & Technology一、培养目标Ⅰ。

Educational Objectives培养德、智、体全面发展,具有计算机科学与计算机工程领域系统、扎实的理论基础,知识结构合理,具有创新能力和国际竞争力的高素质的科技人才。

本专业的学生在信息的获取、传递、处理及应用等方面具有较宽广的专业知识、掌握现代计算机科学及工程中计算机硬件和计算机系统软件的基本原理、计算机应用技术,并具有较强的工程实践能力,具备设计、开发计算机硬件、计算机系统软件和应用软件的能力.要求本专业学生具有较强的英语语言能力、良好的人文素质和创新精神,并在计算机科学、嵌入式系统、操作系统、自动控制、计算机网络、信息安全、软件工程、信息处理及其相关领域中的一个或两个方向具有特色。

毕业生能在科研部门、教育单位、企业、事业、技术和行政管理部门等单位从事计算机教学、科学研究和应用的高级研究型及应用型人才.This program is designed to provide a thorough grounding in the theoretical principles and knowledge of information retrieval, transformation, processing and application。

It remains committed to systematic education for high—level researchers and doers, who have the personality of innovation and the desire for international competition.Students shall be equipped with a professional education of principles and technology in the field of computer hardware & software. Moreover, the proficiency in engineering practice and the ability in development of hardware & software are required. Students with good command of English and personality of innovation shall be expert in one or two of the following fields: Computer Science, Embedded Systems, Operating System, Automatic Control, Computer Network, Information Security, Software Engineering, Information Processing and other related fields. Students can be prepared for any professional role they might choose—education, research & design, practice in research institutes, universities, industries, the professions and other community groups。

第1章(30)教材配套课件

第1章(30)教材配套课件

UNIT 1
UNIT 1
If you look at the timeline of the evolution of computers, you will notice that the first computers used vacuum tubes for circuitry and magnetic drums for memory, and were often enormous, taking up entire rooms. They were very expensive to operate and in addition to using a great deal of electricity, generated a lot of heat, which was often the cause of malfunctions.
UNIT 1
The use of integrated circuits ushered in the third generation of computers. Their use increased the speed and efficiency of computers. Operating systems were the human interface to computing operations and keyboards and monitors became the input-output devices. COBOL, one of the earliest computer languages, was developed in 1959-1960. BASIC came out in 1964. It was designed by John George Kemeny and Thomas Eugene Kurtz. Douglas Engelbart invented the first mouse prototype in 1963. Computers used a video display terminal (VDT) in the early days.

大学计算机信息技术教程CollegeComputerIn

大学计算机信息技术教程CollegeComputerIn
(理解计算机是怎样互连成网络的,信息在计算机之间是怎样 按路由传输的 ,通信参数(如等待时间和带宽)如何影响网 络的响应并限制了人的工作能力。)
Concepts
4. Digital representation of information
信息二进制编码的一般概念;不同的信息编码:如ASCII文本, 数字声音,图象,视频。内容包括表示精度、相互转换、互 操作性(文件格式)、分辨率、保真度、变换、压缩、加密, 以及表示方法的标准化 。
• 《计算机科学导论(第7版)》(美)J. Glenn Brookshear著 北京.清华大学出版社,2004.1第1版 书名原文:Computer Science: An Overview, Seventh Edition
• 中文教材采用江苏省普通高校计算机等级考试统编教材:
• 《大学计算机信息技术教程》 南京大学出版社 张福炎 孙志挥 主编 2007.8 第4版修订本
前 言 (Preface)
Information technology is playing an increasingly
important role in the work and personal lives of citizens. Computers, communications, digital information, software---the constituents of the information age----are everywhere.
✓ 许多人面对信息技术缺乏信心; ✓ 许多人要求获得信息技术潜在的好处; ✓ 部分公民担心信息技术带来的变化会使人的社会价值、自由
或经济利益等受到损害。 ✓ 好奇心——如此强大而普适的技术到底是怎样工作的? 总之:

TheArtofProblemSolving:解决问题的艺术

TheArtofProblemSolving:解决问题的艺术

Mathematics Competitions Vol20No12007The Art of Problem SolvingDavid PatrickDavid Patrick is Vice President ofAoPS Incorporated.He is the authorof Introduction to Counting&Prob-ability,a discrete math textbook formiddle and high school students,and iscurrently working on the sequel,Inter-mediate Counting&Probability.Hewas a USA Mathematical Olympiadwinner in1988,earned his Ph.D.inMathematics from MIT in1997,anddid research in noncommutative alge-bra.1HistoryThe Art of Problem Solving(AoPS)website,1established in2003,has grown to over29,000members.2We believe that it is the largest website of its kind in the English-speaking world,with mathematics resources developed specifically for high-ability middle and high school students. AoPS has been called“a revolution in mathematics training for the top high school students.”[3]2Forum,Blogs,and WikiThe heart of AoPS is the AoPS Forum,which has over800,000posts on a variety of topics,mathematical and otherwise.The AoPS Forum is for students,parents,and teachers to discuss various math problems 12All statistics cited in this article are as of4May2007.19Mathematics Competitions Vol 20No 12007and other topics of interest to people interested in math.The Forum is free for everyone,and its members are students and teachers from all different ages,locations,and abilities.In the late afternoon of May 4,2007,the list of recent discussions include the following (note that these are the actual discussion titles as they appear on the AoPS Forum,so the titles may include misspellings):–Maximum of minimum ofa i 1+ n i =1i(in the Olympiad Inequalities forum;the forum is L A T E X-compatibleto allow for mathematical discussion)–“Another TC problem,whose solution I don’t understand”(in the Computer Science and Informatics forum)–“baseball”(in the Middle School forum;the problem under discussion was a middle-school level problem about baseball)–“Nysml”(in the New York local forum;the discussion was about the recently-concluded New York State Mathematics League contest)–“Displaying the power of a matrix”(in the College Linear Algebra forum)–“perfect square in different bases”(in the High School Basics forum)All of the posts listed (and many others not listed)occurred in a span of under 20minutes.Any AoPS member can set up his or her own personal blog,which is a personal web page on which the owner can post anything he or she wishes.Although the subjects on the blog are unrestricted,many of the blog entries discuss mathematics and problem solving.Currently,over 750AoPS users have started blogs.Finally,AoPS has started a wiki about mathematics and problem solving.A wiki is an online encyclopedia that can be edited by anyone.The AoPS wiki has over 2,000articles on a variety of topics:some are related to mathematical ideas and concepts,others are related to problems and/or problem solving technique,and still others point to other resources.To give a flavor for the types of articles in the AoPS wiki,a list of some of the most recently created or edited articles includes:20Mathematics Competitions Vol20No12007–Fermat’s Last Theorem–Pascal’s Triangle Related Problems–2007USAMO Problems–The Art and Craft of Problem Solving3–Asymptote4–1997AIME Problems3Online ClassesAoPS runs a number of online classes specifically designed for strong students in grades7–12.All of the classes are conducted in AoPS’s “virtual classroom,”an online,moderated chatroom that is L A T E X-compatible and graphics-enabled,to permit mathematical discussion. AoPS offers three different types of classes.First are subject classes in traditional secondary school math topics:algebra,counting& probability,geometry,number theory,and trigonometry.These classes tend to be similar in content to a traditional in-school class,but with a much greater emphasis on difficult problem solving.Second are classes that are designed as preparation for one of the major US mathematics competitions,such as MATHCOUNTS and the various American Mathematics Competitions(AMC)contests(the AMC contests are those that eventually lead to the selection of the United States IMO team). Finally,AoPS offers a year-long Worldwide Online Olympiad Training (WOOT)program,designed for the very best students whose ambition is to do problem-solving at the IMO level.To give some indication of the quality of the WOOT students,in2005-06over90%of the US students in WOOT qualified for the2006USA Mathematical Olympiad,which is very selective:of the approximately230,000students in2006who wrote one of the initial AMC contests,only430qualified for the USAMO.[1] 3This is a popular problem-solving textbook,authored by former IMO participant Paul Zeitz.4Asymptote is a L A T E X plug-in for creating high-quality diagrams.The Asymptote wiki pages on AoPS are considered the“official”wiki pages of the Asymptote project.21Mathematics Competitions Vol20No120074AoPS Foundation and USA Math Talent Search Separate from the main AoPS website is the Art of Problem Solving Foundation5.The AoPS Foundation’s mission is to promote problem solving education for middle and high school students in the United States.The Foundation supports two major endeavors.USA Mathematical Talent SearchThe USAMTS was founded in1989by George Berzsenyi at the Rose-Hulman Institute of Technology.It has run annually every year since, and after a number of years of being managed by the US National Security Agency,the management of the contest was passed to the AoPS Foundation in2004.The USAMTS runs during the USA school year(roughly September through April),and consists of4rounds of5questions each.The USAMTS is a“take-home”contest and is run entirely via the website.Students have at least one full month to work on each round of problems,and must write and submit full solutions including proofs.Students are permitted to use any available resource to solve the problems,including books,calculators, and computers,but may not consult with teachers or other students. Another unique feature of the USAMTS is that students not only receive numeric scores on their solutions,but also receive written feedback on both the correctness and the writing style of their submitted work. The problems on Round1of the2006-07USAMTS were:1.When we perform a‘digit slide’on a number,we move its unitsdigit to the front of the number.For example,the result of a‘digit slide’on6471is1647.What is the smallest positive integer with 4as its units digit such that the result of a‘digit slide’on the number equals4times the number?522Mathematics Competitions Vol 20No 120072.(a)In how many different ways can the six emptycircles in the diagram at right be filled in with thenumbers 2through 7such that each number isused once,and each number is either greater thanboth its neighbors,or less than both its neighbors?(b)In how many different ways can the sevenempty circles in the diagram at right be filledin with the numbers 2through 8such that eachnumber is used once,and each number is eithergreater than both its neighbors,or less than bothits neighbors?3.149(a)An equilateral triangle is divided into 25congruent smaller equilateral triangles,asshown.Each of the 21vertices is labeledwith a number such that for any threeconsecutive vertices on a line segment,theirlabels form an arithmetic sequence.Thevertices of the original equilateral triangle are labeled 1,4,and 9.Find the sum of the 21labels.(b)Generalize part (a)by finding the sum of the labels when there are n 2smaller congruent equilateral triangles,and the labels of the original equilateral triangle are a ,b ,and c .4.Every point in the plane is colored either red,green,or blue.Prove that there exists a rectangle in the plane such that all four of itsvertices are the same color.5.ABCD is a tetrahedron such that AB =6,BC =8,AC =AD =10,and BD =CD =12.Plane P is parallel to face ABC anddivides the tetrahedron into two pieces of equal volume.Plane Q is parallel to face DBC and also divides ABCD into two pieces of equal volume.Line is the intersection of planes P and Q .Find the length of the portion of that is inside ABCD .23Mathematics Competitions Vol20No12007Local ProgramsThe AoPS Foundation also supports a number of local programs devoted to mathematics and problem solving education in specific communities around the United States.These include a number of Math Circles, including those in San Diego,Stanford,Boulder(Colorado),Charlotte, San Jose,Orange County(California),and Albany(New York).The AoPS Foundation also supports The Teachers’Circle,a new math circle designed specifically for teachers in the San Francisco Bay area.The Teachers’Circle is described in greater detail in[2].References[1]2006Summary of High School Results and Awards,AmericanMathematical Competitions,Mathematical Association of America, 2006.[2]T.Shubin,“Math Circles for Students and Teachers,”MathematicsCompetitions,19#2,2006.[3]M.Matchett Wood,“Art of Problem Solving:A New Resource forOutstanding Mathematics Students,”MAA Focus,27#3,March 2007.David PatrickAoPS IncorporatedAlpine,California,USAEmail:*******************************24。

Department of Computational Science,

Department of Computational Science,

This paper should be referenced as:Morrison, R., Brown, A.L., Bailey, P.J., Davie, A.J.T. & Dearle, A. “A Persistent Graphics Facility for the ICL PERQ Computer”. Software – Practice and Experience 16, 4 (1986) pp 351-367.A Persistent Graphics Facility for the ICL PerqR. Morrison, A.L. Brown, P.J. Bailey, A.J.T. Davie, A. Dearle.Department of Computational Science,University of St Andrews,North Haugh,St Andrews KY16 9SX,Scotland.SummaryThe facilities of the PS-algol programming language are described in this paper to show how they may be used to provide an integrated programming support environment. The persistent store mechanism and the secure transaction facilities provide the basic environment in which an integrated system may be implemented. In particular the paper makes use of the data type picture of PS-algol to show how such an environment may be built for a graphics system ideal for use with a medium range computer workstation. An implementation of a picture editor on the ICL PERQ workstation is described to show the utility of the system. Keywords: Persistent store graphics algol transactions workstation ICL PERQ IntroductionThe inclusion of a graphics facility in a language that supports an integrated persistent environment yields an ideal programming environment for a medium range graphics workstation such as the ICL PERQ[7]. The integrated persistent store allows data to be stored and retrieved automatically from user named databases. If one of the legal data types in the language is a picture then pictures may be stored along with any of the other legal data objects such as integers, vectors or procedures.Picture libraries of complete or partial pictures may be built in the persistent store in the same manner as program libraries. Thus the users have a well defined integrated mechanism in which to access and store pictures. This provides the user with a well structured method of building complex picture systems out of parts of pictures in the same manner that might be used when constructing complex programs out of procedures in a library.Thus fourth generation seamless systems such as the proposed software for the Apple Lisa with picture editors, menu systems and mixed picture, text and program documents may be built out of the integrated persistent environment.This paper describes the facilities available in the language PS-algol[2] on the ICL PERQ for the building and the use of persistent pictures. The system supports a general notion of transactions and therefore allows transactions on pictures. An example of how such a mechanism might be used is included in the paper.Persistent StoreIn an increasing number of applications it is necessary to manipulate data that must be able to outlive any program that may use it. The usual approach to this problem is to provide a file system or a database management system (DBMS).With such an approach data is viewed as either short term data, to be manipulated by a programming language, or as long term data, to be manipulated by the file system or DBMS. As a result a large part of a programmers effort is taken up controlling the mapping between the programming language and DBMS. Furthermore the structure and protection of data provided by the programming language is often lost across the mapping.In contrast to this approach the programming language PS-algol provides a long term store where the techniques for manipulating data are independent of its lifetime, or its persistence. Hence PS-algol relieves the programmer of mapping the data between short and long term storage and also allows any data object, regardless of type, to have any persistence. The object of this paper is to demonstrate the utility of this approach and in particular how it has been used in a graphics system.PS-algolPS-algol was developed from the programming language S-algol[10] as an experiment in integrating a long term or persistent store with a programming language. The base types are integer, real, boolean, string and picture. These are augmented by the recursive application of the following three rules. Firstly given any data type T, *T is the data type of a vector whose elements are of type T. Secondly the data type pointer comprises a structure with any number of fields, and any data type in each field. Finally given a series of data types T1,..,Tn and a data type T, proc( T1, .., Tn -> T ) is the type of a procedure of n parameters with types T1, .., Tn that returns a result of type T.The range of PS-algol data types includes several unusual features. Firstly string is a simple data type[11] resulting in a very powerful string handling capability. Secondly the data type pointer may point to any structure class but, when a field of a structure is referenced a check is made that the structure present is of the appropriate class. Using this polymorphism over the data type pointer, arbitrarily complex data types can be manipulated without reference to their actual structure and this is the basis of the persistent store implementation[3].PS-algol's persistent store consists entirely of legal PS-algol data objects. The store is partitioned into databases to allow some concurrency control and protection when sharing persistent data. Each database has a root data structure which, via pointers, allows access to the other data objects in the database. Therefore the interface to the persistent store need only provide a method of accessing the root data structure of a database. Since the pointer data type may point to any structure class and any data type can be a field of a structure there is no restriction on the data types that can be held in a database.This ability to store any data type in the persistent store has several useful properties. For example it is possible to store picture descriptions thus allowing the easy implementation of a picture editor. The picture drawing facilities shown later also allow screen images to be kept in a database and manipulated. Another very powerful property is derived from the fact that procedures are a first class data type. That is they may be stored and manipulated like other objects. Therefore using procedures that can return procedures as results it is possible to implement abstract data objects[9]. These abstract data objects are usually implemented by returning a pointer to a structure containing procedures and constants from a creating procedure or block. This new data object can then be manipulated in the same way as any other data object in PS-algol. For example:structure a.stack( proc( -> int ) pop ; proc( int ) push )let stack = proc( int size -> pntr )beginlet entries = vector 0 :: size of 0let stack.pntr := 0let pop.stack = proc( -> int )beginif stack.pntr > 0 then stack.pntr := stack.pntr - 1else write "Popping an empty stack'n"entries( stack.pntr ) ! This is the value being returned.endlet push.stack = proc( int new.entry )if stack.pntr < size thenbeginentries( stack.pntr ) := new.entrystack.pntr := stack.pntr + 1end else write "Pushing a full stack'n"a.stack( pop.stack,push.stack ) ! This is the value being returned.endFigure 1: A procedure to implement a stack abstract data object.This program segment creates a stack abstract data object and when called creates a new stack of a given size with two operations on it, pop and push. The following is an example of how the operators are accessed. When called the procedure stack returns a structure with two fields both of which are procedures. Notice that the representation of the stack is invisible to the rest of the program by the normal algol scope rules and only visible to the two procedures. In this case an integer is pushed onto a newly created stack of size 20 and then popped off.let a.stack = stack( 20 )a.stack( push )( an.integer )an.integer := a.stack( pop )()It is also possible to simulate modules or Ada packages[8] using this technique together with the persistent store. This is achieved by writing programs for each module that when run place their public procedures in a database. Other programs can then use these procedures by retrieving them from the database. There are several benefits of this approach to providing modules. Firstly there is no need to provide an explicit method of separate compilation. Secondly the delayed binding means that internal changes to a module or the inclusion of additional public procedures need only result in recompilation of that one module and not of every program that uses it.The Persistent Store InterfaceThe interface to the PS-algol persistent store is implemented by two procedures. These are: let open.database = proc( string ,password,mode -> pntr )This procedure attempts to open the database with the name '' in the mode ("read" or "write") given by 'mode'. Passwords are associated with each database to provide some security when sharing databases. The result of this procedure is a pointer to the root data structure of the database or if unsuccessful a pointer to an error.record. An error.record is a data structure containing information relating to why the open failed.This is sufficient to provide access to any object in the persistent store. Automatic transfer of data from the long term persistent store is performed by the persistent object management system when the data is accessed. The access of the data in the persistent store is performed in exactly the same manner as in the main store, the object manager knowing the difference so as to leave the transfer transparent to the user.It is often desirable to ensure that updates to persistent data occur in total or not at all. For example in a banking system the transfer of funds between two accounts would need to be such an update. A mechanism that implements atomic transactions is therefore provided by the following procedure.let commit = proc()When the first database is opened a transaction is started. Ordinarily data objects are copied from the persistent store when they are first used and changes to them are made locally. If any of these data objects have been changed a commit will copy them back to their databases. Any newly created objects reachable from these changed objects will also be copied into the persistent store. They have space allocated for them in the database of an object pointing to them. If data objects from databases that were not opened in write mode have been changed a commit will fail. This ensures that the persistent store is always in a consistent state.If for any reason a commit should fail then its effects will be removed before any other use is made of the databases it was updating. In this way PS-algol provides a secure transaction mechanism on its persistent store.Further reading on the PS-algol system can be found in[1] and[3].Picture Description in PS-algolThe picture drawing facilities in PS-algol are a particular implementation of the Outline system[12] which allows line drawing in an infinite two dimensional real space. Altering the relationship between different parts of a picture is performed by mathematical transformations which means pictures are usually constructed from a number of sub-pictures. In the Outline system picture description and picture drawing are separated. Picture description is supported by the programming language and picture drawing by a procedural interface for the desired output device. Therefore pictures are described in a device independent manner.In PS-algol the picture descriptions are represented by the data type picture. The simplest picture is a point. For example,let point = [ 0.1,2.0 ]represents the point with x-coordinate 0.1 and y-coordinate 2.0 in two-space. All the operations on pictures provided return a picture as their result, so arbitrarily complex pictures may be described and operated on.Points in pictures are implicitly ordered. The binary operators on pictures operate between the last point of the first picture and the first point of the second picture. In the resultingpicture the first point is the first point of the first picture and the last point is the last point of the second picture.There are two binary operators on pictures, join '^' and combine '&'. The effect of the join operator is to give a picture that is made up of its two operands with a line from the last point of the first operand to the first point of the second operand. Combine operates in a similar way without adding the joining line.In addition to the binary operators pictures may also be transformed by shifting, rotating and scaling. For example:shift p by x.shift,y.shiftwill produce a new picture by adding x.shift to every x-coordinate and y.shift to every y-coordinate in the picture p.rotate p by no.of.degreeswill produce a new picture by rotating the picture p no.of.degrees degrees clockwise about the origin.scale p by x.scaling,y.scalingwill produce a new picture by multiplying the x and y-coordinates of every point in the picture p by x.scaling and y.scaling respectively. Text can be included in pictures using the text statement. This takes a string of characters and a base line and constructs the picture of those characters along the base line.let p = text "hello !" from 1,1 to 2,1The characters will always be drawn from the first to last point of the base line. As a consequence text can be inverted by ending the base line on the left of its starting position. Colour can also be specified in a picture but, unlike the other picture operations, the effect of this will depend on the physical output device used.Storing a Picture in a DatabaseAs an example of how pictures may be stored and retrieved from the persistent store we give an example of a program to calculate the unit circle at the origin and store it in the database. In this example we assume that the database root is a pointer to a data structure for associative store and lookup, supported by PS-algol, called a table. Entries are placed in the table using the procedure 's.enter' which takes the associative key, the table, and the value to be stored. The procedure 's.lookup' retrieves from the given table using the given key.!this structure will be used to hold pictures kept in this databasestructure pic.container( pic a.pic )let db = open.database( "a pic","pass","write" )if db is error.record dobegin ! if db points to an error.record the open failedwrite "Unable to open database because: ",db( error.explain ),"'n"abortendlet circle =begin ! this block is an expression describing a unit circlelet no.of.sectors = 10let angle = 90 / no.of.sectorslet quadrant := [0,1]let segment := [0,1] ^ rotate [0,1] by anglefor i = 1 to no.of.sectors dobeginquadrant := quadrant & segmentsegment := rotate segment by angleendlet semi = quadrant & scale quadrant by -1,1! below is the value of this block expressionsemi & scale semi by 1,-1end! a structure containing the circle picture is associated with the key "circle"s.enter( "circle",db,pic.container( circle ) )! the database "a pic" is now updatedcommit()Figure 2: A program to store a picture of a unit circle in a database.The database "a pic" now contains a table with a key "circle" which has an associated value of a structure that contains the description of the circle picture.Figure 3: Pictorial representation of the database "a pic" after the transaction iscommittedRetrieving a Picture From a DatabaseThe second example retrieves the picture description and uses it to define a procedure to draw circles or ellipses of any size at any point.structure pic.container( pic a.pic )let db = open.database( "a pic","pass","read" )if db is error.record dobeginwrite "Unable to open database because: ",db( error.explain ),"'n"abortend! the structure associated with the key "circle" is retrieved and! its picture field extractedlet circle = s.lookup( "circle",db )( a.pic )! the ellipse procedure can now use the circle to construct ellipseslet ellipse = proc( real x.centre,y.centre,x.scale,y.scale -> pic )shift scale circle by x.scale,y.scale by x.centre,y.centreFigure 4: A program to retrieve the circle from the database and define an ellipseprocedure.The ICL PerqThe ICL Perq is a powerful personal workstation designed to support bitmapped graphics. PS-algol is implemented on Perqs running the PNX[5], (Perq UNIX) operating system. Support for graphical output on the Perq under PNX includes a bit mapped screen, a window manager to control the screen and special hardware to support copying and line drawing on bit maps. Graphical input is supported by a tablet and mouse.The Perq window manager provides the ability to create virtual devices. Each of these devices is a bitmap with possibly a border and title, that can be used for normal text output or as the destination of graphical output. Using the window manager it is possible to create, destroy, move or change the size of individual devices. It is also possible to associate input from the Perq keyboard or mouse with individual devices.Interface to Graphics DevicesIn PS-algol every graphical output device is accessed by an abstract data object whose operators are the Outline procedures used for drawing. These procedures are 'draw', 'erase.to', 'limit', 'g.input', 'print', 'activate' and 'shutdown'. The PS-algol structure used to hold the procedures for an output device also contain two constants that indicate the dimensions of the output device.A predefined PS-algol procedure is available to create such structures. It is used to create a window implemented as a virtual device on PNX. This window can have several attributes specified, such as a border or title. In addition the dimensions of the window must be given as well as its screen position. For example to use a window 600 pixels square at screen location 200,200 with a border and the title "Hello" the following would be used.let a.window = window.pac( "Hello",border,600,600,200,200 )Since procedures are assignable objects in PS-algol it is now possible to get the individual procedures for operating on this window and rename them. e.g.let drawer = a.window( draw )let eraser = a.window( erase.to )The system also has facilities (not given here) for window creation on other physical devices which may be attached to the Perq.Picture Drawing Operations on the PerqThe procedures used to operate on windows will now be described. Each of these procedures will only operate on the window for which it was created.'Draw' takes a picture and a bounding box in the infinite two dimensional space over which all pictures are defined. This box is scaled and shifted to fit the area of the window currently in use. Then any intersection between the picture described and this box is drawn on the window. The colours recognised by 'draw' are "background", "foreground" and "opposite". Black and white cannot be used because what appears as black and white can be dynamically altered by the user. Hence it is only sensible to use "foreground" and "background". The colour "opposite" is provided to invert the colour of the pixels it affects.'Erase.to' is used to set the colour of pixels in the area of the window currently in use. It takes as a parameter a string representing one of the three colours recognised by 'draw'. This can be effectively used to draw a chess board, pop up menus or using the colour "opposite" to highlight areas of a window.'Limit' is provided to redefine the area of the window currently in use. Its parameters are the ranges of x and y values, in pixels, of the new area required. These are checked to make sure the new area lies within the window.Graphical input is achieved by use of the procedure 'g.input'. This provides a user with access to the PNX interface to the Perq mouse. Consequently the information returned includes the status of the mouse buttons, whether any keyboard input is available and three versions of themouse position. The mouse positions are relative to the tablet, screen and the window for which 'g.input' was called. All the mouse positions are inverted to correspond to Outline's screen addressing and are in pixels.To obtain a hard copy of a drawn picture the 'print' procedure is included. The operation of 'print' can vary from using a dedicated printer to preparing a device independent version of the window's display for later processing and printing. What is available depends on the individual Perq.When the packages of procedures is first created it is only a description of what the window will actually do. 'Activate' is provided to instantiate this description by creating a virtual device that implements the window. This newly created device appears on the Perq screen on top of any other displayed devices at the position given in the window's description. However once created the device may be moved around the screen at any time by the user. When the device is created 'activate' ensures that both keyboard and mouse input are connected to it.'Shutdown' is used to destroy a virtual device created by 'activate' and so remove it from the screen. Both of these procedures perform some state preservation or restoration on a virtual device.Saving Drawn PicturesThe package of procedures used to operate on windows can, like any other data object in PS-algol, be stored in the persistent store. In some cases it would also be desirable to store the drawn picture rather than the abstract representation of it. Such a facility is provided by the 'activate' and 'shutdown' procedures. The package of procedures used to operate a window keeps an internal copy of what is displayed on the window. When the 'activate' procedure is called this internal copy is displayed on the newly created virtual device. When the 'shutdown' procedure is called the internal copy is overwritten by whatever is currently displayed on the virtual device. Three steps are therefore required to store a complete window description, including what is currently displayed, in the persistent store. Firstly the window description must be placed in the database. Secondly 'shutdown' must be called to complete the window description. Finally commit should be used to update the copy of the database in the persistent store.A Menu Driven Picture Editor.To demonstrate how Outline may be used on the Perq to construct an interactive picture editor the following example program is presented. This program implements the functional geometry model of Henderson[4] as an interactive picture editor. Henderson's model consists of six basic operations namely, 'draw', 'beside', 'above', 'overlay', 'flip', and 'rotate'. We use Henderson's operations as some of the base commands of our interactive picture editor. In this implementation all the pictures created are kept in the picture editor's database so that previously created pictures are always available. Every picture is given a name which is used to identify it in the database's root table. These names are unique PS-algol strings except for "nilpic" and "screen" and "cache". "nilpic" is the name of an empty picture, "screen" and "cache" are the editor's names for its Perq window package and the names of pictures held in a picture cache.The user interface is organised around the concept of a current picture that the user may modify or replace. This is supported by a Perq window that has its drawing area divided between a cache of recently used pictures, a large display of the current picture, a menu of commands available and a picture describing the current operation of the Perq mouse buttons. The cache includes an entry called "temporary" that is the current picture as it was when the last command was completed. This enables references to the current picture while constructing composite pictures. All of the window components are laid out to enable themto be easily identified from the position of the Perq mouse. The resulting window layout is shown in Figure 5.Figure 5:An example of the Perq window used by the picture editor.In addition to the operations of Henderson's model, several house keeping operations are provided. These include renaming a picture, placing the current picture in the database, selecting a new current picture, erasing the current picture, ending the editing session or committing the changes made so far to the editor's database. At the end of an editing session any uncommitted changes to the editor's database are discarded.Initialising the Picture Editor's Database! size and position of the editor's Perq windowlet width = ....let height = ...let x.position = ...let y.position = ...! the picture of the screen background and menus of figure 5.let background = [0,0] ^ [0,height] ^ [width,height] ^ [width,0] ^.........! the details of the background picture..........let screen = window.pac( "Geometric Picture Composition",border,x.position,y.position,width,height ) screen( activate )()screen( draw )( background,0,width,0,height )screen( shutdown )()! screen now has an internal copy of the! drawn background picture.! the empty picture.structure pic.container( pic picture )let nilpic = pic.container( text "" from 0,0 to 1,0 )! the names of pictures held in the cache.! **string is the type of a vector of vectors of strings.structure cache.container( **string s )let cache = cache.container( vector 0 :: 4,0 :: 1 of "" )! the temporary picture in the cache is at position 4,1.! initially this is the empty picture nilpic.cache( s )( 4,1 ) := "nilpic"! create and open the editor's database for writing.let pic.db := open.database( "Pictures","Geometry","write" )if pic.db is error.record dobeginwrite "Error creating the database: ",pic.db( error.explain ),"'n"abortend! enter the screen, empty picture and cache names in the database table.s.enter( "screen",pic.db,screen )s.enter( "nilpic",pic.db,nilpic )s.enter( "cache",pic.db,cache )! commit the changes to the database to the persistent store.commit()Figure 6: A program to initialise the picture editor's database.The picture editor is divided into two parts, an initialisation program and the editing program. The initialisation program shown in Figure 6 constructs a database for the picture editor that consists of the editor's Perq window, the empty picture "nilpic" and a two-dimensional vector holding the names of the pictures held in the cache. To simplify mapping the coordinates of the background to the Perq window, the background picture and Perq window were given the same dimensions.The Picture Editing Program.The main parts of the editing program will now be described. Figure 7 shows the initialisation of the picture editor from the persistent store. This segment of code together with that shown in Figure 8 and a single call to 'commit' form the total overhead in programming the persistent data. As will be seen this is only a small part of the complete program.! open the database for writing.let pic.db := open.database( "Pictures","Geometry","write" )if pic.db is error.record dobeginwrite "Error finding stored pictures: ",pic.db( error.explain ),"'n"abortend! retrieve and display the editor's Perq window.let screen := s.lookup( "screen",pic.db )screen( activate )()! retrieve the names of the pictures held in the cache.structure cache.container( **string s )let cache := s.lookup( "cache",pic.db )( s )Figure 7: A program segment to retrieve the editor's state from a database.The database table performs a mapping from strings to pointers. Therefore pictures are held in individual structures, pointers to which are used in the database table. To abstract over this level of indirection the two procedures of Figure 8 are used to simulate a table of strings to pictures.! the structure used by the database table to hold pictures.structure pic.container( pic picture )! define a procedure to lookup pictures in the database.let lookup.pic = proc( string name -> pic )s.lookup( name,pic.db )( picture )! define a procedure to enter pictures in the database.let enter.pic = proc( string name ; pic apic )s.enter( name,pic.db,pic.container( apic ) )Figure 8: Procedures to enter and lookup pictures held in the database table.。

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

第1章粒计算的艺术姚一豫 (Yiyu Yao)Department of Computer Science, University of ReginaRegina, Saskatchewan, Canada, S4S 0A2E-mail: yyao@cs.uregina.cahttp://www2.cs.uregina.ca/~yyao/1.1引言粒计算(Granular Computing)是一门飞速发展的新学科。

它融合了粗糙集、模糊集以及人工智能等多种理论的研究成果。

在短短十年的发展中,我们已经见证了它对科学及计算机科学的作用和影响。

诸多学者就粒计算的基本理论和方法做了大量工作(见本章参考文献),但为粒计算下一个正式的、精确的、并且能够广为接受的定义仍然是一件困难的事情。

虽然如此,我们仍然可以从问题求解及实践中提取出一些通用的理论和基本要素[1]。

我们对粒计算的描述是建立在对它的直觉认识上的:粒计算是研究基于多层次粒结构的思维方式、问题求解方法、信息处理模式,及其相关理论、技术和工具的学科。

在中国,粒计算的研究已引起众多学者的关注与兴趣。

本书的附录比较全面地收录了近年在国内期刊发表的粒计算方面的文章。

包括,基于商空间理论的粒计算模型[2],模糊商空间及粒计算的商闭包空间模型(张钹和张铃等) [3,4,5,6];粒计算的覆盖模型,粗糙集与粒计算的交叉问题的研究(张文修等)[7,8];粒、规则与例外的关系(王珏等) [9,10,11,12];粒计算的理论、模型与方法的探讨(苗夺谦等) [13,14,15,16,17,18];基于Dempster-Shafer理论和粗糙集的近似和知识约简(吴伟志等) [19, 20,21,22];几种基于覆盖粗糙集的粒计算模型(祝峰和王飞跃)[23,24,25];粒逻辑及其归结原理(刘清等) [26,27,28,29,30];基于关系的粒计算模型,粒化思想在图像的纹理识别上的应用(史忠植等) [31,32,33,34];基于相容关系的粒计算模型,粒计算在进化计算、机器学习中的应用(王国胤等) [35,36,37,38,39];使用粒计算进行知识获取的方法(梁吉业和李德玉) [40];基于泛系理论的粒计算模型(李永礼和林和等) [41,42,43];使用粒分析来描述、刻画粒计算的思考(李凡长);等等。

粒计算的基本思想、原理和策略出现在不同的学科和领域里[44,45,46]。

本书的其他章节对粒计算的模型和方法有非常精彩和深刻的讨论。

因此,我们在本章将不讨论具体某一个理论、方法、工具或应用,而更侧重于把粒计算作为一个独立的学科进行研究。

这要求我们回答下面一些基本问题:1.为什么要研究粒计算?2.粒计算的独特性在哪里?3.对粒计算的研究应该从哪些方面着手?4.粒计算和相关学科的联系是什么?5.粒计算对科学及计算机科学的贡献在哪里?对这些问题的解答既体现了粒计算研究的必要性,又澄清了适于用粒计算进行求解的问题,继而明确了粒计算的研究方向和目标。

研究粒计算有许多原因。

其一是一致性:现实世界充满了结构和层次,它们体现在各种自然系统、社会系统和人工系统之中。

因此,人们对现实世界的感知、理解、解释和表示也是有结构、分层次的。

Zadeh 将人类的认知能力概括为:粒化、组织、和因果推理[46]。

粒化将一个整体分割成部分,每个部分是拥有相同、相似性质的个体的集合。

组织将松散的个体联在一起,形成有着内在联系的整体。

因果推理将找出原因与结果之间的必然联系。

粒计算模型应该能够描述这三种能力。

因而粒计算的结构和现实世界的结构、人们的思维模式、以及行为方式是一致的。

其二是系统性:粒计算的结构提供了对所解决的问题多视角、多层次的理解、概括和操作。

作为一个整体,粒计算提供的思维模式和行为方式是系统的、完整的。

其三是简化性,粒计算提倡对问题进行不同层次的抽象和处理。

在抽象过程中,我们可以只重视主要特性而忽略不相关的细节,从而达到对问题的简化。

其四是灵活性:粒计算的结构允许人们在不同的时间、不同的情况下,将注意力集中在不同的层次, 以及层与层之间的自然过渡上, 缩放和转承是灵活多变的。

其五是有效性:用粒计算指导的思维模式和行为方式将复杂问题分解成若干小问题。

这种分而治之的方法是非常实用的,可以运用到不同的领域。

其六是经济性:粒计算寻求在不同粒度上的近似解。

这样的方法可以提高效率,降低成本。

其七是容忍性:通过使用不同信息粒度,粒计算可以容忍不确定、不完全、或有噪音的信息,从而获得具有鲁棒性的解决方案。

对于第二个问题,我们可以这样理解:粒计算借助于其他学科的哲学思想和方法论,并将它们抽象成为与具体领域无关的方法和策略。

它的独特性体现在用系统的、结构化的理解和方法来解决复杂问题。

对复杂问题的全面理解通常是多视角的,从每一个视角着眼的理解又是多层次的。

由此我们可以得出,粒计算的过程就是对复杂问题的求解过程。

它的结果表现为一个多视角、多层次的粒结构。

这个粒结构是对此复杂问题的系统且近似的描述和解答。

对于第三个问题,我们认为对粒计算的研究应该着眼于三个观点:粒计算的哲学思想、方法论以及计算模式。

从哲学观点考虑,粒计算试图将人类的认知方式抽象化、形式化,从而提炼出结构化的思维模式。

从方法论观点考虑,粒计算着重研究系统化的方法和技术,将问题求解的过程规范为结构化的、自上而下的逐步求精过程。

从计算模式观点考虑,粒计算关注于结构化的信息处理。

信息处理是有层次的,其研究领域涉及抽象的信息处理、人脑中的信息处理以及计算机中的信息处理。

计算模式是方法论的具体表现形式。

在计算机学科中,我们通常将兴趣集中在基于计算机的信息处理模型上,并把它独立出来进行分析。

粒计算的三个观点可以用三角形来表示,也可以用层次结构或三维空间模型来描述。

对粒计算的研究本身也是多视角、多层次的。

对于第四和第五个问题的解答,我们在下一节详细介绍。

1.2不同领域的相同结构和策略粒计算的形成综合了许多学科的研究成果。

为了对其有一个更深入的了解,我们首先考察粒计算思想及其艺术在不同学科中的体现。

概念形成及学习是人类最基本的活动之一[47]。

概念是人类知识的基本单元。

通常,一个概念对应一个自然语言的单词或词组。

一个概念既可能是另一个概念的子概念,同时又可能包含许多子概念。

这就决定了人类的语言也需要符合分层结构,这样才能准确地描述知识;它同时也决定了人类的记忆也需要符合分层结构,这样才能准确地存储知识[48]。

人类的知识结构是一个分层结构[49,50]。

对概念的学习和知识的积累在很大程度上依赖于对概念之间内在联系的挖掘和整理。

形式概念分析[51,52,53]就是一个具体的描述概念层次结构的方法。

粒化及聚类是另一种人类对知识进行总结概括的方法。

一个类可以理解为一个特定概念的实例集合,它是考虑问题的基本单元。

同样,一个类既可能是另一个类的子类,同时又可能包含许多子类。

聚类分析是这种思想的具体实现[54]。

它通过比较对象间的相似程度,把最接近的对象归并成类,对给定的数据集进行层次的分解。

具体又可分为“自底向上”和“自顶向下”两种方案。

例如,在“自底向上”方案中,初始时每一个数据记录都组成一个单独的组,在接下来的迭代中,相互邻近的组合并成一个组,直到所有的记录聚成一组或者某个条件满足为止。

社会网络由人和不同大小的社会群体组成。

每一个群体既可能是另一个群体的子群,同时又可能包含许多子群。

社会网络分析[55,56]注重对社会结构进行分析。

社会结构是人与人之间关系的一种基本的客观现象,具体表现为人和人、人和群体以及群体和群体之间的联系,它可以由婚姻关系或血缘关系定义,可以用权力结构进行分析,也可能反应社会中人与人之间的某种联系(如工作关系、朋友关系等)。

对社会网络的结构化分析有助于人力资源管理和信息资源管理,提高组织中的协作、知识创新和信息传播。

修辞与写作也必须注重结构且言之有序[57,58,59,60]。

词语组合成句子,句子组合成段落,段落构成整篇文章。

文章的结构是由段落层次以及它们之间的连接转承关系组成的。

文章段落是表达一个完整的意思而相对独立的单位。

划分段落的原则是要注意内容的单一性和完整性。

一个或若干个段落形成一个层次,层次中的每一段落围绕一个问题展开讨论。

一篇文章的中心思想往往要分几层意思才能表达清楚。

层次的安排标志着文章内容展开的步骤和次序。

安排段落层次需要分清先后主次,理清来龙去脉,使我们的思想和观点能有步骤地展开,并连贯成为一个整体。

结构化程序的基本组成是程序模块,多个程序模块形成分层结构。

结构化程序设计的特点可以概括为:分层设计、初始设计独立于具体语言、细节延后到较低层次考虑、逐层形式化、逐层验证和逐步求精。

由此我们可以概括出结构化程序设计的核心思想:自顶向下、逐步求精。

程序从最顶层开始,每一个层次逐步精细化、形式化,并对每一个层次进行验证,直到整个程序设计完毕[61,62,63]。

数学证明需要遵循严谨的逻辑结构。

一个结构化的数学证明可以按照自上而下的思维模式分层展开。

每一层次自成体系,包涵一个论点,其证明又在更低一层次具体化。

整个过程循序渐进,直到证明完成[64,65]。

概念形成及学习在理论上决定了一个易于被人们理解的问题求解方法只能是结构化的、有层次的。

例如,与人类记忆有关的组块理论[48]揭示了在写作中人们为什么会采用分层结构[58,59]。

若将文章比作一个随着时间演变的复杂系统[60],则复杂系统的分层结构[66]可以用于写作过程当中。

另一方面,程序设计的风格又受到一般写作的影响,而结构化程序设计思想又反过来影响结构化数学证明[64,65]。

从这些具体例子可以看出,客观世界可以用不同粒度的结构来有效描述。

因此,人们对世界及实际问题的理解和解决是粒化和多层次的;知识结构是粒化和多层次的;同时,我们用来交流知识的自然语言也是粒化和多层次的。

基于这些认识,我们认为Hawkins所提出的人脑概念模型可能会对粒计算有一定指导意义[67]。

人脑的结构是由无数个神经元及其之间的联系组成的,整个人脑又分成不同区域。

从概念上讲,这些区域的联系构成一个多层次的结构,信息可以有效地进行上下传递。

Hawkins 用这样一个大脑皮层的分层结构建立了一个基于记忆的预测模型[67],它可以用来解释人类的自然智能。

最重要的是,大脑皮层的分层结构自然地映射了自然世界的分层结构。

从这个意义上讲,基于粒化和多层次研究的粒计算是非常自然的和重要的。

作为跨学科的研究,粒计算需要综合不同研究领域的成果。

例如,[3,4,5,6]•商空间[68,69,70]•粗糙集[46,71]•模糊集[72]•知识空间[73,74,75]•因素空间[54]•聚类分析[51,52,53]•形式概念分析[76,77]•自然计算(Nature-inspired computing) 和自主计算 (Autonomy-oriented computing)[61,62,63,78]•计算机程序设计[79,80,81]•问题求解[82]•共同研讨(Synectics)[66,83,84,85,86]•分层理论[66,87,88]•一般系统理论[55,56]•社会网络分析[2,67,89,90,91]•人工智能[47,92,93,94,95]•学习[44,96,97]•信息处理[57,58,59,60]•修辞与写作[98,99]•研究方法论[50,72]•教育学[100,101]•认知科学和认知心理学[49,102]•哲学以及科学哲学我们还可以增加更多的学科和领域,使这个列表更加完整。

相关文档
最新文档