SpatialGraphDistribution

SpatialGraphDistribution[n,r]

represents a spatial distribution for graphs with n vertices uniformly distributed over the unit square and edges between vertices that are at distance at most r.

SpatialGraphDistribution[n,r,d]

represents a spatial distribution for graphs with vertices uniformly distributed over the d-dimensional unit square.

SpatialGraphDistribution[n,r,dist]

represents a spatial distribution for graphs with vertices distributed according to the probability distribution dist.

SpatialGraphDistribution[n,r,reg]

represents a spatial distribution for graphs with vertices uniformly distributed in the region reg.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Generate a pseudorandom graph:

Probability density functions of the EdgeCount:

Scope  (7)

Generate simple undirected graphs:

Generate graphs with vertices uniformly distributed in unit cubes of different dimensions:

Generate graphs with vertices distributed according to different distributions:

Univariate distributions:

Bivariate distributions:

Multivariate distributions:

Generate graphs with vertices uniformly distributed over a geometric region:

Generate graphs with distance measured using different norms:

Generate a set of pseudorandom graphs:

Compute probabilities and statistical properties:

Options  (2)

DistanceFunction  (2)

By default, distance is measured using EuclideanDistance:

This is the same as 2-norm:

Use any -norm:

Applications  (3)

A wireless ad hoc network can be modeled with a SpatialGraphDistribution:

Nodes are connected if they are sufficiently near each other:

In a piece of brain cortex with 100 neurons, the neurons are connected by synapses if they are at a distance less than 0.2:

Find the probability that the network is connected:

A frog in a lily pond is able to jump 1.5 feet to get from one of the 25 lily pads to another. Model the frog jumping network from the lily pad density and SpatialGraphDistribution:

Sample a random pond:

Find the largest collection of lily pads the frog can jump between:

Use simulation to find the sizes of the largest collections of lily pads for similar ponds:

Find the number of times the frog would have to swim to visit all lily pads:

Simulate to get results for similar lily ponds:

Properties & Relations  (6)

Distribution of the number of vertices:

Distribution of the number of edges:

Degree distribution:

Use UniformDistribution and EuclideanDistance to simulate SpatialGraphDistribution:

A negative distance bound yields an empty graph:

A large distance bound yields a complete graph:

Neat Examples  (1)

Generate random star constellations:

Wolfram Research (2012), SpatialGraphDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialGraphDistribution.html (updated 2022).

Text

Wolfram Research (2012), SpatialGraphDistribution, Wolfram Language function, https://reference.wolfram.com/language/ref/SpatialGraphDistribution.html (updated 2022).

CMS

Wolfram Language. 2012. "SpatialGraphDistribution." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SpatialGraphDistribution.html.

APA

Wolfram Language. (2012). SpatialGraphDistribution. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SpatialGraphDistribution.html

BibTeX

@misc{reference.wolfram_2024_spatialgraphdistribution, author="Wolfram Research", title="{SpatialGraphDistribution}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SpatialGraphDistribution.html}", note=[Accessed: 06-October-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_spatialgraphdistribution, organization={Wolfram Research}, title={SpatialGraphDistribution}, year={2022}, url={https://reference.wolfram.com/language/ref/SpatialGraphDistribution.html}, note=[Accessed: 06-October-2024 ]}