We have a graph with $9n^2$ vertices and put vertices in a $3n*3n$ table. two vertices are adjacent in graph if they are adjacent in table. what is maximum number of leaves in a spanning tree of this graph.
I think the answer is $6n^2-2(n-1)$ and i have a example for this but i can't prove that there's no spanning tree with more leaves. please let me know if you have any idea how to solve this.
This is my example:
It's easy to find the pattern for bigger n.

Here is a neural network with 2 hidden layer of 10 nodes each to compute the maximum leaves of the graph on $n \times m$ grid. The training data are generated for special know cases mentioned in the paper:
Here is the codes:
The result for
n,m = [[3.0,3.0],[6.0,6.0],[9.0,9.0],[12.0,12.0],[15.0,15.0],[18.0,18.0],[21.0,21.0]]areThe next step is to incorporate more background knowledge in the training set on for example the upper and lower bounds for $R(n,m)$ and show some plots.