Spatial and social interaction in medieval Algerian mosques: a morphological analysis using space syntax

Medieval mosques in Algeria represent an important architectural heritage that deserves to be identified, studied and preserved. Considering the period spanning the 7th to 15th centuries, this study investigated medieval mosques in Algeria, spatially and socially, to identify the architectural genotype and to establish whether such mosques present the same topological model that governs their spatial properties. This study adopted a new approach to spatial analysis of mosques that could be applied to improve understanding of other religious buildings. Space syntax as an architectural analysis tool can be used as a qualitative method for drawing justified graphs and comparing them visually and quantitatively, calculating syntactic measures and integrating visibility graph analysis to identify spatial types, reveal architectural genotypes and explain social logic. The findings demonstrate how space syntax with topological analysis and syntactic measures could be used to provide new understanding for architects, students and all those interested in heritage, architecture and design, by uncovering hidden structures and revealing the social logic embodied in the spatial configurations of mosques.


Introduction
The analysis of this study revolves around a new reading of the socio-spatial organisation of medieval mosques in Algeria during the 7th to 15th centuries. Spatial organisation analysis refers to the search for the spatial configuration of mosques that reflects their spatial arrangement. We focus on medieval mosques because of their historical character and the symbolic, political and religious values they convey. The medieval Muslim world, like medieval Europe, was a society with valuable sources of continuous reference and the mosque was a natural expression of this Muslim society (Frémaux 2007;Taib and Rasdi 2012).
The main objective of this study was to reveal the relationships between the spatial configuration of the mosque as a building and the social interactions (e.g., ritual processes and practices) that take place therein. The spatial dimensions studied in such heritage studies must reveal the social dimension of these ancient buildings, as stated by Mustafa and Hassan (2013, 449): 'Distinctive characteristics of societies exist within spatial systems and are conveyed through space and the organisation of spaces. ' Medieval mosques in Algeria were selected as the study subject because they tend to be well preserved and retains their traditional architectural character, characterised by the local Maghrebi style. This style is close in terms of typology, structure and decoration to that of the first mosque, i.e., that of the Prophet in Medina, with the presence of a courtyard and galleries that function as an outdoor space for prayer. This type of mosque as a historic building requires a different understanding that extends beyond its physical form to the interplay between its spatial and social configurations.

Open Access
Built Heritage *Correspondence: Rejem_meriem@yahoo.fr It can be claimed that medieval mosques in Algeria, owing to their reasonable conservation and authentic typology, represent a genotype of this type of mosque, and topological studies that make it possible to identify configurational properties allow such mosques to be considered as a model.
This study adopted the approach of Hillier and Hanson (1984) of using justified graphs and their outcomes in the form of syntactic measures to enable the determination of qualitative and quantitative types. Hence, this paper focuses on spatial analysis to search the topological types of spaces and the genotypes of the studied mosques. The objectives were to establish whether medieval mosques in Algeria present the same topological model that governs their spatial properties, and to ascertain whether their spatiality could be identified as an architectural genotype.

Literature review
Since the end of the 19th century, mosques have received attention from a number of researchers who undertook historical, archaeological, and symbolical investigations. Historic mosques in Algeria (of the many dynasties that produced great cultural and architectural development, e.g., the Idrissids, Hammadids, Zirids, Almoravids, Zianides and Merinids) have also attracted the interest of researchers who performed architectural surveys and produced monographs, such as the works of Brosselard (1858) on Tlemcen's mosques, Devoulx (1870) on the mosques of Algiers, Bourouiba (1986) on the mosques in Algeria, and Redjem (2014) on medieval and Ottoman mosques in Constantine. Those earlier studies have importance for our research because they provide a spatial and geometric description applicable to the specimens in the corpus of our study.
Few of the previous multidisciplinary and architectural studies on mosques in Algeria adopted analytical approaches to investigate the physical and spatial issues that reflect the spatial and structural forms of such buildings. Mazouz and Benhsain (2009) analysed the genetic and syntactic characteristics of six Ottoman mosques in Algiers, focusing on the relationship between the configuration of space and the behaviour of users therein. Adli and Chemrouk (2015) used both a syntactic approach and a semantic approach to undertake comparative study between the old mosque (Djama' l-A'dam) and the great mosque of Algiers (Djamaâ el-Djazaïr).
Consequently, to elucidate the socio-spatial organisation of historic mosques, it is necessary to derive new reading and improved understanding using spatial analysis methods bearing scientific novelty to provide interpretations of characteristics that are more objective than those presented by previous studies. Some earlier studies did use spatial analysis methods in their examination of mosques. Here, we mention some of those studies, in particular those that used tools such as justified graphs or Visibility Graph Analysis (VGA), or those that focused on ancient mosques to identify their genotype, which are relevant to our research on predicting the movement of the faithful in and around mosques and explaining the socio-spatial properties or the effects of social interactions on the architectural layout. Aazam (2007) identified the genotype of mosques using syntactic analysis to understand the socio-spatial organisation of such buildings and to qualify their functional qualities. Using a syntactic approach, Mustafa and Hassan (2013) attempted to quantify the influence of spatial configuration on the functional efficiency of mosques at the beginning of the Ottoman period. Ezani and Azhan (2017) compared the floor plan complexity of three different mosques located in northern Malaysia using the space syntax method to predict human movement. Finally, using the justified graph technique and mathematical indicators, Elporolosy and Elfalafly (2020) performed comparative analysis on the ancient mosques in Egypt to establish the essential differences in their spatial organisation and to discover the most functional model.
The above analytical approaches consider the space of a mosque not only along unique extreme classical axes, e.g., historical, geometrical and social, but also from a complementary perspective, thereby simultaneously addressing the three main perspectives: historical, spatial and social. However, study of the spatial configuration and social properties of medieval Algerian mosques has been overlooked. This research represents an attempt to fill this knowledge gap in the study of these mosques, particularly from the perspective of spatial and morphological sciences.

Methodology and corpus study
The focus of this study was to develop an objective approach that makes it possible to analyse the spatial form and the structural organisation of medieval Algerian mosques, and to explore the relationships between architecture, society, culture and the physical forms produced. To understand the socio-spatial structure of these mosques, it is important to use mixed methods based on quantitative and qualitative analyses, which can be accomplished using the space syntax approach (Fig. 1).
According to space syntax theory, any spatial arrangement that has an underlying structure linking social and spatial orders can be called a genotype. To avoid confusion with biological genotypes, Hillier and Leaman (1974) called the cultural genotypes and phenotypes the g-models and p-models (Bafna 2012). The genotype is an abstract relational model of a spatial configuration that describes the arrangement of spaces and individuals within a space (Hillier et al. 1987). Phenotypes are actual realisations of genotypes in different physical 'milieu' (architectural artefacts) (Guney 2005). Examining the syntactical characteristics of phenotypes allows us to reveal their underlying genotypes.
The approach followed in this study first refers to the chronological basis developed by several authors who have studied mosques in Algeria, and authors who have attempted to simulate spatial designs in mosque layout proposals and predict how these designs will work using space syntax. Second, this study refers to the syntactic approach that contains a set of analytical, quantitative and descriptive tools that can be used to analyse spatial layouts at the architectural or urban scale (Hillier 1995;Hillier and Hanson 1984). Descriptive (qualitative) data of any architectural or urban plan can be obtained from the corresponding justified graphs, whereas quantitative data are those calculated using mathematical formulas and the values obtained from justified graphs. It is also important to derive certain in-depth syntactic measures such as the Space Link Ratio (SLR), Distributedness Index (ID) and Asymmetry Index (IA).
The main advantage of measuring the degree of ringiness of a spatial system (i.e., the SLR) is that it makes it easy to compare the structure of different mosques without looking at specific parts of their architecture. The method has been proposed to assess the distributedness /non-distributedness properties.
Distributedness reflects the existence of more than one non-intersecting route from a given point in a system to another point. A case in which only a single route exists between any two points in the system is called non-distributed with a tree structure (Guney 2005, 630;Mustafa and Hassan 2013, 453). ID is calculated on the basis of the four topological spaces ('a' , 'b' , 'c' and 'd') as (a+b) / (c+d) = distributedness, where a low value indicates a distributed system and a high value refers to a non-distributed system. The property of symmetry/ asymmetry is important because it expresses the potential for the space to be classified in terms of activities or social roles. The IA is calculated as (a+d) / (c+b) = asymmetry, where a low value refers to asymmetry and a high value refers to symmetry (Hanson 1998). When the value of the IA is high, the movements are more numerous and more difficult to discern.
Third, this study refers to VGA, which was proposed by Turner et al., (2001) as a promising method for optimising computational graph analysis and completing syntactic analysis. VGA is defined as graphs of simple inter-visibility information in a spatial layout, translated into edges to other nodes that are distributed over a regular and dense grid of possible observation points (Franz et al., 2005). VGA makes it possible to identify the spatial properties (local and global measurements) of the studied system to inform about its spatial structure.
The present study examined 18 medieval mosques in Algeria, dating from the 7th to the 15th centuries, which have different typologies but present the same categories of space. The criteria that motivated the selection of the mosques included the availability of data and, for some, their state of physical conservation. The selected Algerian mosques are in the cities of Annaba and Constantine in the east, Algiers in the centre, Chlef, and Tlemcen in the west, and Biskra in the south (these were the capitals of Muslim dynasties and great medieval cities). A sample of mosque plans is presented in Fig. 3, Fig. 4, and Fig. 2 shows the locations of these mosques on a map. Based on the classification typology for mosques in Algeria of Bourouiba (1986), the mosques selected for this analysis present the following typologies: -mosques with a courtyard and galleries: S2, S3, S4, S5, S6, S7, S10, S11, S12, and S13; -mosques with a courtyard and without galleries: S1, S15, S16, S17, and S18; -mosques without a courtyard and without galleries: S8, S9, and S14, and they present the following functional categories: -independent mosques of any religious educational institution, where the mosque is solely a place of worship devoted to prayer; the faithful can meet several times a day to pray individually and collectively; -mosques with religious educational institutions that provide student rooms, a library and classes for the faithful to learn the Quran and the Sunnah.

Justified graphs Fig. 5 and Fig. 6
The plans of the mosques of the study corpus ( Fig. 3 and Fig. 4) were translated into the justified graphs presented in using ' AGRAPH _1_14©' software developed by a researcher from the 'Oslo School of Architecture and Design' (Manum et al., 2005). The permeability from the exterior of a mosque to its interior spaces, in all the cases presented here, can present the following order (but it is not exclusive): exterior, doors, transition (galleries), courtyard, prayer space (prayer hall), imam space (mihrab) and other service spaces (e.g., ablution room and student rooms).
In addition to measures of depth, integration and ringiness, the space syntax approach also provides a method for categorising the types of space in a system based on the topological characteristics of the spaces. The labelling of the justified graphs by topological type is essential for discovering the social logic that guides these configurations, and also for refining the genotype search by examining the nature of the justified graphs.
The topological description reflects the accessibility models present in spatial systems; in other words, this is how the arrangement of cells and entrances controls access and movement (Hillier and Hanson 1984;Stöger 2011). Hillier's classification of the topological type of space ('a' , 'b' , 'c' and 'd') was applied to define the topological types of the selected medieval mosques in Algeria and to examine their relationship with the different categories of space. All the characteristics of this relationship reflect the dominant nature of the spatial organisation and social logic of the mosque (Aazam 2007).
After drawing the justified graphs of the mosques shown in Fig. 5 and Fig. 6, different colours were assigned to the topological types ('a' , 'b' , 'c' and 'd') (Hillier 1995) of mosque space to differentiate them. Thus, the nodes of topological type 'a' , 'b' , 'c' and 'd' are coloured yellow, green, red, and cyan, respectively. From this labelling, we observe the following: 1. The mihrab (M'), the maqsura (Mq), and the dead room (Dr) are always deep. In all specimens, the mihrab is an occupation space of type 'a' . 2. The galleries (Ga: N, S, E, and W) are always part of a ring. The galleries are type 'c' , i.e., they offer throughmovement. 3. The courtyard (Cy) is always shallow. In 10 of the 15 specimens with courtyards it is type 'd' , which allows movement with a choice of route in many directions.
In 5 of the 15 specimens the courtyards it is type 'b' , with strong control because it presents only a single crossing route. 4. The prayer hall (P.H) is always shallow. It is type 'b' in 10 of the 18 specimens and type 'c' in 8 of the 18 specimens.
To determine topological type, we analysed the basic qualitative data of each mosque, i.e., the general way in which the cells are arranged within the different justified graphs.
The linking of graphs can be performed in three ways (structure type). First, a ring structure with lateral connections, where the spatial system has several alternative route choices (very distributed) (Hillier 1995;Hanson 1998) and dispersed control (less controlled navigation). Second, a tree structure in the case of symmetry and non-distributed properties (Hanson 1998;Mustafa and Hassan 2013), with a link number less than the number of cells linked and where there are no circulation rings (Hillier 1995). Third, a linear structure in the case of an asymmetric and non-distributed model, where the spatial system has a single route choice with very controlled navigation.
The syntactic characteristics of the spatial configuration (symmetry/asymmetry and distributedness /non-distributedness properties), which were used for interpretation of the structures of the different mosque layouts, are directly related to the functionality of mosque layout (Mustafa and Hassan 2013).
From the structure of the graphs (Fig. 5, Fig. 6, Fig. 7 and Fig. 8), we can observe the following: -10 specimens have a ring structure and present an asymmetric distributed system (S2, S3, S4, S5, S6, S7, S10, S11, S12 and S13); -8 specimens have a tree structure and present a symmetric non-distributed system (S1, S8, S9, S14, S15, S16, S17 and S18). Redjem and Mazouz Built Heritage (2022)  The SLR determines the distributed/non-distributed structure (Hillier and Hanson 1984). Moreover, discussion on topological type implies use of the IA and ID. These indicators were calculated for all 18 specimens and the results are listed in Table 1 . A mosque layout with a courtyard and galleries is highly efficient according to the space syntax approach, as highlighted by the high values of space types 'c' and 'd' and the low values of space types 'a' and 'b' in specimens S3, S4, S5, S6, S7, S10, S11, S12 and S13 (Table 1 ).
The results of the correlation matrix, after calculation of the standard deviation (Table 2 ) between all types of space of the 18 mosques, are visualised in the factor map shown in Fig. 9.
It can be seen that the number of spaces of type ('a' , 'b' and 'd') and the ID are strongly correlated and are opposed to the number of spaces of type 'c': -the presence of topological spaces of type 'c' (external rings) offers a transition movement (allowing movement to be oriented), which gives a ring structure to the system that favours a large distribution; -the presence of topological spaces of type 'd' (internal rings), together with topological spaces of type 'b' and 'a' , present a spatial configuration that favours a small distribution.
The IA is opposed to the SLR on the second factorial axis. The property of symmetry/ asymmetry reflects the importance of space in terms of segregation or integration. The measure of the SLR represents the degree of permeability of the system: -when SLR> 1, the system presents a ring structure (indicating a high degree of flexibility/ navigation), and the IA presents a low value that implies asymmetry; -when SLR = 1, the system presents a tree structure (only one route exists for movement between two points of the system), and the IA presents a high value that implies symmetry.

Syntactic measures
Discussion on genotype means observing a recurrence of a qualitative order (i.e., justified graphs), but also   (Letesson 2009). Having drawn the justified graphs ( Fig. 3 and Fig. 4), using the exterior as a reference, we performed syntactic analyses of the spatial models of the medieval mosques without consideration of the functions assigned to particular spaces. The resulting data are shown in Table 3 .
Based on phenotypical descriptions, the following distinct groups can be identified (spatial phenotypes): 1. Specimens S3, S4, S5, S6, S7, S10, S11, S12 and S13 constitute the first group with distinct properties. It has a ring structure and the highest SLR values (>1), with a mean difference factor of 0.70 and a mean integration value of 0.30. 2. The second group consists of a single specimen (S2). It has a ring structure and a high SLR value, with the highest difference factor of 0.82 and a mean integration value of 0.24. 3. The third group of specimens includes S14, S15, S16 and S18. It has a tree structure and the lowest SLR values (=1), with a mean difference factor of 0.69 and a mean integration value of 0.38. 4. The fourth group also consists of a single specimen (S1). It has a tree structure and the lowest SLR value, with the lowest difference factor (0.49) and a mean integration value of 0.31. 5. The fifth group consists solely of specimen S17. It has a tree structure and the lowest SLR value, with the highest difference factor (0.84) and a mean integration value of 0.51. 6. The sixth group consists of specimens S8 and S9.
It has a tree structure and the lowest SLR values. It does not have a value of H* but it does have a mean integration value of 0.50.

VGA Integration
In this study, VGA was performed using 'DepthmapX' software. In this process, it is necessary to assume that all the doors of the mosque are open simultaneously. As can be seen from the results presented in Fig. 10 and Fig. 11, the courtyard is the most integrated space in S3, S4, S5, S6, S7, S10, S11, S12, S15, S16 and S17. The prayer hall presents high visual integration in the majority of mosques, but it displays a lower visual integration in S2, S3, S7, S15 and S17. It has been observed that Step Depth is closely related to the integration value of the overall system of medieval mosques from the outside.

Topological Structures and Social Behaviours
On the basis of the topological descriptions, three topological structures of medieval Algerian mosques were identified (Fig. 12):

Topological structure 1 (TS1)
Specimens S3, S4, S5, S6, S7, S10, S11, S12 and S13 have a distributive and asymmetric configuration. These specimens present a ring structure that offers movement options in each direction and retains some control potential. The spaces that constitute the ring (space types 'c' and 'd') create a closed circuit that is composed of the east, west, north and south galleries in S3 and S7, and the east, west and north galleries and the prayer hall in S4, S5, S6, S10, S11, S12 and S13. The courtyard ('d') constitutes a very important circulation ring that serves the three galleries (east, west and north) and the prayer hall ('c'), and gives access to space of type 'a' , e.g., the mihrab, dead room, minaret, students' rooms and ablution room (private space), either directly or through space of type 'b' with high control potential. When the distribution in the structure of the mosque increases, it indicates that the permeability to different spaces is at a high level and that its separation from other spaces is low.

Topological structure 2 (TS2)
Specimens S1, S8, S9, S14, S15, S16, S17 and S18 are extremely simple non-distributive configurations. The tree-like structure presents a reasonably basic arrangement (showing some local symmetry) in which various spaces of type 'b' follow each other before serving occupation spaces of type 'a' . In S1, the prayer hall ('b') has shallow depth, is separated from the outside only by the staircase and provides access to spaces of type 'a' . In S8, S9 and S14, the prayer hall ('b') is the only point of entry into the mosque and it provides access to both the mihrab and the minaret ('a'). In S15, S16 and S18, the graph opens onto a linear sequence of space of type 'b' (e.g., courtyard and prayer hall) that provides access to space of type 'a' . In S17, the courtyard ('b') is the only point of entry into the mosque and it provides access to space of type 'a' either directly or indirectly through space of type 'b' . This type of structure is characterised by strong control of internal and external movement and minimal movement options (i.e., the absence of a ring).

Topological structure 3 (TS3)
Specimen S2 presents a justified graph of a spatial complex characterised by a distributive and asymmetric configuration that is a ring structure. The prayer hall ('c') offers movement options in each direction, and it retains some control potential and gives direct access to occupation spaces of type 'a' (the presence of doors in the prayer hall might make it possible to channel and/or restrict certain related movements).
Topological analysis of mosques allows us to understand the internal arrangement of cells and their connections, and to provide the most complete information possible on the connections between the exterior and the interior and also between the internal spaces (i.e., the precise location of the entrances, cells and openings between cells). The high distribution in TS1 and TS3 is attributable to the presence of space of types 'c' and 'd' in the configurations that present a ring structure. Therefore, it would appear that the existence of this type of space in TS1 facilitates movement (i.e., the movement of worshippers within the mosque) and creates better communication, resulting in a high Redjem and Mazouz Built Heritage (2022) 6:17 Fig. 11 VGA integration: S10-S18 (Source: the authors) level of efficiency, great accessibility and a high degree of flexibility in the use of space. Conversely, TS3 presents a process of increasing depth (spatial complexity), which is a type of configuration that does not facilitate functional flexibility. However, specimen S2 does contain three access points and thus it is characterised by reasonably strong potential for permeability.
The spatial arrangement of those mosques with a prayer hall, courtyard and three or four galleries (TS1 and TS2) favours the rear-front axis. The attention of a person entering the mosque is therefore sequentially focused more particularly on the prayer hall.
The permeability of a mosque also depends on this spatial arrangement and on other parameters such as the existence of entry devices (e.g., galleries, veranda, clearances and entrances), closing devices (e.g., doors and partitions) and even specific cultural and religious prescriptions. These topological and typological structures determine the public or private characteristic of a mosque.
The dimension of symmetry/asymmetry is related to social factors and to the importance of categories. The courtyard, prayer hall and galleries (TS1) are of great importance as a category of social space, with high values of integration, which provides high asymmetry that results in a strong functional relationship (efficiency). This strong flexibility of the spatial arrangement allows clear and easy movement and transition from public to private spaces in a mosque.
The distributedness / non-distributedness aspect is related to the options that exist to access all spaces of the system and it appears to refer to the control within the system, where a distributed system means that there is more than one point of control and a non-distributed system means that there is only a single point of control. The mosques of TS2 are non-distributed, where either the courtyard or the prayer hall represents the only point of control, which results in a simple functional relationship (i.e., when the value of permeability decreases, efficiency decreases).

Functional and Spatial Genotype
The simple measures of depth and integration can express culturally significant typological differences among plans (mosque layouts) because they are based on concepts founded on intrinsic 'social logic' (Hillier et al., 1987). Mean integration values for space categories can also be used to examine the spatial configuration to discern patterns in the spatial organisation based on the relative location of functions, which is a useful first step to describe each mosque through ordering the integration values by space categories (Hillier et al., 1987;Bustard 1999).
The mihrab is used for the prayer of the imam, but it is also a functional space used to direct congregational prayer (Salat al jama'ah); thus, it is considered in the calculation of BDF as a service space. The courtyard and the galleries: could be used for prayer on certain occasions and so they are included in the calculation of BDF as prayer spaces.
A particular consistency of the order of classification of the integration values in Table 4 appears in the sample once the functions of the space have been rearranged. Ignoring the mihrab, service space and the exterior, three distinct genotypic trends can be seen in the sample (Sari et al., 2020).
1. The first is organised on the courtyard, prayer hall and galleries with an integration value varying from strong to medium in S3, S4, S5, S6, S7, S10, S11, S12 and S13. 2. The second is centred on the courtyard and the prayer hall, which have strong integration in S1, S15, S16, S17 and S18. 3. The third is centred on the strongly integrated prayer hall in S8, S9 and S14.
The analysis reveals that the three genotypes generally share many common characteristics and diverge only in terms of a few points. The genotypes of medieval mosques, derived from the analysis, do not appear correlated with either size or geometry of the mosque building (space syntax effectively captures spatial relationships but removes shapes and sizes (Hillier et al., 1987)). They appear as three distinct spatial-functional tendencies, each expressed through several different built forms. These various spatial forms reveal a tendency for similar spatial syntactic properties that ignore the formal classification of the buildings (Aazam 2007).

Integration values and social activities
The differences in the integration values of spaces in spatial complexes are one of the keys to determining how cultural and social relations are expressed through space, i.e., providing an indication of the strength/weakness of social relations with respect to spatial ordering (Hillier et al., 1987;Mustafa and Hassan 2013;Bustard 1999).
Highlighting the social logic (the practice of space) of medieval mosques in Algeria was achieved by analysing qualitative considerations and the explanation of their justified graphs by corresponding topological types (i.e., the impact of the built environment on occupation and movement), and through calculation of the IA and the ID together with study on the arrangement of cells (i.e., linking of ring or tree graphs (SRL)).
These results are consistent with the main role of the mosque as a place of worship (Table 5). On the one hand, the mihrab is a static space of occupation reserved for the imam, and its property of minimal integration is suitable for its segregation. On the other hand, the north gallery is the most integrated space followed by the courtyard and the east gallery. However, because galleries (transition spaces) are present only in 9 of the selected mosques, whereas a courtyard is present in 14 of the mosques, the courtyard is considered the most integrated space, suitable for being the spatial centre of the mosque system and therefore of particular importance for social activities.
The results of VGA integration ( Fig. 10 and Fig. 11) highlight that the courtyard and the prayer hall represent the most integrated elementary components in the different systems of the medieval mosques (many activities take place there), validating the syntactic results of the justified graphs (Table 5). Spatial models with higher integration increase social interaction, and prayer halls tend to be spaces that are more sacred than courtyards and galleries, which have more social and interactive activities. Rather than assuming that the sacred activity is the cause of the lack of social relations, social interaction is seen as one of the key elements in creating a sense of community within a mosque.
Visual Step Depth allows more intuitive perception of visual reality and it is a property with social significance; the visual distance of some spaces from the outside could be seen as reinforcing the idea of the more private nature of these spaces.

Comparison between architectural layouts, topological structures, and genotypes
It is important to compare the architectural layout (AL) with topological structure (TS) and genotype (G) to identify recurrences and variances (Fig. 13). Comparison between (AL) and (G): AL1 corresponds to G1, while AL2 and AL3 correspond to G2 and G3, respectively, and AL4 (with a single case) corresponds to a non-genotype (nG). Therefore, the three genotypes (G1-G3) expressed through several different built forms (ALs).
Comparison between (TS) and (G): TS1 corresponds to G1, TS2 corresponds to both G2 and G3, and TS3 corresponds to an nG. The three genotypes (G1-G3) that capture the functional and spatial relationships have common characteristics expressed through their tow topological structure (ring structure and tree structure).
Comparison between (AL) and (TS): AL1 corresponds to TS1, AL2 and AL3 correspond to TS2, and AL4 corresponds to TS3. The built environment (AL) has an impact on movement, flexibility and level of efficiency of the spatial organisation (TS).

Conclusion
The space syntax approach was applied in this study to derive general and specific conclusions regarding the spatial and social interactions of medieval mosques in Algeria. The analysis has certain significance for interpreting the social dimension invested in the spatial dimension of the architectural layout of historic mosques and other buildings with architectural heritage, and can reveal more than results based only on a historical, social and physical description of the space. We applied the space syntax method using the model of justified graphs and VGA, which allowed us to determine a number of syntactic values and morphological properties that elucidated the topological structure (through visual characterisation, IA, ID and SLR), genotype (through BDF, RA and SLR) and social organisation (through integration and Step Depth measures). In other words, it allowed us to establish a correlation between the social aspect and the physical space of the studied mosques.
The findings emphasise the importance of the courtyard and galleries in the operational efficiency of mosques. Moreover, it is considered that architectural layout AL1 should be used in the design of modern mosques owing to its better performance in comparison with that of the other layouts.
The analysis was not intended to test or validate the space syntax method; instead, it was intended to seek a different application for a new understanding of the permeability, visual accessibility and social interaction of medieval mosques. The analysis allowed a new reading of medieval mosques in Algeria, by elucidating their spatial organisation with objective consideration of the spatial relationships, and by identifying their different topological structures and genotypes, in which the socio-spatial characteristics are related to connectivity and integration.
The analysis revealed a strong relationship between the spatial configuration and the way in which the faithful move physically and visually within the space of the mosque. The spatial configuration of the mosque is also closely associated with other important issues such as the architectural layout, use of space and social equality.
This research was undertaken with the objective of contributing to enrichment of knowledge on the nature of the social and spatial configuration of the studied mosques. The results provide precise and objective indicators that could serve as a reference both for the evaluation of medieval mosques and for the design of new mosques based on this model.