Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 380: Design and Analysis of Algorithms

Similar presentations


Presentation on theme: "CSC 380: Design and Analysis of Algorithms"— Presentation transcript:

1 CSC 380: Design and Analysis of Algorithms
Dr. Curry Guinn

2 Quick Info Dr. Curry Guinn CIS 2015 guinnc@uncw.edu
Office Hours: MWF: 10:00am-11:00m and by appointment

3 Outline of today Satisfiability 3-SAT What’s the problem?
How would we code this problem?

4 The Satisfiability Problem
Given a set of propositional logic clauses, find an assignment of truth values to each symbol so that all of the clauses are true. (P -> Q & S) & (~P & ~Q) & (S | ~Q)

5 3SAT is a special case All clauses contain the disjunction of 3 terms
Disjunction means OR Each term is of the form P or ~P. (P | Q | ~S) & (~P | ~Q | ~S) & (P | ~Q | S) It turns out that any SAT case, can be transformed into 3SAT

6 3SAT is an NP-complete problem
Which means that it is map-able to other NP-complete problems such as Traveling salesman Clique Map coloring Knapsack, Etc. What do I mean by “map-able”?

7 Suppose we want to actually write code to solve this problem
How do we do it? Analysis Design Implement Test

8 Analysis Can we write down the problem?

9 Write down the problem Find a set of truth assignments for the propositional symbols such that are of the clauses are true. Each clause consist of a disjunction (OR) of three terms. Each term is either a proposition symbol or its negation (i.e., P or ~P). More generally, for a particular problem, we will have n different propositional symbols and m different clauses. Do you want to add anything?

10 Find the nouns. Why?

11 Find the nouns. Why? Find a set of truth assignments for the propositional symbols such that all of the clauses are true. Each clause consist of a disjunction (OR) of three terms. Each term is either a proposition symbol or its negation (i.e., P or ~P). More generally, for a particular problem, we will have n different propositional symbols and m different clauses.

12 Start making UML diagrams of the classes
Term Clause Symbol TruthAssignment Problem

13 See board and IDE

14 For Next Class, Monday No Homework Enjoy the weekend


Download ppt "CSC 380: Design and Analysis of Algorithms"

Similar presentations


Ads by Google