In vehicular communications, roadside units are the key components to collect/disseminate information from/to vehicles. In this paper we investigate the roadside unit deployment problem in vehicle-to-infrastructure communications. This problem is formulated as a constrained optimization problem with the objective to minimize the deployment cost subject to the constraints that all service areas should be covered. The roadside unit deployment problem under consideration is a binary integer programming problem. We solve it by the branch and bound method which could effectively reduce the complexity.