All Possible Moves Formula is on 3rd slide of presentation.
All Possible Moves Amount: n**3
Single Ball Moves Amount: n**2
Double Ball Moves Amount: 2*(n-1)*n
Triple Ball Moves Amount: 2*(n-2)*n
Formula returning amount of edge elements for nxn matrix: 4*n - 4