Normal Programs with Cardinality Constraints C = L {a 1,..., a n, not b 1,..., not b m } U L lower bound, U upper bound (missing L: 0, missing U: n+m)

Slides:



Advertisements
Similar presentations
The Important Thing About By. The Important Thing About ******** The important thing about ***** is *****. It is true s/he can *****, *****, and *****.
Advertisements

Generating Hard Satisfiability Problems1 Bart Selman, David Mitchell, Hector J. Levesque Presented by Xiaoxin Yin.
Programming Language Semantics Denotational Semantics Chapter 5.
1 8. Safe Query Languages Safe program – its semantics can be at least partially computed on any valid database input. Safety is tied to program verification,
1 2. Constraint Databases Next level of data abstraction: Constraint level – finitely represents by constraints the logical level.
Chapter 5 The Normal Curve and Standard Scores EPS 525 Introduction to Statistics.
13.1 – Solving Right Triangles
3.3 Zeros of polynomial functions
Area Section 4.2.
2.5 Zeros of Polynomial Functions
2.5 Descartes’ Rule of Signs To apply theorems about the zeros of polynomial functions To approximate zeros of polynomial functions.
Box and Whisker Plots. Order numbers 3, 5, 4, 2, 1, 6, 8, 11, 14, 13, 6, 9, 10, 7 First, order your numbers from least to greatest: 1, 2, 3, 4, 5, 6,
Least Common Multiple (LCM)
Least Common Multiple Lesson 3-6.
Sequences & Summations CS 1050 Rosen 3.2. Sequence A sequence is a discrete structure used to represent an ordered list. A sequence is a function from.
Confidence Interval Proportions.
Normal Distributions Z Transformations Central Limit Theorem Standard Normal Distribution Z Distribution Table Confidence Intervals Levels of Significance.
Normal Curve 64, 95, 99.7.
Real Zeros of Polynomial Functions. Quick Review.
Sample Variability Consider the small population of integers {0, 2, 4, 6, 8} It is clear that the mean, μ = 4. Suppose we did not know the population mean.
Quantitative data. mean median mode range  average add all of the numbers and divide by the number of numbers you have  the middle number when the numbers.
Nurse scheduling problem 25 nurses ( Team A:13, B:12 ) Experienced nurses and new nurses 3 shifts ( day, evening, night ), meetings, days off Time span.
Time Complexity of Algorithms (Asymptotic Notations)
2.4/2.52.4/2.5 Real Zeros of Polynomial Functions.
Integer LP In-class Prob
Bounds Bingo!. Pick any 9 of these numbers
Approximation Objectives for today’s lesson :
1 Review for Quiz 1. 2 Summations 3 Binomial expansion.
Chapter 8 Estimation ©. Estimator and Estimate estimator estimate An estimator of a population parameter is a random variable that depends on the sample.
Least Common Multiple Objectives: The student will be able to:  Find the Least Common Multiple (LCM) for The given Numbers.
Multiplication Find the missing value x __ = 32.
3.3 Real Zeros of Polynomials. Rational Zero Theorem If the polynomial P(x) has integer coefficients then every rational zero of P is of the form p/q.
IGCSE Revision Lesson 1 I can carry out calculations involving reverse percentages, e.g. finding the cost price given the selling price and the percentage.
Descartes’ Rule of Signs
Confidence intervals for µ
Find the lower and upper quartiles for the data set.
Least Common Multiple.
Ch8.4 P-Values The P-value is the smallest level of significance at which H0 would be rejected when a specified test procedure is used on a given data.
4.5 Locating Zeros of a Polynomial Function
3.3 Real Zeros of Polynomials
Integration Review Problems
Upper and Lower Bounds.
Optimal Algorithms Search and Sort.
' d' :- '" L I _ I r 1.
Errors with Continuous data
Finding the Area Between Curves
Sigma Notation.
Grade 6 Geometry and Measures Upper and Lower Bounds 2.
Literacy Research Memory Skill Practice Stretch!
Zeros of a Polynomial Function Shortcuts?
Year 11 Mini-Assessment 13 HIGHER Estimation.
Kitty Muscles Test To earn full credit, show that you know at least 45 muscles. Each additional will earn you ½ point extra credit.
Number and geometric patterns
THE NORMAL DISTRIBUTION AND THE 68–95–99.7% RULE
Field.
Box and Whisker Plots.
Rounded Off Values Upper and Lower Bounds.
Box Plots.
12.4 Box-and-Whisker Plots
Bounds Bingo!.
Normal Distribution: Finding Probabilities
Rounding and estimating: Upper and Lower Bounds
Warm-up: HW: Cumulative Review Packet
Sine Rule: Missing Sides
Warm-up: CW: Cumulative Review 5 F(x) = 2x3 + 3x2 – 11x – 6
Warmup Normal Distributions
Chapter 8 Estimation.
61 – Sequences and Series Day 2 Calculator Required
Big Omega, Theta Defn: T(N) = (g(N)) if there are positive constants c and n0 such that T(N)  c g(N) for all N  n0 . Lingo: “T(N) grows no slower than.
Errors with Continuous data
Presentation transcript:

Normal Programs with Cardinality Constraints C = L {a 1,..., a n, not b 1,..., not b m } U L lower bound, U upper bound (missing L: 0, missing U: n+m) Lit(C) = {a 1,..., a n, not b 1,..., not b m } intuition: at least L, at most U literals must be true rules built from constraints: C 0 <- C 1,..., C n example: 2{a1, a2, a3}2 <- 1{not b1, not b2}, 2{c1, c2, c3, c4}3 at least one b not in model and 2 or 3 c‘s in => 2 a‘s in. normal programs: all constraints of the form 1{a}1 oder 1{not a}1

Satisfaction of constraints in set of literals S S |= a iff a  S, S|= not a iff a  S. S |= C iff L  W(C,S)  U, where W(C,S) = | {l  Lit(C) : S |= l}| rule C 0 <- C 1,..., C n satisfied in S iff some body constraint not satisfied or C 0 satisfied (integrity constraints: first option only) Example: 1{a,b}1 <- 1 {a, not b, not c} 2 S = {a,b}. body satisfied, head not => rule not satisfied S = {a, c}. body and head constraint and thus rule satisfied

Stable models Standard approach: guess S, evaluate „not“ wrt S => reduced program, check whether S minimal model of reduced program Here: reduction to Horn constraint rules: no „not“, no upper bounds, single head atom => Cn(P) smallest set closed under rules Example: a <- 1 {a} b <- c <- 2 {b,d}, 1 {b,a} d <- 1 {a,b,c} Cn(P) = {b}Cn(P) = {b, d, c}

Constraint reduction C = L {a1,..., an, not b1,..., not bm} U C S = L´{a1, …, an} where L´ = L - |{not b  Lit(C) : S |= not b}| Example: S = {q}, C = 3 {not q, not r, p} 4, reduct: 2 {p} P program, S set of atoms. Reduct P S : {p <- C 1 S,..., C n S : C 0 <- C 1,..., C n  P, p  Lit(C 0 )  S, for all C i = L i {a1,…}U i, i  {1, …, n}, W(C i,S)  U i } Def.: S stable model of P iff 1. S satisfies all rules in P 2. S = Cn(P S )

Examples 1 {a1, a2, a3} 1 <- stable models: {a1}, {a2}, {a3} 1 {a1, a2, a3} 1 <- 1 {a1,b} 2 single stable model: empty set {a1, a2, a3} <- stable models: alle subsets of the three a‘s rules of this form are also called choice rules

Weight Constraints C = L {a 1 = w a1,..., a n = w an, not b 1 = w b1, …, not b m = w bm } U arbitrary weights (card. constraints weight 1 for all literals) implemented in Smodels: integers weight of l in C: w(C)(l) necessary changes: W(C,S) =  l  Lit(C),S |= l w(C)(l) and in definition of constraint reduct: L’ = L -  not p  Lit(C) and S |= not p w(C)(l)

Smodels optimization constructs minimize{a 1 = w a1,..., a n = w an, not b 1 = w b1, …, not b m = w bm } stable model computed by Smodels minimizes  l in L and S |= l w(C)(l) (L = {a1,..., an, not b1,..., not bm}) maximize analogously multiple optimization statements: optimize first one, among optimal models optimize second one etc.

Smodels optimization example {a1, a2, a3} <- minimize {a1 = 1} minimize {a2 = 1} minimize {a3 = 1} 1.{ } 2.{a3} 3.{a2 } 4.{a2a3} 5.{a1 } 6.{a1a3} 7.{a1a2 } 8.{a1a2a3}

Notation 1{teaches(L,C) : lecturer(L)}1 <- course(C) to obtain ground instantiation: instatiate C, replace each instatiation of the form 1{teaches(L,c1) : lecturer(L)}1 <- course(c1) with 1{teaches(l1,c1),..., teaches(ln,c1)}1 <- course(c1) where l1,..., ln are the known lecturers