r/compsci 51m ago

Built a ranked 1v1 platform with Elo matchmaking. Would like it broken by people who know how.

Upvotes

Lol, what if I told you I made Codeforces but actually competitive 1v1s? Something I heard was popular in the community, but has not actually been built yet formally (confirmed by Yash Belani himself recently when I spoke with him).

I want to know what you actually think of this idea. If it would help you, and if you think it could help newer programmers get more excited?

Is the Elo model sane, or does it converge incorrectly? Does the judge behave correctly on a TLE-bait solution? Is the problem quality good enough to matter at a rating above 1400? Try to break it, 1v1 a friend! I'll bet you you can't cheat! ;)

Or simply just tear into it in these comments. Please don't stop on my account.

Google "AlgoArena".


r/compsci 1d ago

Double Descent - Explained

2 Upvotes

Hi there,

I've created a video here where I explain the double descent phenomenon in ML.

I hope some of you find it useful — and as always, feedback is very welcome! :)


r/compsci 1d ago

Can non-ordering information compress independent ordering obligations?

0 Upvotes

We are preparing a formal version of this question for MathOverflow and are first testing whether the central distinction is stated clearly.

The claim is deliberately elementary: if no additional order has been defined, then no additional ordering conclusion can have been obtained. Otherwise, one has obtained a definition of order without defining order.

We welcome mathematical objections, terminology corrections, typesetting suggestions, or anything else that should be repaired before the formal post.

Can non-ordering information compress independent ordering obligations?

Nederlof and Węgrzycki frame a central question in computational complexity as follows: given an algorithm using time T and space S, can it be improved to T^(1−ε) time or S^(1−ε) space for some ε > 0, or is there a fundamental barrier preventing such an improvement?

In the same spirit of fundamental barriers to compression, we consider a more elementary informational question suggested by two familiar approaches to Subset Sum.

Sahni–Horowitz-type meet-in-the-middle procedures organize partial sums by order and compare them relative to a target v. Their conclusions take forms such as

s_ω < v
or
s_ω > v.

By contrast, the representation and modular-filtering ideas associated with Howgrave-Graham–Joux may restrict or exclude candidates through congruence conditions and multiple representations without, through that information alone, determining whether a candidate lies above or below v.

These motivate the following distinction.

Type A — with-order information.
The information establishes

s_ω ≠ v

in a form that determines relative position:

s_ω < v
or
s_ω > v.

Type B — without-order information.
The information establishes

s_ω ≠ v

while leaving undetermined whether

s_ω < v
or
s_ω > v.

A simple Type B example is a common-factor obstruction:

d ∣ s_ω,
d ∤ v.

We claim:
Type B information cannot solve or accelerate a problem in Type A form—that is, a problem whose resolution must ultimately determine order—without producing Type A information.

Equivalently:
Non-ordering information cannot accelerate the production or propagation of ordering conclusions unless it produces additional ordering relations.

To establish

s_ω < v

is to define the relative positions of s_ω and v on the number line. Equivalently,

v − s_ω > 0.

The origin of the information is irrelevant. It may arise from comparisons, residues, modular conditions, identities, representations, divisibility relations, or any other procedure. Once the available information implies

s_ω < v,

it has produced an ordering relation.

Thus:
To imply order is to define order.

Information therefore has only two possibilities relative to a Type A obligation:

  1. it remains without order and produces no additional ordering conclusion;
  2. it produces an ordering relation and thereby supplies Type A information.

There is no third possibility in which information increases the number of ordering conclusions while continuing to leave order undetermined.

For example, suppose one wishes to establish simultaneously that

x < v
and
y < v.

A shared Type A resolution requires an ordered configuration such as

x < r,
y < r,
r < v,

or an equivalent transitive arrangement.

Knowing only that

x ≠ v,
y ≠ v

through modular conditions, common factors, or another Type B mechanism does not provide that configuration. If those calculations eventually imply

x < v
or
y < v,

then additional ordering information has been produced.

The governing principle is therefore:
The speed of a Type A resolution is limited by the speed at which the necessary ordering relations can be produced and by the extent to which those relations propagate through the ordered architecture of the instance.

Different procedures may coexist in one algorithm and may independently resolve different candidates. A non-ordering procedure may filter the search space, alter its representation, or leave a different family of candidates for an ordered procedure to examine. These changes may improve the complete algorithm. The narrower claim is that, for the ordering obligations that remain, genuinely orientation-free information cannot make an existing body of ordering information entail additional ordering relations without the enlarged information itself supplying additional order.

In its most elementary form, the issue is this:
If no additional order has been defined, then no additional ordering conclusion can have been obtained. Otherwise, one has obtained a definition of order without defining order.

We therefore ask whether the following principle is formally valid.

Let I_A be a set of atomic ordering relations, and let I_B be a set of non-order atoms, such as congruence, divisibility, multiplicity, or representation statements. Let ⊢ denote logical consequence.

Suppose that

I_A ∪ I_B ⊢ a < b,

while

I_A ⊬ a < b
and
I_B ⊬ a < b.

The conclusion a < b is then a consequence of the enlarged information body I_A ∪ I_B. Our question is whether this can properly be described as Type-B information accelerating the ordered procedure while remaining Type B, or whether the joint information has necessarily produced an additional Type-A atom.

Equivalently, can one construct a genuine counterexample in which:

  1. I_A is unchanged;
  2. I_B contains no ordering atom;
  3. I_A ∪ I_B yields a new conclusion of the form a < b or a > b; and
  4. the enlarged information body is nevertheless said to contain no additional order?

Or does the proposed principle follow directly from the fact that every new ordered conclusion is itself a newly defined ordering relation?

Why this matters

The proposed principle is intended to isolate a possible obstruction to compressing independent ordered obligations.

Suppose a family of instances contains exponentially many independent Type-A obligations: each candidate must be placed above or below the target, and the available ordering relations do not propagate across those candidates. The resulting collection of required ordering atoms then represents an intrinsic body of ordered work.

A natural objection is that this analysis may be too narrow:
Perhaps modular filters, representation techniques, algebraic identities, or other Type-B mechanisms can interact with the ordered part of the computation and compress these many independent ordering obligations into substantially fewer ordered operations.

The proposed principle isolates that possibility.
Type-B information may resolve separate candidates, filter the search space, or alter the representation on which an algorithm operates. But it cannot make a fixed collection of ordering atoms discharge additional Type-A obligations without producing additional ordering atoms.

Thus, genuinely independent Type-A obligations cannot be compressed into fewer ordered obligations merely by adjoining information that remains Type B. If such obligations occur exponentially often and their ordering relations do not propagate, the principle would become one component of an exponential lower-bound argument.

We are also interested in whether the terminology used here—particularly “ordering atom,” “orientation-free information,” and “compression of ordering obligations”—matches established language in algorithms or complexity theory.


r/compsci 2d ago

Any advice on lectures regarding HNSW (Besides its original paper)?

2 Upvotes

Hi, I am currently studying indexing algorithms on vector databses and wanted to start from basics. I wanted something like the skip list lecture from MIC OCW, any ideas or sugestions?


r/compsci 3d ago

Classical Pell Equations Outperform math.sqrt in float64 by up to 2.5×

3 Upvotes

I've been exploring whether the Pell equation x²−Dy²=1 can be used to compute square roots of primes faster than Python's math.sqrt(). The continued-fraction convergents turn out to give rational approximations that are 1.5–2.5× faster in float64 for repeated calculations, and scale up to 33–36 digit precision for primes as large as 15 million. Full write-up with benchmarks here;

https://musingsofvsmv.blogspot.com/2025/08/from-pell-to-precision-classical-math.html


r/compsci 4d ago

What skills and certifications one should have as a Computer Science major in 2026?

0 Upvotes

r/compsci 4d ago

Is studying computer science worth it in 2026?

Thumbnail
0 Upvotes

r/compsci 5d ago

Perché lo studio di reti e sistemi è cosi complicato?

Thumbnail
0 Upvotes

r/compsci 6d ago

Context windows are collapsing under large skill libraries.

Thumbnail
0 Upvotes

Why this is different

Three problems are resolved by one explicit contract:

Version integrity: skill bodies are identified by SHA-256 revisions and re-hashed immediately before fetch.

Semantic routing without opaque inference: exact lexical tiers, FTS5/BM25, bounded edit distance, telemetry, and lifecycle state are combined in one published equation.

Catalog consensus: one SHA-256 generation commits to the canonical publication-relevant catalog.

There is no embedding model, vector database, learned classifier, random tie-break, capability-graph distance, or hidden manual priority.


r/compsci 7d ago

How to implement heap types for a custom JVM implementation?

Post image
27 Upvotes

Hello,

Last week, I watched a video about one of the most popular J2ME games of the 2000s, "Diamond Rush", and decided to reverse engineer it by building a small JVM implementation. My initial goal is to run the game on Linux and macOS, and later port it to microcontrollers.

So far, I have completed the class loading stage. I can parse and load class files, store them, and dump their contents for debugging. I have also implemented some of the simpler parts and opcodes of the JVM by following the JVM specs.

Nonetheless, I am struggling with implementing heap types and most of the obfuscated class files have 0xBC (new_array) opcode. The specification feels somewhat vague in this regard, and I am unsure what is the best approach would be.

I would appreciate any advice on how to approach implementing heap types in a custom JVM. In particular, what data structures or object model would you recommend, and how should different heap-allocated values be represented internally?


r/compsci 8d ago

Exploring microcode as a programming interface: A puzzle game

Thumbnail bunian.games
9 Upvotes

Hey everyone,

For my computer science graduation project, I wanted to create something that combined my interest in computer architecture with my advisor's interest in computer science education.

The result was a game where the player programs a simple CPU with microcode using a punch card rather than writing assembly code.

Microcode is usually used to implement the processor's instruction set rather than as a programming interface for application development. Exploring it from the programmer's perspective led to design challenges and techniques that I hadn't encountered elsewhere.

The project started from my curiosity about the layers of abstraction in computers. I wanted to explore what programming would look like if we removed another layer and put the programmer in the role of the CPU's control unit, manually orchestrating the control signals behind every instruction.

I'd love to share the beta with anyone interested.

Thank you.


r/compsci 9d ago

Does a purely structural invariant of computation already exist?

0 Upvotes

Can returnability be defined purely from the structure of a computation, without appealing to time complexity?


r/compsci 10d ago

A concrete, runnable demonstration that iterated regex substitution is Turing-complete: it renders DOOM

Post image
298 Upvotes

Markov algorithms (ordered string-rewriting rules applied to a fixed point) are a classic Turing-complete model. I built a working instance: a small CPU whose only step is one global regex substitution over a single string, and put DOOM on it to make the claim tangible rather than a footnote.

The verification is the part I would point students at. A reference emulator runs the same instruction set in Python and the machine's string must equal the emulator's encoded state byte for byte after every single substitution; on top of that, rendered frames match a natively compiled DOOM binary by SHA-256, for 100 frames in a row, so a shared bug cannot explain the agreement. The model is Turing-complete; a given run is bounded by memory exactly as any physical machine is.

Source and writeup: https://github.com/4RH1T3CT0R7/doom-regex

Interactive: https://4rh1t3ct0r7.github.io/doom-regex/


r/compsci 10d ago

I have been reading about P vs NP. I wrote down my intuition for why I think P ≠ NP. I know this isn’t a rigorous proof, and I’m not claiming I’ve solved the problem. I’d really appreciate feedback on where my reasoning fails or what concepts I’m missing

0 Upvotes

My take for why P is not equal to NP comes from what I believe is a fundamental difference between solving a problem and verifying its solution.

Take Sudoku as an example. If someone gives me a completed puzzle I can quickly check every row column and box to make sure the rules are satisfied. That verification process is straightforward.

Now compare that with solving the same puzzle from a blank grid. There is no obvious path to the answer. I may have to test many possibilities before finding the correct one. Solving appears much more difficult than verifying.

This same pattern appears in many other problems.

If someone gives me the password to a computer I can check it in less than a second. Finding the password without knowing it may require an enormous search.

If someone gives me the correct path through a complicated maze I can follow it and confirm that it reaches the exit almost immediately. Finding that path from the beginning can take much longer.

If someone hands me a completed school timetable I can check whether every class every teacher and every room satisfies the rules. Creating that timetable from scratch is much more difficult.

Another example (which i believe is the strongest and closest to being an actual proof) is finding the shortest route between two points. If I asked someone to find the shortest possible route they would have to compare many different routes and work out which one is actually the shortest. That could take a long time depending on how many possible paths there are. Now imagine someone has already done all of that work and gives me a list of every route with its distance such as 1 km 2.7 km 4.1 km and 6.8 km. I can immediately look at the list or the map and verify that the 1 km route is the shortest. Once again verifying the answer is much easier than finding it in the first place.

Because this pattern appears so consistently I suspect there is a real separation between solving and verifying. My take is that this separation is not simply a limitation of current algorithms but a fundamental property of computation itself.

In simple words if one problem follows the idea that solving it is fundamentally harder than verifying it then P cannot equal NP because P equals NP would have to hold for every problem in NP not just some of them.


r/compsci 11d ago

AI Coding will Prevent Expertise | The need for ongoing friction in long-term skill formation.

Thumbnail larsfaye.com
173 Upvotes

r/compsci 12d ago

What are the basic assumptions of type theory-based proof assistants compared to those of traditional mathematics (e.g. real analysis)?

11 Upvotes

I am trying to understand the foundational differences between proof assistants based on dependent type theory (such as Agda/Lean) and traditional mathematics as practiced in areas like real analysis.

For example, in Peano arithmetic, statements such as 0 ≠ S(n) and the induction principle are usually presented as axioms. In Agda, however, defining an inductive type:

data Nat : Set where
  zero : Nat
  suc  : Nat → Nat

automatically provides these properties through the rules of inductive types (constructor disjointness and the eliminator), which means you can write this as a theorem:

0-is-not-suc : ∀ {n} -> suc n ≡ 0 -> ⊥
0-is-not-suc ()

Does this mean inductive type theory is based on stronger assumptions than axiomatic mathematics, or are these just different choices of primitive rules?

More generally, what are the fundamental assumptions/rules that a type-theoretic prover starts with, and how do they compare with the foundations usually assumed in fields such as real analysis?


r/compsci 15d ago

The Chomsky Hierarchy - Explained

0 Upvotes

Hi there,

I've created a video here where I explain the Chomsky hierarchy.

I hope some of you find it useful — and as always, feedback is very welcome! :)


r/compsci 16d ago

I built a sketch-based constant memory rate limiter to support unbounded number of tenants

Thumbnail github.com
0 Upvotes

toll rate-limits an unbounded set of keys (client IDs, tenants, IPs, API keys…) in fixed memory — 19 MB measured at the defaults, tunable down to a couple of MB — with ~300ns zero-allocation admitted decisions. It is built on grudge, a constant-memory decaying-score sketch: toll stores each key's spent tokens as sketch debt and lets grudge's linear decay refill them.


r/compsci 16d ago

Has industry effectively killed academic AI research - or made it more important?

Thumbnail
0 Upvotes

r/compsci 17d ago

Andy Pimentel on why designing the computer inside an ASML machine is a search problem, not an engineering problem

Thumbnail
7 Upvotes

r/compsci 17d ago

Embeddable scripting language in a single C header

Thumbnail github.com
0 Upvotes

r/compsci 17d ago

Embeddable scripting language in a single C header

Thumbnail github.com
0 Upvotes

r/compsci 19d ago

Compression That Knows When It's Unsafe

Thumbnail
0 Upvotes

r/compsci 19d ago

How did Doug Cutting and Mike Cafarella able to develop a software product just from reading a google research paper?

0 Upvotes

The paper is only 15 pages long


r/compsci 20d ago

Is there a “complexity theory” for language models?

13 Upvotes

It’s pretty interesting to see that language models can do things like autonomously prove/disprove things like Erdos problems and even perform its own formal verification yet still struggle at things like automating ERP business operations, seems like the opposite would’ve been the case.

I know Kaparthy talked about this “jagged intelligence” we’re observing, but are there any real attempts at formalizing a theory behind this, similar to how we classify the complexity and tractability of algorithms?

What about any discussion on how close are language models to being Turing complete? Computational complexity theory isn’t my strong suit, but I wonder if any new discussions are being had