卷別
資料結構與演算法(A)
選擇國立臺灣大學 2021 · 考試 · 第 18 題
考科演算法
(5 points) Many string-matching algorithms build a finite automata. Below is a partially-completed state transition function for a string of length 10 over the alphabet (columns are states ; a blank means unspecified). It is possible to reconstruct from the partial table. How many A's does the string have?
| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | |
|---|---|---|---|---|---|---|---|---|---|---|
| A | 4 | 5 | 2 | |||||||
| B | 0 | 0 | 7 | 3 | ||||||
| C | 0 | 0 | 0 | 10 |
- (A)4
- (B)5
- (C)6
- (D)7