  This paper presents an optimization approach for cooperative Medium Access
Control (MAC) techniques in Vehicular Ad Hoc Networks (VANETs) equipped with
Roadside Unit (RSU) to enhance network throughput. Our method employs a
distributed cooperative MAC scheme based on Carrier Sense Multiple Access with
Collision Avoidance (CSMA/CA) protocol, featuring selective RSU probing and
adaptive transmission. It utilizes a dual timescale channel access framework,
with a ``large-scale'' phase accounting for gradual changes in vehicle
locations and a ``small-scale'' phase adapting to rapid channel fluctuations.
We propose the RSU Probing and Cooperative Access (RPCA) strategy, a two-stage
approach based on dynamic inter-vehicle distances from the RSU. Using optimal
sequential planned decision theory, we rigorously prove its optimality in
maximizing average system throughput per large-scale phase. For practical
implementation in VANETs, we develop a distributed MAC algorithm with periodic
location updates. It adjusts thresholds based on inter-vehicle and vehicle-RSU
distances during the large-scale phase and accesses channels following the RPCA
strategy with updated thresholds during the small-scale phase. Simulation
results confirm the effectiveness and efficiency of our algorithm.
