Questions tagged [algorithm]
An algorithm is a sequence of well-defined steps that define an abstract solution to a problem. Use this tag when your issue is related to algorithm design.
5,150 questions
6
votes
4
answers
371
views
Sort strings containing valid and invalid substrings by substring groups
Several strings need to be sorted by substring.
String Examples:
"[8A][Dings da][Orange-Blau]"
"[MOD][Weiss][UKE]"
"[GF][MOD3][Dings da]"
"[MOD][Black][UKE]"
...
5
votes
1
answer
225
views
Solving minimum time-to-path discovery problem for implicit online graphs with delayed node expansion via multithreaded bidirectional BFS (Java)
Intro
(See this repository for all the missing parts.) Basically, the below algorithm is a parallel bidirectional breadth-first search. However, it does not return the shortest path in number of arcs ...
6
votes
1
answer
118
views
conv2 Template Function Implementation for Image with Execution Policy
This is a follow-up question for conv2 Template Function Implementation for Image in C++. I am trying to perform parallel computation for conv2 template function ...
1
vote
1
answer
82
views
Solving maximum network flow problem in Java: Edmonds Karp algorithm vs. Relabel-to-front
Intro
This time, I present two maximum flow algorithms:
Edmonds Karp algorithm,
Relabel-to-front.
(The entire repository with unit tests and more may be found here.)
Code
...
1
vote
1
answer
88
views
LoanChainSimplifier.java: Loan cycles simplification in financial graphs
The whole repository is here.
You can read about what is happening in my blog post.
Above, on the first row we show how to possibly resolve loan cycles. On the second row, one can see how to "...
7
votes
2
answers
709
views
BCsort: A fast, statistical, in-place ternary distribution sort
I recently created BCsort: a high-performance, in-place ternary distribution sorting algorithm engineered for Rust. It is designed to combat the Memory Wall by utilizing continuous-space spatial ...
6
votes
3
answers
461
views
Tkinter - Demonstration of the Graham-Scan (Convex hull)
I found an very old project of mine with an issue that I solved today (first and last lines were not drawn).
It demonstrates the Graham-Scan
However, I noticed I didn't document anything, and I ...
5
votes
4
answers
319
views
Generic QuickSelect and QuickSort using IComparable<T>
I was working on this generic QuickSelect and QuickSort class today when I heard the sad news that C. A. R. (Tony) Hoare had passed last week.
Combined, Hoare's QuickSelect/Sort is probably my ...
2
votes
1
answer
133
views
Gaussian Fisheye Image Generator Implementation (Rev.2)
This is a follow-up question for Gaussian Fisheye Image Generator Implementation in C++. As Cris Luengo's comment, I am trying to modify the implementation to iterate over the output image, and ...
3
votes
0
answers
75
views
BCcarver, an exact Hamiltonian cycle finder
This is an exact Hamiltonian cycle finder, which can solve N=2000 dense random graphs 129s with just 29 backtracks.
This project started as an experiment. I wanted to solve a hard problem in order to ...
4
votes
1
answer
184
views
Comparing integral element determinant algorithms: Laplacian expansion vs. Bareiss algorithm
Since Gaussian elimination breaks on matrices with integral element type, I changed it to Bareiss' algorithm which runs - just like Gaussian elimination - in \$\Theta(n^3)\$.
Code
...
3
votes
2
answers
241
views
Comparing determinant algorithms: Laplacian expansion vs. Gaussian elimination in Java
This post presents two algorithms for computing determinants in square matrices. My code follows.
Code
io.github.coderodde.determinant.LongSquareMatrix.java:
...
1
vote
1
answer
62
views
Comparing Hopcroft's and Moore's DFA minimization algorithms in Java
Prior attempts
This post extends my previous topic:
Deterministic finite automaton in Java
Deterministic finite automaton in Java - Take II
This time, I have added two DFA minimization algorithms to ...
6
votes
1
answer
269
views
Deterministic finite automaton in Java - Take II
(This is the continuation of Deterministic finite automaton in Java.)
(The repository is here.)
This time I have reworked the API and supplied a union DFA construction algorithm for additional fun.
...
2
votes
3
answers
655
views
Sorting huge data int files externally - a toolkit in Java
In this post, I will present an algorithm for doing external sorting of int keys when the entire data does not fit in the main memory. Below are the repositories:
...