数据处理的要点|Elements of Data Processing COMP20008

联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981

Data processing is fundamental to computing and data science. This subject gives an introduction to various aspects of data processing including database management, representation and analysis of data, information retrieval, visualisation and reporting, and cloud computing. This subject introduces students to the area, with an emphasis on both tools and underlying foundations.

这是一份unimelb墨尔本大学COMP20007 的成功案例

算法设数据处理的要点|Elements of Data Processing COMP20008 计|Design of Algorithms COMP20007

问题 1.

In this problem, we will analyze the time complexity of Qusc’KS0KT in terms of errox protalulities, rather than in terms of expectation. Suppose the array to be sorted is A|1…n|A|1 ldots n|, and write x1x_{1} for the element that starts in array location A∣2]A mid 2] (before QUICK.SDKT is called). Assume that all the xe?x_{ text {e }} values are distinet.

In solving this problem, it will be useful to recall a claim from lecture. Here it us, slightly restated: Claim: Lete: >1>1 be a real corstant, and let a be a poositive integer. Then, with prodalulity at least 1?1nn,3(cx+c)lg?n1- frac{1}{n^{n}}, 3(c x+c) lg n tosses of a fair coin produce at least clgc lg r herats.Note: High probability bounds, and this C.lain, will be corered in Tueoday’s lecture.(a) [S ponts] Consider a particular element x1?x_{1-} Consider a recursive call of QuICK.SDKT on subarray A|p…p+m?1|A|p ldots p+m-1| of size m≥2m geq 2 whicl includes element rs?r_{ text {s }}. I’rove that, with probability at least 12 frac{1}{2}, eather this call to QuIc:KSORT chorxes I1I_{1} as the pivot element, or the next recursive call to QuJcK.SDKr containing I1I_{1} itrolves a subartay of size at most?34sin. operatorname{most} frac{3}{4} sin .

证明 .

Design a data structure that maintains a FIFO quewe of integers, supporting operations FinuUELE, DEUEUE, and FIND-MuN, each in O(1)O(1) amortized time. In other words, any sequence of m operations should take time O(m)O(m). You may assume that, in any execution, all the atems that get. enqueued are distanct.(a) [5 points] Describe your data structure. Include clear invariants describing its key properties. Hint: Use an actual queue plus auxiliary data structure(s) for loxkkkeeping.Solution: For example, we might use a FIFC queue Man and an auxiliary linked list, Mnn, satesfying the following invariants:

Item xx appears in Mtr if and only if xx is the minimum element of some tailsegrent of Mann.Man is sorted an ancreasing order, front to back.

问题 2.

Consider a particular element x1x_{1}. Prove that, with probalulity at least 1?1π21- frac{1}{ pi^{2}}, the total number of times the algorithm compares xtx_{t} with pivots is at most dlg?nd lg n, for a particular constant dd. Give a value for dd explicitly.

证明 .

(b) [5 points] Describe carefully, in words or pseudo-code, your ENQuEUE, DEQUEUE: and FIND-MIN procedures.Solution:ENQUEUE( (x)(x)1 Add xx to the end of Murin2 Starting at the end of the list, examine elements of Minand remove those that are larger than xx;3 Add xx to the end of MiruDEQuEUE()1 Remove and return the first element xx of Main2 If xx is the first element in MmM m remove it.FIND-MIN()1 Return the first element of Min mathrm{Min}.

发表回复