Cody

Solution 1314802

Submitted on 25 Oct 2017
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   Fail
x = '0'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

2   Fail
x = '1'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

3   Fail
x = 'A'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

4   Fail
x = '~A'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

5   Fail
x = 'A|1'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

6   Fail
x = '1&A'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

7   Fail
x = 'A|B'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

8   Fail
x = 'A&B'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

9   Fail
x = 'A|A'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

10   Fail
x = 'A|~A'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

11   Fail
x = '0==0'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

12   Fail
x = '~0'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

13   Fail
x = '~(A & B) == (~A | ~B)'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

14   Fail
x = '~(Z & Y) == (~Y | ~Z)'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

15   Fail
x = 'A|B|C|D|E|F|G|H|I|J|K|L|M|N|O|P|Q|R|S|T|U|X|V|W|Y|Z'; y_correct = false; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

16   Fail
x = 'A|B|C|D|E|F|G|H|I|J|K|L|M|~A|O|P|Q|R|S|T|U|X|V|W|Y|Z'; y_correct = true; assert(isequal(tautology(x),y_correct))

Error: You may not use the command(s) eval in your code

17   Fail
assert(isequal(tautology('(A|B)|C'),false));

Error: You may not use the command(s) eval in your code

18   Fail
assert(isequal(tautology('(A|B)|(C == C)'),true));

Error: You may not use the command(s) eval in your code

19   Fail
assert(isequal(tautology('(A == B)|(B == C)|(C == A)'),true));

Error: You may not use the command(s) eval in your code

20   Fail
assert(isequal(tautology('~(~(~(~(~(~(0))))))'),false));

Error: You may not use the command(s) eval in your code

21   Fail
assert(isequal(tautology('~(~(~(~(~(~(~0))))))'),true)); % provided by Alfonso: assert(isequal(tautology('((0&1)|~B)&~B'),false));

Error: You may not use the command(s) eval in your code

22   Fail
assert(isequal(tautology('((0&~B)&~B)'),false));

Error: You may not use the command(s) eval in your code

23   Fail
assert(isequal(tautology('((0|A)&~A)'),false));

Error: You may not use the command(s) eval in your code

24   Fail
assert(isequal(tautology('((0|A)|1)'),true));

Error: You may not use the command(s) eval in your code

25   Fail
assert(isequal(tautology('((0|~B)|1)'),true));

Error: You may not use the command(s) eval in your code

26   Fail
assert(isequal(tautology('((1&0)|B)'),false));

Error: You may not use the command(s) eval in your code

27   Fail
assert(isequal(tautology('((1&1)&A)'),false));

Error: You may not use the command(s) eval in your code

28   Fail
assert(isequal(tautology('((1|0)|A)'),true));

Error: You may not use the command(s) eval in your code

29   Fail
assert(isequal(tautology('((1|A)|0)'),true));

Error: You may not use the command(s) eval in your code

30   Fail
assert(isequal(tautology('((1|~A)&B)'),false));

Error: You may not use the command(s) eval in your code

31   Fail
assert(isequal(tautology('((A&1)|~A)|A'),true));

Error: You may not use the command(s) eval in your code

32   Fail
assert(isequal(tautology('((A&~A)&~B)|~A'),false));

Error: You may not use the command(s) eval in your code

33   Fail
assert(isequal(tautology('((A&~B)&1)|B'),false));

Error: You may not use the command(s) eval in your code

34   Fail
assert(isequal(tautology('((A|0)&1)&~B'),false));

Error: You may not use the command(s) eval in your code

35   Fail
assert(isequal(tautology('((A|A)&A)|~A'),true));

Error: You may not use the command(s) eval in your code

36   Fail
assert(isequal(tautology('((B|0)&B)'),false));

Error: You may not use the command(s) eval in your code

37   Fail
assert(isequal(tautology('((B|1)&B)&A'),false));

Error: You may not use the command(s) eval in your code

38   Fail
assert(isequal(tautology('((B|A)|~A)'),true));

Error: You may not use the command(s) eval in your code

39   Fail
assert(isequal(tautology('((~A&~A)&0)&B'),false));

Error: You may not use the command(s) eval in your code

40   Fail
assert(isequal(tautology('((~A&~A)|0)'),false));

Error: You may not use the command(s) eval in your code

41   Fail
assert(isequal(tautology('((~A&~A)|~A)|1'),true));

Error: You may not use the command(s) eval in your code

42   Fail
assert(isequal(tautology('((~A|A)|~B)&1'),true));

Error: You may not use the command(s) eval in your code

43   Fail
assert(isequal(tautology('((~A|B)|A)'),true));

Error: You may not use the command(s) eval in your code

44   Fail
assert(isequal(tautology('((~A|~A)|1)'),true));

Error: You may not use the command(s) eval in your code

45   Fail
assert(isequal(tautology('((~A|~B)&0)'),false));

Error: You may not use the command(s) eval in your code

46   Fail
assert(isequal(tautology('((~B&0)&A)'),false));

Error: You may not use the command(s) eval in your code

47   Fail
assert(isequal(tautology('(0&1)|1&1'),true));

Error: You may not use the command(s) eval in your code

48   Fail
assert(isequal(tautology('(0|~A&B)'),false));

Error: You may not use the command(s) eval in your code

49   Fail
assert(isequal(tautology('(1|A&0)'),true));

Error: You may not use the command(s) eval in your code

50   Fail
assert(isequal(tautology('(A&A&~B)'),false));

Error: You may not use the command(s) eval in your code

51   Fail
assert(isequal(tautology('(A&~A|1)'),true));

Error: You may not use the command(s) eval in your code

52   Fail
assert(isequal(tautology('(A|1)|B'),true));

Error: You may not use the command(s) eval in your code

53   Fail
assert(isequal(tautology('(A|A)|A|1'),true));

Error: You may not use the command(s) eval in your code

54   Fail
assert(isequal(tautology('(B&1)|~B'),true));

Error: You may not use the command(s) eval in your code

55   Fail
assert(isequal(tautology('(B&~B)&~B&0'),false));

Error: You may not use the command(s) eval in your code

56   Fail
assert(isequal(tautology('(B|~B)|B'),true));

Error: You may not use the command(s) eval in your code

57   Fail
assert(isequal(tautology('(~A&B&0)'),false));

Error: You may not use the command(s) eval in your code

58   Fail
assert(isequal(tautology('(~A|0)|~B&~A'),false));

Error: You may not use the command(s) eval in your code

59   Fail
assert(isequal(tautology('(~A|1)|1'),true));

Error: You may not use the command(s) eval in your code

60   Fail
assert(isequal(tautology('(~A|B&B)'),false));

Error: You may not use the command(s) eval in your code

61   Fail
assert(isequal(tautology('(~A|B)|~B'),true));

Error: You may not use the command(s) eval in your code

62   Fail
assert(isequal(tautology('(~A|~A)|0'),false));

Error: You may not use the command(s) eval in your code

63   Fail
assert(isequal(tautology('(~B&0)&1|1'),true));

Error: You may not use the command(s) eval in your code

64   Fail
assert(isequal(tautology('1&B|~B|0'),true));

Error: You may not use the command(s) eval in your code

65   Fail
assert(isequal(tautology('B&1&A&1'),false));

Error: You may not use the command(s) eval in your code

66   Fail
assert(isequal(tautology('~A&0&1|1'),true));

Error: You may not use the command(s) eval in your code

67   Fail
assert(isequal(tautology('~B&0&~A|B'),false));

Error: You may not use the command(s) eval in your code

68   Fail
assert(isequal(tautology('~B|1|1|~B'),true));

Error: You may not use the command(s) eval in your code

69   Fail
assert(isequal(tautology('~B|~B&1|1'),true));

Error: You may not use the command(s) eval in your code

70   Fail
assert(isequal(tautology('A==~A'),false));

Error: You may not use the command(s) eval in your code

Suggested Problems

More from this Author47