CS250: Discrete Math for Computer Science
Transcript of CS250: Discrete Math for Computer Science
![Page 1: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/1.jpg)
CS250: Discrete Math for Computer Science
L7: Predicate Calculus: PredCalc
![Page 2: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/2.jpg)
PredCalc = First-Order Logic with Equality
Generalization of PropCalc:
rich enough to express all of mathematics!
Let’s start by reviewing the R7 Quiz.
![Page 3: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/3.jpg)
PredCalc = First-Order Logic with Equality
Generalization of PropCalc:
rich enough to express all of mathematics!
Let’s start by reviewing the R7 Quiz.
![Page 4: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/4.jpg)
T1 =
1. T1 |= ∀x(Triangle(x)→ Blue(x)) True: all triangles are blue.
2. T1 |= ∀x(Blue(x)→ Triangle(x)) False: e is a Blue Square.
3. T1 |= ∀x(Square(x)→ ∃yLeftOf(y , x)) True: a is LeftOf allthe Squares.
4. T1 |= ∀x(Gray(x)→ Circle(x)) True: All Gray elements areCircles.
5. T1 |= ∀x(Circle(x)→ Gray(x)) False: Not all Circles areGray.
6. T1 |= ∃x∀y(LeftOf(y , x) ∨ y = x) True: there is a uniquerightmost element.
![Page 5: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/5.jpg)
T1 =
7.T1 |= ∃x∀y(Above(y , x) ∨ y = x)False: there is no unique bottom most element.
8.T1 |= ∀x∃y(Triangle(x)→ LeftOf(x , y) ∧ Circle(y))True: every Triangle has a Circle to its right.
9.T1 |= ∀x∃y(Triangle(x)→∼Above(x , y)∧ ∼Above(y , x) ∧ Circle(y))True: Every Triangle shares its row with a circle.
10.T1 |= ∃x∃y(Square(x)∧Circle(y)∧Above(y , x)∧Leftof(x , y))True: witnesses are x := h and y := d .
![Page 6: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/6.jpg)
T1 =
iClicker 7.1 True or False:
T1 |= ∀xy (Gray(x) ∧ LeftOf(x , y)→∼Blue(y)) ?
A: True B: False
iClicker 7.2 True or False:
T1 |= ∀x∃y (Circle(y)∧ ∼Above(x , y)∧ ∼Above(y , x)) ?
A: True B: False
![Page 7: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/7.jpg)
T1 =
iClicker 7.1 True or False:
T1 |= ∀xy (Gray(x) ∧ LeftOf(x , y)→∼Blue(y)) ?
A: True B: False
iClicker 7.2 True or False:
T1 |= ∀x∃y (Circle(y)∧ ∼Above(x , y)∧ ∼Above(y , x)) ?
A: True B: False
![Page 8: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/8.jpg)
T1 =
CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 9: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/9.jpg)
T1 =
CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 10: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/10.jpg)
T1 =
CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 11: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/11.jpg)
T1 =
CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 12: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/12.jpg)
T1 =
CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 13: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/13.jpg)
T1 = CircleT1 = {b,d , f , i , k}
SquareT1 = {e,h, j}TriangleT1 = {a, c,g}
BlueT1 = {a, c,e,g}BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 14: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/14.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 15: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/15.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}
BlueT1 = {a, c,e,g}BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 16: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/16.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 17: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/17.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}
GrayT1 = {d , f , i , k}AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 18: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/18.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 19: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/19.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}
LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 20: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/20.jpg)
T1 = CircleT1 = {b,d , f , i , k}SquareT1 = {e,h, j}
TriangleT1 = {a, c,g}BlueT1 = {a, c,e,g}
BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
Tarski’s World vocabulary: ΣTarski =
(Circle1,Square1,Triangle1,Blue1,Black1,Gray1,Above2,LeftOf2; )
ΣTarski has six predicate symbols of arity 1, and two of arity 2.
A structure or world, T1 ∈World[ΣTarski] has:
A non-empty universe, |T1| = {a,b, c,d ,e, f ,g,h, i , j , k}
and a predicate of the correct arity over its universe for eachpredicate symbol in ΣTarski.
![Page 21: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/21.jpg)
T1 =
Exercise: Whichsentences of the
R7 quiz
N1 = n
does Nishal’sworld, N1, satisfy?
|T1| = {a,b, c,d ,e, f ,g,h, i , j , k}CircleT1 = {b,d , f , i , k}
SquareT1 = {e,h, j}TriangleT1 = {a, c,g}
BlueT1 = {a, c,e,g}BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
|N1| = {n}CircleN1 = {n}
SquareN1 = ∅TriangleN1 = ∅
BlueN1 = ∅BlackN1 = ∅GrayN1 = {n}
AboveN1 = ∅LeftOfN1 = ∅
![Page 22: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/22.jpg)
T1 =
Exercise: Whichsentences of the
R7 quiz
N1 = n
does Nishal’sworld, N1, satisfy?
|T1| = {a,b, c,d ,e, f ,g,h, i , j , k}CircleT1 = {b,d , f , i , k}
SquareT1 = {e,h, j}TriangleT1 = {a, c,g}
BlueT1 = {a, c,e,g}BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
|N1| = {n}CircleN1 = {n}
SquareN1 = ∅TriangleN1 = ∅
BlueN1 = ∅BlackN1 = ∅GrayN1 = {n}
AboveN1 = ∅LeftOfN1 = ∅
![Page 23: CS250: Discrete Math for Computer Science](https://reader030.fdocuments.in/reader030/viewer/2022012608/619c18bbfc44e17035408eae/html5/thumbnails/23.jpg)
T1 =
Exercise: Whichsentences of the
R7 quiz
N1 = n
does Nishal’sworld, N1, satisfy?
|T1| = {a,b, c,d ,e, f ,g,h, i , j , k}CircleT1 = {b,d , f , i , k}
SquareT1 = {e,h, j}TriangleT1 = {a, c,g}
BlueT1 = {a, c,e,g}BlackT1 = {b,h, j}GrayT1 = {d , f , i , k}
AboveT1 = {(a, c), . . . , (a, k), . . . , (i , k)}LeftOfT1 = {(a,b), . . . , (a, k), . . . , (j , k)}
|N1| = {n}CircleN1 = {n}
SquareN1 = ∅TriangleN1 = ∅
BlueN1 = ∅BlackN1 = ∅GrayN1 = {n}
AboveN1 = ∅LeftOfN1 = ∅