Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Verify all of the logical equivalences in the table on page 19(table below) using the Python function equiv defined in the text. Table from page
Verify all of the logical equivalences in the table on page 19(table below) using the Python function equiv defined in the text.
Table from page 19:
Thank You!!
Table 2.2. Logical Equivalences. Identities PAT=p pvF=p Domination Laws pvT=T p^ F= F Idempotent Laws PvP =P PAP=P Double Negation -(-p) =p Associative Laws (pvq) vr = pv (vr) ( pa) Ar=p^ (qar) Distributive Laws pv (p^q) = (p v q) ^ (p v g) PA (p v q) = (p ^ q) v (p^a) Absorption Laws pv (p ^ q) =p PA (pvq) =p import itertools, inspect def TruthTableResult (f): result=[] for combination in itertools.product ([True, False], \ repeat=len (inspect.signature (f).parameters) ): result.append(f(*combination)) return (result) def equiv(f, g): return (TruthTableResult (f) ==TruthTableResult (g)) Table 2.2. Logical Equivalences. Identities PAT=p pvF=p Domination Laws pvT=T p^ F= F Idempotent Laws PvP =P PAP=P Double Negation -(-p) =p Associative Laws (pvq) vr = pv (vr) ( pa) Ar=p^ (qar) Distributive Laws pv (p^q) = (p v q) ^ (p v g) PA (p v q) = (p ^ q) v (p^a) Absorption Laws pv (p ^ q) =p PA (pvq) =p import itertools, inspect def TruthTableResult (f): result=[] for combination in itertools.product ([True, False], \ repeat=len (inspect.signature (f).parameters) ): result.append(f(*combination)) return (result) def equiv(f, g): return (TruthTableResult (f) ==TruthTableResult (g))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