Answered step by step
Verified Expert Solution
Question
1 Approved Answer
By hand, without using any program, find a solution to the Simplified Tetris problem described in the data 4 1 3x2 1 2x3 1 2x2
By hand, without using any program, find a solution to the Simplified Tetris problem described in the data 4 1 3x2 1 2x3 1 2x2 2 1x2 1 2x1 4 1x1
Specify which blocks you would drop onto the grid, in which column (recall: you must always drop the block in the "leftmost place where it fits") and in which order
Suppose you have an empty NxN grid, and some rectangular blocks of (possibly) different dimensions. You are allowed to choose any of the blocks and drop it from above onto the grid. The block will then fall until either it lands at the bottom of the grid, or on top of another block. For simplicity, you must always drop the block as far to the left as you can, so long as the block fits (both vertically and horizontally) and no empty spaces are left beneath the block. 1 You are NOT allowed to rotate the blocks. They must be dropped onto the grid using their original orientation. In the example pictured above, there are exactly enough blocks to solve the puzzle, but sometimes there will be more blocks. In general it is not required (or possible) to use every given block. The goal is to completely fill the grid with blocks such that there are no empty spaces remaining. using as few blocks as possible. Data Files You will be given a series of data files representing Simplified Tetris problems. Each file represents a single problem. The following is an example that corresponds to the situation in the picture above. The 4 on line 1 specifies N, which is the dimension of the grid. Each subsequent line specifies the availabilty of a certain size of block. For example, line 2 indicates that one 22 block is available, and line 3 indicates that two 13 blocks are availableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started