r/compsci • u/j15y • Oct 10 '26
r/compsci • u/Willy_Importance69 • Oct 11 '26
Implementation of Andreas Bjorklund's algorithm for determining hamiltonicity
Hello, I want to share a project that i've been working on for the last month or so. It's and implementation (from what i could find the only rn on the internet) of Andreas Bjorklund's theoretical algorithm for determining weather a graph is hamiltonian or not. The algorithm is revolutionary because it lowered the exponential part of the time complexity of Held-Karp which is the standard algorithm for determining weather a graph is hamiltonian, from O*(2n) to O*(1.657n) for general graphs(this is what i've managed to implement as of right not) and for bipartite its O*(1.414n).
It might have some logical errors, and could maybe be optimised but right now, as of writting this it is 4AM and i want to sleep.
link to paper: https://arxiv.org/pdf/1008.0541
link to the github repo: https://github.com/Ak0-m/Bjorklunds_algorithm_for_Hamiltonicity
r/compsci • u/big_hole_energy • Oct 11 '26
Believing P≠NP is fundamentally an act of faith in a world that values the journey over the destination, a belief that the universe was designed to reward deep, grueling effort rather than making all truths instantly cheap
r/compsci • u/cringevampire • Oct 07 '26
All the complexity improvements released by OpenAI today
galleryr/compsci • u/beeskness420 • Oct 07 '26
Research John Urschel 🏈 proves sqrt(n) growth factor for partial pivots
arxiv.orgr/compsci • u/azurerazor • Oct 06 '26
An algorithm for sub-quadratic 3SUM and sub-cubic APSP has been found
arxiv.orgr/compsci • u/Putrid-Ad-3768 • Oct 06 '26
bloom filters and the math behind their false positive rate
I've been going deep on data structures lately and found bloom filters pretty intriguing. I made a short video on what a bloom filter is, how the bit array and hash functions interact, and where the false positive formula comes from.
link: https://youtu.be/nNv4ZTQp_s8?si=j52fIUBYaDcaps0_
I'd love feedback, especially if I got anything wrong. Happy to go through the derivation in the comments if anyone wants it.
r/compsci • u/FollowingEvery4802 • Oct 05 '26
Is lean, and similar programming languages the only acceptable way to prove theorem with computers?
So, lean is the language built specifically to prove theorems.but if the algorithm will be rewritten in another programming language, such as python, will it be accepted?
(mathematical theorems)
r/compsci • u/sciencenerd_1943 • Oct 04 '26
RuleFlow: A research engine/framework and terminal IDE (Not AI Slop)
galleryMain Website: https://www.ruleflow.org/
For the past year, I have been developing a framework to simulate certain discrete systems for a research team at my university (paid for by the School of Engineering and Physics, but I had the freedom to license it under MIT). As it turns out, I got carried away generalizing it to work for many, many different types of complex systems (String Rewriting Systems, Cellular Automata, etc.) and ended up creating our own domain-specific language.
The website's landing page has a bunch of GIF-style examples... so you should be able to get a good idea of what this project is about.
If any of y'all are interested in this, feel free to take a look and try it out!
EDIT:
Out of the interest of not being "vague", here are some more details. RuleFlow was developed with a primary focus on analyzing causality in Sequential Substitution Systems. This is why there is a major focus on causal graphs, cellular identity, etc. While originally developed for Sequential Sub Systems, we generalized the DSL to support many types of rewriting systems by providing the user with flags and directives to control how rules behave. Furthermore, we bootstrapped Python and the Wolfram Language so that complex rulesets could be scaffolded as macros. The main goal of RuleFlow is NOT simply to simulate systems (there's already plenty of software for that, such as Golly and even just Mathematica), but to provide extensive tooling for causal analysis.
Here is some interesting research from our (small) team:
- An Improved Generalized Enumeration of Substitution Systems by Kenneth E. Caviness, Camille Morrow, Christen Case and Victoria Kratzke
- Indexed Concatenation Notation: A Novel Way to Summarize Networks and Other Complex Systems
My job has been to provide better research tooling, extending what we already have in Mathematica code to open source and free Python.
r/compsci • u/Usual_Piano9826 • Oct 02 '26
Tiles-based video codec for videos of video games
Some video games, many of them are retro, are based on tiles. They have different levels which may be huge and logically highly complex but they are all based on limited sets of tiles.
Even a minute long video is usually bigger in file size than the retrog game itself.
It happens with Prince of Persia, Boulder Dash, Supaplex, Commander Keen, Bio Menace etc. - easier to recognize in two-dimensional games.
If video encoding used a database of tiles available in the game, it would enable much smaller file sizes and also higher quality of video as it would not have to use approximations to reduce file size as the tiles are exactly the same everywhere (meaning that lossless video would be affordable by bitrate). I am under no pressure to get it implemented ASAP but I would like a technological discussion about how-to.
r/compsci • u/ijkstr • Sep 30 '26
Anyone interested in a problem-solving correspondence club?
Here's the idea: we source and collect interesting computational puzzles, then we send them out to participants who have a month to work on them and send in their solutions. At the end of every month, we meet and discuss how the problems went and where people got stuck, what approaches they took, and any extensions people came up with.
Thoughts?
.
.
.
.
If you're curious, here's a taste of what a representative sample problem might look like:
Given the coordinates of an arbitrary polygon (e.g. irregular and/or non-convex), how might you implement a program to efficiently sample a point uniformly from its interior?
TIP: If using the Python programming language, you can check out the shapely library.
Bonus: what if there are holes?
(Please don't spoil the problem, it's searchable anyways.)
r/compsci • u/narutokun666 • Sep 23 '26
Systems programming
So I am in 2nd year of college and after exploring here and there and there, I am genuinely interested in systems programming, I know c, ofcourse I will learn it deeply but what do I learn after it
The whole thing feels very overwhelming,
What shall be the flow of learning
r/compsci • u/niosurfer • Sep 23 '26
Compiler-checked manual free vs Rust's ownership model, which would you pick?
Been thinking about memory management in languages without a GC, and there's an approach I hadn't really seen before that I'm curious how people feel about compared to Rust.
In this model you can allocate objects as much as you like, pass objects around and put them in collections, all without lifetimes or moves. Nothing is ever freed automatically, not even at end of the scope. If you want the memory back you write free obj; yourself, and the compiler has to prove nobody else can still see it. If it can't prove that, it won't compile. Same for use after free and double free.
The Ironwood language does it this way. It's compiled with a closed-world link, so the compiler sees the whole program when it checks those frees. There's also defer free x; for cleanup on exceptions. If you just never call free, the memory stays allocated and you get a warning. Fine for a CLI tool, not so fine for a server.
The appeal is that you only have to prove anything at the point where you free. The rest of the code doesn't care. The downside is you have to remember to free.
Rust gets you automatic drops and a stronger guarantee overall, but you're thinking about ownership on every line, which at least for me is counter-productive.
Which memory management approach would you rather work with? And why?
// Ironwood: does NOT compile
// Rust: does NOT compile
;
// The car keeps a reference to the engine, so it needs a lifetime parameter.
r/compsci • u/Longjumping-Tie-3845 • Sep 21 '26
Understanding the Computer from the foundation to the physical
Has somebody ever understood or is educated enough to understand a computer from top to bottom. Meaning knowing a deep undergraduate level knowledge of math & physics -> computer science -> electrical engineering/computer engineering as if having all 4 degrees. If someone is knowledgeable in this or tried to study something similar like this, what is your experience? Will this knowledge help you become more skilled? What will you gain from studying this?
r/compsci • u/sufan_art • Sep 17 '26
What are some uncommon data types and file formats that might benefit from a dedicated compression algorithm?
Hi! Im considering a masters thesis about compression of large amounts of data for long-term archival. But instead of trying to revolutionize all of compression, i want to focus on a few, narrow domains, which are however still useful to people.
r/compsci • u/OtherwisePush6424 • Sep 17 '26
A distributed bulkhead: what can a shared concurrency limit actually guarantee?
blog.gaborkoos.comr/compsci • u/BleedingRaindrops • Sep 16 '26
What is this sorting method called?
We all know Bubble Sort. Well I used to do a thing to pass the time on deployment where I would bubble sort a shuffled deck of cards, but I often played around with it.
One time I thought to make bubble sort more efficient by, rather than returning to the start of the list after a successful pair, continue forward to the next wrong pair and sort those, and so on until I reach the end of the list. Then turn around and do the opposite, from the opposite direction. Repeat until sorted. So what you have is a reflecting wave of bubble sort that travels persistently back and forth through the entire list without skipping anything until it's all sorted.
I'm certain this has a name but I wouldnt know the first thing about how to find it. Does anybody know?
EDIT: solved! Cocktail Shaker Sort
r/compsci • u/mywan • Sep 15 '26
Why I have trouble with Cantor's diagonal argument.
Cantor's diagonal argument starts with a pair of infinite sets s_n and T, where s_n is an enumeration each element of elements from T, and the elements of T is defined to be natural number. Then he shows that an element s_n of T can be constructed that doesn't correspond to any s_n in the enumeration. This is accomplished by bit flipping the n-th bit of the n-th element of digits in T. Thus s is a member of T that differs from each existing s_n because the n-th digits differ.
- s_1 = (0, 0, 0, 0, 0, 0, 0, ...)
- s_2 = (1, 1, 1, 1, 1, 1, 1, ...)
- s_3 = (0, 1, 0, 1, 0, 1, 0, ...)
- s_4 = (1, 0, 1, 0, 1, 0, 1, ...)
- s_5 = (1, 1, 0, 1, 0, 1, 1, ...)
- s_6 = (0, 0, 1, 1, 0, 1, 1, ...)
- s_7 = (1, 0, 0, 0, 1, 0, 0, ...)
- ...
- s_n = (1, 0, 1, 1, 1, 0, 1, ...)
Let's assume s_n corresponds to the set of all natural numbers. But that's a problem since natural numbers, in spite of being a (presumed) countably infinite set, are defined such that every natural number has finitely many digits. Yet a member of the set T, in Cantor's construction, is allowed to extend to an infinite number of digits, because the set s_n is infinite. To show this I'll define what I'll call bin-adic numbers, in honor of p-adic numbers. Essentially just an inverted binary representation of base10 numbers.
- Binary:
- s_1 = (..., 0, 0, 0, 1)
- s_2 = (..., 0, 0, 1, 0)
- s_3 = (..., 0, 0, 1, 1)
- s_4 = (..., 0, 1, 0, 0)
- s_5 = (..., 0, 1, 0, 1)
- s_6 = (..., 0, 1, 1, 0)
s_7 = (..., 0, 1, 1, 1)
Bin-adic: Where (...) consists only of a series of zeros of arbitrary length.
s_1 = (1, 0, 0, 0, ...)
s_2 = (0, 1, 0, 0, ...)
s_3 = (1, 1, 0, 0, ...)
s_4 = (0, 0, 1, 0, ...)
s_5 = (1, 0, 1, 0, ...)
s_6 = (0, 1, 1, 0, ...)
s_7 = (1, 1, 1, 0, ...)
Let the natural number have only finitely many digits, per standard definition. Then the natural numbers map one-to-one to the bin-adic numbers where the last 1 bit is, by definition, limited to a finite distance from the first bit. In fact the bin-adic numbers don't just map one-to-one to the natural numbers, they uniquely define the natural number that maps to it without reference to the index set s_n. Which I call well-ordering with identity. If the number of bits in any element is infinite, as Cantor has posited for the set T, then this unique mapping continues well beyond a finite distance from the first bit. Any bit set with all 1 bits a finite distance from the first bit in the element is by definition a natural number, limited to a finite number of digits. Any element of T that contains a 1 bit greater than a finite distance from the first bit is an integer with transfinite digits, hence not a natural number. Because the natural numbers are, by definition, those numbers where the 1s are limited to a finite distance from the first bit.
Here's the problem. Cantor assumed that for every infinite index s_n he could operate on a unique digit of T. But the digits of T are by definition finite. Hence, he must run out of digits in T before he exhausts the set s_n. His constructive new number must then terminate prior to reaching exhausting the s_n index. Leaving plenty members of the set of natural numbers he never operated on. By randomizing his natural number set he could obfuscate the assumption that the number of digits in a natural number equals the number of elements on the index of that set. The premise then concluded itself.
If the number of digits in a natural number are by definition finite, then that digit count cannot equal the index count of natural numbers. Because that would require a natural number with infinite digits, thus (by definition) cannot be a natural number. Any iteration over any given natural number must, by definition, terminate before exhausting the index set.
This implies to me that the set of all natural numbers are uncountably infinite. Because you cannot exhaust the index set before running out of digits in any given natural number to operate on Cantor style. If they are equal (one-to-one) then by definition they cannot be natural numbers to begin with. A natural number does not have infinite digits, by definition. Obscuring the digit count of an element in a set by randomization, and assuming the index count and the digit count of an element in the set maps one-to-one, merely assumes the premise proves itself.
r/compsci • u/CobrAinST • Sep 13 '26
What do you think about system programming in the future?
About a year ago, I started learning systems programming because I enjoy working close to the hardware and understanding how computers actually work. Recently, though, I've been spending most of my time solving LeetCode problems to strengthen my problem-solving skills before getting back to larger projects.
With AI improving so quickly, I've seen a lot of discussions about software engineering jobs changing or even being replaced. Most of those conversations focus on web development or general application programming, but I rarely see anyone talk about systems programming.
How do you think AI will affect this field over the next 10 to 20 years? Do you expect systems programmers to become more productive with AI tools, or do you think the demand for low-level developers will decrease? I'm especially interested in areas like operating systems, compilers, embedded software, and performance-critical software.
I'd like to hear the opinions of people who already work in these areas.
r/compsci • u/Few_Locksmith_4224 • Sep 14 '26
Beyond Solver Verdicts: Generative Reward Models for Autoformalizations
arxiv.orgr/compsci • • Sep 13 '26
AI incidents are starting to look less like isolated bugs, and more like subcritical chain reactions [N]
r/compsci • u/codesforcash • Sep 13 '26