Skip to content

LongestZigzag on DyckPath ​

The length of the longest stretch of steps that alternate between up and down.

On DyckPath

Starts the count again at 1 on a repeated step; the accumulator is (best, current, previous step), with 2 for no previous step.

Called as CombinatorialStat(x, "LongestZigzag"). The head's page has its examples.

Live

Distribution

Over DyckPaths at each size, tallied here in your browser; sizes past 10 are not offered.

FindStat St000981

The length of the longest zigzag subpath.

ObjectValue
[1,0,1,0]4
[1,1,0,0]2
[1,0,1,0,1,0]6
[1,0,1,1,0,0]3
[1,1,0,0,1,0]3
[1,1,0,1,0,0]4
[1,1,1,0,0,0]2
[1,0,1,0,1,0,1,0]8

Data from FindStat, the combinatorial statistic finder; the page at findstat.org/St000981 has the rest.