Write the boolean formula for the constraints

Assignment Help Mathematics
Reference no: EM13969676

Problem 1: Mathematical Background: Set Theory

1. Let A = {1,2,3}, B = {∅,{1},{2}}, and C = {1,2,{1,2}}. Compute A ∪ B, A ∩ B, B ∩ C, A ∩ C, A × B,

A × C, C \ B, A × B × C, and 2B. Recall that 2A denotes the power set of A, and A \ B denotes A set difference B.

2. Prove that for any sets A, B, and C, A × (B ∪ C) = (A × B) ∪ (A × C).

Problem 2 Mathematical Background: Proofs and Induction

1. Prove Pythagorean Theorem, which states that the square of hypotenuse is equal to the sum of squares of the other two sides.

2. Prove by contradiction that there are infinitely many prime numbers.

3. Suppose that a post office sells only 2¢ and 3¢ stamps. Show that any postage of 2¢, or over, can be paid for only using these stamps.

Problem 3 Propositional Logic

1. Prove that the following semanic entailments are true by using truth tables.
• (p → q) → r,s → ¬p,t,¬s,t → q |= r
• ∅ |= q → (p → (p → (q → p)))

2. Prove the following inferences in propositional logic using natural deduction proof rules.
• (p → q) → r,s → ¬p,t,¬s,t → q ` r
• `q → (p → (p → (q → p)))

Problem 4 [Complexity of Some Problems in Propositional Logic]

Two of the commonly used normal forms for formulas in propositional logic is Conjunctive Normal Form (CNF) and Disjuctive Normal Form (DNF). A formula φ is said to be in k-CNF form if it is a conjuction of subformulas, i.e., φ = ψ1∧ψ2∧ψl where, each ψi is a disjuction of k literals, i.e., ψi = p1∨p2 ∨...∨pk. A formula ξ is said to be in k-DNF if it is a disjunction of subformulas, i.e, ξ = η1∨η2 ∨...∨ηl where, each ηi is a conjunction of k literals, i.e., ηi = p1 ∧ p2 ∧...∧pk. Here, pi can be a propositional variable or its negation. Now prove the following complexity theoretical problems over propositional logic.

1. Given a k-DNF formula, prove that its satisfiability can be decided in polynomial time.

2. Given a k-CNF formula, prove that to decide whether the given formula is a tautologycan be decided in polynomial time.

3. Given a 2-CNF formula, prove that its satisfiability can be decided in polynomial time.

Problem 5 [Solving Sudoku Using SAT Solvers] Sudoku is a popular number-placement puzzle that originated in France in the end of the 19th century. Modern Sudoku was likely invented by Howard Garns from Connersville, Indiana and was first published in 1979 under the name Number Place. The objective of the puzzle is to place numbers 19 on a 9×9 grid, such that each number occurs only once in every row, every column, and every of the nine 3×3 subgrids that compose the main grid. Sudoku puzzles are grids that have been partially occupied with numbers. The task is then to occupy the remaining fields in such a way that the constraints on rows, columns, and sub-grids are satisfied. A sample Sudoku problem and its solution are given in Figure 1. For more information about Sudoku refer to its Wikipedia page at https://en.wikipedia.org/wiki/Sudoku.

In this problem, you will use one of the SAT Solvers Z3 (downloadable at https://z3. codeplex.com/ and use Python API) or use MiniSAT (downloadable at https://minisat.se/ with C++ API) to solve the sudoku problem given in Figure 1. Alternatively, you can also you use any other SAT solver of your preference. In this problem, you will do the following:

1. Write the boolean formula for the constraints that each number can occur at most oncein every row.

2. Write the boolean formula for the constraints that each number can occur at most oncein every column.

3. Write the boolean formula for the constraints that each number can occur at most oncein every 3×3 sub-grid.

Encode each of the above mentioned constraints using the API for the solver that you chose. Finally, encode the constraints which specify the numbers provided in the partially filled puzzle.

2272_Sudoku puzzle.png

Figure 1: Sudoku puzzle for Problem 5.

Reference no: EM13969676

Questions Cloud

Identify social family or other non-system barriers : Identify health care system barriers to achieving the seamless continuum. Identify social, family or other "non-system" barriers. Propose ways in which community organizations or the government might assist in overcoming the barriers you have ident..
Define the formal groupings within an organization : Organizational structures define the formal groupings within an organization and these groupings have cultures that are defined in part by their structure and in part be the values expoused by their leaders.
Recognise a strategic knowledge management : i) Define in one sentence, how would you recognise a Strategic Knowledge Management (SKM) story within the press or media? ii) What 5 features or dimensions must be considered to identify an SKM story?
How do we withhold or withdraw life-sustaining therapy : From your review of the literature, briefly describe three (3) circumstances in which you believe physician-assisted suicide would be appropriate, and write a one-paragraph justification for your position
Write the boolean formula for the constraints : Prove Pythagorean Theorem, which states that the square of hypotenuse is equal to the sum of squares of the other two sides and prove by contradiction that there are infinitely many prime numbers.
Review the employee selection procedures : Do you believe that this is a fair test? Why or why not? If you are asked to review the employee selection procedures, would you make any changes to this system? Why or why not?
Should barry complain about his treatment : Should Barry complain about his treatment? To whom? If he did complain, what power tactics should Barry use? Studies have shown that those prone to complaining tend to have less power in an organization. Do you think complaining leads to diminished ..
Create a code of conduct suitable for the rider hotel : Create a Code of Conduct suitable for the Rider Hotel. Ensure Personal behavior is consistent ethical and reflects values of the organization.
What are the advantages for a donor of participating : What are the advantages for a donor of participating in a venture philanthropy organization versus traditional philanthropy

Reviews

Write a Review

Mathematics Questions & Answers

  What is the probability that destiny draws an ace

Destiny shows her friend Kaitlyn a deck of cards. Assuming the cards are randomly distributed, what is the probability that Destiny draws an ace and does not replace it, and then draws another ace?

  What is the probability of a randomly selected student

If 309 students was enrolled in a weekend and evening program, or a regional center with 6,633 students what is the probability of a randomly selected student attended a regional center or the weekend and evening program?

  What is the average monthly sales

When the price for a color television is 260 dollars , the average monthly sales for this item at a department store is 480 . For each 10 dollar increase in price, the average monthly sales fall by 30 units. What is the average monthly sales if th..

  What is the probability that all graduate

In a report on high school graduation, it was stated that 85% of high school student graduate. Suppose 3 high school students are randomly selected from different schools. What is the probability that all graduate?

  Standard error and standard error

The standard error of the estimate (standard error) is the estimated standard error of the distribution of the independent variable (X).

  Prove de morgan''s laws for sets

Prove De Morgan's laws for sets by using set theory arguments

  Find probability that a randomly selected junior

Probability that a randomly selected junior prefers meat toppings. Find the indicated probability. The table shows the number of college students who prefer a given pizza topping.

  How long is the part of the pole driven in the ground

a pole is driven into the ground so that 7/8 of the pole is above the ground. If the pole is 6m. long. How long is the part of the pole driven in the ground?

  Find the width of the outside of the picture frame

The outside of a picture frame has a lenght of 3 cm more than width. The area enclosed by the outside of the picture frame is 154 square cm. Find the width of the outside of the picture frame.

  Determine the dimensions of largest possible area of a

determine the dimensions of largest possible area of a rectangular garden.arectangular garden is bounded on one side by

  Determine what the first equation should be

How does the author determine what the first equation should be? What about the second equation? How are these examples similar? How are they different?

  Calculate the probability

Calculate the probability that the rent of a randomly selected unit.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd