This paper deals with motion planning for a multifunctional underwater robot that can perform various tasks such as swimming, walking and grasping objects. The authors have developed a unified motion planning method that can generate motion planning for a variety of movement using a single algorithm. Under this method, motion planning problems are modeled as finite-horizon Markov decision processes, and optimum motion planning is achieved by dynamic programming. However conventional dynamic programming is sometimes considered to have limited applicability because of "the curse of dimensionality." To avoid this issue, we propose two efficient approaches. One is an application a random network as a state transition network to suppress the explosion in the number of states. The other is a modification using a gradient method to improve the found motion in the random network. The effectiveness of the proposed method is demonstrated through numerical simulations involving two types of tasks for multifunctional robots. One is a reaching task, and the other is a thrust force generation task.