Forest fires are a fact of life on a planet covered in trees. Some are minor occurrences, burning over a few acres before being snuffed out without event, while others take hold of hundreds of square miles, rage for months and destroy tremendous swaths of forest and property.
Knowing which course a wildfire will take is difficult and involves a number of factors that are hard to model, but there are fundamental questions we might expect to be insensitive to the details such as
Here, we're going to build a simple model that we can interrogate in a controlled way.
We start the fire by randomly lighting one tree at time zero.
As we increase the density of trees in the forest increases, as does the likelihood that trees form clusters. Therefore, we might expect that the extent and duration of the average forest fire varies as some function of
When find the tree density at which the expected duration of the forest fire is maximal.
Note:
The code environment below has a runtime limit of
so be judicious in how you measure the forest. There are three functions in the imported module available for your use:
add_lists()
which takes two lists of length two and returns their vector sum,
dedupe_list()
which takes a list of lists and returns its unique elements, and
print_forest()
which takes a forest lattice and returns a pretty print representation of the state of the forest.
Diagram: At time
the tree at
is lit on fire. At time
the first tree is burned out and the fire has spread to the trees at
and
.
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.
First thing first: sorry for posting a solution with Matlab code instead of python, but I'm more proficient with the former and the code is fully functional with base Matlab Home Edition without any additional toolbox.
The solution is around 0.7, so it falls in the range [0.61, 0.75)
Considerations about the solution can be found as comments embedded in the source code