Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The matrix alignment problem ( MA ) accepts two square matrices A ( size m m and size n n containing positive integers, where m

The matrix alignment problem (MA) accepts two square matrices A(size
mm and size nn containing positive integers, where mn, and
it outputs a row and column i and j so that positioning A[0,0] over B[i,j],
multiplying the overlapped numbers, and adding the products gives the
largest possible sum. For example, if we consider the problem where
A=[1221], and ,B=[314225613],
The four most likely solutions are (i,j)=(0,0),(0,1),(1,0), and (1,1),
which yield product-sums of:
Note that it is possible to choose "misalignments" like (i,j)=(0,-1) or
(0,2); however, all values of B that are out of bounds are considered to
be 0. For this problem, the optimum alignment is i=1 and j=0, with
a value of 19.
Give pseudocode for a greedy algorithm to solve MA. Your algorithm must
be greedy, though it does not need to be correct.
image text in transcribed

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 RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions

Question

1. What is Fog ?

Answered: 1 week ago

Question

How water vapour forms ?

Answered: 1 week ago

Question

What is Entrepreneur?

Answered: 1 week ago

Question

Which period is known as the chalolithic age ?

Answered: 1 week ago

Question

What process do you have in place for development planning?

Answered: 1 week ago

Question

What guidance are you giving managers on pre- and post- briefing?

Answered: 1 week ago