Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 Suppose we have a m n grid ( m squares one way, n squares the other ) , and some squares of the

Problem 3
Suppose we have a mn grid (m squares one way, n squares the other), and some squares of the grid (q of
them) are colored green while all the others are uncolored. We wish to cover the green squares with dominoes,
which are 12 or 21 subgrids. The dominoes may overlap (share squares) but they may not be placed so
as to cover any uncolored squares.
A green walk starts at a green square s1, then moves to an adjacent green square s2, then to a green
square s3 adjacent to s2, etc., up to a green square sk for some positive k>1. A green walk may visit
a square more than once: it is possible that si=sj for ij. A green walk is non-backtracking if, upon
stepping from any si to si+1, we do not immediately step back to si. That is,sisi+2 for any i between 1
and k-2, inclusive. A non-backtracking green walk is called a green tour if s1=sk and k>1.
Assume that the green squares that you are given contain no green tours.
Under this condition, find an efficient algorithm that covers all of the green squares using the minimum
number of dominoes. The running time may be a function of m,n, or q, or some combination of these
variables.
Note that if there is a green square that is not adjacent to any other green square, then this type of
covering is not possible, and the algorithm should report this.
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

Data Management Databases And Organizations

Authors: Richard T. Watson

6th Edition

1943153035, 978-1943153039

More Books

Students also viewed these Databases questions