  We consider a device-to-device (D2D) underlaid cellular network, where each
cellular channel can be shared by several D2D pairs and only one channel can be
allocated to each D2D pair. We try to maximize the sum rate of D2D pairs while
limiting the interference to cellular links. Due to the lack of global
information in large scale networks, resource allocation is hard to be
implemented in a centralized way. Therefore, we design a novel distributed
resource allocation scheme which is based on local information and requires
little coordination and communication between D2D pairs. Specifically, we
decompose the original problem into two cascaded subproblems, namely channel
allocation and power control. The cascaded structure of our scheme enables us
to cope with them respectively. Then a two-stage algorithm is proposed. In the
first stage, we model the channel allocation problem as a many-to-one matching
with externalities and try to find a strongly swap-stable matching. In the
second stage, we adopt a pricing mechanism and develop an iterative two-step
algorithm to solve the power control problem.
