frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

The Fastest Way yet to Color Graphs

https://www.quantamagazine.org/the-fastest-way-yet-to-color-graphs-20250512/
47•GavCo•2d ago

Comments

tonyarkles•10h ago
In case you haven't looked at the article, this is looking specifically at the Edge Coloring problem and not the more commonly known Vertex Coloring problem. Vertex Coloring is NP-complete unfortunately.
erikvanoosten•10h ago
You can convert edge coloring problems into vertex coloring problems and vice versa through a simple O(n) procedure.
meindnoch•9h ago
Wrong. You can convert edge-coloring problems into vertex-coloring problems of the so-called line graph: https://en.m.wikipedia.org/wiki/Line_graph

But the opposite is not true, because not every graph is a line graph of some other graph.

tonyarkles•9h ago
Hrm... right. It's been a while. And it looks like both Vertex Coloring and Edge Coloring are both NP-complete (because of the O(n) procedure you're talking about and the ability to reduce both problems down to 3-SAT). I've started looking closer at the actual paper to try to figure out what's going on here. Thanks for the reminder, I miss getting to regularly work on this stuff.

Edit: thanks sibling reply for pointing out that it's not a bidirectional transform.

mauricioc•9h ago
For the edge-coloring problem, the optimal number of colors needed to properly color the edges of G is always either Delta(G) (the maximum degree of G) or Delta(G) + 1, but deciding which one is the true optimum is an NP-complete problem.

Nevertheless, you can always properly edge-color a graph with Delta(G) + 1 colors. Finding such a coloring could in principle be slow, though: the original proof that Delta(G) + 1 colors is always doable amounted to a O(e(G) * v(G)) algorithm, where e(G) and v(G) denote the number of edges and vertices of G, respectively. This is polynomial, but nowhere near linear. What the paper in question shows is how, given any graph G, to find an edge coloring using Delta(G) + 1 colors in O(e(G) * log(Delta(G))) time, which is linear time if the maximum degree is a constant.

Syzygies•5h ago
Yes. The article ran through this point as follows:

"In 1964, a mathematician named Vadim Vizing proved a shocking result: No matter how large a graph is, it’s easy to figure out how many colors you’ll need to color it. Simply look for the maximum number of lines (or edges) connected to a single point (or vertex), and add 1."

I keep wondering why I ever read Quanta Magazine. It takes a pretty generous reading of "need" to make this a correct statement.

phkahler•9h ago
Is this going to lead to faster compile times? Faster register allocation...
john-h-k•9h ago
Very few compilers actually use vertex coloring for register allocation
isaacimagine•9h ago
Totally. The hard part isn't coloring (you can use simple heuristics to get a decent register assignment), rather, it's figuring out which registers to spill (don't spill registers in hot loops! and a million other things!).
NooneAtAll3•6h ago
and this post isn't even about vertex coloring
DannyBee•3h ago
No.

In SSA, the graphs are chordal, so were already easily colorable (relatively).

Outside of SSA, this is not true, but the coloring is still not the hard part, it's the easy part.

Baby is healed with first personalized gene-editing treatment

https://www.nytimes.com/2025/05/15/health/gene-editing-personalized-rare-disorders.html
624•jbredeche•9h ago•276 comments

Cracked - method chaining/CSS-style selector web audio library

https://github.com/billorcutt/i_dropped_my_phone_the_screen_cracked
13•stephenhandley•1h ago•2 comments

A leap year check in three instructions

https://hueffner.de/falk/blog/a-leap-year-check-in-three-instructions.html
206•gnabgib•5h ago•71 comments

Teal – A statically-typed dialect of Lua

https://teal-language.org/
59•generichuman•3h ago•39 comments

Ollama's new engine for multimodal models

https://ollama.com/blog/multimodal-models
26•LorenDB•2h ago•1 comments

Initialization in C++ is bonkers (2017)

https://blog.tartanllama.xyz/initialization-is-bonkers/
109•todsacerdoti•6h ago•79 comments

Sitting for a long time shrinks your brain even if you exercise

https://alz-journals.onlinelibrary.wiley.com/doi/full/10.1002/alz.70157
25•codexon•3h ago•11 comments

Tek – A music making program for 24-bit Unicode terminals

https://codeberg.org/unspeaker/tek
99•smartmic•7h ago•13 comments

Launch HN: Tinfoil (YC X25): Verifiable Privacy for Cloud AI

109•FrasiertheLion•11h ago•82 comments

The unreasonable effectiveness of an LLM agent loop with tool use

https://sketch.dev/blog/agent-loop
251•crawshaw•8h ago•160 comments

NASA keeps ancient Voyager 1 spacecraft alive with Hail Mary thruster fix

https://www.theregister.com/2025/05/15/voyager_1_survives_with_thruster_fix/
143•nullhole•3h ago•17 comments

The current state of TLA⁺ development

https://ahelwer.ca/post/2025-05-15-tla-dev-status/
98•todsacerdoti•8h ago•23 comments

Rolling Highway

https://en.wikipedia.org/wiki/Rolling_highway
21•taubek•2d ago•9 comments

Lock-Free Rust: How to Build a Rollercoaster While It's on Fire

https://yeet.cx/blog/lock-free-rust/
21•r3tr0•2d ago•4 comments

I was a Theranos whistleblower. Here's what I think Elizabeth Holmes is up to

https://www.statnews.com/2025/05/15/theranos-whistleblower-tyler-shultz-commentary-elizabeth-holmes-billy-evans-haemanthus-startup/
63•iancmceachern•2h ago•26 comments

A Tiny Boltzmann Machine

https://eoinmurray.info/boltzmann-machine
225•anomancer•14h ago•39 comments

GTK Krell Monitors

https://gkrellm.srcbox.net/
28•Deeg9rie9usi•2d ago•12 comments

Show HN: Easel – Code multiplayer games like singleplayer

https://easel.games/about
54•BSTRhino•1d ago•32 comments

Dia – An Early Review

https://www.fldr.zip/blog/dia-review
3•wyxuan•2d ago•0 comments

Malicious compliance by booking an available meeting room

https://www.clientserver.dev/p/malicious-compliance-by-booking-an
314•jakevoytko•14h ago•293 comments

Show HN: Min.js style compression of tech docs for LLM context

https://github.com/marv1nnnnn/llm-min.txt
157•marv1nnnnn•14h ago•46 comments

"The Mind in the Wheel" lays out a new foundation for the science of mind

https://www.experimental-history.com/p/new-paradigm-for-psychology-just
53•CharlesW•9h ago•53 comments

Improving Naval Ship Acquisition

https://www.construction-physics.com/p/fixing-naval-ship-acquisition
44•Luc•9h ago•73 comments

Dr. Dobb's Journal interviews Jef Raskin (1986)

https://computeradsfromthepast.substack.com/p/dr-dobbs-journal-interviews-jef-raskin
67•rbanffy•9h ago•51 comments

In the US, a rotating detonation rocket engine takes flight

https://arstechnica.com/space/2025/05/venus-aerospace-flies-its-rotating-detonation-rocket-engine-for-the-first-time/
76•LorenDB•16h ago•59 comments

Fetii (YC S22) Is Hiring

https://www.ycombinator.com/companies/fetii/jobs/QDjleWs-senior-operations-manager-fetii
1•Mattiommi•10h ago

I don't like NumPy

https://dynomight.net/numpy/
371•MinimalAction•11h ago•161 comments

Refactoring Clojure

https://www.orsolabs.com/post/refactoring-clojure-1/
82•luu•8h ago•18 comments

Coinbase says hackers bribed staff to steal customer data, demanding $20M ransom

https://www.cnbc.com/2025/05/15/coinbase-says-hackers-bribed-staff-to-steal-customer-data-and-are-demanding-20-million-ransom.html
312•gpi•11h ago•343 comments

Pathfinding

https://juhrjuhr.itch.io/deep-space-exploitation/devlog/945428/9-pathfinding
122•sebg•15h ago•39 comments