We enumerate permutations which have exactly r 123-patterns and s 132-patterns where r+s ≤ 2.
We also give a new bijection between the ordered trees on n+1 vertices and 123-avoiding permutations of length n. We define the weight of ordered trees so that the bijection becomes weight-preserving, and find the generating function, in the form of a continued fraction, of 123-avoiding permutations of length n that have exactly r 132-patterns.
r+s≤2를 만족할 때, 정확하게 r개의 123-유형과 s개의 132-유형을 가지는 순열들의 개수를 구했다.
n+1 개의 꼭지점을 가지는 수형도와 123-유형이 없는 길이가 n인 순열사이에 일대일대응을 구현하였다. 이 일대일대응이 가중값을 보존하도록 수형도에 가중값을 정의하고, 그리고 123-유형이 없고 r개의 132-유형을 갖는 길이가 n인 순열을 세는 연분수 형태의 생성함수를 구했다.