Java icon indicating copy to clipboard operation
Java copied to clipboard

[FEATURE REQUEST] Adding Randomized Algorithms to the Repository

Open DenizAltunkapan opened this issue 10 months ago • 14 comments

What would you like to Propose?

Hello everyone,

Until just five days ago, our repository had very few randomized algorithms. If anyone is motivated, they can dive into the topic and implement some interesting randomized algorithms.

Issue details

As examples, i could consider algorithms like:

  • [ ] Randomized Closest Pair Algorithm

  • [x] Randomized Quicksort [solved by @VibhuKhera123 #6234 ]

  • [ ] Randomized Matrix Multiplication Verification, if A* B = C

And many others...

Additional Information

These algorithms are a bit harder to test due to their inherent randomness, but they offer a great opportunity to expand the variety of algorithms in the repository and explore different problem-solving approaches.

If you're interested, feel free to start exploring and contribute! Any contributions would be highly appreciated.

DenizAltunkapan avatar Apr 12 '25 12:04 DenizAltunkapan

@DenizAltunkapan Hey , can i contribute to this issue sir!

VSENTHAMIZHAN avatar Apr 16 '25 10:04 VSENTHAMIZHAN

@DenizAltunkapan Hey , can i contribute to this issue sir!

ofc. I am currently not able to assign anyone but everyone can contribute by opening a Pull Request to improve this repository 🔥

DenizAltunkapan avatar Apr 16 '25 20:04 DenizAltunkapan

here are some other examples. Please first check if they are already implemented in the repo :) :

  • [ ] Randomized approximation of Pi
  • [x] Karger's Min Cut on graphs [solved by @MuhammadEzzatHBK #6233 ]
  • [x] Randomized approximation of Integrals (Monte Carlo) [solved by @MuhammadEzzatHBK #6235 ]
  • [ ] Randomized solutions of NP-complete Problems, such as:
    • [ ] Randomized solution for the Knapsack Problem
    • [ ] Randomized solution for the Traveling Salesman Problem (TSP)
    • [ ] Randomized solution for the N-Queens Problem

DenizAltunkapan avatar Apr 29 '25 21:04 DenizAltunkapan

Hello, I will be working Karger's Min Cut. Thanks!

MuhammadEzzatHBK avatar May 05 '25 04:05 MuhammadEzzatHBK

Hello again, I'll be working on the Monte Carlo Integration. Thanks!

MuhammadEzzatHBK avatar May 07 '25 18:05 MuhammadEzzatHBK

Hello again, I'll be working on the Monte Carlo Integration. Thanks!

Thanks a lot! @MuhammadEzzatHBK

DenizAltunkapan avatar May 08 '25 05:05 DenizAltunkapan

@DenizAltunkapan Hey , can i contribute to this issue sir!

Did you actually contribute to it

Obi7-7 avatar May 09 '25 13:05 Obi7-7

Hello! Has this issue been resolved or can I open a PR

jasonghent98 avatar May 28 '25 03:05 jasonghent98

resolved

On Wed, May 28, 2025 at 9:27 AM Jason Ghent @.***> wrote:

jasonghent98 left a comment (TheAlgorithms/Java#6219) https://github.com/TheAlgorithms/Java/issues/6219#issuecomment-2914826787

Hello! Has this issue been resolved or can I open a PR

— Reply to this email directly, view it on GitHub https://github.com/TheAlgorithms/Java/issues/6219#issuecomment-2914826787, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2SMTCL7TTLVPLMEPSQ6GUT3AUX3BAVCNFSM6AAAAAB277C3OCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMJUHAZDMNZYG4 . You are receiving this because you were mentioned.Message ID: @.***>

VibhuKhera123 avatar May 28 '25 03:05 VibhuKhera123

Hello! Has this issue been resolved or can I open a PR

This issue is still open since not all in this issue mentioned algorithms are implemened. There are still some problems missing (not implemented yet). Which of the mentioned problems interests you? @jasonghent98

DenizAltunkapan avatar May 28 '25 04:05 DenizAltunkapan

Good afternoon! I was wondering if I could contribute a solution for the Randomized Closest Pair as requested in the original issue opened. I have already begun implementation. Thank you. @DenizAltunkapan

bri-harris avatar May 29 '25 20:05 bri-harris

Good afternoon! I was wondering if I could contribute a solution for the Randomized Closest Pair as requested in the original issue opened. I have already begun implementation. Thank you. @DenizAltunkapan

sure :)

DenizAltunkapan avatar May 29 '25 21:05 DenizAltunkapan

@DenizAltunkapan I can take over the randomized matrix multiplication verification. Just to confirm, are we expecting something straightforward with checks and logic or something a little more nuanced, like Freivalds algorithm?

I guess it depends on the scale of the inputs we would be dealing with

jasonghent98 avatar May 30 '25 02:05 jasonghent98

@DenizAltunkapan I can take over the randomized matrix multiplication verification. Just to confirm, are we expecting something straightforward with checks and logic or something a little more nuanced, like Freivalds algorithm?

I guess it depends on the scale of the inputs we would be dealing with

i was exactly thinking about Freivalds algorithm! But if you also want to include other approaches, feel free to go for it :) Totally up to you. @jasonghent98

DenizAltunkapan avatar May 30 '25 19:05 DenizAltunkapan

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution!

github-actions[bot] avatar Jun 30 '25 00:06 github-actions[bot]

Hello @DenizAltunkapan , I’ve submitted PR #6339, which adds the Randomized Closest Pair algorithm with proper unit tests as requested in this issue. Would appreciate your review when possible. Thank you!

aditya-7562 avatar Jul 04 '25 08:07 aditya-7562