Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a bucket or double-bucket data structure?

I'm doing some reading about shortest path algorithm implementations and have been running into over and over that implementing Dijkstra's Algorithm with a Double-Bucket data structure is a good implementation.

However I cannot seem to find what a double-bucket implementation actually means, the wikipedia article on it is kind of vague. From what I've seen it is similar to a hash table/map. I never heard of this before in my data structures or algorithm classes.

The particular paper I was reading was this,

Cherkassky, B. V., Goldberg, A. V., & Radzik, T. (1996). Shortest paths algorithms: Theory and experimental evaluation. Mathematical Programming,73(2), 129-174.

like image 984
Carson Avatar asked Feb 22 '17 18:02

Carson


People also ask

What is a bucket in programming?

A bucket is a document of no definite size to which information of interest is added with no structure. Many software packages have a README file which is a bucket containing the very latest information. In IBM culture, such a file is known as a bucket and is opened for critical fixes and fix packages.

What is bucketing of array?

Bucketing builds, the hash table as a 2D array instead of a single dimensional array. Every entry in the array is big, sufficient to hold M items (M is not amount of data. Just a constant). Problems. Lots of wasted space are created.

What are the 2 main types of data structures?

Basically, data structures are divided into two categories: Linear data structure. Non-linear data structure.

What is bucket in statistics?

In statistics, bucket evaluations is a method for correlating vectors. This method is a non-parametric, unsupervised correlation method first published in 2012 by Shabtai et al. Bucket evaluations was initially constructed for genetic research, and was used for finding a new potential anti-cancer drug.


1 Answers

A bucket data structure is a data structure that uses the key values as the indices of the buckets, and store items of the same key value in the corresponding bucket. Naturally it makes the most sense to use the bucket data structure with integer key values.

Suppose B is a bucket data structure such that bucket B[x] stores all items with the key value of x.

Using the Shortest Paths problem as the example, if you have 3 nodes u, v and w in the Frontier set, where the currently known shortest distances are 3, 3 and 7, respectively, then B[3] = {u, v} and B[7] = {w}.

Time analysis of the bucket data structure that is relevant to the Shortest Paths problem:

  • Insert: O(1)
  • Removal: O(1)
  • Decrease Key: O(1)
  • Find Minimum: O(c), where c is the maximum key value.

Thus if Dijkstra's algorithm is implemented with a bucket data structure, you have O(m + nc) for your total time complexity, where m is the number of edges and n is the number of nodes.


A double bucket data structure, in most cases, refers to the bucket data structure where each bucket contains a bucket data structure.

like image 197
wookie919 Avatar answered Nov 20 '22 17:11

wookie919