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

multithreaded fibonacci series #475

Open
dejokz opened this issue Jan 7, 2022 · 8 comments
Open

multithreaded fibonacci series #475

dejokz opened this issue Jan 7, 2022 · 8 comments
Labels
algorithms question Further information is requested

Comments

@dejokz
Copy link

dejokz commented Jan 7, 2022

Description of the problem

implementation of multi-threaded Fibonacci series with a method fib_multi with takes the parameter n. This is part of SWoC v2.

Example of the problem

fib_multi(n=20)
4181
fib_multi(n=7)
8

References/Other comments

CLRS: chapter 27: Multithreaded algorithms
Not sure under which file hierarchy should this python file come under? Perhaps a new directory can be created to facilitate multithreaded algorithms.

@czgdp1807
Copy link
Member

Can you explain how multithreading is helpful here? The fastest algorithm that I know of is O(log n) to generate (n + 1)-th and n-th Fibonacci numbers.

The more important question is what is the applicability of Fibonacci numbers? In which domain their efficient implementation is required to solve a non-trivial problem? Any references?

@czgdp1807 czgdp1807 added algorithms question Further information is requested labels Jan 8, 2022
@Abekaesh
Copy link
Contributor

Is this issue relating to implementation of fastest algorithm to find nth fibonacci series number?

@mridul45
Copy link

I would be happy to contribute to the project as I find my skills a good fit for the issue . As a GSSOC 23 member I humbly ask to allow me to contribute to the issue.

@Meghaa702
Copy link

I would be happy to contribute to the project as I find my skills a good fit for the issue . Please allow me to contribute to the issue.

@Kushagra9399
Copy link

Well, I think it is better to use threading here for faster and efficient calculation and threading will also take less space as compared to recursion approach.
Hello, I am Kushagra Prajapat, want to work on this project in GSOC 2025. It seems your project is interesting as it is more logically. Hence, I would like to work on this project.
Please allow me to contribute on this project and I will provide you the required code within two to three days.

Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 4, 2025
@Kushagra9399
Copy link

Please refer the above content. I have created fibonacci.py file which includes the code for multi-threaded fibonacci series and I have verified it and checked it twice before submitting. I have also created test for that as per the problem given. Please see that and tell me if anything to change or edit, I will do that. I really liked this project. I want to work in this project in GSOC 2025.
Thank You

@Kushagra9399
Copy link

One thing also according to your example if we assume fib_multi(1) = fib_multi(2) = 1 then your examples are working but in the code I have assumed fib_multi(0)=fib_multi(1) = 1 and then the series follows.

@Kushagra9399
Copy link

Pull request #593

Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 5, 2025
Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 5, 2025
Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 5, 2025
Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 5, 2025
Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 6, 2025
Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 6, 2025
Kushagra9399 added a commit to Kushagra9399/pydatastructs that referenced this issue Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
algorithms question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants