【资料】Fluery's Algorithm( 用于查找Euler path 和Euler circuit)
2014-01-11 19:42
225 查看
复习discrete math 看了老师的课件感觉不靠普,在百度上也找不到好的科普贴,
只能从国外的网站上扒下来生肉,看英文贴还是挺舒服的= =
所以直接:点击打开链接
Introduction
Euler's Theorems are examples of existence theorems
existence theorems tell whether or not something exists (e.g. Eulercircuit)
but doesn't tell us how to create it!
we want a constructive method for finding Euler paths and circuits
methods (well-defined procedures, recipes) for construction are calledalgorithms
there is an algorithm for constructing an Euler circuit: Fleury'salgorithm
we will illustrate it with the graph:
Fleury'sAlgorithm
1. pick any vertex to start
2. from that vertex pick an edge to traverse (see below for importantrule)
3. darken that edge, as a reminder that you can't traverse itagain
4. travel that edge, coming to the next vertex
5. repeat 2-4 until all edges have been traversed, and you areback at the starting vertex
at each stage of the algorithm:
the original graph minus the darkened (already used) edges = reducedgraph
important rule: never cross a bridge of the reduced graphunlessthere is no other choice
why must we observe that rule?
Notes:
the same algorithm works for Euler paths
before starting, use Euler’s theorems to check that the graph has an Eulerpath and/or circuit to find!
when you do this on paper, you can erase each edge as you traverse it
this will make the reduced graph visible, and its bridges apparent
Example
The rest of the trip is obvious, and the complete Euler circuit is:
(F, C, D, A, C, E, A, B, D, F)
推荐题目:
POJ 1789 POJ 1386 POJ 2337 POJ 1975(传递闭包) POJ 3360 POJ 2570 ZOJ 1798
期末考试完毕后再刷题吧T^T
只能从国外的网站上扒下来生肉,看英文贴还是挺舒服的= =
所以直接:点击打开链接
Introduction
Euler's Theorems are examples of existence theorems
existence theorems tell whether or not something exists (e.g. Eulercircuit)
but doesn't tell us how to create it!
we want a constructive method for finding Euler paths and circuits
methods (well-defined procedures, recipes) for construction are calledalgorithms
there is an algorithm for constructing an Euler circuit: Fleury'salgorithm
we will illustrate it with the graph:
Fleury'sAlgorithm
1. pick any vertex to start
2. from that vertex pick an edge to traverse (see below for importantrule)
3. darken that edge, as a reminder that you can't traverse itagain
4. travel that edge, coming to the next vertex
5. repeat 2-4 until all edges have been traversed, and you areback at the starting vertex
at each stage of the algorithm:
the original graph minus the darkened (already used) edges = reducedgraph
important rule: never cross a bridge of the reduced graphunlessthere is no other choice
why must we observe that rule?
Notes:
the same algorithm works for Euler paths
before starting, use Euler’s theorems to check that the graph has an Eulerpath and/or circuit to find!
when you do this on paper, you can erase each edge as you traverse it
this will make the reduced graph visible, and its bridges apparent
Example
Step in recipe | Marked graph | Reduced graph |
Pick any vertex (e.g. F) | ||
Travel from F to C (arbitrary choice) | ||
Travel from C to D (arbitrary) | ||
Travel from D to A (arbitrary) | ||
Travel from A to C (can't go to B: that edge is a bridge of the reduced graph,and there are two other choices, we chose one of them) |
(F, C, D, A, C, E, A, B, D, F)
推荐题目:
POJ 1789 POJ 1386 POJ 2337 POJ 1975(传递闭包) POJ 3360 POJ 2570 ZOJ 1798
期末考试完毕后再刷题吧T^T
相关文章推荐
- ubuintu 12.04 server 系统语言
- Ant之build.xml详解
- UITabBarController的使用
- ZWave for Arduino
- 1.C#泛型-泛型集合Dictionary<Key,Value>
- easyui学习笔记1—增删改操作
- 使用filter解决request.getParameter的中文乱码问题
- ANDROID 中UID与PID的作用与区别
- NGUI DragablePanel与UiStretch的兼容
- ab测试时结果显示大量Request failed的情况分析
- Windows Phone (WP) 跨线程更新界面(UI)
- java 之DelayQueue实际运用示例
- 刷新Activity中的scrollview示例(局部ui刷新)
- (转)Android UI布局中设置了fill_parenet仍然没有全屏的解决办法
- Attribute value "xx" is quoted with " which must be escaped when used within the
- 切割NGUI图集
- LeetCode(94)Unique Binary Search Trees
- UINavigationbar的背景修改方法集合(ios4和5)
- UIToolBar和UINav的修改办法(自适应IOS4和5)
- Android UI 设计之 TextView EditText 组件属性方法最详细解析