上海科技大学2018年《991数据结构与算法》考研专业课真题试卷

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

1

12

2018

991

1. 150180

2.

3.

1.

True or False (5 problems, 2 points each)

2

T

F

1. Let f(n) = n 3 - 4n + 4 and g(n) = 5n 3 100, then f(n) + g(n) is (n 3) and f(n)*g(n) is o(n 6).

f(n) = n 3 - 4n + 4

g(n) = 5n 3 100, f(n) + g(n) (n 3) f(n)*g(n)

o(n 6).

2. Using a simple uniform hashing function h to hash n distinct keys into an array of length m,

the expected cardinality of {{k, l}: k l and h(k) = h(l)} is n/m.

n

keys

m {{k, l}: k l

and h(k) = h(l)}n/m.

3. A directed acyclic graph with n nodes has at most n (n -1)/2 edges.

(-1)/2

4. In any depth-first search of a graph G, if the finishing time of u is later than the finishing time

of v for two vertices u and v in G, and u and v are in the same DFS tree, then u is an ancestor of v in the depth first tree.

DFS

G

u v u v u

v

DFS

DFS

u

v

5. Given a boolean formula F of length n defined over 100 variables, deciding if F is satisfiable is

NP-complete, assuming P NP .

相关文档
最新文档