import math


def Lattice_Theory_Algebraic(N,Kappa,d) : 

	"""
	
	Approximate expression for the algebraic connectivity of a periodic 
	random geometric graph.
	
	This formula is presented in chapter 4 of:
	Nyberg, Amy. The Laplacian Spectra of Random Geometric Graphs. Diss. 2014.
	(Also see Van Mieghem, Piet. Graph spectra for complex networks. Cambridge University Press, 2010.)
	
	
	Parameters
	-----------
	
	N : int
	
	Network size
	
	Kappa :  float
	
	Mean degree of the ensemble
	
	d: int
	
	Dimension of the embedding space
	
	Returns
	---------
	
	Mu2 : float
	
	Approximate value of the algebraic connectivity. 
	
	"""
	
	Mu2 = (1.0/6.0)*( (math.pi/(N**(1.0/d)) )**2 )*( ( Kappa + 1.0)**( (d + 2.0)/float(d) ) )
	return Mu2