Optimization of resource allocation in fog computing is a key research direction that aims to efficiently distribute computational, storage, and networking resources among heterogeneous fog nodes and connected devices while meeting latency, energy, and Quality of Service (QoS) requirements. Research papers in this area propose optimization models and algorithms that address challenges such as limited fog node capacity, dynamic workloads, mobility of end-users, and multi-objective trade-offs. Techniques explored include linear and nonlinear programming, game theory, evolutionary algorithms, heuristic/metaheuristic approaches, and machine learning-based adaptive optimization. Recent studies also investigate joint optimization of computation offloading, service placement, and bandwidth allocation to minimize latency, reduce energy consumption, and improve resource utilization. Multi-tier fog–edge–cloud collaboration models are emphasized for scalable and flexible allocation, ensuring seamless service delivery. Security- and privacy-aware optimization frameworks are increasingly integrated to safeguard sensitive data during resource allocation. Applications span smart healthcare, smart grids, vehicular networks, industrial IoT, and real-time multimedia systems. Overall, optimization of resource allocation in fog computing provides the foundation for efficient, resilient, and adaptive management of distributed fog infrastructures, enabling high performance and sustainable operation of next-generation computing environments.