{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

hmwk1

hmwk1 - Johny Nguyen September 16th 2009 CS 473 Homework 1...

This preview shows pages 1–7. Sign up to view the full content.

Johny Nguyen September 16 th , 2009 CS 473 Homework 1 Downey

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
PROBLEM 1 Draw directed graphs representing relations of the following types: (a) Reflexive, transitive and antisymmetric . Antisymmetry of R means that ( 2200 a , b ) if ( a , b ) R and a b, then ( b , a ) R . (b) Reflexive, transitive, and neither symmetric nor antisymmetric.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
PROBLEM 2 What is the reflexive, transitive closure R * of R = {( a , b ) ,( a , d ) ,( d , c ) ,( d , e )}? Express R * as a set, and also draw a directed graph representing the relation R *. R* = {(a,a), (b,b), (c,c), (d,d), (e,e), (a,e), (a,c), (a,b), (a,d), (d,c), (d,e)}
PROBLEM 3 i. A ( n , 0) = n + 1 ii. A (0, m + 1) = A (1, m ) iii. A ( n + 1, m + 1) = A ( A ( n , m + 1) , m ) A(n,m) = A ( A ( n - 1, m ) , m - 1) (a) A(n,1) = A( A(n-1, 1), 0) A(n,1) = A(n-1, 1) + 1 by (i) A(n-1, 1) = A(n-2,1) + 1 A(n,1) = A(n-2,1) + 2 A(n,1) = A(n-k,1) + k, Let k = n A(n-1) = A(0,1) + n A(n,1) = A(1,0) + n by (ii) A(n,1) = 2 + n

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Proof: Base: n = 1. A(1,1) = 2 + 1 = 3 A(1,1) = A(1-1,1) + 1 = A(0,1) + 1 = A(1,0) + 1 = 2 + 1 = 3 Inductive: Suppose A(k, 1) = k + 2, then A(k+1,1) = (k + 1) + 2 = k + 3. A(k+1,1) = A((k+1)-1,1) + 1 = A(k,1) + 1 A(k+1,1) = A(k,1) + 1 = (k+2) + 1, By Inductive Hypothesis A(k+1,1) = k + 3. QED (b) A(n,2) = A( A(n-1, 2), 1) A(n,2) = A(n-1,2) + 2 by (a) A(n-1,2) + 2 = A(n-2,2) + 2 A(n,2) = (A(n-2,2) + 2) + 2 = A(n-2,2) + 2*2 A(n-2,2) = A(n-3,2) + 2 A(n,2) = (A(n-3,2) + 2) + 2*2 = A(n-3,2) + 3*2 A(n,2) = A(n-k,2) + 2k, Let k = n A(n,2) = A(0,2) + 2n A(n,2) = A(1,1) + 2n by (ii) A(n,2) = 3 + 2n by (a) Proof: Base: n = 1. A(1,2) = 3 + (2*1) = 3 + 2 = 5
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 12

hmwk1 - Johny Nguyen September 16th 2009 CS 473 Homework 1...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online