Give an algorithm that takes a sequence of points

Assignment Help Data Structure & Algorithms
Reference no: EM13699422

Algorithm: Give an algorithm that takes a sequence of points in the plane (x1, y1), (x2, y2), ...., (xn, yn) and an integer k as input and returns the best piecewise linear function f consisting of at most k pieces that minimizes the sum squared error.

You may suppose that you have access to an algorithm that computes the sum squared error for one segment through a set of n points in O(n) time.

Your solution should use \(O(n^2k)\) time and \(O(nk)\) space. Please keep it simple and short and no copy and paste or at least help me get started?

 

Reference no: EM13699422

Questions Cloud

Write a program in java to perform lzw decoding : Write a program in java to perform LZW decoding. It should read and write textual lists of integers.
Show that the order in which catch clauses : Write a program that can be used to show that the order in which catch clauses are listed is important
Draw and identify the monosaccharides be formed : Problem- Draw and identify the monosaccharides that would be formed in a Kiliani-Fischer homologation of D-xyglose
Write a select statement that answers this question : Write a SELECT statement that returns these columns - Write a SELECT statement that answers this question: Which customers have ordered more that one product? Return columns:
Give an algorithm that takes a sequence of points : Give an algorithm that takes a sequence of points in the plane (x1, y1), (x2, y2), ...., (xn, yn) and an integer k as input and returns the best piecewise linear function f consisting of at most k pieces that minimizes the sum squared error.
Carl has implemented two programs : Carl picks 20 random names and finds that P1 sorts them faster than P2. "We're using P1!" exclaims Carl. Why are you hesitant to commit?
What is the manimum amount of fe2o3 that can be formed : Problem- What is the manimum amount of Fe2O3 that can be formed from the reaction of 12.0g of MgO and 10.0g of Fe? (Unbalanced)
How many liters of h2 would be formed at hg : Problem- How many liters of H2 would be formed at 750mm Hg and 12?C if 20.0g of zinc was allowed to react
What is the buffer range of a solution composed of phenol : Problem- What is the buffer range of a solution composed of equal molar concentration of phenol and sodium phenolate. (Ka = 1.3x10-10)

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Choosing computer passwords

Before logging on to computer, you must have a unique username and unique password. Analyze and explain considerations you must make when choosing a password.

  Designing an algorithm for task-array of person numbers

You have been allotted task of designing an algorithm for following task. Someone has built the array of person numbers of all n students enrolled in 331 this fall.

  Research and implement the sieve of eratosthenes

Research and implement the Sieve of Eratosthenes (also called prime sieve) algorithm. Researching and implementing algorithms is something I did frequently while consulting and any programmer must be able to do this

  Ford-fulkerson algorithm on capacities

Write code that finds a maximum flow in a directed graph, using the Ford-Fulkerson algorithm on capacities given as matrix void maximum flow(

  Contents of registers for independent memory-reference

Find out the contents of registers PC, AR, DR, AC, and IR for two independent memory-reference instructions below. Each instruction starts with given Initial values.

  Binary multiplication using booths algorithm

Perform the subsequent 4-bit binary multiplication using Booth's algorithm, assuming signed two's complement integers:

  Computing hash value for message

For a message, he computes the hash value H = (VChar 1 x VChar 2 x VChar 3 ...x VChar N) mod(26).

  Tree walk algorithm

We know how the regular tree walk algorithm works. If you have some values in the tree then the tree walk algorithm prints everything in order

  Spreadsheet to compute projected total costs and profits

Prepare a spreadsheet to compute your projected total costs, total revenues, and total profits for giving seminar on cost estimating.

  Explain how to determine line in o-n lg n time

Explain how to determine such a line in O(n lg n) time. Provide the O(n^2 lg n)-time algorithm to pair Ghostbusters with ghosts in such a way that no streams cross.

  Calculate worst-case run-time complexity of algorithm

Calculate the worst-case run-time complexity of your algorithm and prove optimality of the solution it gives. Suppose that the road is a straight line with a western end and an eastern end.

  Write a program that checks if left and right braces

Write a program that checks if left and right braces, brackets, and parentheses are balanced

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd