(A) Distribution of nearest neighbor distances between L5+ spines from experiments (red) and from 1000 times random reshuffling the recorded number of inputs over all present spines within each individual dendritic segment (blue, dark blue mean trace). Median values of recorded and reshuffled data are significantly different (data, median = 3.10 μm; simulations, median = 5.02 ± 0.43 μm; p<0.0001).The plot of the difference between inter-input distances from experiments and simulations (purple) shows that the deviation is most pronounced for small inter-input distances below 10 µm with a peak deviation around 5 µm, suggesting a clustered arrangement of L5+ spines. (B) Combinatorial cluster analysis: Illustration of the principle of calculating the specific ensemble likelihood (combinatorial cluster analysis step 2). Top, example of a dendritic segment with N = 30 spines in total and n = 5 L5+ spines (red). m = 4 L5+ spines are part of an input ensemble of size M = 6 spines (gray box) by fulfilling the maximal nearest neighbor distance criterion of △crit = 2 (blue bar; cluster analysis step 1). The ensemble is flanked by 'gaps' of L5- spines (gray brackets). As illustrated below, the likelihood for observing an ensemble of M = 6 spines with m = 4 L5+ spines is determined by three factors: The number or ways the L5+ spines can be distributed inside the ensemble, the number of ways the remaining L5+ spines can be distributed outside of the ensemble and the number of ways an ensemble of the given size can be placed on the dendritic segment. Bottom left, all possible arrangements of m = 4 L5+ spines in an ensemble of M = 6 spines, note that the ensemble edges (red arrowheads) have to be occupied always to delimit the ensemble. Bottom middle, four examples of the possible assignments of the remaining n-m = 1 L5+ spine to the spines outside of ensemble and gaps. Bottom right, four examples of the possibilities to place the ensemble of size M = 6 spines into the dendritic segment with N = 30 spines in total. Note that at positions close to the beginning and end of the segment, the leading or trailing gap, respectively, are not fully realized. (C) Dendrograms of 10 out of 20 mapped pyramidal cells summarizing 7 observed input clusters (L5+ spines, red; L5- spines, black; dendrograms of all other recorded cells with input clusters in Figure 2—figure supplement 1). Gray boxes mark input ensembles (cluster analysis step 1), red numbers are the specific ensemble likelihood values (cluster analysis step 2), red asterisks mark ensembles identified as clusters (specific ensemble likelihood ≤0.01, inputs ≥3; cluster analysis step 3), black numbers are overall cluster likelihood values for each cluster (cluster analysis step 4). Note that spines, which are located very close to each other, are not resolved at this scale and their marks appear to overlap; dashed lines indicate unmapped stretches). (D) Specific ensemble likelihood scores of all ensembles (thin line) and those with at least three inputs (thick line). Dashed line, cluster likelihood threshold. (E) Number of L5+ spines in individual clusters (red) and all ensembles (black). (F) Length of clusters (red) and all ensembles (black).