r/algorithms

New moderators needed - comment on this post to volunteer to become a moderator of this community.
▲ 2.6k r/algorithms+365 crossposts

New moderators needed - comment on this post to volunteer to become a moderator of this community.

Hello everyone - this community is in need of a few new mods, and you can use the comments on this post to let us know why you’d like to be a mod here. 

Priority is given to redditors who have past activity in this community or other communities with related topics. It’s okay if you don’t have previous mod experience and our goal, when possible, is to add a group of moderators so you can work together to build the community.

Please use at least 3 sentences to explain why you’d like to be a mod and share what moderation experience you have (if any).  

If you are interested in learning more about being a moderator on Reddit, please visit redditforcommunity.com. This guide to joining a mod team is a helpful resource. 

Comments from those making repeated asks to adopt communities or that are off topic will be removed. 

u/GaryNOVA — 1 day ago

If this algorithm runs too long, you can compress randomness

I wrote a post about a non-trivial analysis technique I was shown in a course that proves why an algorithm terminates.

Link: here

Feedback appreciated!

reddit.com
u/Due_Raspberry_6269 — 18 hours ago

The "unreasonable effectiveness" of Linear Programming

When I was first learning LP in undergrad (simplex, relaxations for Integer Problems, weak and strong duality and all that jazz), I honestly didn't see where it would be that useful. Now in my research it shows up quite a bit via primal-dual algorithms. These simultaneously keep track of the primal and dual solutions.

To be fair, even in undergrad one usually learns about using LP relaxations and (deterministic or randomized) rounding to get approximation algorithms for problems such as MAXSAT or Set Cover.

I'm curious where else people run into it. Has LP ever popped up in your own research or work?

reddit.com
u/Phytor_c — 3 days ago
▲ 24 r/algorithms+7 crossposts

Aquifer: Bounded Queues, Fairness, and Dynamic Pacing for AI Workloads

Aquifer is an open-source local control plane for AI workloads and MCP infrastructure. It provides durable queues, bounded concurrency, fairness controls, and dynamic pacing for bursty traffic patterns common in agent systems.

It also experiments with the Aqueduct Protocol, a stream and webhook-based coordination protocol that dynamically communicates flow state through headers, allowing clients to scale traffic up or down at a controlled pace instead of relying solely on static rate limits. The project also includes an encryption and identity protocol that uses public-key verification, reducing the need to store shared secrets in a database. The goal is to make agent and MCP traffic more resilient to overload, retries, and traffic spikes.

Repo: https://github.com/rjpruitt16/aquifer

u/Noobcreate — 4 days ago

A Geometric, Best-Improvement Heuristic for the Travelling Salesman Problem

I spent six months in 2021 building a TSP solver from geometric first principles, with no prior reading of the literature. Recently turned it into an interactive web app with step-by-step animation of every algorithmic move.

Interesting result: the algorithm independently rediscovered convex hull seeding and 2-opt uncrossing. It also produced a farthest-neighbour strategy I haven't seen documented.

On Berlin52: 7783 vs world optimal 7542 (3.2% above). 14ms on a single CPU core.

Demo: tsp.uncledroid.app
Paper: tsp.uncledroid.app/paper.pdf

Happy to discuss the algorithm — especially if anyone can point me to prior work on farthest-neighbour as a TSP construction heuristic.

video: youtu.be/92z670RTsJg

reddit.com
u/Square-Stomach-6059 — 3 days ago

What Are You Working On? August 16, 2026

Inspired by the recurring threads on r/math, we are starting our own weekly discussion thread!

 

This recurring thread will be for general discussion on whatever algorithm-related projects, problems, or topics you have been or will be working on this week. This can be anything, including:

* theoretical computer science and algorithm design,

* books, papers, or articles you are reading,

* coursework or self-study (what you have been learning recently),

* competitive programming or interview prep,

* preparing a talk, presentation, or project demo.

 

All backgrounds and levels of experience are welcomed!

reddit.com
u/Phytor_c — 4 days ago
▲ 10 r/algorithms+1 crossposts

Spacing points "evenly" across a gradient

Does anyone know an algorithm for "evenly" spacing points across a given space (e.g. a cylinder), where one given point is locked in place and all others are as evenly spaced as possible, but across multiple gradients that weigh less points to be placed at specific positions. For example, a cylinder with aversion points at the top, bottom, and 3D middle, such that some points appear at the top, bottom, and middle, but less than in the middle of the surface where most points would reside. With configurable weights to the aversion points to push points closer or further away from them. Specifically, I'm trying to use such an algorithm to choose a number of sufficiently contrasting colors, but to understand the solution in general would be ideal. Is something like Lloyd's algorithm what I should be reaching for, or is there something simpler?

reddit.com
u/subone — 8 days ago

Looking for standard Graph Problems with 2 Vertices (Shortest Path, Reachability, LCA in DAG, Max Flow) No variations/twists please!

I am looking for standard graph theory / algorithmic problems where the input is a graph and two target vertices (e.g., source and destination / pair of nodes).

Some specific examples are:

  • Shortest Path (standard unweighted/weighted shortest path between $u$ and $v$)
  • Reachability (checking if $v$ is reachable from $u$)
  • Lowest Common Ancestor (LCA) in a DAG (given two vertices $u$ and $v$ in a DAG)
  • Maximum Flow / Min-Cut (max flow specifically between a source $s$ and sink $t$)

Important constraint: I am strictly looking for pure problems without added variations or twists (no dynamic edge weights, no modified state spaces, no constraints like "at most k skips", etc.).

I would love any kind of response. Additionally, if you have links to the problem definition link or benchmark problem sets that fit this exact criteria, please drop them below!

Thanks in advance!

reddit.com
u/cepci1 — 10 days ago

[Academic] How does your social media feed affect what feels 'real' to you? (4-5 mins, anonymous)

Hi! I'm an Msc student, researching how algorithmic personalisation on social media shapes perceptions of authenticity and decision-making.

The survey takes 4-5 minutes, is completely anonymous, and includes a short mock Instagram post to react to.

Would really appreciate your help — every response counts! 🙏

https://qualtricsxmt49bm7j6z.qualtrics.com/jfe/form/SV_248ntuA314RvLKK

Thank you!

reddit.com
u/Nervous-Dragonfly-92 — 10 days ago

sorting problem

background: i work for a company as a maintenance technician and recently took over the operations of our warehouse from someone that left it a wreck.

i have to get rid of old equipment given to the warehouse to dispose of. there is an unknown quantity of equipment. ~enough to fill a warehouse. each piece needs to be tagged with a type of barcoded document with information about it in order to be received by the disposal facility. a portion of these forms have been made but have not been attached. i will need to make and attach the rest of these documents but do not know how many.

how can i most efficiently sort these items? the goal is that i can tell my boss how much time it will take and then fill enough trucks to have all the materials disposed of.

this is actually the bane of my existence and costing my warehouse greatly. i would greatly appreciate, as the problem could make or break the operation.

reddit.com
u/Big_Profession_5664 — 10 days ago

How do you actually learn and practice Algorithms & Analysis?

Hey everyone,

Not sure where to post this, so here i am.I'm new to computer science and currently taking an Algorithms & Analysis course in Python. Honestly, it's one of the hardest subjects in my degree, and I'm struggling to figure out the best way to actually learn these concepts instead of just memorizing them.

This is what we're covering this semester: Basic Data Structures & Algorithmic Analysis, Algorithmic Analysis, Brute Force, Decrease & Conquer, Divide & Conquer, Transform & Conquer, Greedy Techniques, Dynamic Programming, Time & Space Tradeoffs, and Iterative Improvement.

I know Abdul Bari the GOAT, and his videos have definitely helped me understand the theory. But my biggest issue is practice. Everyone recommends LeetCode, but even the Easy problems feel way above my level sometimes. Also, I can't seem to find problems that match the topics we're learning in class, especially things like Transform & Conquer or Iterative Improvement.

So I wanted to ask: how did you learn algorithms when you were just starting out? Where did you practice topic by topic? Are there any websites that organize problems by algorithm rather than difficulty? Should I be doing LeetCode, HackerRank, Codeforces, something else, or just implementing the algorithms from scratch? Any advice for someone who feels completely lost with algorithms?

I'd really appreciate any tips or resources that helped you when you were a beginner. Thanks!

reddit.com
u/starfall_327 — 13 days ago

Is there an algorithm for optimally distributing sets of files across Blu-ray discs?

Hi, I want to back up my GOG games onto 25 GB Blu-ray discs. Is there an algorithm for optimally splitting the games so they take up as little space as possible?

Thanks for reading

reddit.com
u/OneRandomPeopleE — 13 days ago

[Meta] Which best describes your background/interest in algorithms?

Following up on the suggestion to survey the community, please pick the option that best describes you. Feel free to elaborate in the comments.

View Poll

reddit.com
u/Phytor_c — 13 days ago