frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Discuss – Do AI agents deserve all the hype they are getting?

4•MicroWagie•4h ago•1 comments

Ask HN: Anyone Using a Mac Studio for Local AI/LLM?

48•UmYeahNo•1d ago•30 comments

LLMs are powerful, but enterprises are deterministic by nature

3•prateekdalal•8h ago•6 comments

Ask HN: Non AI-obsessed tech forums

29•nanocat•19h ago•26 comments

Ask HN: Ideas for small ways to make the world a better place

18•jlmcgraw•21h ago•21 comments

Ask HN: 10 months since the Llama-4 release: what happened to Meta AI?

44•Invictus0•1d ago•11 comments

Ask HN: Who wants to be hired? (February 2026)

139•whoishiring•5d ago•520 comments

Ask HN: Who is hiring? (February 2026)

313•whoishiring•5d ago•514 comments

Ask HN: Non-profit, volunteers run org needs CRM. Is Odoo Community a good sol.?

2•netfortius•16h ago•1 comments

AI Regex Scientist: A self-improving regex solver

7•PranoyP•23h ago•1 comments

Tell HN: Another round of Zendesk email spam

104•Philpax•2d ago•54 comments

Ask HN: Is Connecting via SSH Risky?

19•atrevbot•2d ago•37 comments

Ask HN: Has your whole engineering team gone big into AI coding? How's it going?

18•jchung•2d ago•13 comments

Ask HN: Why LLM providers sell access instead of consulting services?

5•pera•1d ago•13 comments

Ask HN: How does ChatGPT decide which websites to recommend?

5•nworley•1d ago•11 comments

Ask HN: What is the most complicated Algorithm you came up with yourself?

3•meffmadd•1d ago•7 comments

Ask HN: Is it just me or are most businesses insane?

8•justenough•1d ago•7 comments

Ask HN: Mem0 stores memories, but doesn't learn user patterns

9•fliellerjulian•2d ago•6 comments

Ask HN: Is there anyone here who still uses slide rules?

123•blenderob•4d ago•122 comments

Kernighan on Programming

170•chrisjj•5d ago•61 comments

Ask HN: Anyone Seeing YT ads related to chats on ChatGPT?

2•guhsnamih•1d ago•4 comments

Ask HN: Does global decoupling from the USA signal comeback of the desktop app?

5•wewewedxfgdf•1d ago•3 comments

Ask HN: Any International Job Boards for International Workers?

2•15charslong•18h ago•2 comments

We built a serverless GPU inference platform with predictable latency

5•QubridAI•2d ago•1 comments

Ask HN: Does a good "read it later" app exist?

8•buchanae•3d ago•18 comments

Ask HN: Have you been fired because of AI?

17•s-stude•4d ago•15 comments

Ask HN: Anyone have a "sovereign" solution for phone calls?

12•kldg•4d ago•1 comments

Ask HN: Cheap laptop for Linux without GUI (for writing)

15•locusofself•3d ago•16 comments

Ask HN: How Did You Validate?

4•haute_cuisine•2d ago•6 comments

Ask HN: OpenClaw users, what is your token spend?

14•8cvor6j844qw_d6•4d ago•6 comments
Open in hackernews

How the most feared algorithm in algebra is simple

13•diegoofernandez•3mo ago
When I started implementing Buchberger's algorithm in TypeScript for my algebraic engine RomiMath, I discovered something surprising: this algorithm, considered one of the most complex in computational algebra, is actually pure mechanics.

Let's break it down to earth, step by step, without unnecessary abstractions. 1. Monomials (Without Complications)

A monomial is simply a term. Sums (+) and subtractions (-) divide monomials.

Example: 254 + 15x - 2 has 3 monomials.

In code:

class Monomial { coefficient: number; // e.g., 5, -2 variables: string[]; // e.g., ['x', 'y'] exponents: number[]; // e.g., [2, 1] for x²y }

2. Degree (Super Simple)

Degree is just the sum of exponents:

    3x²y → degree = 2 + 1 = 3

    5x → degree = 1

    7 → degree = 0
3. Lexicographic Order (Easier Than It Seems)

It's like ordering words in a dictionary:

    x > y > z > w

    x³ > x²y¹⁰⁰⁰ (because 3 > 2)

    x²y > x²z (because y > z)

    xy > x (because it has more variables)
4. Buchberger's Algorithm (Step by Step)

Step 1: Take Two Polynomials

P1: x² + y - 1 P2: x + y² - 2

Step 2: Look at Their "Leading Terms"

    LT(P1) = x² (because x² > y > -1)

    LT(P2) = x (because x > y² > -2)
Step 3: Calculate the "LCM" of Those Terms

    LCM(x², x) = x² (maximum of exponents: max(2,1) = 2)
Step 4: Do the "Smart Subtraction" (S-polynomial)

S(P1,P2) = (x²/x²)P1 - (x²/x)P2 = (1)(x² + y - 1) - (x)(x + y² - 2) = (x² + y - 1) - (x² + xy² - 2x) = -xy² + 2x + y - 1

Step 5: Simplify Against What We Already Have

    Try to reduce the result using P1 and P2

    If it doesn't reduce to zero → NEW POLYNOMIAL!
Step 6: Repeat Until Nothing New Appears

The Real Essence

Buchberger is just:

while (pairs remain) { 1. Take two polynomials 2. Do their "smart subtraction" 3. Simplify the result 4. If something new remains, add it to the basis }

It's no more complex than following a cooking recipe.

Why This Matters

I implemented this algorithm in TypeScript and it now solves 7-variable systems in seconds in the browser. The complexity wasn't in understanding the algorithm, but in overcoming the fear of mathematical notation.

When you decompose "advanced" concepts into mechanical operations, everything becomes accessible.

Has anyone else had that experience of discovering that a "complex" concept was actually simple once they broke it down?

Comments

_jsmh•3mo ago
> The complexity wasn't in understanding the algorithm, but in overcoming the fear of mathematical notation.

Yes. Many times I found the actual problem is something slightly different and often simpler than what people think. It's a kind of superpower to think this way.

diegoofernandez•3mo ago
Exactly, it's a bit unbelievable when you consider that the symbology has some unnecessary abstraction.

But yes, it's really great to then discover that it's almost elementary, so to speak. It's something that stays with you for the "next" challenge, knowing that at some point it will loosen up and the basic form will become visible.

ajay_as•3mo ago
This makes so much sense now. I was always sure that the algorithm invented by Buchberger was incredibly complex, but it seems to be easily divisible into parts making it seem much more manageable. It is(s) insane how simple things can be once you put them step-by-step.
diegoofernandez•3mo ago
Yes, absolutely! Great that you can see it as simpler and more accessible. Oh, that's a great... mmm... secret, you could say? Or logical reasoning... simplifying and reducing any problem to steps makes it digestible :)