Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Dynamic Programming: Question 1 (10pt) You are given a color picture consisting of an m x n array A of pixels, where each pixel specifies

Dynamic Programming:image text in transcribed

Question 1 (10pt) You are given a color picture consisting of an m x n array A of pixels, where each pixel specifies a triple of red, green, and blue (RGB) ntensities. Suppose that we wish to compress this picture slightly. Specifically, we wish to remove one pixel from each of the m rows, so that the whole picture become one pixel narrower. To avoid disturbing visual effects, however, we require that the pixels removed in two adjacent rows be in the same or adjacent columns; the pixels removed from a "seam" from the top row to the bottom row where successive pixels in the seam are adjacent vertically or diagonally. [8pt] Suppose now that along with each pixel Ali, j], we have calculated a real valued disruption measure d ,j, indicating how disruptive it would be to remove pixel A ' Intuitively, the lower a pixel's disruption measure, the more similar the pixel is to its neighbors. Suppose further that we define the disruption measure of a seam to be the sum of the disruption measures of its pixels. Give a dynamic programming algorithm to find a seam with the lowest disruption measure. The space used by your algorithm must be O(mn). (For space requirement, assuming that the total disruption measure of any seam requires a constant amount of space.) The running time of your algorithm must be a polynomial in mn; calculate it

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

Advances In Knowledge Discovery In Databases

Authors: Animesh Adhikari, Jhimli Adhikari

1st Edition

3319132121, 9783319132129

More Books

Students also viewed these Databases questions

Question

Briefly list the format of a companys balance sheet under IFRS.

Answered: 1 week ago

Question

KEY QUESTION Refer to the table in question

Answered: 1 week ago

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago