subject

Pebbling a checkerboard. we are given a checkerboard which has 4 rows and n columns, and has an integer written in each square. we are also given a set of 2n pebbles, and we want to place some or all of these on the checkerboard (each pebble can be placed on exactly one square) so as to maximize the sum of the integers in the squares that are covered by pebbles. there is one constraint: for a placement of pebbles to be legal, no two of them can be on horizontally or vertically adjacent squares (diagonal adjacency is fine). (a) determine the number of legal patterns that can occur in any column (in isolation, ignoring the pebbles in adjacent columns) and describe these patterns. call two patterns compatible if they can be placed on adjacent columns to form a legal placement. let us consider subproblems consisting of the first k columns 1 ? k ? n. each subproblem can be assigned a type, which is the pattern occurring in the last column. (b) using the notions of compatibility and type, give an o(n)-time dynamic programming algorithm for computing an optimal placement

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 25.06.2019 02:00
Feedback is one of the basic elements games have in common true false
Answers: 2
question
Computers and Technology, 25.06.2019 02:30
What are the charges for invasion of privacy on computers
Answers: 1
question
Computers and Technology, 25.06.2019 04:30
You can fit more raw files on a memory card than the jpeg files? truefalse
Answers: 1
question
Computers and Technology, 25.06.2019 11:10
1. when you see a sign colored yellow, you should: o a. adjust your driving for the condition indicated b. figure out if you're nearing your destination o c. obey the prohibition indicated on the sign
Answers: 1
You know the right answer?
Pebbling a checkerboard. we are given a checkerboard which has 4 rows and n columns, and has an inte...
Questions
question
English, 18.03.2021 01:20
question
Mathematics, 18.03.2021 01:20
question
Mathematics, 18.03.2021 01:20
question
Mathematics, 18.03.2021 01:20