1. Let
be an array of integers of size
and let
denote the
-th
entry of
for a natural number
. Express the assertions given below as a proposition of
a predicate logic using the predicate
. The universe is the set of natural numbers between
and
.
(a) Some entries of
are nonnegative.
(b) The
-th or
-th entry of
is nonnegative.
(c) If some entries of
are nonnegative, then all the entries of
are nonnegative.
(d) If the first
entries of
are nonnegative, then the last
entries
are also nonnegative.
(e) All entries at even numbered locations are nonnegative.
2 (a) Express the argument given below in the symbolic form of first order predicate logic.
Use the predicate symbols shown. You may also use the predicate = .
(b) Prove that the argument is valid by deriving the conclusion from the premises using inference rules.
Use one rule for each step of your reasoning and state what rule is used.
Argument: Every computer science student works harder than someone. Everyone who works harder
than any other person gets less sleep than that person. Jane is a computer science student.
Therefore, Jane gets less sleep than someone else.
:
is a computer science student.
:
works harder than
.
:
sleeps less than
.
3. Which of the following statements are true and which are false ?
and
are sets.
(a)
(b) If
, then
.
(c) If
and
, then
.
(d)
(e)
if and only if
.
(f) {
} has two subsets.
(g)
(h)
4. Prove by mathematical induction the following:
(a)
is an even number for all natural number
.
(b) Prove that any amount of postage greater than or equal to 14 cents can be obtained
using 3-cent and 8-cent stamps.
5 (a) Recursively define the set of propositions of propositional logic with P, Q and R
as propositional variables.
(b) Recursively define the relation
on the set of natural numbers.
6. Fill in the table below with "Y" if the relation has the corresponding property, else
with "N". In the table the following abbreviations are used.
Ref: Reflexive, Irref: Irreflexive, Antisym: Antisymmetric, Sym: Symmetric, Tran: Transitive.
| Relation | Ref | Irref | Antisym | Sym | Tran |
|
|
|||||
| Parent-child relation on peoples | |||||