Union Find data structure

Category: Python - Education

This script implements the Union Find data structure and algorithm. This data structure allows one to find out which set an object belongs to, as well as join two sets. The algorithm's performance, given m union/find operations of any ordering, on n elements has been shown to take log* time per operation, where log* is pronounced log-star, and is the INVERSE of what is known as the Ackerman function, which is given below: A(0) = 1 A(n) = 2**A(n-1) Date: 26 May, 2012


Data Structure - Tree Algorithm - Union Find - Data - Structure - Union

Homepage: http://code.activestate.com/

Developer: code.activestate.com

License: Freeware

Operating System: All

Add a Comment

all are required fields

     
What do you think of this resource?

Select Your Rate:

Votes:0

 

Related Scripts Download

This script is a pure python drop in replacement for collections.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This structure is a kind of dictionary which allows you to map data intervals to values.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Quick and easy FIFO queue class is an easy First-In-First-Out queue class based on Python's List data structure.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


A ring buffer is a buffer with a fixed size.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


This data structure acts almost like a dictionary, with two modifications: First, D.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


The str() function in the standard library behaves in a slightly weird way when applied against lists: on each element of the list, the repr() is appended.

developer Developer: code.activestate.com
license License: Artistic License, GNU General Public License (GPL)
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


Generic Tree Data Structure for Ruby is a simple to use general purpose Tree data structure implementation in Ruby.

developer Developer: files.rubyforge.vm.bytemark.co.uk
license License: Freeware
operating systems Operating System: Windows, Linux, Mac OS, BSD, Solaris


This script shows a clean way of implementing a 'switch' statement in Python via a dictionary container.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All


Some of Python's powerful meta-programming features are used to enable writing Python functions which include Prolog-like statements.

developer Developer: code.activestate.com
license License: Freeware
operating systems Operating System: All