## Abstract

We define [k]={1,2,…,k} to be a (totally ordered) alphabet on k letters. A wordw of length n on the alphabet [k] is an element of [k]^{n}. A word can be represented by a bargraph (i.e., by a column-convex polyomino whose lower edges lie on the x-axis) in which the height of the ith column equals the size of the ith part of the word. Thus these bargraphs have heights which are less than or equal to k. We consider the perimeter, which is the number of edges on the boundary of the bargraph. By way of Cramer's method and the kernel method, we obtain the generating function that counts the perimeter of words. Using these generating functions we find the average perimeter of words of length n over the alphabet [k]. We also show how the mean and variance can be obtained using a direct counting method.

Original language | English |
---|---|

Pages (from-to) | 2456-2465 |

Number of pages | 10 |

Journal | Discrete Mathematics |

Volume | 340 |

Issue number | 10 |

DOIs | |

State | Published - Oct 2017 |

### Bibliographical note

Publisher Copyright:© 2017 Elsevier B.V.

## Keywords

- Bargraphs
- Generating functions
- Narayana numbers
- Perimeter
- Words

## ASJC Scopus subject areas

- Theoretical Computer Science
- Discrete Mathematics and Combinatorics