Editing
Union Find
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The disjoint-set data structure, also known as the union-find data structure, is used to keep track of a collection of non-overlapping sets or elements that are partitioned into disjoint subsets. The primary operations associated with this data structure are: * Find: Determine which subset an element belongs to. This is typically used to check if two elements are in the same subset. * Union: Join two subsets together, combining them into a single subset. The disjoint-set data structure is commonly used to solve problems that involve checking for connectivity between elements or managing partitions of sets. It's particularly efficient in applications like Kruskal's algorithm for finding minimum spanning trees, as it can quickly check if adding an edge would create a cycle in the graph. A popular implementation of disjoint-set data structure is using an array or a map with a "parent" pointer for each element. The parent pointers are used to represent the tree structure that keeps track of the connected components. The efficiency of the find and union operations can be improved by applying path compression and union by rank heuristics.
Summary:
Please note that all contributions to Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
My wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information