CMPS 260 Spring 2019
Homework #1: Sets, relations, proof methods
Due: 3pm, Monday, February 11

1. For each binary relation described below on the left, indicate in the table to the right which among the listed properties it possesses. Each relation is to be understood as being on the set A = { a, b, c }.

Recall these definitions:

R1: { (a,b), (b,c), (a,c), (c,a) }
R2: { (a,b), (b,a) }
R3:     (i.e., empty set)
R4: { (a,a), (b,b), (c,c), (b,a), (b,c) }
R5: { (a,b), (b,c) }
      
Property\Relation R1 R2R3 R4R5
reflexive       
symmetric       
transitive       


2. Two sets S1 and S2 satifsy the condition

S1 = (S1 ∪ S2) − S2

if and only if a particular relationship holds between S1 and S2. What is that relationship?


3. Prove by mathematical induction on n that 1 + 3 + 5 + ... + 2n-1 = n2 for all n≥0. That is, the sum of the first n odd natural numbers is equal to the square of n.


4. Prove that in any group of two or more people, two of them have the same number of acquaintances within the group. Assume that R = { (x,y) : x and y are acquaintances } is an irreflexive and symmetric relation. That is,
  1. for all x: (x,x) ∉ R (irreflexivity), and
  2. for all x,y: (x,y) ∈ R if and only if (y,x) ∈ R (symmetry)

Hint 1: Use the Pigeonhole Principle.
Hint 2: Consider as two cases one in which there exists a hermit (i.e., someone having no acquaintances) and another in which there are no hermits.


5. Consider the (context-free) grammar G with the following three productions:

Sλ(1)
SaAb(2)
AbSa(3)

S is the grammar's start symbol, A is its second variable, and the terminal symbols are a and b.

Describe L(G), the language generated by this grammar. That is, provide a precise characterization of the terminal strings that can be derived from S.


6. Prove that, for all n≥0, at least one among n, n+2, and n+4 is divisible by 3. (For a bonus point, show that you can replace "at least" by "exactly".)

Hint 1: Consider these cases (which cover all possibilities):

Hint 2: Alternatively, you can make an argument that involves the Pigeonhole Principle.