Recurrence relation to develop your pseudocode

Assignment Help Basic Computer Science
Reference no: EM13935263

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 = Σi 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 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: EM13935263

Questions Cloud

Identify three types of manufacturing companies : Identify three types of manufacturing companies for which process costing would be an appropriate product costing system.
Design pseudocode for the image comparison 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 ..
Explain the major differences between job order : Explain the major differences between job order and process costing systems.
Determine the required torque : Determine the required torque M as a function of (). The mass of eight cubes is 0.25 kg, and the center- of-mass distance r = 0.55r. Neglect friction, and assume that the resultant of the distributed normal force acting on the cube passes through ..
Recurrence relation to develop your pseudocode : 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 ..
Describes two functions of dna : Explain how knowledge of DNA and technology is being used today to do things that we could not have done 50 years ago. Address how control of gene expression affects biotechnology.
Cultural or generational diversity : Whether it is cultural or generational diversity, create a PowerPoint presentation or MS MovieMaker project that identifies a diversity challenge of interest you.
Are you convinced that prions can be infectious agents : After browsing Prusiner's paper and/or checking out the website mentioned, are you convinced that prions can be infectious agents? Why or why not?
What are the causes effects and solution of misbehavior : What are the causes, effects and solution of misbehavior in the workplaces. What is the root causes of unwanted behaviors in an organization. What are the effects of misbehaviors of employees on the performance of organization. Define some key issues..

Reviews

Write a Review

Basic Computer Science Questions & Answers

  Despite the growing number of security incident

Despite the growing number of security incidents, cybersecurity risks and threatsare still notoriously hard to quantify and estimate.

  Describe not be able to perform without microsoft office

Assume that you did not have access to Microsoft Office or other compatible application suites. Describe at least three (3) tasks that you would not be able to perform without Microsoft Office 2013.

  Describe kinds of pc applications skills

Describe in scholarly detail the kinds of PC applications skills which important for working within a major organization? Also put yourself in the shoes of a manager and share your thoughts.

  What is the frequency of the ripple voltage

What is the frequency of the ripple voltage for a negative output half-wave rectifier with an input of 120 Vrms, 60 Hz?

  Write a loop that asks the user to enter a number

Write a loop that asks the user to enter a number. The loop should iterate 10 times nd keep a running total of the numbers entered.

  Develop a technique for machines

For artificial intelligence systems to adapt to new conditions, the 1st task is to construct a technique for machines to resolve problems 'on their own'. To do this, one requires to develop a generic method to resolve generic troubles

  Components of a warehouse management system

components of a warehouse management system

  Prime number program

Write a new program called SpeedConversion.py that converts a nautical speed in knots to a speed in kilometres per hour (km/h). Your program must rst ask the user to enter their name.

  Provide a description of the algorithm in pseudocode

You are required to create a detailed analysis for each of the following array-based sorting algorithms.

  New business knowing that monopoly power comes from market

Rather than spending ones time in court is it better to seek new business knowing that Monopoly power comes from market acceptance and not from a patent, a prettier product, a slick advertising campaign etc?

  Understanding of the principles of procedural programming

Unit aim: To provide learners with an understanding of the principles of procedural programming and to enable them to design and implement procedural programming solutions. Unit abstract:

  Compare activity of disk required for each of the relational

Compare the activity (quite theoretical) of the disk (in number of bytes) required for each of both relational. Indicate the advantages and the inconveniences of the new relational scheme.

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