# Natural Hydrocarbon Samples Classification by Topological Analysis Method
## 1 Introduction  
Complex structure analysis is a rapidly developing branch that comprises a broad spectrum of applications and modern data analysis methods. Such structures encompass many spatial features of various scales. Although many mathematical methods aim to describe such objects as of statistical origin, this work focuses on the approach based on topological data analysis. Statistical methods are often frequency-based and are well suited for capturing some regularities enclosed in the structure. However, when it comes to the analysis of significantly irregular formations (mostly naturally occurring), statistical methods may lack the ability to reflect the variety of spatial features present in such objects. The main advantage of the topology-based approach is that it allows for the capture of the main structural features (such as tied parts, tunnels, and cavities) expressed through topological invariants, which appears to be extremely useful when describing such natural objects as core, soil samples, etc. Application of computer tomography (CT) for studying the samples of hydrocarbon reservoirs has been steadily increasing in recent decades. CT was initially developed for obtaining medical scans [1, 2] in the early 1970s. Soon it was proposed to use CT in geology, for instance for studying soil [3, 4], meteorites [5], paleontology [6], geo-engineering [7], and sedimenthology [8]. CT can perform relatively rapid non-destructive scanning of the internal structure of solids at various scales. The classification problem usually arises during studying porous media (for example, hydrocarbon reservoir samples). Solving it is urgent for combining results of varying survey methods or distinct samples into one dataset with the following statistical analysis. It is also essential for similar hydrocarbon reservoir matching (searching for the analogs). Therefore, the classification problem appears during the following processes:  
1. Getting a primary idea of what the object under study is;Allocation of sufficiently homogeneous sampling zones for detailed study;
* 3. Extrapolation of structure and properties of a large volume, based on the research of a small part of it;
* 4. Grouping research results and their joint analysis;
* 5. Choosing the set of analogous samples, for example, for destructive methods of analysis. Modern CT gives very detailed images (density maps) that can be counted as big data. Thus, an automated method for studying and classifying a large number of samples is needed, which would take into account the microstructure of the studied soil and at the same time be computationally simple and stable. There are various approaches to the quantitative description of porous media using their 3D images. So, the internal structure of the pore space can be described using correlation functions, Minkowski functionals, or persistent homology. Correlation functions allow one to describe the structure of three-dimensional porous media, efficiently compress and store structural information, and also provide a means to reconstruct the structure [9]. Minkowski functionals (MF) characterize the geometric and topological characteristics of a pore space [10]. MF were used to study the internal structure of sedimentary rocks [11; 12], soils [13; 14; 15], ceramics [16], foams [17; 18], and composite materials [19]. However, since the Minkowski functionals can be interpreted as the volume, area, and curvature of the surface of pore space and the Euler-Poincare characteristic, they provide a single value measure by integrating over the surface of an object. For a more detailed description of the topological structure of porous media, the full set of Betti numbers can be used [20; 21] instead of the Euler-Poincare characteristic (which is defined as the alternating sum of the Betti numbers). This approach was previously used to demonstrate differences in the topological structure of the pore space of soils extracted from different horizons [21].