  We investigate pattern-avoiding (0,1)-matrices as generalizations of
pattern-avoiding permutations. Our emphasis is on 123-avoiding and 321-avoiding
patterns for which we obtain exact results as to the maximum number of 1's such
matrices can have. We also give algorithms when carried out in all possible
ways, construct all of the pattern-avoiding matrices of these two types.
