Axiom of Extensionality Let A and B denote any sets. If A and B denote the same set, we write A = B, and A = B iff for every x, (x A iff x B) Axiom of Separation Let D be a set and let (x) be a predicate in the one variable x. Assume that this predic
CS313K: Logic, Sets and Functions, Spring 2013
Additional Problems
We use i, j, k, m, n as variables for nonnegative integers, and x, y as
variables for real numbers.
1. For each of these formulas determine whether it is true. If it is
false then express
CS313K: Logic, Sets and Functions, Spring 2013
Additional Problems
1. Recall that the absolute value and the sign of a real number x are dened
by the formulas
x,
if x 0,
|x| =
x, otherwise;
1, if x < 0,
sgn(x) = 0,
if x = 0,
1,
if x > 0.
Prove that for al
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 5, Due February 1
1. Function f is dened by the formulas
f (x) =
1 + x, if x 0,
1 x, otherwise.
(a) Rewrite the denition of f in logical notation. (b) Sketch the
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 1, Due January 17
In the following problems, x is a variable for real numbers.
1. Simplify each of these formulas.
(a) x < 5 x 0.
(b) x 5 x = 5.
(c) x = 10 x > 10
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 4, Due January 29
We use n as a variable for nonnegative integers, and x as a variable for real
numbers.
1. For each formula, either prove it by exhaustion or nd
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 3, Due January 25
1. Recall that harmonic numbers are dened by the formula
k
Hk =
i=1
1
.
i
Calculate H101 H99 .
2. The sequence of numbers X1 , X2 , . . . is den
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 2, Due January 22
In the following problems i, j, k are variables for nonnegative integers.
1. Represent the property i is a power of 2 (that is to say, i is one
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 7, Due February 15
The sequence S1 , S2 , S3 , . . . is dened by the formula
n
i2 .
Sn =
i=1
1. Rewrite the denition of Sn as a recursive denition.
2. The numbers
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 9, Due February 22
1. Use induction to prove the formula
n
i3 =
i=1
n2 (n + 1)2
4
for all nonnegative integers n.
2. Find all nonnegative integers n such that 3n
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 11, Due March 1
1. For any nonnegative integer n, let f (n) be the product of all odd numbers
from 1 to 2n + 1:
f (n) = 1 3 5 (2n + 1).
Give a recursive denition
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 6, Due February 5
1. In Homework Assignment 5 we dened the sequence C1 , C2 , . . . by the
formulas
3n, if n is even,
Cn =
2n, otherwise.
Prove that for all n
Cn
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 10, Due February 26
1. Prove that for all integers n 10, 2n > n + 1000.
2. Prove that for all nonnegative integers n, 4n 1 is a multiple of 3.
Name:
Discussion section:
CS313K: Logic, Sets and Functions, Spring 2013
Homework Assignment 8, Due February 19
1. Use induction to prove the formula
n
i=1
1
n
=
.
i(i + 1)
n+1
2. The sequence V1 , V2 , . . . is dened by the formula
n
Vn =
i ! i.
i=1
(i)
CS 313k - homework 7
Staple the pages of your solution set together, and put your name and EID on the top of
the rst page. Answer each question clearly. The logic you use to produce your answers is
the most important thing.
1. For each of the following bi
Predicate Logic
Example:
All men are mortal.
Socrates is a man.
Socrates is mortal.
Note: We need logic laws that work for statements involving quantities like some and all.
In English, the predicate is the part of the sentence that tells you
something a
CS313K: Logic, Sets, and Functions
J Strother Moore Department of Computer Sciences University of Texas at Austin (Lecture 1)
1
Syllabus
http:/www.cs.utexas.edu/users/moore/classes/cs313k
2
The Last Real Lecture This will be the last real lecture you get
Test Exam - Midterm 1:
1) What is the value of
(implies (not (and t t) (and nil t)?
2) Formalize the statement x or y is 5 when both a and b are t.
3) Define the function that zips two lists together
Example: (zzip '(a b c) '(1 2 3) => (a 1) (b 2) (c 3)
Test Exam - Midterm 1 - Solutions:
1) Answer: t
2) Answer: (implies (and (equal a t) (equal b t)
(or (equal x 5) (equal y 5)
3) Answer:
You need to decide how to handle the possibility that one
list is shorter than the other. E.g., perhaps
(zip '(a
Finding Covert Storage Channels
computer Science
Recall that several conditions must hold
for there to be a covert storage channel:
1
Sender
Both sender
and receiver must have access
to some attribute of a shared object.
2
The sender must be able to modif
CS 301k - Discussion Session #1
1. Translate the following English statements into logical notation. Dene your own
propositional variables. Make sure that each propositional variable represents a complete sentence.
(a) Julie is small, but Cindy is slow.
(
CS 301 - Homework #2
100 points possible
Give clear, legible answers to all questions.
1. For the following statements, write each in logical notation and then indicate True
or False.
(a) 2 + 3 = 5 only if 8 is a prime number.
R: 2 + 3 = 5, S: 8 is a prim