Question: PROBLEM Dominoes Strike Back! Picture Edition Rather than tile a board, we would like to use dominoes to tile a pixel-art image, such as Figure
PROBLEM Dominoes Strike Back! Picture Edition Rather than tile a board, we would like to use dominoes to tile a pixel-art image, such as Figure 1. Unfortunately, not every such image can be tiled with dominoes. Write an algorithm that takes as input a black-and-white pixel-art image (with m rows and n columns) and determines whether or not that image's black pixels can be exactly tiled using 2-by-1 dominoes. The running time of your algorithm should be a polynomial in n and m. Prove the correctness and running time of your algorithm. (Hint: Think about max flow.) Figure 1: A pixel-art dinosaur. Can you tile the the black pixels using standard 2-by-1 dominoes? PROBLEM Dominoes Strike Back! Picture Edition Rather than tile a board, we would like to use dominoes to tile a pixel-art image, such as Figure 1. Unfortunately, not every such image can be tiled with dominoes. Write an algorithm that takes as input a black-and-white pixel-art image (with m rows and n columns) and determines whether or not that image's black pixels can be exactly tiled using 2-by-1 dominoes. The running time of your algorithm should be a polynomial in n and m. Prove the correctness and running time of your algorithm. (Hint: Think about max flow.) Figure 1: A pixel-art dinosaur. Can you tile the the black pixels using standard 2-by-1 dominoes
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
