|
|
|
|
|
by burntsushi
761 days ago
|
|
As the OP specifically and explicitly says, back-references are definitively NP-complete. The OP even links to a proof[1]. If you found a way to implement them in worst case linear time, then I believe you would have discovered a constructive proof for p=np. Look-around is a different story, but I don't believe you can still guarantee linear time. [1]: https://perl.plover.com/NPC/NPC-3SAT.html |
|
(I’m willing to believe backreference matching is NP-complete, I just think the linked statement is weaker than that.)