Discuss the optimality of the dynamic programming solution

Assignment Help Computer Engineering
Reference no: EM131264465

Dynamic programming pseudocode algorithm

Design an algorithm (using pseudocode) that takes in as an input, two 2-D int arrays that are assumed to be 2 black-and-white images: initialImage x, whose dimensions are IxJ, and finalImage y, whose dimensions are IxK. The algorithm will compare x to the y, row-by-row, as defined below. Your algorithm will employ a dynamic programming scheme to compare X to Y identifying the minimal difference between each row.

Because you are working with black-and-white images only, you should assume that each image is a 2-D int array consisting of 2 possible values: 0 or 1, where 0 represents black and 1 represents white. Thus, this 2-D grid of 0 and 1 values comprise a 2-D black-and-white image. Each row of this image is then simply a 1-D int array filled with either 0s or 1s. Therefore, you must define how you will measure the difference between the strings of 0s and 1s in each row.

Remember that you will do the comparison one row in the images at a time.

First, compare X1,* to Y1,*. (Here X1,* is the first row in image X and Y1,* is the first row in image Y ). Next, compare X2 to Y2... Each one of these comparisons will require the construction of a D (distance) matrix.

In the following example, the first row of X is X1,*, and the first row of Y is Y1,* = 00110.

Use the following recurrence relation to develop your pseudocode:

After the D matrix is completed, the minimum number in the bottom row is the minimal mismatch for this row. You will assign this value to the variable minVali. This number tells how different row X1,* is from row Y1,* . You will then repeat this comparison for all rows i and aggregate the difference when complete into variable totalDifference = Si minVali.

As a result, the algorithm will compare the total difference to a threshold value called thresh. If total value is above the threshold, the images are declared different; otherwise, they are declared to be similar images. You can assume that the thresh variable is supplied as an input to your algorithm.

Part 1

Create a portfolio that includes all previous IPs.

Part 2a

Design pseudocode for the image comparison algorithm discussed above, given input Images X, Y, and thresh. The output is a declaration: The images are similar, or The images are different.

Part 2b

Discuss the optimality of the dynamic programming solution. Discuss the time complexity of this algorithm in terms of the size of the inputs X and Y.

Reference no: EM131264465

Questions Cloud

Make about variable costs-fixed costs and volume of business : You and a friend have come up with an idea for a product that you think will sell on the Internet. Your friend's mom has a lot of money so the two of you plan on asking her for an advance to get the business started. Mom asks some tough questions suc..
Which risk treatment method should be used : Which risk treatment method should be used when a section of the project is too difficult for the company to perform? Explain your answer.
Compute the budgeted fixed cost per labor : Schmidt Company uses standara costing. The company has two manufacturing plants, one in Colorafo and the other in Michigan. Compute the budgeted fixed cost per labor-hour for the fixed overhead separetely for each plant. Compute the variable overhead..
Find the maximum dynamic stress in the rope : An 80-lb weight falls through 5 ft and is then caught at the end of a wire rope 90 ft long having a cross-sectional area of 0.5 in.2. Find the maximum dynamic stress in the rope, assuming E = 15 × 106 psi.
Discuss the optimality of the dynamic programming solution : Discuss the optimality of the dynamic programming solution. Discuss the time complexity of this algorithm in terms of the size of the inputs X and Y.
Identify performance metrics that will be measure for system : Identify the performance metrics that will be measured for the system. Discuss the collection process for the metrics and the tools that will be used.
Describe why do we prefer public key : Briefly describe why do we prefer public key certi_cates over public key authority - What means can a worm use to access remote systems to propagate?
Determine the maximum dynamic stress in the beam : The free end of the W250 × 67 steel cantilever beam is supported by a spring of stiffness k = 180 Kn/m. The 3.6-kg mass is dropped on the end of the beam from a height of 1.0 m. Determine the maximum dynamic stress in the beam. Use E = 200 GPa for..
New orleans most famous pralines sells pralines costing : Aunt Sally’s “New Orleans Most Famous Pralines” sells pralines costing $1.06 each to make. If Aunt Sally’s wants a 30% markup based on selling price and produces 35 pralines with an anticipated 11% spoilage, what should each praline be sold for? (Rou..

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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