今天研究了young tableus,把《算法导论》上该部分的题做了下,感觉还行。
An m × n Young tableau is an m × n matrix such that the entries of each row are in sorted order from left to right and the entries of each column are in sorted order from top to bottom. Some of the entries of a Young tableau may be ∞, which we treat as nonexistent elements. Thus, a Young tableau can be used to hold r ≤ mn finite numbers.
-
Draw a 4×4 Young tableau containing the elements {9, 16, 3, 2, 4, 8, 5, 14, 12}.
-
Argue that an m × n Young tableau Y is empty if Y[1, 1] = ∞. Argue that Y is full (contains mn elements) if Y[m, n] < ∞.
-
Give an algorithm to implement