Device-to-device communication (D2DC) is an important and challenge technique in the next generation of wireless communication that it can effectively reduce the load of base stations and simultaneously allows user equipment (UE) to proceed in direct communications. In D2DC, devices are very close among themselves and therefore the resulting interferences maybe quite serious, it becomes an important issue of how to properly select a UE owner so that when this UE owner searches for its associated communicating UEs in its service range they will suffer the least interference effect. In this paper, as UEs are distributed and clusters of UEs are formed in the D2D communication area; we propose to use K-Means to locating a UE around the cluster center as the UE Owner of the cluster. With this formation of UE clusters and UE owners they still have the chance to incur interferences among UE clusters due to they may be possibly use the same frequency band in their communications. Frequency hopping technique is then considered in this paper to further reduce the co-channel interference. In this paper it proposes to use Genetic Algorithm (GA) with frequency hopping technique to optimally select the number of frequency channels required in the system and then allocate these frequency channels to the UE clusters for their D2D communications. Simulations have been performed in a D2DC system with the proposed GA algorithm to reveal the effectiveness of the designed algorithm in the allocation of frequency channels to the clusters with minimum interference effect.