Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For this assignment, discuss the various approaches to coding a specific algorithm in each of three programming languages. You are given a list of 2

For this assignment, discuss the various approaches to coding a specific algorithm in each of three programming languages.
You are given a list of 2D points in the plane. You must provide the subset of those points as a list that represents the convex hull of the original list.
You must describe how to implement a convex hull algorithm three different ways:
Using an object-oriented language, such as Self, Smalltalk, or Java.
Using a functional language, such as Scheme, Lisp, Haskell, or OCaml.
Using a logic language, such as Prolog.
You may choose the specific language you are using, but your description must emphasize the use of the language mechanisms specific to that programming paradigm (either object-oriented, functional, or logic).
You do not need to provide a fully working implementation. A prose description with code samples is sufficient.
You may use any algorithm for the convex hull you want. In fact, you may decide to choose one algorithm for one paradigm and another for a different paradigm, because each algorithm may be easier to express in a different paradigm.
As a reminder of possible complex hull algorithms (more of which can be found in Cormen et al, the textbook for 311; online; or in books on computational geometry, such as ones by Tamassia), here are brief descriptions of examples:
Package wrapping: convert the coordinates of the points to polar coordinates, sort them radially, then pick the farthest points out radially while checking that the new point doesnt create a convex dent in the previous points.
Build bottom-up from a triangle: Start with a triangle. Check remaining points. If inside, move on. If outside, extend the hull to the outermost points from the view of the candidate point.
Scan: Sort the points by one dimension. The two most extreme points (least and most on that dimension) are on the hull. Connect those two points and consider points on either side (divide and conquer-style).
Given the complexity of the algorithms in question, expect at least a page, perhaps two, per algorithm, plus additional space for code samples illustrating how the specific paradigm affects the design and/or implementation of the algorithm.
Does this paradigm make it easier or harder to express the algorithm? Or easier or harder to understand what the code is actually doing?
This assignment is worth 30 points, and each writeup is worth 10 points. Your writeup must emphasize how the language paradigm affects expressiveness and understanding of the algorithm.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions