We study the generating functions for pattern-restricted k-ary words of length n corresponding to the longest alternating subsequence statistic in which the pattern is any one of the six permutations of length three.