Cody

Solution 239091

Submitted on 2 May 2013 by Clemens Giegerich
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% Pvar={ [1 2], [-2 3 -4], [4 -5] }; Tval=[ 1 0 1 1 0 ]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
2   Pass
%% Pvar={ [1 2], [-2 3 4], [-4 5] }; Tval=[ 1 0 1 1 0 ]; y_correct=false; assert(isequal(CnfProp(Pvar,Tval),y_correct))
3   Pass
%% Pvar={ [1 2], [-2 3 -4], [4 -5] }; Tval=[ 0 1 1 0 0 ]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
4   Pass
%% Pvar={ [1 2] }; Tval=[0 0]; y_correct=false; assert(isequal(CnfProp(Pvar,Tval),y_correct))
5   Pass
%% Pvar={ [1 2] }; Tval=[0 1]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
6   Pass
%% Pvar={ [1 2] }; Tval=[1 0 ]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
7   Pass
%% Pvar={ [1 -2] }; Tval=[0 0]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
8   Pass
%% Pvar={ [1 2 3 4 ], [ 5 6 7 8] }; Tval=[1 0 0 0 1 0 0 0]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
9   Pass
%% Pvar={ [1 2 3 ], [ 4 5 6 ], [7 8 9], [10 11 -12] }; Tval=[1 0 0 0 1 0 0 0 1 0 0 0]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
10   Pass
%% Pvar={ [1 2 3 ], [ 4 5 6 ], [7 8 9], [10 11 12] }; Tval=[1 0 0 0 1 0 0 0 1 0 0 0]; y_correct=false; assert(isequal(CnfProp(Pvar,Tval),y_correct))
11   Pass
%% Pvar={ [1 2 3 ], [ -3 2 -1], [3 2 -4] [ 4 -2 -1] }; Tval=[1 0 0 0 ]; y_correct=true; assert(isequal(CnfProp(Pvar,Tval),y_correct))
12   Pass
%% Pvar={ [1 2 3 ], [ -3 2 -1], [3 2 -4] [ 4 -2 -1] }; Tval=[1 0 0 1 ]; y_correct=false; assert(isequal(CnfProp(Pvar,Tval),y_correct))