solution of ore mining problems