CS 157 : Assignment 4 Douglas
نویسنده
چکیده
This write-up presents the design and analysis of several algorithms for determining the maximum sum of certain subsets of one-dimensional arrays. In the first section, we consider the Maximum Subsequence Sum (MSS) problem: given an array A with signed integer elements, find a contiguous subarray with the maximum possible sum. In Section 2, we extend our algorithm to handle the case of cyclic shifts of the array elements. Finally, in Section 3 we consider the Maximum Nonconsecutive Sum (MNCS) problem. For this task, we find a subset of array elements (none of which are contiguous) which achieve the maximum possible sum.
منابع مشابه
CS 157 : Assignment 6 Douglas R . Lanman 8 May 2006 Problem 1 : Evaluating Convex Polygons
Problem 1: Evaluating Convex Polygons This write-up presents several simple algorithms for determining whether a given set of twodimensional points defines a convex polygon (i.e., a convex hull). In Section 1.1, we introduce the notion of regular polygons and provide examples of both convex and non-convex point sets. Section 1.2 presents an algorithm for ordering a set of points such that a cou...
متن کاملCS 157 : Assignment 3
In this write-up, we extend quicksort to the task of fuzzy sorting of intervals. In many situations the precise value of a quantity is uncertain (e.g., any physical measurement is subject to noise). For such situations we may represent a measurement i as a closed interval [ai, bi], where ai ≤ bi. A fuzzysort is defined as a permutation 〈i1, i2, . . . , in〉 of the intervals such that there exist...
متن کاملEvaluating the quality of dialogical argumentation in CSCL: moving beyond an analysis of formal structure
Douglas Clark, College of Education, Payne 203F, Arizona State University, Tempe, AZ 85287-0911, USA, [email protected], Victor Sampson, College of Education, Payne 203F, Arizona State University, Tempe, AZ 85287-0911, USA, [email protected] Armin Weinberger, Ludwig-Maximilans-Universität, Leopoldstr. 13, 80802 Munich, Germany, [email protected], Gijsbert Erkens, Research C...
متن کاملEN 292s34 / CS 220: 3D Photography and Geometry Processing Assignment 2: 3D Photography using Planar Shadows
The goal of this assignment is to build an inexpensive, yet accurate, 3D scanner using household items and a camera. Specifically, we’ll implement the “desktop scanner” originally proposed by Jean-Yves Bouguet and Pietro Perona [3]. As shown in Figure 1, our instantiation of this system is composed of five primary items: a camera, a point-like light source, a stick, two planar surfaces, and a c...
متن کاملCS 157 : Assignment 2 Douglas R . Lanman
The union-find data structure, utilizing the “union-by-rank” and “path compression” heuristics, is one of the most efficient disjoint-set data structures known [1]. In general, union-find can be applied to any problem in which one must determine membership within a set. For instance, in class we studied its application within Kruskal’s algorithm, where it was used to efficiently detect connecte...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2006