Post Reply 
Little math problem(s) February 2019
02-07-2019, 12:14 PM (This post was last modified: 02-07-2019 12:17 PM by pier4r.)
Post: #1
Little math problem(s) February 2019
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)

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.

Wikis are great, Contribute :)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Little math problem(s) February 2019 - pier4r - 02-07-2019 12:14 PM



User(s) browsing this thread: 1 Guest(s)