The height and width of bargraphs
A bargraph is a lattice path in N 0 2 with three allowed steps: the up step u=(0,1) u = ( 0 , 1 ) , the down step d=(0,?1) d = ( 0 , ? 1 ) and the horizontal step h=(1,0) h = ( 1 , 0 ) . It starts at the origin with an up step and terminates as soon as it intersects the x x -axis again. A down step cannot follow an up step and vice versa. The height  of a bargraph is the maximum y y coordinate attained by the graph. The width is the horizontal distance from the origin till the end. For bargraphs of fixed semi-perimeter n n we find the generating functions for the total height and the total width and hence find asymptotic estimates for the average height and the average width. Our methodology makes use of a bijection between bargraphs and uudd u u d d -avoiding Dyck paths.
height bargraphs generating functions asymptotics