CS 512, Spring 2017: Take-Home End-of-Term Examination
|
|
- Harriet Lee
- 5 years ago
- Views:
Transcription
1 CS 512, Spring 2017: Take-Home End-of-Term Examination Out: Tuesday, 9 May 2017, 12:00 noon Due: Wednesday, 10 May 2017, by 11:59 am Turn in your solutions electronically, as a single PDF file, by placing it in the subfolder End-of-Term Exam of the Dropbox folder CS512-Assignments The solution scribe and grader for the End-of-Term Exam is: Assaf Kfoury (kfoury@bu.edu). The parts shaded in light blue are the questions you have to solve. Problem 1 In this problem, every WFF ϕ is a propositional WFF in CNF: ϕ C 1 C n where n 1 and every clause C i is a disjunction of finitely many literals. All literals are propositional variables or negated propositional variables in the set X {x 1,..., x p } for some p 1. We assume that every clause C i contains at least one literal. Relative to a propositional WFF ϕ as defined above, two optimization versions of the SAT problem are: 1 MaxSAT: Determine a truth assignment σ that maximizes the size of a subset C {C 1,..., C n } such that σ simultaneously satisfies C and falsifies {C 1,..., C n } C. MinSAT: Determine a truth assignment σ that minimizes the size of a subset C {C 1,..., C n } such that σ simultaneously satisfies C and falsifies {C 1,..., C n } C. These two problems are often restricted by the size k 1 of the clauses in ϕ: The restrictions k-maxsat and k-minsat result from requiring that each clause C i has at most k literals. Example. The following α is a propositional WFF in CNF, over the variables {x 1, x 2, x 3 }, with 5 clauses: α ( x 1 ) ( x }{{} 1 x 2 ) ( x }{{} 2 ) (x }{{} 3 ) (x }{{} 1 ) }{{} C 1 C 2 C 3 C 4 Because the clauses in α have each at most 2 literals, α can be an input instance for 2-MaxSAT and 2-MinSAT. Below is a list of all possible solutions for the two problems: Only one possible solution for 2-MaxSAT: false if x = x 1, σ 1 (x) false if x = x 2, true if x = x 3, which simultaneously satisfies the clauses {C 1, C 2, C 3, C 4 } and falsifies {C 5 }. It is not possible to simultaneously satisfy all of the 5 clauses. 1 We give here the simplest formulations of these two problems. In the literature, you will find formulations that are more involved, which qualify these problems as partial and/or weighted. C 5 1
2 Three possible solutions for 2-MinSAT: true if x = x 1, σ 2,1 (x) false if x = x 2, false if x = x 3, false if x = x 1, σ 2,2 (x) true if x = x 2, false if x = x 3. true if x = x 1, σ 2,3 (x) true if x = x 2, false if x = x 3. σ 2,1 simultaneously satisfies {C 3, C 5 } and falsifies {C 1, C 2, C 4 }; σ 2,2 simultaneously satisfies {C 1, C 2 } and falsifies {C 3, C 4, C 5 }; and σ 2,3 simultaneously satisfies {C 2, C 5 } and falsifies {C 1, C 3, C 4 }. There is no truth assignment σ which satisfies less than two clauses in {C 1, C 2, C 3, C 4, C 5 } and falsifies the remaining clauses. For another example, try on your own α C 1 C 2 C 3 C 4 C 5 where C 5 = x 1 (i.e., C 5 is the same as C 1 ). For α, you should find that it is possible to simultaneously satisfy all the clauses in {C 1, C 2, C 3, C 4, C 5 } and falsify none, for a solution of 2-MaxSAT; and you should find that it is possible to simultaneously satisfy exactly one clause in {C 1, C 2, C 3, C 4, C 5 } and falsify the remaining four, for a solution of 2-MinSAT In all parts below you can assume that, together with a propositional WFF ϕ, the input includes two numbers: n (the number of clauses in ϕ) and p (the number of variables in ϕ). Keep in mind that SAT is a decision problem, whereas MaxSAT and MinSAT are optimization problems. In parts (a) and (b), the requested algorithms must be efficient in the sense that they produce an optimal solution by scanning an input ϕ only once (from left to right). (a) Define precisely (in plain English) the steps of an efficient algorithm for 1-MaxSAT. Hint: Compare the number of occurrencs of the literal x i and the number of occurrences of the literal x i in ϕ. (b) Define precisely (in plain English) the steps of an efficient algorithm for 1-MinSAT. Hint: Do part (a) before part (b). (c) Suppose you are given an efficient algorithm A MaxSAT for the MaxSAT problem. Define precisely (in plain English) the steps of an efficient algorithm for SAT that uses A MaxSAT. 2 For part (d) we need a few preliminary notions. Every truth assignment σ : X {true, false} induces a two-block partition of the clauses {C 1,..., C n } of a propositional WFF ϕ C 1 C n in CNF: the block of true clauses w.r.t. σ, which is defined by block(ϕ, σ, true) { C i σ(c i ) = true }, the block of false clauses w.r.t. σ, which is defined by block(ϕ, σ, false) { C j σ(c j ) = false }. 2 If you took a course on algorithms or computational complexity, part (c) asserts that: SAT is reducible to MaxSAT. 2
3 We write block(ϕ, σ, true) and block(ϕ, σ, false) to denote the number of clauses in block(ϕ, σ, true) and block(ϕ, σ, false), respectively. The two-block partition of {C 1,..., C n } w.r.t. σ is defined by: partition(ϕ, σ) ( block(ϕ, σ, true), block(ϕ, σ, false) ) and its index is a pair of natural numbers defined by: ( index partition(ϕ, σ) ) ( ) block(ϕ, σ, true), block(ϕ, σ, false) We allow one of the two blocks in partition(ϕ, σ) to be the empty set. Given two pairs of natural numbers (a 1, b 1 ) and (a 2, b 2 ), we write (a 1, b 1 ) (a 2, b 2 ) iff: a 1 < a 2 or (a 1 = a 2 and b 1 b 2 ) which is the usual lexicographic ordering of pairs of numbers. Below we define an algorithm call it A 2-MinSAT to solve 2-MinSAT when the input ϕ C 1 C n satisfies three restrictions: (i) Every variable in X {x 1,..., x p } appears in ϕ. (ii) There are no pure literals in ϕ, i.e., for every variable x j X, it must be that both the literal x j and the literal x j appear in ϕ. (iii) If a clause C i is a disjunction of two literals, say C i (l i l i ), then there is no x j X such that {l i, l i } = {x j, x j }. In the example above, α satisfies (i) and (iii) but not (ii), because variable x 3 appears as a pure literal in α. Algorithm A 2-MinSAT is defined as follows: A 2-MinSAT 1. input: ϕ C 1 C n over variables X {x 1,..., x p } satisfying {(i), (ii), (iii)}. 2. Enumerate all the truth assignments σ : X {true, false} in some fixed order. There are 2 p such assignments, which we denote σ 1,..., σ 2 p. 3. Compute (q, r) := min { index ( partition(ϕ, σ i ) ) 1 i 2 p }. 4. σ := the first assignment σ i in the list σ 1,..., σ 2 p such that index ( partition(ϕ, σ i ) ) = (q, r). 5. output: σ. (d) Assume that A 2-MinSAT is correct (you are not asked to prove its correctness, though it is useful that you understand why A 2-MinSAT is correct before you answer this question). (e) 1. If the input ϕ does not satisfy (ii) or (iii) or both, does A 2-MinSAT still return a correct output? If yes, give a reason. If no, give a counter-example. 2. Propose adjustments in A 2-MinSAT so that the resulting algorithm A 2-MinSAT is more efficient. Hint: Your proposed adjustments need not be more than two or three new instructions in A 2-MinSAT. 3 Identify two real-world applications of formal modeling, one for MaxSAT and one for MinSAT. Hint: You can identify your own real-world applications, if you want, but it is much easier to search the Web and give a good answer for part (e) in at most 3-5 lines. You need to give the URL of an appropriate website and/or a reference to an appropriate article for each of your two applications. 3 As now written, A 2-MinSAT runs in time exponential in the size of the input ϕ in the worst case. 2-MinSAT is known to be an NP-hard problem. Hence, there is not much hope in reducing this time complexity of A 2-MinSAT down to polynomial time. Nevertheless, there are adjustments that will make it more efficient. 3
4 Problem 2 This is a problem about first-order modeling. Let ϕ be an arbitrary first-order sentence over some signature Σ. If M is a Σ-structure with a single domain/universe M, then we write M to denote the cardinality of M. The spectrum(ϕ) is the set of cardinalities of finite Σ-structures satisfying ϕ: spectrum(ϕ) { n N n = M for some Σ-structure M s.t. M = ϕ } Important note: spectrum(ϕ) excludes the cardinalities of infinite Σ-structures satisfying ϕ. (a) (b) Write a first-order sentence ϕ even such that spectrum(ϕ even ) is the set of all even positive integers. Hint: You can choose the signature of ϕ even in any way that will simplify your task. Write a first-order sentence ϕ odd such that spectrum(ϕ odd ) is the set of all odd positive integers. Hint: You will find it easier to start with part (a) before attempting this part (b). In the rest of this problem, we assume the signature Σ contains only binary relation symbols. You can use. an additional binary relation symbol =, which is implicitly in Σ and always interpreted as equality. If Σ contains only one binary relation symbol R, then Σ is the signature of structures that are graphs G = (V, E). In such a graph G, V is the domain (its vertices) and E V V is the binary predicate describing its edges. (c) Let ϕ be a first-order sentence over signature Σ = {R}, the signature of graphs. Is there an algorithm to decide whether an arbitrary n N is in spectrum(ϕ)? If yes, define precisely (in plain English) the steps of the requested algorithm. If no, define precisely (in plain English) a counter-example showing that there cannot be any such algorithm. (d) Let ϕ 1 and ϕ 2 be two first-order sentences over signature Σ = {R}, and let S 1 = spectrum(ϕ 1 ) and S 2 = spectrum(ϕ 2 ). If A, B N, we define A + B as the set { m + n m A and n B }. 1. Show there is a first-order sentence ψ 1 such that S 1 S 2 = spectrum(ψ 1 ). 2. Show there is a first-order sentence ψ 2 such that S 1 S 2 = spectrum(ψ 2 ). 3. Show there is a first-order sentence ψ 3 such that S 1 + S 2 = spectrum(ψ 3 ). Hint: The signature of the sentences ψ i may contain other binary relation symbols besides R (and, implicitly,. =). If G = (V, E) is an undirected graph, then (a, b) E iff (b, a) E for all distinct vertices a and b, and, by convention, (a, a) E (there are no self-loops). (e) Look up the definition of bipartite undirected graph from the Web (or any textbook on graphs). Write an infinite set Γ bipartite of first-order sentences such that, for every undirected graph G, it holds that G = Γ bipartite iff G is bipartite. Hint: G is bipartite iff every cycle in G (possibly with repeated vertices) has even length. 4
5 Problem 3 This problem is based on Handout 34 entitled, Program Schemes and First-Order Logic. Both the program P (on page 4 of Handout 34) and the corresponding program scheme S (on page 5) mention a precondition. In P, the precondition is x > 0 and y > 0 (not in the syntax of first-order logic, although precisely stated) which becomes, in S, the precondition R (x, c ) R (y, c ) (in the syntax of first-order logic). (a) What is missing from the specification of P and S are postconditions. An appropriate postcondition for program P is: n is the greatest common divisor of x and y. Write the corresponding postcondition for program scheme S over signature Σ = {R, lo, hi, f, c } with n, x, and y as free variables. The postcondition for S is a first-order WFF, possibly involving quantifiers, which is interpreted in the Σ-structure (N, <, min, max, mod, 0) with <, min, max, mod, and 0, being the interpretations of R, lo, hi, f, and c, respectively. Although. = is not explicitly mentioned in Σ, you can include it as a binary predicate symbol (in infix position) always interpreted as equality. (b) Do the exercise on page 18 of Handout 34. Hint: Read and understand pages in the handout before attempting this exercise. The following is a variation on the definition of what it means for a set Φ of first-order WFF s to enforce totality of a program scheme (page 15 in Handout 34). Let S be a program scheme over the signature Σ and whose input variables are X = {x 1,..., x m }. Let C be a class of Σ-structures. Let Φ {ϕ 1, ϕ 2,...} be a set (possibly infinite) of first-order WFF s over signature Σ with FV(ϕ i ) {x 1,..., x m } for every i 1. We say that Φ enforces quasi-totality of program scheme S in the class C iff: there is finite set of k 1 execution paths {π 1,..., π k } in S such that, for every M C and every m-tuple a (a 1,..., a m ) from the domains of M, if (M, a) = Φ and S M ( a) converges, then execution of S M ( a) follows a path in {π 1,..., π k }. Intuitively, even though Paths(S) is an infinite set (if S is not trivial and therefore contains loops), all inputs (M, a) satisfying the conditions expressed by Φ will use only a finite number k of execution paths. What it means for a program scheme S to unwind in the class C is defined in Handout 34 (page 19). (c) Let S and Φ as in the preceding paragraph, and let C { M M = Φ }. Prove the assertion: Φ enforces quasi-totality of S in the class C iff S unwinds in the class C. Hint 1: This assertion is a double implication, which is therefore a stronger assertion than the single implication in Theorem 3 in Handout 34. Hint 2: Please do not fudge! Skip this part if you do not see your way through clearly. You can earn enough points from all other parts in this exam to do well. 5
Where Can We Draw The Line?
Where Can We Draw The Line? On the Hardness of Satisfiability Problems Complexity 1 Introduction Objectives: To show variants of SAT and check if they are NP-hard Overview: Known results 2SAT Max2SAT Complexity
More informationLinear Time Unit Propagation, Horn-SAT and 2-SAT
Notes on Satisfiability-Based Problem Solving Linear Time Unit Propagation, Horn-SAT and 2-SAT David Mitchell mitchell@cs.sfu.ca September 25, 2013 This is a preliminary draft of these notes. Please do
More information8.1 Polynomial-Time Reductions
8.1 Polynomial-Time Reductions Classify Problems According to Computational Requirements Q. Which problems will we be able to solve in practice? A working definition. Those with polynomial-time algorithms.
More information1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time:
1. Suppose you are given a magic black box that somehow answers the following decision problem in polynomial time: Input: A CNF formula ϕ with n variables x 1, x 2,..., x n. Output: True if there is an
More information8 NP-complete problem Hard problems: demo
Ch8 NPC Millennium Prize Problems http://en.wikipedia.org/wiki/millennium_prize_problems 8 NP-complete problem Hard problems: demo NP-hard (Non-deterministic Polynomial-time hard), in computational complexity
More informationIntroduction to Sets and Logic (MATH 1190)
Introduction to Sets and Logic () Instructor: Email: shenlili@yorku.ca Department of Mathematics and Statistics York University Dec 4, 2014 Outline 1 2 3 4 Definition A relation R from a set A to a set
More informationNP-Hardness. We start by defining types of problem, and then move on to defining the polynomial-time reductions.
CS 787: Advanced Algorithms NP-Hardness Instructor: Dieter van Melkebeek We review the concept of polynomial-time reductions, define various classes of problems including NP-complete, and show that 3-SAT
More informationThe Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT
The Satisfiability Problem [HMU06,Chp.10b] Satisfiability (SAT) Problem Cook s Theorem: An NP-Complete Problem Restricted SAT: CSAT, k-sat, 3SAT 1 Satisfiability (SAT) Problem 2 Boolean Expressions Boolean,
More informationNP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT
NP-Completeness of 3SAT, 1-IN-3SAT and MAX 2SAT 3SAT The 3SAT problem is the following. INSTANCE : Given a boolean expression E in conjunctive normal form (CNF) that is the conjunction of clauses, each
More informationNP and computational intractability. Kleinberg and Tardos, chapter 8
NP and computational intractability Kleinberg and Tardos, chapter 8 1 Major Transition So far we have studied certain algorithmic patterns Greedy, Divide and conquer, Dynamic programming to develop efficient
More informationReductions and Satisfiability
Reductions and Satisfiability 1 Polynomial-Time Reductions reformulating problems reformulating a problem in polynomial time independent set and vertex cover reducing vertex cover to set cover 2 The Satisfiability
More informationALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007
ALGORITHMS EXAMINATION Department of Computer Science New York University December 17, 2007 This examination is a three hour exam. All questions carry the same weight. Answer all of the following six questions.
More informationPCP and Hardness of Approximation
PCP and Hardness of Approximation January 30, 2009 Our goal herein is to define and prove basic concepts regarding hardness of approximation. We will state but obviously not prove a PCP theorem as a starting
More informationCSC 501 Semantics of Programming Languages
CSC 501 Semantics of Programming Languages Subtitle: An Introduction to Formal Methods. Instructor: Dr. Lutz Hamel Email: hamel@cs.uri.edu Office: Tyler, Rm 251 Books There are no required books in this
More informationThe Resolution Algorithm
The Resolution Algorithm Introduction In this lecture we introduce the Resolution algorithm for solving instances of the NP-complete CNF- SAT decision problem. Although the algorithm does not run in polynomial
More informationGreedy Algorithms 1. For large values of d, brute force search is not feasible because there are 2 d
Greedy Algorithms 1 Simple Knapsack Problem Greedy Algorithms form an important class of algorithmic techniques. We illustrate the idea by applying it to a simplified version of the Knapsack Problem. Informally,
More informationCSC Discrete Math I, Spring Sets
CSC 125 - Discrete Math I, Spring 2017 Sets Sets A set is well-defined, unordered collection of objects The objects in a set are called the elements, or members, of the set A set is said to contain its
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Spring 2005 Clancy/Wagner Notes 7 This lecture returns to the topic of propositional logic. Whereas in Lecture Notes 1 we studied this topic as a way of understanding
More informationExam in Algorithms & Data Structures 3 (1DL481)
Exam in Algorithms & Data Structures 3 (1DL481) Prepared by Pierre Flener Tuesday 15 March 2016 from 08:00 to 13:00, in Polacksbacken Materials: This is a closed-book exam, drawing from the book Introduction
More information8 Matroid Intersection
8 Matroid Intersection 8.1 Definition and examples 8.2 Matroid Intersection Algorithm 8.1 Definitions Given two matroids M 1 = (X, I 1 ) and M 2 = (X, I 2 ) on the same set X, their intersection is M 1
More informationChapter 10 Part 1: Reduction
//06 Polynomial-Time Reduction Suppose we could solve Y in polynomial-time. What else could we solve in polynomial time? don't confuse with reduces from Chapter 0 Part : Reduction Reduction. Problem X
More informationCSE 20 DISCRETE MATH. Fall
CSE 20 DISCRETE MATH Fall 2017 http://cseweb.ucsd.edu/classes/fa17/cse20-ab/ Final exam The final exam is Saturday December 16 11:30am-2:30pm. Lecture A will take the exam in Lecture B will take the exam
More informationReductions. Linear Time Reductions. Desiderata. Reduction. Desiderata. Classify problems according to their computational requirements.
Desiderata Reductions Desiderata. Classify problems according to their computational requirements. Frustrating news. Huge number of fundamental problems have defied classification for decades. Desiderata'.
More informationDiscrete Mathematics Lecture 4. Harper Langston New York University
Discrete Mathematics Lecture 4 Harper Langston New York University Sequences Sequence is a set of (usually infinite number of) ordered elements: a 1, a 2,, a n, Each individual element a k is called a
More informationLECTURE 8: SETS. Software Engineering Mike Wooldridge
LECTURE 8: SETS Mike Wooldridge 1 What is a Set? The concept of a set is used throughout mathematics; its formal definition matches closely our intuitive understanding of the word. Definition: A set is
More informationChapter 8. NP and Computational Intractability. Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved.
Chapter 8 NP and Computational Intractability Slides by Kevin Wayne. Copyright 2005 Pearson-Addison Wesley. All rights reserved. 1 Algorithm Design Patterns and Anti-Patterns Algorithm design patterns.
More informationOnline Appendix: A Stackelberg Game Model for Botnet Data Exfiltration
Online Appendix: A Stackelberg Game Model for Botnet Data Exfiltration June 29, 2017 We first provide Lemma 1 showing that the urban security problem presented in (Jain et al. 2011) (see the Related Work
More information/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18
601.433/633 Introduction to Algorithms Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/27/18 22.1 Introduction We spent the last two lectures proving that for certain problems, we can
More informationExercises Computational Complexity
Exercises Computational Complexity March 22, 2017 Exercises marked with a are more difficult. 1 Chapter 7, P and NP Exercise 1. Suppose some pancakes are stacked on a surface such that no two pancakes
More informationCS 3512, Spring Instructor: Doug Dunham. Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010
CS 3512, Spring 2011 Instructor: Doug Dunham Textbook: James L. Hein, Discrete Structures, Logic, and Computability, 3rd Ed. Jones and Barlett, 2010 Prerequisites: Calc I, CS2511 Rough course outline:
More informationIntroduction to Algorithms / Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14
600.363 Introduction to Algorithms / 600.463 Algorithms I Lecturer: Michael Dinitz Topic: Approximation algorithms Date: 11/18/14 23.1 Introduction We spent last week proving that for certain problems,
More informationComputability Theory
CS:4330 Theory of Computation Spring 2018 Computability Theory Other NP-Complete Problems Haniel Barbosa Readings for this lecture Chapter 7 of [Sipser 1996], 3rd edition. Sections 7.4 and 7.5. The 3SAT
More informationSAT-CNF Is N P-complete
SAT-CNF Is N P-complete Rod Howell Kansas State University November 9, 2000 The purpose of this paper is to give a detailed presentation of an N P- completeness proof using the definition of N P given
More informationTo prove something about all Boolean expressions, we will need the following induction principle: Axiom 7.1 (Induction over Boolean expressions):
CS 70 Discrete Mathematics for CS Fall 2003 Wagner Lecture 7 This lecture returns to the topic of propositional logic. Whereas in Lecture 1 we studied this topic as a way of understanding proper reasoning
More information(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer
(QiuXin Hui) 7.2 Given the following, can you prove that the unicorn is mythical? How about magical? Horned? Decide what you think the right answer is yourself, then show how to get the answer using both
More informationGreedy Algorithms 1 {K(S) K(S) C} For large values of d, brute force search is not feasible because there are 2 d {1,..., d}.
Greedy Algorithms 1 Simple Knapsack Problem Greedy Algorithms form an important class of algorithmic techniques. We illustrate the idea by applying it to a simplified version of the Knapsack Problem. Informally,
More information! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.
Algorithm Design Patterns and Anti-Patterns Chapter 8 NP and Computational Intractability Algorithm design patterns. Ex.! Greed. O(n log n) interval scheduling.! Divide-and-conquer. O(n log n) FFT.! Dynamic
More informationFoundations of AI. 9. Predicate Logic. Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution
Foundations of AI 9. Predicate Logic Syntax and Semantics, Normal Forms, Herbrand Expansion, Resolution Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller 09/1 Contents Motivation
More informationComplexity of Disjoint Π-Vertex Deletion for Disconnected Forbidden Subgraphs
Journal of Graph Algorithms and Applications http://jgaa.info/ vol. 18, no. 4, pp. 603 631 (2014) DOI: 10.7155/jgaa.00339 Complexity of Disjoint Π-Vertex Deletion for Disconnected Forbidden Subgraphs Jiong
More informationExample of a Demonstration that a Problem is NP-Complete by reduction from CNF-SAT
20170926 CNF-SAT: CNF-SAT is a problem in NP, defined as follows: Let E be a Boolean expression with m clauses and n literals (literals = variables, possibly negated), in which - each clause contains only
More information(a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are rational they can be written as the ratio of integers a 1
CS 70 Discrete Mathematics for CS Fall 2000 Wagner MT1 Sol Solutions to Midterm 1 1. (16 pts.) Theorems and proofs (a) (4 pts) Prove that if a and b are rational, then ab is rational. Since a and b are
More informationMassachusetts Institute of Technology Department of Electrical Engineering and Computer Science Algorithms For Inference Fall 2014
Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.438 Algorithms For Inference Fall 2014 Recitation-6: Hardness of Inference Contents 1 NP-Hardness Part-II
More informationCh9: Exact Inference: Variable Elimination. Shimi Salant, Barak Sternberg
Ch9: Exact Inference: Variable Elimination Shimi Salant Barak Sternberg Part 1 Reminder introduction (1/3) We saw two ways to represent (finite discrete) distributions via graphical data structures: Bayesian
More informationCSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter p. 1/27
CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer Science (Arkoudas and Musser) Chapter 2.1-2.7 p. 1/27 CSCI.6962/4962 Software Verification Fundamental Proof Methods in Computer
More informationTreewidth and graph minors
Treewidth and graph minors Lectures 9 and 10, December 29, 2011, January 5, 2012 We shall touch upon the theory of Graph Minors by Robertson and Seymour. This theory gives a very general condition under
More informationPropositional Logic. Part I
Part I Propositional Logic 1 Classical Logic and the Material Conditional 1.1 Introduction 1.1.1 The first purpose of this chapter is to review classical propositional logic, including semantic tableaux.
More informationCS264: Homework #4. Due by midnight on Wednesday, October 22, 2014
CS264: Homework #4 Due by midnight on Wednesday, October 22, 2014 Instructions: (1) Form a group of 1-3 students. You should turn in only one write-up for your entire group. (2) Turn in your solutions
More informationIntegrity Constraints (Chapter 7.3) Overview. Bottom-Up. Top-Down. Integrity Constraint. Disjunctive & Negative Knowledge. Proof by Refutation
CSE560 Class 10: 1 c P. Heeman, 2010 Integrity Constraints Overview Disjunctive & Negative Knowledge Resolution Rule Bottom-Up Proof by Refutation Top-Down CSE560 Class 10: 2 c P. Heeman, 2010 Integrity
More informationNP-Complete Reductions 2
x 1 x 1 x 2 x 2 x 3 x 3 x 4 x 4 12 22 32 CS 447 11 13 21 23 31 33 Algorithms NP-Complete Reductions 2 Prof. Gregory Provan Department of Computer Science University College Cork 1 Lecture Outline NP-Complete
More informationComplexity of unique list colorability
Complexity of unique list colorability Dániel Marx 1 Department of Computer Science and Information Theory, Budapest University of Technology and Economics, Budapest H-151, Hungary. Abstract Given a list
More informationNP-Completeness. Algorithms
NP-Completeness Algorithms The NP-Completeness Theory Objective: Identify a class of problems that are hard to solve. Exponential time is hard. Polynomial time is easy. Why: Do not try to find efficient
More informationSafe Stratified Datalog With Integer Order Does not Have Syntax
Safe Stratified Datalog With Integer Order Does not Have Syntax Alexei P. Stolboushkin Department of Mathematics UCLA Los Angeles, CA 90024-1555 aps@math.ucla.edu Michael A. Taitslin Department of Computer
More information9.1 Cook-Levin Theorem
CS787: Advanced Algorithms Scribe: Shijin Kong and David Malec Lecturer: Shuchi Chawla Topic: NP-Completeness, Approximation Algorithms Date: 10/1/2007 As we ve already seen in the preceding lecture, two
More informationPropositional Logic Formal Syntax and Semantics. Computability and Logic
Propositional Logic Formal Syntax and Semantics Computability and Logic Syntax and Semantics Syntax: The study of how expressions are structured (think: grammar) Semantics: The study of the relationship
More information! Greed. O(n log n) interval scheduling. ! Divide-and-conquer. O(n log n) FFT. ! Dynamic programming. O(n 2 ) edit distance.
Algorithm Design Patterns and Anti-Patterns 8. NP and Computational Intractability Algorithm design patterns. Ex.! Greed. O(n log n) interval scheduling.! Divide-and-conquer. O(n log n) FFT.! Dynamic programming.
More informationDiscrete Optimization. Lecture Notes 2
Discrete Optimization. Lecture Notes 2 Disjunctive Constraints Defining variables and formulating linear constraints can be straightforward or more sophisticated, depending on the problem structure. The
More informationCSE 20 DISCRETE MATH. Winter
CSE 20 DISCRETE MATH Winter 2017 http://cseweb.ucsd.edu/classes/wi17/cse20-ab/ Final exam The final exam is Saturday March 18 8am-11am. Lecture A will take the exam in GH 242 Lecture B will take the exam
More informationarxiv: v2 [cs.cc] 29 Mar 2010
On a variant of Monotone NAE-3SAT and the Triangle-Free Cut problem. arxiv:1003.3704v2 [cs.cc] 29 Mar 2010 Peiyush Jain, Microsoft Corporation. June 28, 2018 Abstract In this paper we define a restricted
More informationSolutions for the Exam 6 January 2014
Mastermath and LNMB Course: Discrete Optimization Solutions for the Exam 6 January 2014 Utrecht University, Educatorium, 13:30 16:30 The examination lasts 3 hours. Grading will be done before January 20,
More information1 Elementary number theory
Math 215 - Introduction to Advanced Mathematics Spring 2019 1 Elementary number theory We assume the existence of the natural numbers and the integers N = {1, 2, 3,...} Z = {..., 3, 2, 1, 0, 1, 2, 3,...},
More informationReal Analysis, 2nd Edition, G.B.Folland
Real Analysis, 2nd Edition, G.B.Folland Chapter 4 Point Set Topology Yung-Hsiang Huang 4.1 Topological Spaces 1. If card(x) 2, there is a topology on X that is T 0 but not T 1. 2. If X is an infinite set,
More informationA Simplied NP-complete MAXSAT Problem. Abstract. It is shown that the MAX2SAT problem is NP-complete even if every variable
A Simplied NP-complete MAXSAT Problem Venkatesh Raman 1, B. Ravikumar 2 and S. Srinivasa Rao 1 1 The Institute of Mathematical Sciences, C. I. T. Campus, Chennai 600 113. India 2 Department of Computer
More informationThis is already grossly inconvenient in present formalisms. Why do we want to make this convenient? GENERAL GOALS
1 THE FORMALIZATION OF MATHEMATICS by Harvey M. Friedman Ohio State University Department of Mathematics friedman@math.ohio-state.edu www.math.ohio-state.edu/~friedman/ May 21, 1997 Can mathematics be
More informationOverview. CS389L: Automated Logical Reasoning. Lecture 6: First Order Logic Syntax and Semantics. Constants in First-Order Logic.
Overview CS389L: Automated Logical Reasoning Lecture 6: First Order Logic Syntax and Semantics Işıl Dillig So far: Automated reasoning in propositional logic. Propositional logic is simple and easy to
More informationCHENNAI MATHEMATICAL INSTITUTE M.Sc. / Ph.D. Programme in Computer Science
CHENNAI MATHEMATICAL INSTITUTE M.Sc. / Ph.D. Programme in Computer Science Entrance Examination, 5 May 23 This question paper has 4 printed sides. Part A has questions of 3 marks each. Part B has 7 questions
More informationComputational problems. Lecture 2: Combinatorial search and optimisation problems. Computational problems. Examples. Example
Lecture 2: Combinatorial search and optimisation problems Different types of computational problems Examples of computational problems Relationships between problems Computational properties of different
More informationPropositional Logic. Andreas Klappenecker
Propositional Logic Andreas Klappenecker Propositions A proposition is a declarative sentence that is either true or false (but not both). Examples: College Station is the capital of the USA. There are
More informationComputer Science Technical Report
Computer Science Technical Report Feasibility of Stepwise Addition of Multitolerance to High Atomicity Programs Ali Ebnenasir and Sandeep S. Kulkarni Michigan Technological University Computer Science
More informationCMPSCI611: The SUBSET-SUM Problem Lecture 18
CMPSCI611: The SUBSET-SUM Problem Lecture 18 We begin today with the problem we didn t get to at the end of last lecture the SUBSET-SUM problem, which we also saw back in Lecture 8. The input to SUBSET-
More informationEfficient Enumeration Algorithms for Constraint Satisfaction Problems
Efficient Enumeration Algorithms for Constraint Satisfaction Problems Henning and Ilka Schnoor Institut für Theoretische Informatik Leibniz Universität Hannover 2.10.2006 Efficient Enumeration Algorithms
More informationChapter 8. NP-complete problems
Chapter 8. NP-complete problems Search problems E cient algorithms We have developed algorithms for I I I I I finding shortest paths in graphs, minimum spanning trees in graphs, matchings in bipartite
More informationReview Material: First Order Logic (FOL)
Information Integration on the WEB with RDF, OWL and SPARQL Review Material: First Order Logic (FOL) Grant Weddell October 7, 2013 Syntax of FOL Signatures Vocabularies are called signatures in FOL. The
More informationMinimal-Change Integrity Maintenance Using Tuple Deletions
Minimal-Change Integrity Maintenance Using Tuple Deletions Jan Chomicki University at Buffalo Dept. CSE chomicki@cse.buffalo.edu Jerzy Marcinkowski Wroclaw University Instytut Informatyki jma@ii.uni.wroc.pl
More informationCS446: Machine Learning Fall Problem Set 4. Handed Out: October 17, 2013 Due: October 31 th, w T x i w
CS446: Machine Learning Fall 2013 Problem Set 4 Handed Out: October 17, 2013 Due: October 31 th, 2013 Feel free to talk to other members of the class in doing the homework. I am more concerned that you
More informationModule 11. Directed Graphs. Contents
Module 11 Directed Graphs Contents 11.1 Basic concepts......................... 256 Underlying graph of a digraph................ 257 Out-degrees and in-degrees.................. 258 Isomorphism..........................
More informationW4231: Analysis of Algorithms
W4231: Analysis of Algorithms 11/23/99 NP-completeness of 3SAT, Minimum Vertex Cover, Maximum Independent Set, Boolean Formulae A Boolean formula is an expression that we can build starting from Boolean
More informationTheorem 2.9: nearest addition algorithm
There are severe limits on our ability to compute near-optimal tours It is NP-complete to decide whether a given undirected =(,)has a Hamiltonian cycle An approximation algorithm for the TSP can be used
More information8.1 Polynomial-Time Reductions
Algorithm Design Patterns and Anti-Patterns Analysis of Algorithms Algorithm design patterns. Ex. Greed. O(n 2 ) Dijkstra s SSSP (dense) Divide-and-conquer. O(n log n) FFT. Dynamic programming. O(n 2 )
More informationTowards a Logical Reconstruction of Relational Database Theory
Towards a Logical Reconstruction of Relational Database Theory On Conceptual Modelling, Lecture Notes in Computer Science. 1984 Raymond Reiter Summary by C. Rey November 27, 2008-1 / 63 Foreword DB: 2
More informationSOFTWARE ENGINEERING DESIGN I
2 SOFTWARE ENGINEERING DESIGN I 3. Schemas and Theories The aim of this course is to learn how to write formal specifications of computer systems, using classical logic. The key descriptional technique
More informationChapter 3. Set Theory. 3.1 What is a Set?
Chapter 3 Set Theory 3.1 What is a Set? A set is a well-defined collection of objects called elements or members of the set. Here, well-defined means accurately and unambiguously stated or described. Any
More informationLOGIC AND DISCRETE MATHEMATICS
LOGIC AND DISCRETE MATHEMATICS A Computer Science Perspective WINFRIED KARL GRASSMANN Department of Computer Science University of Saskatchewan JEAN-PAUL TREMBLAY Department of Computer Science University
More informationLecture 19 Thursday, March 29. Examples of isomorphic, and non-isomorphic graphs will be given in class.
CIS 160 - Spring 2018 (instructor Val Tannen) Lecture 19 Thursday, March 29 GRAPH THEORY Graph isomorphism Definition 19.1 Two graphs G 1 = (V 1, E 1 ) and G 2 = (V 2, E 2 ) are isomorphic, write G 1 G
More informationLTCS Report. Concept Descriptions with Set Constraints and Cardinality Constraints. Franz Baader. LTCS-Report 17-02
Technische Universität Dresden Institute for Theoretical Computer Science Chair for Automata Theory LTCS Report Concept Descriptions with Set Constraints and Cardinality Constraints Franz Baader LTCS-Report
More informationDM841 DISCRETE OPTIMIZATION. Part 2 Heuristics. Satisfiability. Marco Chiarandini
DM841 DISCRETE OPTIMIZATION Part 2 Heuristics Satisfiability Marco Chiarandini Department of Mathematics & Computer Science University of Southern Denmark Outline 1. Mathematical Programming Constraint
More informationThe Inverse of a Schema Mapping
The Inverse of a Schema Mapping Jorge Pérez Department of Computer Science, Universidad de Chile Blanco Encalada 2120, Santiago, Chile jperez@dcc.uchile.cl Abstract The inversion of schema mappings has
More informationCS 125 Section #10 Midterm 2 Review 11/5/14
CS 125 Section #10 Midterm 2 Review 11/5/14 1 Topics Covered This midterm covers up through NP-completeness; countability, decidability, and recognizability will not appear on this midterm. Disclaimer:
More informationChapter 3. Describing Syntax and Semantics
Chapter 3 Describing Syntax and Semantics Chapter 3 Topics Introduction The General Problem of Describing Syntax Formal Methods of Describing Syntax Attribute Grammars Describing the Meanings of Programs:
More information[Ch 6] Set Theory. 1. Basic Concepts and Definitions. 400 lecture note #4. 1) Basics
400 lecture note #4 [Ch 6] Set Theory 1. Basic Concepts and Definitions 1) Basics Element: ; A is a set consisting of elements x which is in a/another set S such that P(x) is true. Empty set: notated {
More information1 The Traveling Salesperson Problem (TSP)
CS 598CSC: Approximation Algorithms Lecture date: January 23, 2009 Instructor: Chandra Chekuri Scribe: Sungjin Im In the previous lecture, we had a quick overview of several basic aspects of approximation
More informationCardinality of Sets. Washington University Math Circle 10/30/2016
Cardinality of Sets Washington University Math Circle 0/0/06 The cardinality of a finite set A is just the number of elements of A, denoted by A. For example, A = {a, b, c, d}, B = {n Z : n } = {,,, 0,,,
More informationPropositional Calculus: Boolean Algebra and Simplification. CS 270: Mathematical Foundations of Computer Science Jeremy Johnson
Propositional Calculus: Boolean Algebra and Simplification CS 270: Mathematical Foundations of Computer Science Jeremy Johnson Propositional Calculus Topics Motivation: Simplifying Conditional Expressions
More informationTyped Lambda Calculus
Department of Linguistics Ohio State University Sept. 8, 2016 The Two Sides of A typed lambda calculus (TLC) can be viewed in two complementary ways: model-theoretically, as a system of notation for functions
More informationPROPOSITIONAL LOGIC (2)
PROPOSITIONAL LOGIC (2) based on Huth & Ruan Logic in Computer Science: Modelling and Reasoning about Systems Cambridge University Press, 2004 Russell & Norvig Artificial Intelligence: A Modern Approach
More informationHorn Formulae. CS124 Course Notes 8 Spring 2018
CS124 Course Notes 8 Spring 2018 In today s lecture we will be looking a bit more closely at the Greedy approach to designing algorithms. As we will see, sometimes it works, and sometimes even when it
More informationPropositional Theories are Strongly Equivalent to Logic Programs
Under consideration for publication in Theory and Practice of Logic Programming 1 Propositional Theories are Strongly Equivalent to Logic Programs Pedro Cabalar Department of Computer Science, University
More informationSAT Solver. CS 680 Formal Methods Jeremy Johnson
SAT Solver CS 680 Formal Methods Jeremy Johnson Disjunctive Normal Form A Boolean expression is a Boolean function Any Boolean function can be written as a Boolean expression s x 0 x 1 f Disjunctive normal
More informationName: CS 341 Practice Final Exam. 1 a 20 b 20 c 20 d 20 e 20 f 20 g Total 207
Name: 1 a 20 b 20 c 20 d 20 e 20 f 20 g 20 2 10 3 30 4 12 5 15 Total 207 CS 341 Practice Final Exam 1. Please write neatly. You will lose points if we cannot figure out what you are saying. 2. Whenever
More information15-819M: Data, Code, Decisions
15-819M: Data, Code, Decisions 08: First-Order Logic André Platzer aplatzer@cs.cmu.edu Carnegie Mellon University, Pittsburgh, PA André Platzer (CMU) 15-819M/08: Data, Code, Decisions 1 / 40 Outline 1
More informationChapter 1. Preliminaries
Chapter 1 Preliminaries 1.1 Topological spaces 1.1.1 The notion of topological space The topology on a set X is usually defined by specifying its open subsets of X. However, in dealing with topological
More information