Final Project Option A. Retrieve All Stored Vectors within a Threshold Distance of a Cue VectorYou are provided with a large number (T) of vectors of equal size (S). Each vector represents a grey-scale image of L x W pixels. Hence, every vector has LW values, with each value in the range [0,255]. You are free to store the set of vectors in any way that would optimize the performance of your program. Assume distance (D) between any two vectors is the normalized city-block distance between them. For example, if V1=(1,2,3) and V2=(2,3,4) then D(V1,V2)=(|1-2|+|2-3|+|3-4|)/3=1. Given an unseen cue vector (Vc), your problem is to design, implement and test algorithm(s) and data structure(s) that would return all stored vectors within a user-provided distance of any user-provided Vc. The time and space complexity of your solution must (a) scale-up as well as possible (approximately, linearly or better) with both the size of vectors (LW) and the number of stored vectors (T); (b) be practically useable. The data needed for the development and testing of your program will be provided by the instructor via moodle. Exact instructions on submission will be provided (via moodle) soon: prepare to demo your program and provide a brief (3-5 page) written report describing its design (e.g., using a flow chart or pseudo-code) and the results of its operation.Option B. Devise a Meta-Algorithm that Optimizes a Sorting AlgorithmYou are provided with a set of data samples belonging to different input data distributions: near-sorted, uniformly random, near-inversely-sorted, normally distributed (with different means and standard deviations). You are provided with a generic representation of a sorting algorithm, methods for generating one (using t代做Cue Vector作业、代写Meta-Algorithm作业、代做java/c++课程设计作业、代做python,he generic representation) as well as methods for mutating it and assessing its quality. For example, assume a list L contains elements L[0], L[1], .. , L[N]. Given that instruction swap(l,m) compares L(l) to L(m) and swaps these elements iff lL(m), a sequence of swap instructions can represent a sorting algorithm (not necessarily a great one). An example of such sorting routines is: (0,N),(1,N-1),(2,N-2), .., (N/2,N/2 +1). Such an algorithm would perfectly sort a perfectly inversely sorted list. In terms of mutation: one could simply exchange any two – different – swaps in the sequence, resulting in a slightly different sorting algorithm. A mutated ‘child’ sorting algorithm would be kept iff it is of better quality than its ‘parent’. The quality of a sorting algorithm has two aspects. One is efficiency, which is the total number of comparisons, equal to the number of swap instructions in the sequence, and effectiveness, which must reflect how un-perfectly sorted the resulting lists are. Hence, for effectiveness, one would apply the sorting algorithm to a set of input lists, then generate a number (say, average number of inversions) that reflect how far the output lists are from perfect order. Both effectiveness and efficiency must contribute (you decide how) to the computation of quality. Naturally, your sorting algorithms must produce sorted or near-sorted output lists and do so in linear time or better. The data needed for the development and testing of your program will be provided by the instructor via moodle. Exact instructions on submission will be provided (via moodle) soon: prepare to demo your program and provide a brief (3-5 page) written report describing its design (e.g., using a flow chart or pseudo-code) and the results of its operation.转自:http://ass.3daixie.com/2018120110863815.html
讲解:Cue Vector、Meta-Algorithm、java/c++、python, C/C++Java|
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- By clicking to agree to this Schedule 2, which is hereby ...