Average size of connected components in grid

Click For Summary

Discussion Overview

The discussion revolves around the average size of connected components in an infinite 2D grid where each cell is randomly colored black or white. Participants explore the implications of this setup on the expected number of connected components and their sizes, particularly in finite nxn grids.

Discussion Character

  • Exploratory
  • Mathematical reasoning

Main Points Raised

  • One participant proposes that the average size of a connected component can be expressed as \(\lim_{n \rightarrow \infty} \frac{n^2}{f(n)}\), where \(f(n)\) is the expected number of connected components in an nxn grid.
  • Another participant suggests that the number of connected components in the grid may not exceed the total number of "runs" in its rows, questioning whether this provides an upper bound for the expected number of connected components.
  • A participant mentions that if the number of connected components grows linearly with \(n\), then the fraction of components per tile approaches zero.
  • One participant calculates an upper bound for the average size of connected components using non-overlapping 3x3 subgrids, estimating a maximal average size of at most 96 based on certain probabilities.
  • A later reply shares simulation results indicating an average component size of around 7.6 for random grids of size 3000x3000, suggesting that the average size remains roughly constant across different grid sizes.

Areas of Agreement / Disagreement

Participants express differing views on the relationship between runs in rows and connected components, and while some calculations and simulations are presented, there is no consensus on the average size of connected components or the implications of the findings.

Contextual Notes

The discussion includes assumptions about adjacency and the probabilistic nature of cell coloring, which may affect the interpretations of connected components and their sizes. The estimates provided rely on specific configurations and may not account for all possible arrangements in the grid.

mXSCNT
Messages
310
Reaction score
1
Start with an infinite 2d grid of cells, with each cell randomly colored black or white (50% chance). Now take the graph G whose nodes are the cells, and with an edge (A, B) if A and B are adjacent in the grid, and the same color.

What is the average size of a connected component of G? Is it finite, or infinite?Specifically, let's say you have an nxn grid. G(n) is the graph whose nodes are the cells with an edge (A, B) if A and B are adjacent in the grid and the same color. Let f(n) be the expected number of connected components in G(n), so that \frac{n^2}{f(n)} is the expected average size of connected components in the grid. Find \lim_{n \rightarrow \infty} \frac{n^2}{f(n)}
 
Physics news on Phys.org
If we consider a row in the grid, it has a certain number of "runs" in it. My intuition is that there are no more connected components in the whole grid than there are total runs in its rows. Does the expected total number of runs in the rows provide any useful upper bound for the expected number of connected components?
 
Just for clarification: "Adjacent" means "same column, row differs by 1 OR same row, column differs by 1"? So each cell has 4 adjacent cells.

Stephen Tashi said:
My intuition is that there are no more connected components in the whole grid than there are total runs in its rows.
If that is true and I understand it correctly, the number of connected components grows just linearly with n, and the fraction components/tile goes to zero.

It is easy to find an upper bound for the average size (=lower limit for the components per tile): Consider non-overlapping 3x3 subgrids. Each subgrid has a probability of 1/16 to have an isolated cell in the middle. With a better pattern, you can get a "cross" every 6 tiles. Therefore, the maximal average size (as defined in post 1) is at most 16*6=96.
 
mfb said:
Just for clarification: "Adjacent" means "same column, row differs by 1 OR same row, column differs by 1"? So each cell has 4 adjacent cells.
Yeah

If that is true and I understand it correctly, the number of connected components grows just linearly with n, and the fraction components/tile goes to zero.

It is easy to find an upper bound for the average size (=lower limit for the components per tile): Consider non-overlapping 3x3 subgrids. Each subgrid has a probability of 1/16 to have an isolated cell in the middle. With a better pattern, you can get a "cross" every 6 tiles. Therefore, the maximal average size (as defined in post 1) is at most 16*6=96.
Cool! I should have thought of that.

I ran a simulation and got around 7.6 for average component size (random grids of 3000 x 3000). For grids of 300x300 it was 7.5-7.6 so it does seem to be roughly constant.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 22 ·
Replies
22
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K