A Fire in Woodsborough

The great town of Woodsborough has always prided themselves on having an entire township completely constructed of wood. One day, disaster strikes: a fire breaks out in the blacksmith's and begins to spread throughout the city. As soon as the fire starts, the fire department begins fire-proofing the city.

As panic breaks out through the streets of this wooden town, the mayor gives you a map of the city and explains the following:

"Woodsborough is constructed on a strict grid system, and each plot of land either contains a building or empty space. The fire has started at the blacksmith's and, once every ten minutes, will spread to each of the plots in the four cardinal directions: north, south, east, and west. The fire will only spread to adjacent buildings, and will not pass through any empty plots. "

"At the same time, the fire department will begin fire-proofing the buildings in Woodsborough. Starting at the fire department, they will fire-proof their own building and then, once every ten minutes, will go to each of the adjacent plots in the same four cardinal directions. Like the fire itself, the fire department will not pass through empty plots, only traveling to each adjacent building once every ten minutes. If the fire reaches a building at the same time as the fire department, the fire will be extinguished, but the building will still burn."

The map is given to you in this grid, with a "B" for building, "E" for empty plot, "F" for fire, and "D" for fire department.
This is how the fire plays out on the map:

F B E B
B B B D
B B E B
B B B B

An orange tile represents a burning building, a blue tile represents a fire-proofed building, a beige tile represents an unburned building, and a black tile represents an extinguished building.

As you can see, the fire will burn down eight buildings before it is extinguished.

The mayor hands you the following map. How many buildings will be burnt?

B B B E B B E B B E E E B B B B B E B B
B E B E B E B E B B B E B E B E B B E B
B B B B B B B B B E B E B E B B B E B B
E E B E B E E B E B B B B E B E B E B E
B B B B E E B B E B B B B B B E B B B B
B E E B B B F E E B B B B E B E B E E B
B B E B E B E B B B B B B B B E B B B B
E B B B E B E B E E B E E E E E B E D E
E E E B E B B B E B B B B B B B B E B E
B B B B B B E B E E B E B E B B E B B E
B E B E E E E B B B E E B B E B B E B B
B E B B B E B E E E B B B E B B E E E B
B E B E B E B B B B B E B B E B B B B B
B E B E B E B E E E B E B E B B E B E E
B B E B B B B E B B B E B E B B E B E B
E E E E B E B E B E E B B B B B E B B B
B B B B B B B B B E B B E B E B E B E B
E B E E E E E E B B B E B B E B B E E B
E B E B B B B E B E B E B E B B E B B B
B B B B B B B B B E B E B B E B B B E E

.


The answer is 116.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Eric Schneider
Jun 13, 2018

The town of Woodsborough looks like this at the beginning:

Where orange represents the initial fire, and blue represents the initial fire department. At the end of the fire, Woodsborough looks like this:

Which has 116 \boxed{116} burning buildings.

Hello! I'm not sure about the rules stated in the problem, because when I ran it, the map ended up with 125 burnt houses. You can check the step by step maps here https://pastebin.com/raw/RgjrRWmX. Please let me know if anything went wrong with it.

Following celluar automata:

E - empty tile, B - building, F - active fire,

D - fire-proven building, A - ashes of a building

Rules:

B -> A if adjacent to both F and (D or A)

B -> F if adjacent to F but not D or A

B -> D if adjacent to D or A but not F

in any other case B -> B

F -> A if adjacent to D or A, otherwise F -> F;

E -> E, D -> D, A -> A always

Full python code is here https://pastebin.com/HRtrei5t

Mykyta Shvets - 2 years, 11 months ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...