## 1 Introduction  
The subject of this article is a software expert system for the analysis of the electromagnetic compatibility (EMC) conditions on a ship as a tool to support the design, exploitation, and modernization of sea vessel equipment, especially in navy ships. This system can be used to analyze the EMC of not only a ship's environment, but also other topological structures. This subject is very important in practice; however, for defense reasons, it is not widely described in the scientific and technical literature. The idea of a topological description of the field interactions between electrical and electronic elements and systems was proposed by [PERSON] [1]. This approach was developed by [PERSON] [2], [PERSON] et al. [3], and [PERSON] et al. [4]. The phrase \"topological\" means the type of spatial object; in this case, it characterizes the ship structure, especially the internal structure (below the deck). A ship's construction is a complicated spatial structure with a specified number of electromagnetic (EM) shielding walls, such as decks, superstructures, compartments, and rooms through which EM disturbances penetrate and influence the functioning of the ship's electrical and electronic devices. On the other hand, the shielding walls also perform useful functions, particularly in the protection of the ship's steering systems and control networks against disturbances. To improve the EMC conditions, it is desirable to effectively lower the level of the disturbances that affect the electrical and electronic devices and systems, as well as the radiation from them [5]. Another important problem to consider is the EM leak of information, which degrades the safety and security conditions of the ship's information system [6]. For many years, problems related to the state of the EMC conditions in a ship's environment have been the subject of joint research conducted at the Gdansk University of Technology's and at the R&D Marine Technology Centre in Gdynia (Poland) [7]. The design of a ship's internal structure and deployment of electrical and electronic devices is a complex problem due to the fact that the signals from these devices negatively influence each other's operations. This is a very important problem to consider in naval ships. It is known that every ship contains different electrical, electronic, and radio devices, including electrical power equipment and transmitting antennas, that radiate EM fields (EM disturbances), which influence the operation and functionality of the electrical and electronic equipment. Moreover, naval ships have many command and steering systems composed of different electronic elements. Additionally, due to the complicated form of a ship's structure, which consists of many EM shielding walls, investigations into the EMC conditions of the ship's internal environment, i.e., under the main deck, is a very complex issue. Knowledge of the EMC condition state of a ship's environment improves design procedures, exploitation efficiency, and modernization tasks in the ship. The proposed topological EMC model and its matrix description can be used to improve EMC analysis. The described method for analyzing EMC conditions when designing the ship's internal structure, the deployment of energy stations, radio communication and radio navigation equipment, and elements of the ship's control systems has important utility. The described method also has use during the performance of modernization work on a ship's equipment, e.g., installing new electronic systems that are necessary on the modern battlefield. One novelty of this article is the use of a matrix calculus to describe the distribution of EM disturbances in a ship's topological structure. Using such an approach to analyze the state of the EMC condition of the electrical and electronic systems and devices installed in such structures, an effective computational tool was developed for practical applications.