pith. sign in

arxiv: 2101.09699 · v2 · pith:UIX2LV44new · submitted 2021-01-24 · 💻 cs.PL

Longest segment of balanced parentheses -- an exercise in program inversion in a segment problem (Functional Pearl)

classification 💻 cs.PL
keywords segmentbalancedfindlongestparenthesesproblemapproachbecause
0
0 comments X
read the original abstract

Given a string of parentheses, the task is to find the longest consecutive segment that is balanced, in linear time. We find this problem interesting because it involves a combination of techniques: the usual approach for solving segment problems, and a theorem for constructing the inverse of a function -- through which we derive an instance of shift-reduce parsing.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.