首页 | 本学科首页   官方微博 | 高级检索  
相似文献
 共查询到20条相似文献,搜索用时 156 毫秒
1.
递归是一种重要的算法设计方法。经过对递归进行研究,给出递归的定义和它在二叉树、搜索和排序中的应用,并利用C#语言编程实现相应的算法。  相似文献   

2.
本文根据递归算法的定义,对其在C语言程序设计中的应用进行了阐述,通过对递归的内部实现过程的描述,对递归的使用进行评价,说明递归在程序设计中具有一定的使用空间.  相似文献   

3.
在对XML数据模型主动机制研究的基础上,结合规则实例提出了一种新的分析规则终止性的静态判定算法。此算法基于触发环的概念,首先对触发环中每一个被修改的节点产生一个递归等式,然后通过展开递归等式并检验其可满足性,就可以分析规则集的可终止性,这样不仅可以得到更高的精确度及更小的复杂度,而且可以得到有效的判定主动规则可终止性的条件。  相似文献   

4.
本文根据递归算法的定义,对其在C语言程序设计中的应用进行了阐述,通过对递归的内部实现过程的描述,对递归的使用进行评价,说明递归在程序设计中具有一定的使用空间.  相似文献   

5.
递归算法的非递归实现   总被引:5,自引:0,他引:5  
递归以其算法简单清晰、可读性强及易实现而具有很好的理论,但在实际应用时,递归过程用到的大量数据不管有用无用都需要保存,而当递归层次多到一定程度,将耗尽系统内存资源,因此很少在真正的实际应用中使用,实用性较差。如果可以设计出一种既保持递归算法简单、清晰、易实现的优点,双能避免递归算法极耗内存缺陷的新型递归算法,将是一件十分有意义的事情。  相似文献   

6.
主动XML系统一般采用触发器,即“事件-条件-动作”(ECA)规则来提供主动行为。本文提出了一种新的事件监测机制,在XML系统中引入‘主动节点’,即把规则也融入节点,各节点上的ECA规则只需在节点修改时被激活并进行检查,提高了动作的执行效率,增强了系统的实时性。本文结合规则实例给出了分析规则终止性的静态判定算法,引入触发图、活化图、修改后的触发图、触发环等概念,对触发图中的简单触发环进行转换,产生一个对应于触发环的循环语句,对触发环中每一个被修改的节点产生一个递归等式。展开递归等式检验它的可满足性可以用来分析规则集的可终止性。这一算法提高了可终止性判定的精确性,降低了复杂度。  相似文献   

7.
委托是常见的一种安全策略形式,委托可以用带标识的有向图对其严格地形式化建模,称为委托图。给出了委托图的定义,存储,委托图中实现委托的算法,委托图无环性判定算法,并进行了分析,讨论了委托图的性质。  相似文献   

8.
一种有效的用于数据挖掘的动态概念聚类算法   总被引:11,自引:0,他引:11  
郭建生  赵奕  施鹏飞 《软件学报》2001,12(4):582-591
概念聚类适用于领域知识不完整或领域知识缺乏时的数据挖掘任务.定义了一种基于语义的距离判定函数,结合领域知识对连续属性值进行概念化处理,对于用分类属性和数值属性混合描述数据对象的情况,提出了一种动态概念聚类算法DDCA(domain-baseddynamicclusteringalgorithm).该算法能够自动确定聚类数目,依据聚类内部属性值的频繁程度修正聚类中心,通过概念归纳处理,用概念合取表达式解释聚类输出.研究表明,基于语义距离判定函数和基于领域知识的动态概念聚类的算法DDCA是有效的.  相似文献   

9.
孔明棋是一种玩法简单,但其中变化无数的益智游戏。对孔明棋求解问题进行分析,提出了基于回溯思想的递归和非递归算法,运行结果表明了算法的有效性。文章还围绕栈在存储数据、消解递归等方面的应用对两个算法的优缺点进行了比较分析,递归算法结构清晰,但递归调用次数多;而非递归算法借助程序栈,将程序向循环转化,降低了时间复杂度,但算法难以分析和理解。因此在求解实际问题时可以采用递归思想来分析,然后借助栈用非递归来实现算法。  相似文献   

10.
对规范流网中OR-join任务语义及使能判定算法进行了深入研究。首先介绍YAWL语言中与OR-join任务有关的概念,规范流网的有关定义,然后在此基础上定义规范流网关于OR-join任务新的语义;最后提出一种判定规范流网OR-join任务使能的算法,并举例说明算法的正确性和有效性。  相似文献   

11.
In this paper, we study some aspects of the semantics of nondeterministic flowchart programs with recursive procedures. In the first part of this work we provide the operational semantics of programs using the concept of an execution tree. We propose a new definition of the semantics of a non-deterministic recursive program as a mapping from the input domain to the set of execution trees determined by the program. Using this new concept, we prove that every nondeterministic flowchart program with recursive procedures can be unfolded into a semantically equivalent infinite pure flowchart (without procedures). This result is applied in the second part of this work to prove the soundness of an inductive assertion method which is also complete with a finite number of assertions (contrary to De Bakker and Meertens's method [11]).  相似文献   

12.
陈海明 《软件学报》1998,9(10):755-759
运算构造和检验系统FC(function constructor)是形式规约获取系统SAQ(specification acquisition)的一个子系统.在SAQ系统中,运算用于表示规约的语义.FC提供了对运算的交互式归纳定义方式和运算的施用,支持运算的联立递归定义.详细介绍FC的功能、结构和实现技术,并讨论了下一步的改进方向.  相似文献   

13.
A common basis is presented, for Floyd's method of inductive assertions and for the subgoal induction method of Morris and Wegbreit. This basis is provided by consequence verification, a method for verifying logic programs. We connect flowcharts with logic programs by giving a recursive definition of the set of all computations of a flowchart. This definition can be given in two ways: the recursion can run forward or backward. Both definitions can be expressed in logic, resulting in a logic program which is then subjected to consequence verification. Verification of the forward logic program is shown to be essentially Floyd's method; verification of the backward program corresponds similarly to subgoal induction.  相似文献   

14.
A noninductive method for mechanical theorem proving is presented, which deals with a recursive class of theorems involving iterative functions and predicates. The method is based on the symbolic evaluation of the formula to be proved and requires no inductive step. Induction is avoided since a metatheorem is proved which establishes the conditions on the evaluation of any formula which are sufficient to assure that the formula actually holds. The proof of a supposed theorem consists in evaluating the formula and checking the conditions. The method applies to assertions that involve element-by-element checking of typed homogeneous sequences which are hierarchically constructed out of the primitive type consisting of the truth values. The sequences can be computed by means of iterative and ``accumulator' functions. The paper includes the definition of a simple typed iterative language in which both predicates and functions are expressed. The language precisely defines the scope of the proof method. The method proves a wide variety of theorems about iterative functions on sequences, including that which states that REVERSE is its own inverse, and that it can be inversely distributed on APPEND, that FLATTEN can be distributed on APPEND and that each element of any sequence is a MEMBER of the sequence itself. Although the method is not complete, it does provide the basis for an extremely efficient tool to be used in a complete mechanical theorem prover.  相似文献   

15.
Based on inductive definitions, we develop a tool that automates the definition of partial recursive functions in higher-order logic (HOL) and provides appropriate proof rules for reasoning about them. Termination is modeled by an inductive domain predicate which follows the structure of the recursion. Since a partial induction rule is available immediately, partial correctness properties can be proved before termination is established. It turns out that this modularity also facilitates termination arguments for total functions, in particular for nested recursions. Our tool is implemented as a definitional package extending Isabelle/HOL. Various extensions provide convenience to the user: pattern matching, default values, tail recursion, mutual recursion and currying.  相似文献   

16.
17.
is paper presents a method to define a set of mutually recursive inductive types,and develops a higher-order unification algorithm for λП∑ extended with inductive types.The algorithm is an extension of Elliott‘s algorithm for λП∑.The notaiton of normal forms plays a vital role in higher-order unification.The weak head normal forms in the extended type theory is defined to reveal the ultimate “top level structures”of the fully normalized terms and types.Unification transformation rules are designed to deal with inductive types,a recursive operator and its reduction rule.The algorithm can construct recursive functions automatically.  相似文献   

18.
目前针对“k(≤3)条渐次最短路径的问题”国际上尚无一种有效的解决方案,本文基于最短路径算法及背离路径的定义提出了一种递归计算方法,能够有效地解决某些实际问题中k条渐次最短路径的计算。对于算法中的环路问题,文中介绍了相应的方法予以消除。算法的复杂度分析及仿真实验表明本算法具有较好的性能。  相似文献   

19.
辨识时变系统遗忘因子算法的收敛性分析   总被引:7,自引:5,他引:2  
著名的递推遗忘因子算法(RFFA)可以用辨识时变系统参数,具有良好的跟踪性能,本文借助于随机过程理论分析了RFFA的收敛性和稳定性,给出了参数跟踪误差的上下界。  相似文献   

20.
汤震浩  李彬  翟娟  赵建华 《软件学报》2018,29(6):1527-1543
本文提出了一种对递归数据结构的归纳性质进行自动化分析的框架.工作分为三个主要部分.首先,它将递归数据结构的归纳性质分为两个主要类别,并提出对应的处理模式,从而帮助简化对于程序中的递归数据结构上的相关性质的分析.其次,提出了一种称为分割与拼接的技术来发现和描述递归数据结构是如何被程序修改的:递归数据结构首先被分割为若干个互不相交的片段,然后这些片段以新的方式重新拼接在一起,形成一个新的数据结构.这个技术的重点在于如何将程序原有的性质保留下来,从而为后面的分析过程所使用.最后,提出了一种调用上下文敏感的程序摘要过程间分析方法.案例分析和实验结果表明我们的分析框架可以有效地分析递归数据结构的归纳性质,并生成对程序证明过程有用的断言.  相似文献   

设为首页 | 免责声明 | 关于勤云 | 加入收藏

Copyright©北京勤云科技发展有限公司  京ICP备09084417号