02-07-2019, 12:14 PM
I saw this packing problem on an android program.
It shouldn't be terribly difficult with brute force (only time consuming).
One has the following space around a base building (determined by the B cells)
There are two other types of buildings. A 3x3 and a 2x2. There is a caveat, they need empty space around them to be placed. As follows.
2x2
3x3
Empty space can overlap but should not be occupied by buildings.
What is the packing that fits two 3x3 buildings and then as many 2x2 as possible?
Of course the problem can be extended to a combination of different numbers of 3x3 and 2x2 (or even other size and starting space).
I'll try to give it a shot with the 50g if I see in my mind something better than brute force.
It shouldn't be terribly difficult with brute force (only time consuming).
One has the following space around a base building (determined by the B cells)
Code:
ssssss
ssssssssss
ssssssssssss
ssssssssssssss
ssssssssssssssss
ssssssssssssssss
ssssssssssssssssss
ssssssssssssssssss
ssssssssBBssssssss
ssssssssBBssssssss
ssssssssssssssssss
ssssssssssssssssss
ssssssssssssssss
ssssssssssssssss
ssssssssssssss
ssssssssssss
ssssssssss
ssssss
There are two other types of buildings. A 3x3 and a 2x2. There is a caveat, they need empty space around them to be placed. As follows.
2x2
Code:
ee
eBBe
eBBe
ee
3x3
Code:
eee
eBBBe
eBBBe
eBBBe
eee
Empty space can overlap but should not be occupied by buildings.
What is the packing that fits two 3x3 buildings and then as many 2x2 as possible?
Of course the problem can be extended to a combination of different numbers of 3x3 and 2x2 (or even other size and starting space).
I'll try to give it a shot with the 50g if I see in my mind something better than brute force.