Algorithms_week2_Union−Find

UNION-FIND 官网总结
DYNAMIC CONNECTION
在这里插入图片描述

The algorithms that we’re looking at today are not going to actually give the path connecting the two objects. It’s just going to be able to answer the question, is there a path?
For programming we’re going to associate each object with a name and we’ll just name the objects with a number, integers from zero to N-1.
在这里插入图片描述

API=应用程序接口
API

QUICK FIND
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

QuickFind is too slow for huge problems. So, how are we going to do better?

QUICK UNION
在这里插入图片描述
在这里插入图片描述

QUICK UNION IMPROVEMENTS
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

UNION-FIND APPLICATION
percolation渗滤
在这里插入图片描述
在这里插入图片描述
So the scientific question, or the, mathematical question from this model is, how do we know, whether it’s going to percolate or not?
在这里插入图片描述
What’s that threshold value? The only solution we have comes from a computational model, where we run simulations. And those simulations are only enable by fast union find algorithms.
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_44241082/article/details/85316681