Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ challenge

Name: Anonymous 2014-07-02 13:05

A set of integers is sum-free when addition always gets you out of the set (i.e. x + y = z has no solutions -- in other words S + S and S are disjoint). Formally, let S be a subset of N. S is sum-free if for all a,b in S, a+b is not in S.

Now, let S be any set of nonzero integers. Find a subset of size > |S|/3.

You may use your favorite lisp language.

I've got a really nice solution for this one.

Name: Anonymous 2014-07-03 10:10

>>35
First a prime p that does not divide any of the x in Χ needs to be found. Then that prime can be used to generate linearly a sumfree subset. I still haven't implemented the details. It's all in 'the probabilistic method' though.

>>39
Can it be siamese cats instead? They're purring complete

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List