Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Brick Sort #129

Closed
nehasangeetajha opened this issue Mar 7, 2020 · 11 comments · Fixed by #221
Closed

Parallel Brick Sort #129

nehasangeetajha opened this issue Mar 7, 2020 · 11 comments · Fixed by #221

Comments

@nehasangeetajha
Copy link

Description of the problem

I would like to propose an odd-even transposition sort or brick sort. Odd-Even Transposition Sort is based on the Bubble Sort technique. It compares two adjacent numbers and switches them if the first number is greater than the second number to get an ascending order list. The opposite case applies to a descending order series.

Please assign me this issue.

@czgdp1807
Copy link
Member

In computing, an odd–even sort or odd–even transposition sort is a relatively simple sorting algorithm, developed originally for use on parallel processors with local interconnections. It is a comparison sort related to bubble sort, with which it shares many characteristics.

This page says that it was originally developed for parallel threads/processors. So, IMO, we should add its parallel implementation with odd indices being sorted on one thread and even indices on another thread. Though before, that a nice API design should be proposed which can be applicable to other parallel sorting algorithms like parallel merge sort. We can develop a uniform API for all parallel sorting algorithms.

@czgdp1807
Copy link
Member

Please assign me this issue.

See our issue policy at https://github.com/codezonediitj/pydatastructs/wiki/Issue-Policy

@Meenakshi2000
Copy link

How to contribute

@czgdp1807
Copy link
Member

See, https://github.com/codezonediitj/pydatastructs/wiki/Plan-of-Action-for-the-Projects
For this issue specifically we need a parallel version of brick sort. You can think of an idea to make brick sort parallel and we can discuss over it further.

@MukundVaradarajan
Copy link

MukundVaradarajan commented Mar 20, 2020

Hi, I would like to work on this. Is anyone else already working on it? I have got an idea to go about it.

@czgdp1807 can I start working on this? Any updates on this?

@czgdp1807
Copy link
Member

czgdp1807 commented Mar 22, 2020

@MukundVaradarajan Please start by proposing some API designs for brick sort. We need only it's parallel version implemented. IMO, the API for this can along the lines of parallel merge sort already there in the master.
See,

def merge_sort_parallel(array, num_threads, **kwargs):

@czgdp1807
Copy link
Member

Parallel implementation of this algorithm is yet to be added.

@czgdp1807 czgdp1807 changed the title Brick Sort Parallel Brick Sort Mar 25, 2020
@HarsheetKakar
Copy link
Contributor

we can try one thread for odd and one thread for even part of the array.

@czgdp1807
Copy link
Member

Some idea is given in #129 (comment)

@HarsheetKakar
Copy link
Contributor

Some idea is given in #129 (comment)

I can start with a draft PR if its ok?

@czgdp1807
Copy link
Member

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants