MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Generating a finite sigma-algebra

  • To: mathgroup at
  • Subject: [mg103828] Generating a finite sigma-algebra
  • From: Valeri Astanoff <astanoff at>
  • Date: Thu, 8 Oct 2009 07:51:02 -0400 (EDT)

Good day,

Given a set and a list of its subsets, how can one
generate *the* sigma-algebra generated by the subsets ?
The original question was posted on another CAS group
and I tried and did it with Mathematica this way :

In[1]:= sigmaAlgebra[set_List, parts_List /; Depth[parts]==3] :=
 With[{}, int[subs_List]:=
 Outer[Intersection,subs,subs,1] // Flatten[#,1]& // Union;

 Outer[Union,subs,subs,1] // Flatten[#,1]& // Union;

 comp[om_List, subs_List]:=
 Union[subs, Complement[om,#]& /@subs] ;


sigmaAlgebra[set_List, elements_List/;Depth[elements]==2] :=
sigmaAlgebra[set, List /@ elements];

In[3]:= sigmaAlgebra[{1,2,3,4,5}, {{1,2,3,4},{1,3},{4}}]

Out[3]= {{},{2},{4},{5},{1,3},{2,4},{2,5},{4,5},

In[4]:= sigmaAlgebra[{1,2,3,4},{2,4}]

Out[4]= {{},{2},{4},{1,3},{2,4},

Is that way correct and optimal, and if not, what is
the best and fastest way to get the sigma-algebra ?



  • Prev by Date: Re: Google Trends Data and Mathematica
  • Next by Date: Re: How to find which variable caused the trigger in Manipulate[]
  • Previous by thread: Re: Grad in VectorAnalysis`
  • Next by thread: Re: Generating a finite sigma-algebra