Define a set of boolean formulas by: For each i N, the variable x; F. If...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Define a set of boolean formulas by: For each i N, the "variable" x; F. If pe F then (-p) EF. If p, q E F then (p^q) EF and (pv q) EF. Nothing else is in F. Define T,N: F F by: . For each i EN, T(x;) = x; and N(x) = x;. If p E F then T((-p)) = N(p) and N((-p)) = T(p). If p, q E F then - T((p ^q)) = (T(p) ^ T(q)) - N((p ^q)) = (N(p) v N(q)) - T((pv q)) = (T(p) V T(q)) - N((p V q)) = (N(p) ^ N(q)) (a) Prove that for each p = F, T(p) is logically equivalent to p and has negation only on variables. Do that by Structural Induction on the definition of F, after first strengthening the claim to include a claim about function N. (b) Write a recursive Python function to compute T, but without writing any helper functions (in particular, don't define N). Use the following representation for boolean formulas: If x; is a variable the string "x_i" represents it, e.g., 'x_236' represents X236. If p and q represent boolean formulas then so does the 2-tuple ('', p) and so do the 3-tuples (p. 'A', q) and (p, 'V', q). State a natural-number measure of size for formulas, so that your recursive calls are always on formulas of smaller size, and put a comment before each recursive call explaining why it is on a formula of smaller size. Define a set of boolean formulas by: For each i N, the "variable" x; F. If pe F then (-p) EF. If p, q E F then (p^q) EF and (pv q) EF. Nothing else is in F. Define T,N: F F by: . For each i EN, T(x;) = x; and N(x) = x;. If p E F then T((-p)) = N(p) and N((-p)) = T(p). If p, q E F then - T((p ^q)) = (T(p) ^ T(q)) - N((p ^q)) = (N(p) v N(q)) - T((pv q)) = (T(p) V T(q)) - N((p V q)) = (N(p) ^ N(q)) (a) Prove that for each p = F, T(p) is logically equivalent to p and has negation only on variables. Do that by Structural Induction on the definition of F, after first strengthening the claim to include a claim about function N. (b) Write a recursive Python function to compute T, but without writing any helper functions (in particular, don't define N). Use the following representation for boolean formulas: If x; is a variable the string "x_i" represents it, e.g., 'x_236' represents X236. If p and q represent boolean formulas then so does the 2-tuple ('', p) and so do the 3-tuples (p. 'A', q) and (p, 'V', q). State a natural-number measure of size for formulas, so that your recursive calls are always on formulas of smaller size, and put a comment before each recursive call explaining why it is on a formula of smaller size.
Expert Answer:
Answer rating: 100% (QA)
a To prove that for each p F Tp is logically equivalent to p and has negation only on variables we will use structural induction on the definition of ... View the full answer
Related Book For
Algebra Graduate Texts In Mathematics 73
ISBN: 9780387905181
8th Edition
Authors: Thomas W. Hungerford
Posted Date:
Students also viewed these programming questions
-
168. is responsible for graft rejection : (1) Antibody mediated immunity (2) Cell mediated immunity (3) Innate immunity (4) Herd immunity
-
The following set of questions relates to using Poisson regression methods to analyze data from an in vitro study of human chromosome damage. In this study, using Poisson regression is appropriate...
-
Formularium Management III Kevin Denis June 18, 2014 Use at own risk. Part I Inventory Control 1 Known demand (p198) 1.1 Basic EOQ model (p210) Assumptions: 1. Demand is xed at units per unit time....
-
Runnals National Bank has experienced the following trends over the past five years (all figures in millions of dollars): Input Area: 1 2 3 4 5 Net Income (after tax) 2.65 2.75 3.25 3.65 4.00 Total...
-
Two identical cylinders at the same temperature each contain the same kind of gas and the same number of moles of gas. If the volume of cylinder A is three times greater than the volume of cylinder...
-
The facts of the case are straightforward. A shop floor dispute at an automobile parts manufacturing plant in Hamilton, Iowa, ended with one worker killing another. At about 2:00 p.m., police...
-
With reference to the preceding exercise, find the corresponding distribution function, and use it to determine the probabilities that a random variable having the distribution function will take on...
-
Best Vision is revamping its assembly lines to improve efficiency. As shown below, there are 10 steps to assembling a television set. a. If Best needs to produce 120 televisions in a 40-hour work...
-
Blue Spruce Company manufactures and sells two products. Relevant per-unit data concerning each product follow: Product Basic Deluxe Selling price $44.00 $56.00 Variable costs $22.00 $29.40 Machine...
-
As the in-charge senior auditor on the audit engagement for JA Tire Manufacturing for the year ended December 31, 2019, you are responsible for performing risk assessment procedures related to the...
-
The income statement and balance sheet are powerful tools that provide essential information about a company's financial performance. profitability, liquidity, and overall financial strength. While...
-
Where is the cash paid during the year to satisfy a company s debt found?
-
A. Calculate the ending balance for each account. (The area shaded in yellow) B. Create the income statement. C. Create the statement of owner's equity. D. Create the balance sheet. Cash Assets...
-
Explain which one or two sociological theory(ies) (functionalism, conflict theory, and symbolic interactionism) best describes view of education? 1. explain why in comparison to the other theory that...
-
A supply chain failure is defined as an interruption caused by external or internal operations that may have significant impact on an organisation's quality, delivery or cost impact to clients. In...
-
assume that the company's income to be $2000 in the coming year and to grow at the rate of 5% in every subsequent year into infinity. Also, assume that the company's common equity as of the end of...
-
For the following reaction, show the product of one mole of reagent adding across the triple bond, and then show the product of a second mole of reagent. one mole of reagent H Br, second mole of...
-
Refrigerant R-12 at 30C, 0.75 MPa enters a steady flow device and exits at 30C, 100 kPa. Assume the process is isothermal and reversible. Find the change in availability of the refrigerant.
-
Let char K = p 0 and let u be transcendental over K. Suppose F is generated over K by {u,v 1 ,v 2 , ... } , where v i is a root of x pi - u K(u)[x] for i = 1,2, .... Then F is separable over K, but...
-
Show that the ring R consisting of all rational numbers with denominators not divisible by some (fixed) prime p is a local ring.
-
If N G and N, G/ N are both p-groups, then G is a p-group.
-
A mixture of benzene and monochlorobenzene is to be separated into almost pure products by distillation. Determine an appropriate operating pressure at the top of the tower.
-
The feed to a distillation tower consists of \(14.3 \mathrm{kmol} / \mathrm{hr}\) of methanol, \(105.3 \mathrm{kmol} / \mathrm{hr}\) of toluene, \(136.2 \mathrm{kmol} / \mathrm{hr}\) of ethylbenzene,...
-
In a reboiled absorber, operating as a deethanizer at 400 psia to separate a light hydrocarbon feed, conditions at the bottom tray are: Liquid Phase Molar flow = 1, \(366 \mathrm{lbmol} /...
Study smarter with the SolutionInn App