All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
Consecutive-Free Sets (Posted on 2025-02-13) Difficulty: 3 of 5
Find the number of sets A such that A ⊂ {1, 2, 4, 5, 6, 8, 9, 10, 11}, |A| = 4 and A contains no consecutive integers.

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 1 of 4
There are 29:

     1     4     6     8
     1     4     6     9
     1     4     6    10
     1     4     6    11
     1     4     8    10
     1     4     8    11
     1     4     9    11
     1     5     8    10
     1     5     8    11
     1     5     9    11
     1     6     8    10
     1     6     8    11
     1     6     9    11
     2     4     6     8
     2     4     6     9
     2     4     6    10
     2     4     6    11
     2     4     8    10
     2     4     8    11
     2     4     9    11
     2     5     8    10
     2     5     8    11
     2     5     9    11
     2     6     8    10
     2     6     8    11
     2     6     9    11
     4     6     8    10
     4     6     8    11
     4     6     9    11
     
clearvars
ct=0;
fullSet=[1 2 4 5 6 8 9 10 11];
idx=combinator(9,4,'c');
sets=fullSet(idx);
for i=1:length(sets);
  set=sort(sets(i,:));
  d=set(2:4)-set(1:3);
  if ~ismember(1,d)
    ct=ct+1;
    disp(set)
  end
end
ct     

  Posted by Charlie on 2025-02-13 08:34:25
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (4)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2025 by Animus Pactum Consulting. All rights reserved. Privacy Information