Cameron's Sum-Free Set Constant

Author

Eric W. Weisstein
April 16, 2004

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Constants/CameronsSum-FreeSetConstant.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/CameronsSum-FreeSetConstant.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<DiscreteMath`Combinatorica`

Code

SumFreeSetQ[l_List?VectorQ]:=True /; Length[l]<3
SumFreeSetQ[l_List?VectorQ]:=Intersection[l,Plus@@@KSubsets[l,2]]=={}

Enumartion

r=Union[Flatten[Table[Select[Subsets[n],SumFreeSetQ],{n,0,14}],1]];//Timing

(Count[Flatten[Select[r,Length[#]==1&]],_?OddQ]+Count[r,_?(OddQ/@(And@@#)&)])/Length[r]//N

r3=Select[r,Length[#]>2&];

Count[r3,_?(OddQ/@(And@@#)&)]/Length[r3]//N