Questions tagged [independent-set]

32 questions
0
votes
1 answer

Independent set check by checking in graph is a clique

I have a homework question for an algorithm class regarding transforming an s-clique into a s-independent set. Below is code and the function at the very bottom independent_set_decision(H,s) is what I need to finish. I am stumped. def k_subsets(lst,…
Andy
  • 275
  • 2
  • 14
-2
votes
2 answers

How to test linear independence of boolean array in a pythonic way?

The rows of this matrix are not linearly independent, as the first two rows can be added (or XORed) to produce the third: matrix = [ [ 1, 0, 0, 1 ], [ 0, 0, 1, 0 ], [ 1, 0, 1, 1 ], [ 1, 1, 0, 1 ] ] One could do brute-force reduction…
Ray Butterworth
  • 588
  • 1
  • 3
  • 18
1 2
3