This paper addresses the problem of resource allocation to interdependent tasks in mobile ad hoc computational Grids. Dependencies between tasks imply that there can be heavy communication induced by data transfers between tasks executed on separate nodes. The communication in mobile ad hoc Grids is always expensive and unreliable, and therefore plays a critical role in application performance. There are several factors that contribute to communication cost. Unreliable and short-term connectivity can increase communication cost due to frequent failure and activation of links, and ineffective resource allocation can increase communication cost due to multi hop communication between dependent tasks. To reduce communication cost, an effective and robust resource allocation scheme is required. However, the design of such a scheme for mobile ad hoc computational Grids exhibits numerous difficulties due to the constrained communication environment, node mobility, and lack of pre-existing network infrastructure. In this paper, we propose a two-phase resource allocation scheme to reduce communication cost between dependent tasks. The scheme is divided into two phases. The first phase exploits the history of user mobility patterns to select nodes that provide long-term connectivity and the second phase takes into account the task and dependency types, and uses the distance information among the nodes selected in the first phase to reduce communication costs. The scheme is validated in a simulation environment using various workloads and parameters.