自然科学版
陕西师范大学学报(自然科学版)
数学与计算机科学
生成有向图中全部简单回路的一种新算法
PDF下载 ()
王玉英1,2,陈平2,苏2
(1 西安建筑科技大学 理学院, 陕西 西安 710055;2 西安电子科技大学 软件工程研究所, 陕西 西安 710071)
王玉英,女,副教授,博士研究生,研究方向为逆向工程、面向对象技术和软件体系结构.
摘要:
提出了生成有向图中全部简单回路的一种新算法.算法的主要思想是对图中顶点进行缩减,在缩减过程中巧妙地利用字符串标记保存图中原有信息,不断减少图中顶点的数量,最终将图缩为一点,逐步得到全部简单回路.这种缩减过程隐藏在矩阵运算中,在运算中不断简化矩阵,从而降低了运算复杂度,提高运算效率.此算法生成的回路中不包含重复的回路,算法结构清晰,易转化为计算机程序.文中给出了算法的详细证明和实例应用.
关键词:
有向图; 简单有向回路; 算法; 矩阵运算
收稿日期:
2008-03-15
中图分类号:
O1576;TP311.12
文献标识码:
A
文章编号:
1672-4291(2008)04-0012-04
基金项目:
国家自然科学基金资助项目(60473063);教育部博士点基金资助项目(20030701009)
Doi:
A new algorithm to find all elementary circuits of a directed graph
WANG Yu-ying1,2 ,CHEN Pin2, SU Yang2
(1 College of Science, Xi′an University of Architecture and Technology, Xi′an 710055, Shaanxi China; 2 Software Engineering Institute, Xidian University, Xi′an 710071, Shaanxi China)
Abstract:
A new algorithm for creating all elementary circuits of a direct graph is proposed. The main idea of this algorithm is to remove vertices from the graph one by one and to find elementary circuits. When the graph is shrunk to a point, all elementary circuits are found. During this process, the related matrices are simplified gradually and some strings are used to save the information about the original graph, which makes the algorithm complexity reduce and increases its efficiency. All elementary circuits obtained are not reduplicate. It is convenient to transform this algorithm to computer program. The proof of this algorithm and its application are given.
KeyWords:
directed graph; elementary directed circuit; algorithm; matrix operation