## 1 Introduction
The metal oxide semiconductor sensors with good thermal stability and long-term working stability have greatly aroused the interest of researchers and have been extensively studied [7; 8; 9; 10] in the past decade. The gas adsorption reaction is converted into the sensitivity response of the sensor to detect gas by measuring the work function, capacitance, conductivity [10; 12; 13; 14; 15], optical characteristics, and other parameters of the sensing material surface. [PERSON] et al. reported that nanowire sensors made by SnO\({}_{2}\) can detect CO at temperatures between 200 \({}^{\circ}\)C and 280 \({}^{\circ}\)C [16]. The \(\beta\)-Ga\({}_{2}\)O\({}_{3}\) films can be used to detect several gases, such as CO, hydrogen, methane (CH\({}_{4}\)), NO, and ammonia (NH\({}_{3}\)) [17]. The structure of ZnGa\({}_{2}\)O\({}_{4}\) is spinel (space group: \(F\overline{4}3m\)). Both ZnGa\({}_{2}\)O\({}_{4}\) and \(n\)-type semiconductor ZnGa\({}_{2}\)O\({}_{4}\) thin films have been successfully developed as gas sensors. [PERSON] et al. [13] reported that ZnGa\({}_{2}\)O\({}_{4}\) films can be used to sense liquid petroleum gas (LPG). When the ZnGa\({}_{2}\)O\({}_{4}\) sensor is further doped with palladium at approximately 320 \({}^{\circ}\)C, the sensitivity of detecting LPG increases, but the sensitivity to CH\({}_{4}\) and CO [13] gas becomes poor. Despite the introduction of new approaches for developing gas sensors, the fundamental interaction between gas molecules and metal oxide compounds remains unclear. In recent decades, the density functional theory (DFT) has been widely used in the fields of the gas-sensing mechanism, adsorption of atoms and molecules on surfaces, and surface reconstruction [6; 7]. For example, the gas-sensing mechanism of ZnO applied to H\({}_{2}\), NH\({}_{3}\), CO, and ethanol (C\({}_{2}\)H\({}_{5}\)OH) was studied by first-principles DFT calculations [7]. Due to the adsorption of surface molecules, the ZnO surface is reconstructed. The charge is transferred from the gas to the ZnO surface and vice versa, which affects the conductivity of the ZnO in gas detection. [PERSON] et al. reported that the resistance of ZnO increases (decreases) in the presence of NO\({}_{2}\) (H\({}_{2}\)S) [8] adsorption. Recently, we demonstrated that the use of the metal organic chemical vapor deposition (MOCVD) technique to grow epitaxial ZnGa\({}_{2}\)O\({}_{4}\) films on sapphire substrates can produce highly selective gas sensors [9]. Reactions of NO\({}_{2}\) and H\({}_{2}\)S molecules on Ga-Zn-O terminated ZnGa\({}_{2}\)O\({}_{4}\)(111) surfaces were modeled and carried out using a first-principles density functional theory method [18]. Based on our previous theoretical study, we report on the palladium adsorbed on the ZnGa\({}_{2}\)O\({}_{4}\)(111) surfaces and the work function changes with and without NO\({}_{2}\) (H\({}_{2}\)S)molecules. In principle, the sensitivity response of the sensor to detect the target gas can be determined by the following work function changes \(\Delta\Phi\) according to  
\[\Delta\Phi=\Delta\text{X}+kT\ln(Rg/Ra)\]  
where \(\Delta\text{X}\) is the change in electron affinity, and \(kT\) is the product of the Boltzmann's constant \(k\) and the temperature \(T\). \(Rg\) is the resistance in the presence of the target gas. \(Ra\) is the resistance in the reference gas, which is usually air. We hope that this work can help experimental researchers to effectively develop gas-sensing devices.