Optimal Control Model for Brain Memory Working