conference-paper

Fast Algorithms for Parsing Sequences of Parentheses with Few Errors

Research footprint

At a glance

Citations
8
References
15
Comments
0
Paper overview

Abstract

We consider the problem of fixing sequences of unbalanced parentheses. A classic algorithm based on dynamic programming computes the optimum sequence of edits required to solve the problem in cubic time. We show the first algorithm that runs in linear time when the number of necessary edits is small. More precisely, our algorithm runs in O(n) + dO(1) time, where n is the length of the sequence to be fixed and d is the minimum number of edits. The problem of fixing parentheses sequences is related to the task of repairing semi-structured documents such as XML and JSON.

Record transparency

Publication details

DOI
10.1145/2902251.2902304
OpenAlex
W2427677460
Document type
conference-paper
Language
EN
Last metadata update
Community

Comments

Log in to join the discussion.

  1. No comments yet. Start the discussion.