function b = CS_sat(sentence,bits)
% CS_sat - check if bits satisfy the sentence
% On input:
%     sentence (1xk vector): disjunction of k literals
%     bits (1xn vector): n truth assignments to logical variables
% On output:
%     b (Boolean): 1 if bits satisfy sentence; else 0
% Call:
%     b = CS_sat([1,-2],[0,1]);
% Author:
%     T. Henderson
%     UU
%     Summer 2018
%

b = 0;

len_sentence = length(sentence);
for e = 1:len_sentence
    if sentence(e)>0==bits(abs(sentence(e)))
        b = 1;
        return
    end
end
