東京大学 情報理工学系研究科 創造情報学専攻 2007年8月実施 筆記試験 第4問
Author
itsuitsuki, 祭音Myyura
Description
日本語
以下に示す情報システムに関する8項目から4項目を選択し、各項目を4~8行程度で説明せよ。必要に応じて例や図を用いてよい。
- 分割統治法 (divide and conquer algorithm)
- B 木 (B-tree)
- ナイキスト周波数
- インパルス応答とステップ応答とその関係
- ベクトル量子化
- アウトオブオーダ (out-of-order) 実行
- 正規文法と正規言語(必ず例を挙げて説明のこと)
- Web システムにおける CGI (Common Gateway Interface)
English
Select four items out of the following eight items concerning information systems, and explain each item in approximately 4~8 lines of text. If necessary, use examples or figures.
- Divide and conquer algorithm
- B-tree
- Nyquist frequency
- Impulse response and step response and their relationship
- Vector quantization
- Out-of-order execution
- Regular grammar and regular language (Examples are mandatory.)
- CGI (Common Gateway Interface) in Web systems
题目描述
从下列八个信息系统相关主题中任选四个,每个用约 4~8 行说明;必要时可使用示例或图。第 7 项必须举例。
- 分治算法。
- B 树。
- 奈奎斯特频率。
- 冲激响应、阶跃响应及二者关系。
- 向量量化。
- 乱序执行。
- 正则文法与正则语言。
- Web 系统中的 CGI(Common Gateway Interface,公共网关接口)。
Kai
Divide and conquer algorithm
A methodology including three parts: dividing, conquering and merging. An divide-and-conquer algorithm first divides a problem into smaller subproblems (e.g. with size), then conquers them by solving them (the solution is also got by a recursive call, breaking into smallest constant-size pieces and gathering usually), and finally merges the solutions.
Some examples are Merge sort, binary search and binary tree traversal.
The time complexity for such an algorithm is , following this formula:
And we can solve by building a tree to analyze with Master theorem.
For example, when , the work over all recursion levels is .
B-tree
A data structure which is based on an -ary tree, where the number of entries (keys) stored in every internal node is if it has subtrees. It satisfies that for an -order B-tree with , (1) Space Constraint: every node has at most keys, and every non-root node, including a leaf, has at least keys. An internal node with keys has children; an internal root has between 2 and children. An empty tree may have a root with no keys; (2) Ordering: the stored keys are ordered: for a node represented by , every key in is smaller than , and every key in is larger than ; (3) Balance: the leaves are all at the same depth.
In application, B-tree is used to store data on disk or in databases. When querying data on disks, disk I/O is time-consuming and proportional to tree height. A B-tree tackles that with a small height and wide nodes: disk I/O uses a page, for example 4 KB, as a unit, so reading one entry or multiple contiguous entries need not require more I/O.
For stored keys, a single-key search, insertion or deletion uses node accesses when is treated as fixed (more precisely, the height is ). This makes a B-tree better in disk I/O than binary-tree data structures.
Out-of-order execution
The processor issues an instruction when its operands and a functional unit are ready, even if an earlier independent instruction is stalled. Register renaming removes false dependencies, and a reorder buffer commits results in program order to preserve precise state. This exploits instruction-level parallelism without changing program semantics.
Regular grammar and regular language
A right-linear grammar has productions of the form , , or . The languages generated by such grammars are exactly those recognized by finite automata (and denoted by regular expressions). For example, generates the regular language , whose regular expression is a*b.
Nyquist frequency
For a sampling rate , the Nyquist frequency is . Frequency components above it can alias into the lower frequency range after sampling. To reconstruct a signal bandlimited to without endpoint ambiguity, choose and apply an appropriate analog anti-aliasing filter before sampling. For example, sampling at kHz gives a Nyquist frequency of kHz. This is different from the Nyquist rate , which is the rate associated with a specified signal bandwidth.
Impulse and step responses
For a continuous-time linear time-invariant system initially at rest, the impulse response is the output to , while the step response is the output to the unit step . Convolution gives
The derivative is understood in the distributional sense if the system has an instantaneous feedthrough or jumps. For a causal system the integral may be written from , retaining any impulse at zero. In discrete time the corresponding relations are and . These identities require linearity, time invariance and the specified zero initial state; they are not general identities for nonlinear systems.
Vector quantization
Vector quantization replaces an input vector by a representative vector from a finite codebook . For squared-error distortion, the encoder selects and transmits or stores its index. The decoder reconstructs , so the representation is generally lossy. A fixed-length index requires bits per vector, with the codebook shared in advance. Codebooks may be learned by alternating nearest-neighbor assignment and centroid updates, as in -means. Jointly quantizing correlated components can use bits more efficiently than treating each component independently.
CGI in Web systems
CGI defines an interface between a Web server and an external program used to generate a response. The server passes request metadata through variables such as REQUEST_METHOD and QUERY_STRING, and passes request-body data through the program's standard input. The program writes response headers, including a content type, followed by a body to standard output; the server forwards the response to the client. For example, a form submission can invoke a program that queries a database and generates an HTML result. Traditional CGI commonly starts a process per request, which can incur substantial overhead; CGI itself specifies the interface rather than a programming language. The interface is described in RFC 3875.