Cody

Solution 242885

Submitted on 11 May 2013 by Paul Berglund
  • Size: 27
  • This is the leading solution.
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(DnfProp(Pvar,Tval),y_correct))
2   Pass
%% Pvar={ [1 2], [-2 3 4], [-4 5] }; Tval=[ 1 0 1 1 0 ]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
3   Pass
%% Pvar={ [1 2], [2 3 4], [-4 5] }; Tval=[ 1 0 1 1 0 ]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
4   Pass
%% Pvar={ [1 2], [-2 3 -4], [4 -5] }; Tval=[ 0 1 1 0 0 ]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
5   Pass
%% Pvar={ [1 2], [2 3 -4], [4 -5] }; Tval=[ 0 1 1 0 0 ]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
6   Pass
%% Pvar={ [1 2] }; Tval=[0 0]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
7   Pass
%% Pvar={ [1 2] }; Tval=[0 1]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
8   Pass
%% Pvar={ [1 2] }; Tval=[1 0 ]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
9   Pass
%% Pvar={ [1 2] }; Tval=[1 1 ]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
10   Pass
%% Pvar={ [1 -2] }; Tval=[0 0]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
11   Pass
%% Pvar={ [-1 -2] }; Tval=[0 0]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
12   Pass
%% Pvar={ [1 2 3 4 ], [ 5 6 7 8] }; Tval=[1 0 0 0 1 0 0 0]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
13   Pass
%% Pvar={ [1 2 3 4 ], [ 5 6 7 8] }; Tval=[1 0 0 0 1 1 1 1]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
14   Pass
%% Pvar={ [1 2 3 ], [ 4 5 6 ], [7 8 9], [10 11 -12] }; Tval=[0 0 0 0 0 0 0 0 0 1 1 0]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
15   Pass
%% Pvar={ [1 2 3 ], [ 4 5 6 ], [7 8 9], [10 11 12] }; Tval=[0 0 0 0 0 0 0 0 0 1 1 0 ]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))
16   Pass
%% Pvar={ [1 2 3 ], [ -3 2 -1], [3 2 -4] [ 4 -2 -1] }; Tval=[0 0 0 1 ]; y_correct=true; assert(isequal(DnfProp(Pvar,Tval),y_correct))
17   Pass
%% Pvar={ [1 2 3 ], [ -3 2 -1], [3 2 -4] [ 4 -2 -1] }; Tval=[1 0 0 1 ]; y_correct=false; assert(isequal(DnfProp(Pvar,Tval),y_correct))