Answered step by step
Verified Expert Solution
Question
1 Approved Answer
%Program truth.m % Construct the truth table for proposition(s) in propos.m clear format compact global num propos(-1); tot=2^num; separt=888; disp(' Basic variables 888 Proposition value(s)')
%Program truth.m % Construct the truth table for proposition(s) in propos.m clear format compact global num propos(-1); tot=2^num; separt=888; disp(' Basic variables 888 Proposition value(s)') for i=1:tot q=i-1; for j=1:num r=rem(q,2); p(num+1-j)=r; q=(q-r)/2; end prop=propos(p); disp([p separt prop]) end %propos function prop=propos(p) global num if p<0 num=3 else prop(1)=~p(1) | p(3); prop(2)=~(~p(1) p(3)); prop(3) =p(2)&~(~p(1) end
2. Write out by hand the truth tables for the following compound propositions. Decide which are tautologies, contradictions or neither. Verify your answers (showing your reasoning) using the MATLAB programtruth.m with func tion propos .m given in Section 7.3 of the Unit Notes (and also available on the LMS). 2. Write out by hand the truth tables for the following compound propositions. Decide which are tautologies, contradictions or neither. Verify your answers (showing your reasoning) using the MATLAB programtruth.m with func tion propos .m given in Section 7.3 of the Unit Notes (and also available on the LMS)Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started