Wednesday, June 30, 2010

how to prove it - ch6, sec6.3(Recursion) ex

This section introduces recursion and shows how it relates to mathematical induction. Also, in recursive formulae, since we can easily relate f(n+1) to f(n) so they are usually proved with mathematical induction. For similar reason, proofs involving ∑ are also easily done by induction.

=================================================================================================

Ex-1: Scratchwork:
P(1) = 1/2
P(2) = 2/3
P(3) = 3/4

It is easy enough to guess that P(n) = nn+1

Formal Proof:

Base case: n = 1, 11(1+1) = 12

Induction step:

Let, i=1n1i(i+1).

Now, i=1n+11i(i+1)
= i=1n1i(i+1) + 1(n+1)(n+2)
= nn+1+1(n+1)(n+2)
= 1n+1(n+1n+2)
= 1n+1((n+1)2n+2)
= n+1n+2


Ex-2: Base case: For n = 1,
LHS = 11(1+1)(1+2) = 16
RHS = 12+3(1)4(1+1)(1+2) = 44.2.3 = 16

clearly, LHS = RHS

Induction step:

Let, i=1n1i(i+1)(i+2)=n2+3n4(n+1)(n+2)

Now, i=1n+11i(i+1)(i+2)
= i=1n1i(i+1)(i+2)+1(n+1)(n+2)(n+3)
= n2+3n4(n+1)(n+2)+1(n+1)(n+2)(n+3)
= 1(n+1)(n+2)(n2+3n4+1n+3)
= (n3+5n2+4n)+(n2+5n+4)4(n+1)(n+2)(n+3)
= (n2+5n+4)n+(n2+5n+4)4(n+1)(n+2)(n+3)
= (n2+5n+4)(n+1)4(n+1)(n+2)(n+3)
= n2+5n+44(n+2)(n+3)
= (n+1)2+3(n+1)4(n+2)(n+3)


Ex-3: Base case: For n = 2

LHS = 1(2-1)(2+1) = 13
RHS = 3.22-2-24.2(2+1) = 12-44.2.3 = 84.2.3 = 13

Induction step:

Let, i=2n1(i-1)(i+1)=3n2-n-24n(n+1)

Now, i=2n+11(i-1)(i+1)
= i=2n1(i-1)(i+1)+1n(n+2)
= 3n2-n-24n(n+1)+1n(n+2)
= 1n[3n2-n-24(n+1)+1(n+2)]
= 1n[(3n2-n-2)(n+2)+4(n+1)4(n+1)(n+2)]
= 1n[3n3-n2-2n+6n2-2n-4+4n+44(n+1)(n+2)]
= 1n[3n3+5n24(n+1)(n+2)]
= 3n2+5n4(n+1)(n+2)
= 3(n2+2n+1)-6n-3+5n4(n+1)(n+2)
= 3(n+1)2-(n+1)-24(n+1)(n+2)


Ex-4: Base case: For n = 0;

LHS = (2(0)+1)2 = 1
RHS = (0+1)(2.0+1)(2.0+3)3 = (1)(1)(3)3 = 1

clearly, LHS = RHS

Induction step:

Let, i=0n(2i+1)2=(n+1)(2n+1)(2n+3)3

Now, i=0n+1(2i+1)2
= i=0n(2i+1)2+(2(n+1)+1)2
= (n+1)(2n+1)(2n+3)3+(2n+3)2
= (2n+3)[(n+1)(2n+1)3+(2n+3)]
= (2n+3)[(2n2+3n+1)+(6n+9)3]
= (2n+3)[2n2+9n+103]
= (2n+3)[2n2+4n+5n+103]
= (2n+3)[(n+2)(2n+5)3]
= (n+2)(2n+3)(2n+5)3


Ex-5: Base case: For n = 0

LHS = r0 = 1
RHS = r(0+1)-1r-1 = r-1r-1 = 1

Induction step:

Let, i=0nri=r(n+1)-1r-1

Now, i=0n+1ri
= i=0nri+r(n+1)
= r(n+1)-1r-1+r(n+1)
= r(n+1)-1+r(n+2)-r(n+1)r-1
= r(n+2)-1r-1


Ex-6: Base case: For n = 1

LHS = 112 = 1
RHS = 2-11 = 1

clearly, LHS RHS

Induction step:

Let, i=1n1i22-1n

Now, i=1n+11i2
= i=1n1i2+1(n+1)2
(2-1n)+1(n+1)2
= (2-1n+1)+1n+1-1n+1(n+1)2
= (2-1n+1)+(n2+n)-(n2+1+2n)+nn(n+1)2
= (2-1n+1)-1n(n+1)2
(2-1n+1)


Ex-7:
(a) Base case: for n = 0

LHS = RHS = a0+b0

Induction step:

Let i=0n(ai+bi)=i=0nai+i=0nbi

Now, i=0n+1(ai+bi)
= i=0n(ai+bi)+(an+1+bn+1)
= i=0nai+i=0nbi+(an+1+bn+1)
= (i=0nai+an+1)+(i=0nbi+bn+1)
= i=0n+1ai+i=0n+1bi

(b) Base case: for n = 0, LHS = RHS = ca0

Induction step: Let ci=0nai=i=0n(c.ai)

Now, ci=0n+1ai
= ci=0nai+c.an+1
= i=0n(c.ai)+(c.an+1)
= i=0n+1(c.ai)


Ex-8:
(a) We will let m be arbitrary natural number and prove that nN(nmHn-Hmn-mn

Base case: For n = m
LHS = Hm-Hm = 0 = m-mm = RHS

Induction step: Let n be arbitrary natural number greater than or equal to m and Hn-Hmn-mn

Now, Hn+1-Hm
= (i=1n+11i)-Hm
= (i=1n1i+1n+1)-Hm
= (Hn+1n+1)-Hm
= (Hn-Hm)+1n+1
n-mn+1n+1
= n2+n-mn-m+mm(n+1)
= nm.(n+1)-mn+1 (since n m, so nm1)
(n+1)-mn+1

(b) Base case: For n = 0, LHS = H20=H1=1=1+02=1 = RHS

Induction step: Let H2n1+n2

Now, using part(a) H2n+1-H2n
2n+1-2n2n+1
= 2n(2-1)2n+1
= 12
So, H2n+1-H2n12
=> H2n+1H2n+12
=> H2n+11+n2+12
=> H2n+11+n+12


Ex-9: Base case: For n = 2

LHS = k=11Hk=H1=1
RHS = 2(1+12)-2 = 2 + 1 - 2 = 1

clearly, LHS = RHS

Induction step: Let k=1n-1Hk=nHn-n

Now, k=1nHk
= (k=1n-1Hk)+Hn
= nHn-n+Hn
= (n+1)Hn-n

Since Hn+1=i=1n+11i=i=1n1i+1n+1
=> Hn=Hn+1-1n+1

Hence, k=1nHk
= (n+1)Hn-n
= (n+1)(Hn+1-1n+1)-n
= (n+1)Hn+1-(n+1)


Ex-10: Scratchwork:
P(1) = 1 = 2! - 1
P(2) = 5 = 3! - 1
P(3) = 23 = 4! - 1
P(4) = 119 = 5! - 1

It is easy enough to guess that P(n) = (n+1)! - 1

Theorem: i=1n(i(i!)) = (n+1)! - 1
Proof:

Base case: For n = 1, LHS = 1 = RHS

Induction step: Let i=1n(i(i!)) = (n+1)! - 1

Now, i=1n+1(i(i!))
= i=1n(i(i!)) + (n+1).(n+1)!
= (n+1)! - 1 + (n+1).(n+1)!
= (1 + n + 1)(n+1)! - 1
= (n + 2)(n+1)! - 1
= (n+2)! - 1


Ex-11: Scratchwork:

P(0) = 0
P(1) = 1/2
P(2) = 5/6
P(3) = 23/24

My guess: P(n) = (n+1)!-1(n+1)!

Proof:

Base case: For n = 0, LHS = 0 = RHS

Induction step: Let i=0ni(i+1)!=(n+1)!-1(n+1)!

Now, i=0n+1i(i+1)!
= i=0ni(i+1)!+(n+1)(n+2)!
= (n+1)!-1(n+1)!+(n+1)(n+2)!
= [(n+1)!-1](n+2)(n+2)!+(n+1)(n+2)!
= 1(n+2)![(n+2)!-(n+2)+(n+1)]
= (n+2)!-1(n+2)!


Ex-12:
(a) Base case: n = 0, clearly 20 = 1 > 0

Induction step:

Let, for an arbitrary natural number n s.t. n 1, 2n>n

Now, 2(n+1) = 2.2n > 2n = (n + n) (n+1)

Thus, 2(n+1)(n+1)

(b) Base case: n = 9, 9! = 362880 262144 = 218=(29)2

Induction step: Let n be an arbitrary natural number s.t. n 9 and n!(2n)2

Now, (n+1)! = (n+1).n! (n+1).(2n)2=(n+1).22n

since, n 9, so (n+1) > 4

Hence (n+1)! (n+1).22n>4.22n=22(n+1)=(2n+1)2

(c) Base case: n = 0, 0! = 1 202

Induction step: Let n be an arbitrary natural number and n! 2(n2)

Now, (n+1)! = (n+1).n! (n+1).2(n2)(2(1+2n)).2(n2)=2(n+1)2


Ex-13:
(a) Base case: n = 0, (k2)!1=k2.0

Induction step: Let n be an arbitrary natural number s.t. (k2+n)!k2n

Now, (k2+(n+1))!=(k2+n+1).(k2+n)!(k2+n+1).k2n=k2(n+1)+(n+1).k2nk2(n+1)

(b) Base case: n = 2k2

by putting n = k2 in part(a) result, we get

(k2+k2)!k2k2
=> (2k2)!k2k2

Induction step: Let n be an arbitrary natural number s.t n2k2 and n!kn

Now, (n+1)! = (n+1).n! (n+1).knk.kn=k(n+1)


Ex-14: Let a be an arbitrary real number and m be an arbitrary natural number.

Base case: n = 0, (am)0=1=am(0)

Induction step: Let n be an arbitrary natural number and (am)n=amn

Now, (am)(n+1)=(am)n.am=a(mn+m)=am(n+1)


Ex-15: Base case: n = 0, a0=0=20-0-1

Induction step: Let an=2n-n-1

Now, an+1=2an+n=2(2n-n-1)+n=2n+1-2n-2+n=2n+1-(n+1)-1


Ex-16: Scratchwork:
an=(an-1)2=(an-2)22=(an-3)23...=(an-n)2n=a02n=22n

Thus an=22n

Proof:

Base case: n = 0, a0=2=21=220

Induction step: Let an=22n

Now, an+1=(an)2=(22n)2=22.2n=22(n+1)


Ex-17: Scratchwork:
a1=1
a2=12
a3=13
a4=14

..easy guess, an=1n

Proof:

Base case: a1=11=1

Induction step: Let an=1n

Now, an+1=anan+1=1/n(1/n)+1=1n+1

Note: In all the following exercises, [nCk] represents n-combination-k

Ex-18:
(a) [nC0] = n!0!(n-0)!=n!0!.n!=n!n!.0!=n!n!.(n-n)! = [nCn]

(b) RHS
= [nCk] + [nC(k-1)]
= n!k!(n-k)!+n!(k-1)!(n-k+1)!
= n!.(n-k+1)k!(n-k+1)!+n!(k-1)!(n-k+1)!
= (n+1).n!k!(n-k+1)!-k.n!k!(n-k+1)!+n!(k-1)!(n-k+1)!
= (n+1).n!k!(n-k+1)!-n!(k-1)!(n-k+1)!+n!(k-1)!(n-k+1)!
= (n+1)!k!(n-k+1)!
= [(n+1)Ck]

(c) Base case: n = k, # of elements in Pk(A) of a set A having k elements = 1 = [kCk]

Induction step: Let k be an arbitrary natural number. Let n be an arbitrary natural number s.t. nk. For any set A, that has n elements, Pk(A) has [nCk] elements.

Let A be a set containing n+1 elements and a be an arbitrary element of A. Let us define a set B = A\{a}.

Pk(A)=Pk(B){X{x}XPk-1(B)}

Since Pk and {X{x}XPk-1(B)} are disjoint, so the # of elements in Pk(A) = # of elements in Pk(B) + # of elements in {X{x}XPk-1(B)}

Then, # of elements in Pk(A) = [nCk] + [nC(k-1)] = [(n+1)Ck]

(d) Let x and y be arbitrary real numbers.

Base case: n = 0, LHS = (x+y)0=1=[0C0]x0-0y0

Induction step: Let (x+y)n = k=0n[nCk]xn-kyk

Now, (x+y)n+1

= (x+y).(x+y)n
= (x+y).k=0n[nCk]xn-kyk

= (x+y)([nC0]xn+[nC1]xn-1y+[nC2]xn-2y2+...+[nCn]yn)

= ([nC0]xn+1+[nC0]xny)+([nC1]xny+[nC1]xn-1y2)+([nC2]xn-1y2+[nC2]xn-2y3)+...+([nCn]xyn+[nCn]yn+1)

= xn+1+([nC0]xny+[nC1]xny)+([nC1]xn-1y2+[nC2]xn-1y2)+...+([nC(n-1)]xyn+nCn]xyn)+yn+1

= xn+1+[(n+1)C1]xny+[(n+1)C2]xn-1y2+...+[(n+1)Cn]xyn+yn+1

= [(n+1)C0]xn+1+[(n+1)C1]xny+[(n+1)C2]xn-1y2+...+[(n+1)Cn]xyn+[(n+1)C(n+1)]yn+1

= k=0n+1[(n+1)Ck]xn-kyk


Ex-19:
(a) In Ex-18(d) put x = y = 1 to get

(1+1)n=k=0n[nCk]1n-k1k
=> 2n=k=0n

(b) Base case: For n = 1

LHS = k=01(-1)k[nCk]=(-1)0[nC0]+(-1)1[nC1]=1-1=0 = RHS

Induction step: Let k=0n(-1)k[nCk]=0

Now, k=0n+1(-1)k[(n+1)Ck]

= (-1)0[(n+1)C0]+k=1n(-1)k[(n+1)Ck]+(-1)n+1[(n+1)C(n+1)]

= (-1)0+k=1n(-1)k[(n+1)Ck]+(-1)n+1

= 1+k=1n(-1)k[(n+1)Ck]+(-1)n+1

= 1+k=1n(-1)k([nCk]+[nC(k-1)])+(-1)n+1

= 1+k=1n(-1)k[nCk]+k=1n(-1)k[nC(k-1)]+(-1)n+1

= ((-1)0[nC0]+k=1n(-1)k[nCk])+k=1n(-1)k[nC(k-1)]+(-1)n+1

= (k=0n(-1)k[nCk])+k=1n(-1)k[nC(k-1)]+(-1)n+1

= (0)+k=1n(-1)k[nC(k-1)]+(-1)n+1

= k=1n(-1)k[nC(k-1)]+(-1)n+1

Let, l = k-1, then k = l+1. Now above expression becomes

= l=0n-1(-1)l+1[nCl]+(-1)n+1

= l=0n-1(-1)l+1[nCl]+(-1)n+1[nCn]

= l=0n(-1)l+1[nCl]

= -l=0n(-1)l[nCl]

= 0


Ex-20: As given in the hint, we will prove that for all n1, 0<an<12

Base case: For n = 1
a1=(a0)2+14=14

clearly, 0<a1<12

Induction step: Let n be arbitrary natural number greater than or equal to 1 and 0<an<12

Now, an+1
= (an)2+14
> 0

Also, an+1
= (an)2+14
< (12)2+14
= 14+14
= 12

Thus, 0<an+1<14

Monday, June 28, 2010

my emacs cheat-sheet

This post will be a record of my random emacs cheats, will keep on updating it whenever I learn something new.

Navigation:
C-a -- Go to start of current line
M-m --Go to start of the current line after the whitespaces
C-e -- Go to end of current line
M-a -- Go to start of current sentence
M-e -- Go to end of current sentence
C-n -- goto next line
C-p -- goto prev line
C-f -- forward char
M-f -- forward word
C-b -- backward char
M-b -- backward word
M-r -- reposition point to centre/top/bottom of the page without scroll
C-v -- Scroll one page down
M-v -- Scroll one page up
C-M-v --Scroll other window
C-l -- Bring current line to the centre
C-< -- Go to start of buffer
C-> -- Go to end of buffer
M-g g -- Go to a particular line

Dired Mode Tips:
o -- open file in other buffer and move cursor there
C-o -- open file in other buffer but dont move cursor
g -- refresh dir listing
^ -- go to parent director
q -- close directory
D -- delete file/dir
+ -- create new directory
R -- rename/move file
C -- copy file

m -- mark a file
u -- unmark a file
U -- unmark all

Essential Org Mode:
tab / shift-tab : fold / unfold
M-up/down : move a headine up/down
M-RET : enter a new headline
M-left/right : increase/decrease indentation of an item but not its children
M-S-left/right : increase/decrease indentation of an item and its children
C-c C-n/p : next/previous heading
C-c C-f/b : next/previous heading, same level
C-c C-u : backward to higher level heading
S-up/down : previous/next plain list item
you can have lists. unordered list start with -/+/*  and ordered list start with number and dot e.g. 1., 2.
list line which is a  term and its description can be written as term :: description
also you can make words *bold*, /italic/, _underlined_, =code=, ~verbatim~ and +strike-through+


IDO Mode Tips:
C-f -- go to open file selection
C-b -- go back to open buffer selection
C-j -- open directory in dired mode
C-g -- cancel

Mark:

C-SPC -- Set mark at current location
C-x C-x -- Swap mark and point (or go back to most recent mark location, this can be used to go to and fro start-end of just yanked text)
C-u C-SPC -- Cycle through mark ring(stores last 16 mark locations)

Copy/Cut/Kill:
C-k -- cuts/kills current line
C-w -- cuts/kills region
M-w -- copies/save-on-kill-ring region

Yank/Paste:
C-y -- paste most recent copy/cut
M-y -- replace pasted text with earlier copied/cut text

Undo:
C-/ OR C-_ OR C-x u

Search/Replace:
C-s -- Forward search [Use M-c to toggle case-sensitivity]
C-r -- Backward search
C-s C-w -- Search the word under cursor
C-s C-s -- repeat last search query
M-% -- query replace, y for yes, n for no, ! for all
C-M-s -- regex forward search
C-M-% -- regex query replace

when in Search mode you can use..
M-c --toggle case sensitivity
M-n, M-p --go through history of past searches
(Regexp Syntax on Emacs Wiki and "M-x regexp-builder" can be useful)

Macros:
C-x ( -- Start recording a macro
C-x ) -- Finish recording a macro
C-x e -- Call the macro

Repeats:
C-u <n> -- Repeat a command n times
C-M-0 to C-M-9
M-0 to M-9
C-0 to C-9

Font:
Increase Buffer Font Size: C-x C-+
Decrease Buffer Font Size: C-x C--

Windows:
C-x +  -- balance size of all windows

Dynamic Abbreviation Expand:
M-/ -- call command dabbrev-expand

Line-Endings:
Call set-buffer-file-coding-system, then give a value of "mac", "dos", "unix". For details, see http://xahlee.org/emacs/emacs_line_ending_char.html

Deleting-Lines:
M-x flush-lines RET <regex>  RET (To delete empty lines regex would be ^\s-*$ )

Typing Ctrl-<char> :
C-q C-<char>
C-q C-j (for newline char)

Cancel:
C-g

Editing Remotely:
You can open file or dired buffer using "/ssh:user@remote_host_or_ip:/path/to/file_or_dir"
You can use emacs bookmarks for remote hosts visited frequently. Also, you can run eshell on a buffer visiting remote file/dir and that eshell will effectively be running on the remote machine.

Other Important ones:
kill-rectangle, yank-rectangle, delete-rectangle
delete-trailing-whitespace, delete-whitespace-rectangle

Emacs Daemon:
emacs --daemon[=optional_name] #starts daemon
emacsclient -c [-n] #in a X window, -n to return control to terminal
emacsclient -t #run in terminal
emacsclient -e "(kill-emacs)" #kill daemon from shell
(kill-emacs) or (save-buffers-kill-emacs) #kill daemon from within emacs frame
You might want to set following env variables..
EDITOR=emacsclient -c
VISUAL=emacsclient -c

Finding Help:
C-h k -- find out what a key does
C-h m -- info about currently active modes
C-h f -- describe a function
C-h a -- type a regex/string and find info about it
M-x describe-bindings -- list all key bindings
Use menu on top to see [mode specific] key shortcuts

Tips:
Use Incremental search for jumping around
Use repeat functionality wherever you can
Use M-/ for auto word completion

Others:
GNU Emacs Manual
GNU Emacs-Lisp Reference Manual
Org Mode Basics
Org Mode Key bindings

Sunday, June 27, 2010

how to prove it - ch6, sec6.2(More Examples) ex

This section shows some example proofs to emphasize the fact that power of mathematical induction goes far beyond proving facts about various properties of natural numbers.

=================================================================================================

Ex-1:
(a) First, we prove that R' is reflexive in A'
Let x be arbitrary element of A'. Then (x,x)AʹXAʹ. Since AʹA, so (x,x)R also. Since (x,x)AʹXAʹ and (x,x)R, hence (x,x)Rʹ. Since x is arbitrary, so R' is reflexive.

Second, we prove that R' is antisymmetric in A'
Let (x,y) be arbitrary element of A' x A' s.t. (x,y)Rʹ and (y,x)Rʹ. Then (x,y)R and (y,x)R. Since R is antisymmetric, so x = y. Thus R' is antisymmetric.

Third, we prove that R' is transitive in A'
Let (x,y) and (y,z) be arbitrary elements of A' x A' s.t. (x,y)Rʹ and (y,z)Rʹ. Then (x,y)R and (y,z)R. Then (x,z)R. Also (x,z)AʹXAʹ. Then (x,z)Rʹ. Since (x,y) and (y,z) are arbitrary, so R' is transitive.

Hence R' is partial order on A'

(b) First, prove that T is reflexive in A.
Let x be arbitrary element of A. If x = a, then (x,x){a}XA or else (x,x)Tʹ. Thus (x,x)T. Since x is arbitrary, so T is reflexive.

Second, we prove that T is antisymmetric on A.
Let (x,y) be arbitrary element of AxA s.t. (x,y)T and (y,x)T. Let us consider following exhaustive set of cases.
Case#1: (x,y)Tʹ and (y,x)Tʹ
Since T' is antisymmetric, so x = y

Case#2: (x,y){a}XA and (y,x){a}XA
Then x = y = a

Case#3: (x,y)Tʹ and (y,x){a}XA
Then y = a and yAʹ, which is not possible.

Case#4: (x,y){a}XA and (y,x)Tʹ
Then x = a and xAʹ, which is not possible

Hence x = y. Thus T is antisymmetric.

Third, we prove that T is transitive on A.
Let (x,y) and (y,z) be arbitrary elements of A x A s.t. (x,y)T and (y,z)T. Let us consider following exhaustive set of cases.
Case#1: (x,y)Tʹ and (y,z)Tʹ
Then (x,z)Tʹ. Then (x,z)T

Case#2: (x,y){a}XA and (y,z){a}XA
Then x = y = a. Thus (x,z){a}XA. Then (x,z)T

Case#3: (x,y)Tʹ and (y,z){a}XA
Then y = a and yAʹ. Its not possible

Case#4: (x,y){a}XA and (y,z)Tʹ
Then x = a. Since (a,z){a}XA, so (x,z){a}XA. Then (x,z)T

Thus (x,z)T. Hence T is transitive.

Thus T is partial order on A.

Now, let x and y be arbitrary elements of A. Let us consider following exhaustive set of cases
Case#1: x = a
Then (x,y){a}XA and hence (x,y)T

Case#2: y = a
Then (y,x){a}XA and hence (y,x)T

Case#3: xa and ya
Then xAʹ and yAʹ. Thus either (x,y)Tʹ or (y,x)Tʹ. Then either (x,y)T or (y,x)T.

Hence either (x,y)T or (y,x)T. Since x and y are arbitrary, so T is total order on A.

Now, we prove that RT
Let (x,y) be arbitrary element of A x A s.t. (x,y)R. y = a is not possible because a is R-minimal. Then yAʹ. Let us consider following exhaustive set of cases now.

Case#1: x = a
The (a,y){a}XA. Then (a,y)T. Then (x,y)T.

Case#2: xAʹ
Then (x,y)Rʹ. Then (x,y)Tʹ. Then (x,y)T.

Hence (x,y)T. Since (x,y) is arbitrary, so RT


Ex-2: Base case: T = R satisfies mentioned properties
Indcution step: Let all the subsets of A that have n elements satisfy the mentioned property.

Let B be a subset of A containing n+1 elements. Let us define a set B' = B\{b} , where b is one arbitrary element of B. Since B' has n elements, so it follows from inductive hypothesis that we can choose a relation T' on A s.t. RTʹ and xBʹyA((x,y)Tʹ(y,x)Tʹ).
Now let A1 = {xA(x,b)Tʹ} , A2 = A\A1 and T = Tʹ(A1XA2)

we will now prove that T has all the necessary properties, that is
- T is partial order on A
- RT
- xByA(xTyyTx)

First, we prove that T is reflexive on A
Let x be an arbitrary element of A. Then (x,x)Tʹ. Then (x,x)T. Since x is arbitrary, so T is reflexive.

Second, we prove that T is antisymmetric on A
Let (x,y) be arbitrary element of A x A s.t. (x,y)T and (y,x)T. Let us consider following exhaustive set of cases
Case#1: (x,y)Tʹ and (y,x)Tʹ
Then x = y

Case#2: (x,y)Tʹ and (y,x)A1XA2
Then xA2 and yA1. Then (y,b)Tʹ. Since (x,y)Tʹ and (y,b)Tʹ. So (x,b)Tʹ. Then xA1. but xA2. This is a contradiction and hence this case is not possible.

Case#3: (x,y)A1XA2 and (y,x)Tʹ
not possible for same reason as above

Case#4: (x,y)A1XA2 and (y,x)A1XA2
this is also not possible as x or y can not be element of both of A1 and A2

Hence x = y. Since (x,y) is arbitrary, so T is antisymmetric.

Third, we prove that T is transitive on A
Let (x,y) and (y,z) be arbitrary elements of A x A s.t. (x,y)T and (y,z)T. let us consider following exhaustive set of cases.
Case#1: (x,y)Tʹ and (y,z)Tʹ
Then (x,z)Tʹ and hence (x,z)T

Case#2: (x,y)A1XA2 and (y,z)A1XA2
This is not possible as y can't both be in A1 and A2

Case#3: (x,y)Tʹ and (y,z)A1XA2
Then yA1. Then (y,b)Tʹ. Since (x,y)Tʹ and (y,b)Tʹ, so (x,b)Tʹ. Then xA1. Also since (y,z)A1XA2, so zA2. So (x,z)A1XA2. Then (x,z)T

Case#4: (x,y)A1XA2 and (y,z)Tʹ
TODO

Hence (x,z)T. Since (x,y) and (y,z) are arbitrary, so T is transitive.

Thus T is partial order on A.

Since RTʹ, so RT.

Let x be an arbitrary element of B and y be an arbitrary element of A. Let us consider following exhaustive set of cases.

Case#1: xBʹ
Then (x,y)Tʹ or (y,x)Tʹ. Then (x,y)T or (y,x)T

Case#2: x = b
If yA1 then (y,b)Tʹ, hence (y,b)T.Or, if yA2, then since bA1 so (b,y)A1XA2 and hence (b,y)T. Thus either (b,y)T or (y,b)T. Hence either (x,y)T or (y,x)T.

Thus (x,y)T or (y,x)T


Ex-3: Base case: Let a be arbitrary element of A and B = {a}. clearly a is R-smallest as it is the only one
Induction step:
Let every subset of A that has n elements contain an R-smallest element.

Let B be a set s.t. BA and has n+1 elements. Let b be an arbitrary element of B and define B' = B\{b}. Since B' has n elements, so we can choose aBʹ s.t. a is R-smallest in B'. Since R is total order so there are only two possible cases, Let us consider both of them
Case#1: aRb
Then a is R-smallest of B

Case#2: bRa
Then its trivial to check that b is R-smallest of B

Hence there always exists a R-smallest element for any non-empty subset of A.


Ex-4:
(a) Base case: Let a be arbitrary element of A. B = {a}. Since R is reflexive on A, so (a,a)R. Hence (a,a)RR

Induction Step: Let every subset of A that has n elements has the mentioned property.

Let B be a subset of A with n+1 elements. Let b be an arbitrary element of B, and define B' = B\{b}. Since B' has n elements, so we can choose an element xBʹ s.t. yBʹ((x,y)RR). Let us consider following possible cases.

Case#1: (x,b)RR
Then yB((x,y)RR)

Case#2: (x,b)R
Let y be an arbitrary element of B. If y = b, then since R is reflexive, so (b,b)R and therefore (b,y)=(b,b)RR. Now suppose yb. Then yBʹ, so by choice of x we know that (x,y)RR. Then we can choose some zA s.t. (x,z)R and (z,y)R. We have (x,z)R, so if (z,b)R then (x,b)RR, which contradicts with the assumption for this case. Therefore (z,b)R, so (b,z)R. Since (b,z)R and (z,y)R, so (b,y)RR. Since y is arbitrary, so yB((b,y)RR)

(b) Let A = set of all the contestants
R = {(x,y)AXAxbeatsy}

clearly, xAyA(xRyyRx)

From part(a), since AA, we can choose some aA s.t. yA((a,y)RR). Then a is the excellent contestant. So atleast one excellent contestant exists.


Ex-5: Base case: For n = 1, F1 = 221+1 = 5 = 3 + 2 = F0+2
Induction step: Let n be an arbitrary natural number greater than 1 s.t. Fn = F0.F1.F2....Fn-1+2

So, F0.F1.F2....Fn-1.Fn+2
= (F0.F1.F2....Fn-1).Fn+2
= (Fn-2).Fn+2
= (Fn)2-2Fn+2
= (22n+1)2-2(22n+1)+2
= 22(n+1)+1+2(22n)-2(22n)-2+2
= 22(n+1)+1
= Fn+1


Ex-6: Base case: clearly a1a1
Induction step: Let a1+a2+a3+...+ana1+a2+a3+...+an

Then, a1+a2+a3+...+an+an+1
= (a1+a2+a3+...+an)+an+1
a1+a2+a3+...+an+an+1 (by triangle inequality)
a1+a2+a3+...+an+1 (by induction hypothesis)


Ex-7:
(a) (a-b)20
=> a2+b2-2ab0
=> a2+b22ab

Since a and b are positive real numbers, so ab is also positive real numbers. Now, divide both sides with ab

Then, ab+ba2

(b) (c-a)(c-b)0
=> c2-cb-ca+ab0
=> ab+c2-cbca

Since a and c are positive real numbers, so ca is also positive real numbers. Now, divide both sides with ca

=> abca+c2ca-cbcacaca
=> bc+ca-ba1

(c) Base case: For n = 2, a1a2+a2a12 (using result of part(a) )
Induction Step: Let a1a2+a2a3+...an-1an+ana1n

Now, a1a2+a2a3+...an-1an+anan+1+an+1a1
= a1a2+a2a3+...an-1an+(ana1-ana1)+anan+1+an+1a1
= (a1a2+a2a3+...an-1an+ana1)-ana1+anan+1+an+1a1
n+(anan+1+an+1a1-ana1)

If we put, c = an+1, b = an and a = a1, we'll see that anan+1+an+1a1-ana11

so, a1a2+a2a3+...an-1an+anan+1+an+1a1n+1


Ex-8:
(a) Scratchwork: a+b2ab
=> a2+b2+2ab4ab
=> a2+b2+2ab4ab
=> a2+b2-2ab0
=> (a-b)20

Formal Proof:
clearly (a-b)20
=> a2+b2-2ab0
=> a2+b2+2ab4ab
=> a2+b2+2ab4ab (now take square root of both sides)
=> a+b2ab

(b) Base case: for n=1, using part(a) result we can say that a1+a22a1.a2

Induction step: Let a1+a2+a3+...+a2n2n(a1.a2.a3...a2n)12n

Now, a1+a2+a3+...+a2n+a2n+1+a2n+2+...+a2n+12n+1
= a1+a2+a3+...+a2n2n+1+a2n+1+a2n+2+...+a2n+12n+1
= 12(a1+a2+a3+...+a2n2n+a2n+1+a2n+2+...+a2n+12n)

apply the inductive hypothesis now to get following...
= 12[(a1.a2.a3...a2n)12n+(a2n+1.a2n+2...a2n+1)12n]

Now, apply the result of part(a) to get
= (a1.a2.a3...a2n+1)12n+1

(c) Base case is trivial with n = n0
Induction step: Let nn0 s.t.

a1+a2+a3+...+ann<(a1.a2.a3...an)1n

Now, Let an+1=m=a1+a2+a3+...+ann
=> m<(a1.a2.a3...an)1n
=> mn<(a1.a2.a3...an)
=> mn+1<(a1.a2.a3...an.an+1)
=> m<(a1.a2.a3...an.an+1)1n+1

So, a1+a2+a3+...+an+an+1n+1
= a1+a2+a3+...+ann+1+an+1n+1
= mnn+1+mn+1
= m(n+1)n+1
= m
< (a1.a2.a3...an.an+1)1n+1

(d) Let it fails for some n0, then using the result of part(c) we can choose some n1 s.t. 2nn0 and there is a list of length 2n s.t. arithmatic-geomatric mean inequality fails. But, this contradicts result proved in part(b). Hence such a n0 does not exist and arithmatic-geomatric mean inequality always holds.


Ex-9: n1a1+1a2+1a3+...+1an
Let bk=1ak.

Then, n1a1+1a2+1a3+...+1an
= nb1+b2+b3+...bn

now apply arithmatic-geometric mean inequality to get following
1(b1.b2.b3...bn)1n
= (b1.b2.b3...bn)-1n
= (a1.a2.a3...an)1n


Ex-10: Base case: A = , P(A)={}, clearly it has 20=1 elements

Induction Step: Let power set of every set, that have n elements, has 2n elements.

Let A be a set of n+1 elements and x be an arbitrary element of A. Let, B = A\{x}. As B has n elements, so by inductive hypothesis P(B) has 2n elements.

Now P(A) = P(B){y{x}yP(B)}

Number of elements in {y{x}yP(B)} = 2n

also P(B) and {y{x}yP(B)} are disjoint.

So, # of elements in P(A) = # of elements in P(B) + # of elements in {y{x}yP(B)} = 2n+2n = 2n+1


Ex-11: Base case: A set with 2 elements, A = {a,b}, P(A) = {{a,b}}, clearly it has 2(2-1)2 = 1 element only

Induction Step: Let every set with n elements fulfills the given property.

Let A be a set of n+1 elements and x be an arbitrary element of A. Let, B = A\{x}.

clearly P(A) = P(B) {{x,y} | yB }

As B has n elements, so by inductive hypothesis P(B) has n(n-1)2 elements. Also {{x,y} | yB } has n elements. And P(B) and {{x,y} | yB } are disjoint.

So, # of elements in P(A) = # of elements in P(B) + # of elements in {{x,y} | yB }
= n(n-1)2 + n
= n(n+1)2


Ex-12:


Base case: For n = 1, 41=4, if we divide an equilateral triangle in 4 congruent triangles. [Fig-1] shows how we can fill it with one corner removed.

Induction Step: Suppose if we divide any equilateral triangle into 4n congruenet equilateral triangles, then we can fill the remain area after removing one corner with given trapezoidal tiles.

Now, if we divide a big equilateral triangle into 4n+1 congruent equilateral triangles. We can look at the resulting triangle as 4 smaller equilateral triangles each divided in 4n congruent equilateral triangles as shown in [Fig-2].

Triangle ABC is divided into 4n+1 triangles. We can look at the resulting triangle as made up of triangles APQ, PBR, QRC and PQR; each of which are divided into 4n congruenet equilateral triangles. If we remove one corner at A and place a tile at R as shown in [Fig-2]. Then all the 4 triangles got one corner removed and by induction hypothesis can be filled with given tiles.

Hence, when triangle ABC is divided into 4n+1 congruent triangles, it can be filled with given tiles with one corner removed.


Ex-13: Base Case: n = 1, clearly one chord divides the circle in to 12+1+22 = 2 regions.

Induction step: Let the given property be true for n chords.

If we draw a new chord cutting each other n chords, then it passes through n+1 regions cutting each of them into two halves. So resulting circle has

n2+n+22+(n+1) = n2+3n+42 = (n+1)2+(n+1)+22 regions


Ex-14: The key here is that, after n chords... if you draw (n+1)th chord. The new chord will divide the circle into two halves. Take any halve and invert the colors of all the regions inside it. Then you'll end up with the desired color scheme and that proves the given statement.


Ex-15: The flaw is that nA doesn't necessarily mean that n+1A also


Ex-16: Induction step proves the statement with the assumption that there are atleast 3 elements inside A(as he chooses unique a1, a2 and a3). Base case proves the statement for sets containing 1 element. None of them prove the given statement for sets containing only 2 elements. Hence the given proof is wrong.

Saturday, June 26, 2010

how to prove it - ch6, sec6.1(Proof by mathematical Induction) ex

This scetion introduces another proof technique, called Mathematical Induction, to prove the statements P(n) where n is arbitrary natural number. That is n = {0, 1, 2, 3, 4, ...}. Here is how you do it.

To Prove a goal of the form nNP(n):
First prove P(0), and then prove nN(P(n)P(n+1)). The first of these proofs is sometimes called the *base case* and the second the *induction step*. Premise of the induction step is called the *induction hypothesis*.

Form of the final proof:
Base case: [Proof of P(0) goaes here]
Induction Step: [Proof of nN(P(n)P(n+1)) goes here]

Why Mathematical Induction works?
Well, certainly P(0) is true because we prove it in the base case. Also, we prove that nN(P(n)P(n+1)). So P(0) -> P(1). Then P(1) -> P(2). Then P(2) -> P(3). It goes on. Continuing in this way, you should be able to see that by repeatedly applying the induction step you can show that P(n) must be true for every natural number.

A small variation in the problem might be to prove the goal of the form, for all natural number n k, k is a natural number, P(n). Then simply the base case becomes n = k instead of n = 0.

=============================================================================================

Ex-1:
Base case: For n = 0, both sides are 0 and hence same.

Induction Step:
Let n be an arbitrary natural number s.t. 0 + 1 + 2 + ... + n = n(n+1)2

Now, 0 + 1 + 2 + ... + n + (n+1)
= n(n+1)2 + (n+1)
= (n+2)(n+1)2


Ex-2: Base case: For n = 0, both sides are 0 and hence same
Induction Step:
Let n be an arbitrary natural number s.t. 02+12+22+...+n2=(n(n+1)(2n+1)6

Now, 02+12+22+...+n2+(n+1)2
= (n(n+1)(2n+1)6+(n+1)2
= (n+1)(n+2)(2n+3)6


Ex-3: Base case: For n = 0, both sides are 0 and hence same
Induction Step:
Let n be an arbitrary natural number s.t. 03+13+23+...+n3=[(n(n+1)2]2

Now, 03+13+23+...+n3+(n+1)3
= [(n(n+1)2]2+(n+1)3
= (n+1)2(n2+4(n+1))4
= [(n+1)(n+2)2]2


Ex-4: Scratchwork:
P(1) = 1, P(2) = 4, P(3) = 9, P(4) = 16...

its easy to guess that P(n) = n2. Let us try to prove it now.

Formal Proof:

Base case: For n = 1, LHS = 1 and RHS = 12 = 1. cleary LHS = RHS = 1

Induction step:
Let n be arbitrary natural number s.t. n1 and 1 + 3 + 5 ... + (2n-1) = n2

Now, 1 + 3 + 5 + ... + (2n-1) + (2n+1)
= n2+2n+1
= (n+1)2


Ex-5: Base case: For n = 0, both sides are 0 and hence same

Induction step:
Let n be arbitrary natural number s.t. 0.1 + 1.2 + 2.3 + ... + n(n+1) = n(n+1)(n+2)3

Now, 0.1 + 1.2 + 2.3 + ... + n(n+1) + (n+1)(n+2)
= n(n+1)(n+2)3 + (n+1)(n+2)
= (n+1)(n+2)(n+3)3


Ex-6: Scratchwork: My guess using results of ex1,5 is n(n+1)(n+2)(n+3)4
Formal Proof:

Base case: For n = 0, both sides are 0 and hence same.

Induction step:
Let n be arbitrary natural number s.t. 0.1.2 + 1.2.3 + 2.3.4 + ... + n(n+1)(n+2) = n(n+1)(n+2)(n+3)4

Now, 0.1.2 + 1.2.3 + 2.3.4 + ... + n(n+1)(n+2) + (n+1)(n+2)(n+3)
= n(n+1)(n+2)(n+3)4 + (n+1)(n+2)(n+3)
= (n+1)(n+2)(n+3)(n+4)4


Ex-7: Guess is 3n+1-12

Base case: For n = 10, LHS = RHS = 1

Induction step:
Let n be arbitrary natural number s.t. 30+31+32+...+3n=3n+1-12

30+31+32+...+3n+3n+1
= 3n+1-12+3n+1
= 3n+2-12


Ex-8: Base case: For n = 1, LHS = 1 - 1/2 = 1/2 and RHS = 1/2. clearly both sides are equal

Induction Step:
Let n be arbitrary natural number s.t. 1-12+13-14+...+12n-1-12n=1n+1+1n+2+...+12n

Now, 1-12+13-14+...+12n-1-12n+12n+1-12n+2
= 1n+1+1n+2+...+12n+12n+1-12n+2
= 1n+2+...+12n+12n+1-12n+2+1n+1
= 1n+2+...+12n+12n+1+12n+2


Ex-9:
(a) Base case: For n = 0, clearly 2 divides 02+0=0
Induction Step:
Let n be arbitrary natural number s.t. 2n2+n. Then we can choose some integer k s.t. n2+n=2k

(n+1)2+(n+1)
= n2+2n+1+n+1
= (n2+n)+2(n+1)
= 2(k + n + 1)

clearly, 2[(n+1)2+(n+1)]

(b) Base case: For n = 0, clearly 6 divides 03-0=0
Induction Step:
Let n be arbitrary natural number s.t. 6(n3-n). Then we can choose some integer k s.t. n3-n=6k

Now, (n+1)3-(n+1)
= n3+1+3n2+3n-n-1
= (n3-n)+3(n2+n)

In Part(a) we prove that n2+n is always divisible by 2. so we can choose some integer l s.t. n2+n=2l

So, (n+1)3-(n+1)
= (n3-n)+3(n2+n)
= 6k + 3(2l)
= 6(k+l)

clearly 6 divides (n+1)3-(n+1)


Ex-10: Base case: For n = 0, clearly 64 divides 90-8(0)-1=0
Induction step:
Let n be arbitrary natural number s.t. 64 divides 9n-8n-1. Then we can choose some integer k s.t. 9n-8n-1=64k

Now, 9n+1-8(n+1)-1
= 9.9n-8n-9
= 9(9n-8n-1)+64n
= 9(64k) + 64n
= 64(9k + 1)

clearly 64 divides 9n+1-8(n+1)-1


Ex-11: Base case: For n = 0, clearly 9 divides 40+6(0)-1=0
Induction step:
Let n be arbitrary natural number s.t. 9 divides 4n+6n-1. Then we can choose some integer k s.t. 4n+6n-1=9k

Now, 4n+1+6(n+1)-1
= 4.4n+6n+6-1
= 4(4n+6n-1)-18n+9
= 4(9k)-9(2n-1)
= 9(4k-2n+1)

clearly 9 divides 4n+1+6(n+1)-1


Ex-12: Base case: For n = 0, clearly (a-b) divides (a0-b0)=0
Induction step:
Let n be arbitrary natural number s.t. (a-b) divides an-bn. Then we can choose some integer k s.t. an-bn=(a-b)k

Now, an+1-bn+1
= a(an-bn)+abn-bn+1
= a(an-bn)+bn(a-b)
= (a-b)(ka+bn)


clearly (a-b) divides an+1-bn+1


Ex-13: Base case: For n = 0, clearly (a+b) divides a2(0)+1+b2(0)+1=(a+b)
Induction step:
Let n be arbitrary natural number s.t. (a+b) divides a2n+1+b2n+1

Now, a2(n+1)+1+b2(n+1)+1
= a2n+3+b2n+3
= a2(a2n+1+b2n+1)-a2b2n+1+b2n+3
= a2(a+b)k-b2n+1(a2-b2)
= (a+b)(a2k-b2n+1(a-b))

clearly (a+b) divides a2(n+1)+1+b2(n+1)+1


Ex-14: Base case: For n = 10, 210=1024>103=1000
Induction step:
Let n be arbitrary natural number s.t. 2n>10n

Now, 2n+1
= 2.2n
> 2n3 = n3+n3 = n3+10n2 (bacause n10)
= n3+3n2+3n2+n2
> n3+3n2+3n+1 = (n+1)3

clearly 2n+1>(n+1)3


Ex-15: Base case: For n = 0, clearly 00(mod3)
Inductive step:
Let n be a arbitrary natural number s.t. n0(mod3) or n1(mod3) or n2(mod3). Let us consider all the possible cases for (n+1)

Case#1: n0(mod3)
Then we can choose some integer k s.t. n = 3k. Then (n + 1) = 3k + 1. Then (n+1)-1=3k. Thus (n+1)1(mod3)

Case#2: n1(mod3)
Then we can choose some integer k s.t. (n-1) = 3k. Then (n+1) = 3k+2. Then (n+1)-2=3k. Thus (n+1)2(mod3)

Case#3: n2(mod3)
Then we can choose some integer k s.t. (n-2) = 3k. Then (n+1) = 3k+3. Then (n+1)-0=3(k+1). Thus (n+1)0(mod3)

Thus (n+1)0(mod3) or (n+1)1(mod3) or (n+1)2(mod3)


Ex-16: Base case: For n = 1. LHS = 2.21 = 4, RHS = (1)21+1=4. clearly LHS = RHS
Induction Step:
Let n be arbitrary natural number s.t. 2.21+3.22+4.23+...+(n+1)2n=n2n+1

Now, 2.21+3.22+4.23+...+(n+1)2n+(n+2)2n+1
= n2n+1+(n+2)2n+1
= n2n+1+n2n+1+2n+2
= n2n+2+2n+2
= (n+1)2n+2


Ex-17:
(a) Base case is not proved.

(b) Scratchwork:
I could not actually guess it. So I solved it. However, after finding the answer, it seems it was so easy to guess :)

P(n) = 1.30+3.31+5.32+...+(2n+1)3n
3P(n) = 1.31+3.32+...+(2n-1)3n+(2n+1)3n+1

P(n) - 3P(n) = 1.30+2.31+2.32+....+2.3n-(2n+1)3n+1
P(n) - 3P(n) = -1.30+2(30+31+32+...+3n)-(2n+1)3n+1 ,now use result of ex-7
P(n) - 3P(n) = -1+23n+1-12-(2n+1)3n+1
2P(n) = 1-23n+1-12+(2n+1)3n+1
2P(n) = 1-3n+1+1+(2n+1)3n+1
2P(n) = 2+2n3n+1
P(n) = 1+n3n+1

So, 1.30+3.31+5.32+...+(2n+1)3n=1+n3n+1

Formal Proof:

Base case: For n = 0. LHS = 1.30 = 1, RHS = 1+(0)30+1 = 1 + 0 = 1

Induction step:
Let n be arbitrary natural number s.t. 1.30+3.31+5.32+...+(2n+1)3n=1+n3n+1

Now, 1.30+3.31+5.32+...+(2n+1)3n+(2n+3)3n+1
= 1+n3n+1+(2n+3)3n+1
= 1+n3n+1+2n3n+1+3.3n+1
= 1+3n3n+1+3n+2
= 1+(n+1)3n+2


Ex-18: Note that even/odd is defined to natural numbers 1
Base case: for n = 1, clearly 1 is odd and a1=a<0

Induction step:

Let n be an arbitrary natural number. if n is even then an>0 or if n is odd then an<0. Let us consider both the cases

Case#1: n is even and an>0
(n+1) is odd. And an+1 = a.an. Since a is negative and an is positive, so an+1<0

Case#2: n is odd and an<0
(n+1) is even. And an+1 = a.an. Since a is negative and also an is negative, so an+1>0


Ex-19:
(a) Base case: For n = 1, 0 < a < b
Induction step:
Let n be arbitrary natural number greater thant or equal to 1 s.t. 0<an<bn.

clearly, 0<an+1.

Now, bn+1=bbn>ban>aan=an+1
Thus, 0<an+1<bn+1

(b) TODO

(c) We'll prove the inequality directly.
inequality to prove is, abn+ban<an+1+bn+1. it can rewritten as an+1+bn+1-abn-ban>0

Now an+1+bn+1-abn-ban
= an+1-abn+bn+1-ban
= a(an-bn)-b(an-bn)
= (a-b)(an-bn)
= (b-a)(bn-an)

from part(a), an<bn
=> (bn-an)>0

also (b-a) > 0

Hence an+1+bn+1-abn-ban = (b-a)(bn-an) > 0

(d) Base case: For n = 2,
(a+b2)2=a2+b24+2ab4

In part(c), putting n = 1 gives
ab+ba<a2+b2
=> 2ab<a2+b2

So, (a+b2)2
= a2+b24+2ab4
< a2+b24+a2+b24 = a2+b22

Induction step:
Let n be arbitrary natural number greater than or equal to 2 s.t. (a+b2)n<an+bn2

Multiplying both sides of above inequality with a+b2, we get

(a+b2)n+1<an+bn2.a+b2
=> (a+b2)n+1<an+1+bn+1+ban+abn4

from part(c), abn+ban<an+1+bn+1
so, an+1+bn+1+ban+abn4<2(an+1+bn+1)4=an+1+bn+12

Hence, (a+b2)n+1<an+1+bn+12

Wednesday, June 23, 2010

how to prove it - ch5, sec5.3(Inverses of Functions) ex

This section is collection of some theorems about inverses of a funcion. Here they are, their proofs can be looked up in the book.

1. Suppose f:A -> B. f is one-to-one and onto iff f-1:B -> A

2. Suppose f is a function from A to B and f-1 is a function from B to A. Then f-1f=iA and ff-1=iB

3. Suppose f:A -> B.
- If there is a function g:B -> A s.t. gf=iA then f is one-to-one.
- If there is a function g:B -> A s.t. fg=iB then f is onto

All of the above can be combined into this one.

4. Suppose f:A -> B. Then the following statements are equivalent.
- f is one-to-one and onto
- f-1:B -.A
- There is a function g:B->A s.t. gf=iA and fg=iB

Now, this one is used in proofs alot.

5. Suppose f:A->B, If there exists a function g:B->A s.t. gf=iA and fg=iB. Then f is one-to-one and onto and g=f-1

================================================================================================

Ex-1: the person sitting immediately to the right of p

Ex-2: A\X

Ex-3: Consider, g(x) = 3x-52.
Then (gf)(x)
= g(f(x))
= g(2x+53)
= 3(2x+53)-52
= x

Thus gf=iR

Also, (fg)(x)
= f(g(x))
= f(3x-52)
= 2(3x-52)+53
= x

Thus fg=iR

It follows from theorem#5 above that f is one-to-one and onto. and f-1(x) = g(x) = 3x-52


Ex-4: Let g be a function from R to R defined as g(x) = (x+32)13

Then, (gf)(x)
= g(f(x))
= g(2x3-3)
= ((2x3-3)+32)13
= (x3)13
= x

Thus gf=iR

Also, (fg)(x)
= f(g(x))
= f((x+32)13)
= 2((x+32)13)3-3
= 2(x+32)-3
= x

Thus fg=iR

Hence f is one-to-one and onto and f-1(x) = g(x) = (x+32)13


Ex-5: Scratchwork:
y = 102-x
taking log of both sides with base 10
log(y) = (2-x)log(10)
=> log(y) = 2-x
=> x = 2 - log(y)

Formal Proof:
Let g:R+R defined by g(x) = 2 - log(x)

It is easy to check that gf=iR and fg=iR+. Hence f is one-to-one and onto and f-1 = g(x) = 2-log(x)


Ex-6: Scratchwork:
y = 3xx-2
=> xy - 2y = 3x
=> x(y-3) = 2y
=> x = 2yy-3

which is not defined for y = 3, clearly B = R\{3}

(a),(b) B = R\{3} and consider g:B -> A defined as g(x) = 2xx-3.

Let x be an arbitrary element of A.
Then (gf)(x)
= g(f(x))
= g(3xx-2)
= 2(3xx-2)(3xx-2)-3
= 6x3x-3(x-2)
= 6x6
= x

Thus gf=iA

Its trivial to check that fg=iB

Hence f is one-to-one and onto and f-1 = g(x) = 2xx-3


Ex-7:
(a) Let x be an arbitrary real number.
Then, (f2f1)(x)
= f2(f1(x))
= f2(x+7)
= x+75
= f(x)

Since x is arbitrary, so f2f1 = f

(b) Note: g means f-inverse-1 and h means f-inverse-2.
It is trivial to compute that
g(x) = x - 7
h(x) = 5x

(gh)(x) = g(h(x)) = g(5x) = 5x-7 = f-1(x)


Ex-8: Prove that ff-1=iB
(a) Let b be an arbitrary element of B. Then we can choose some aA s.t. f(a) = b. Then f-1(b)=a
Now, (ff-1)(b) = f(f-1(b)) = f(a) = b

Since b is arbitrary, so ff-1=iB

(b) It is given that f-1f=iA. Let b be an arbitrary element of B.
Then ((f-1f)f-1)(b) = (iAf-1)(b)
=> f-1((ff-1)(b)) = f-1(b)

Thus, (ff-1)(b)=b

Since b is arbitrary, so ff-1=iB


Ex-9: Suppose g:A->B s.t. fg=iB. Let b be an arbitrary element of B. Then (b,b)iB. Then (b,b)fg. Then, we can choose aA s.t. (b,a)g and (a,b)f. Thus f(a) = b. Since b is arbitrary, so f is onto.


Ex-10: () Let (b,a) be an arbitrary ordered pair in B X A s.t. (b,a)g. Since (b,b)iB, then (b,b)fg. Then we can choose some a0A s.t. (b,a0)g and (a0,b)f. Since (b,a)g, (b,a0)g and g is a function, so a=a0. Hence (a,b)f and then (b,a)f-1.

() Let (b,a) be an arbitrary ordered pair in B X A s.t. (b,a)f-1. Then (a,b)f. Since (a,a)iA, then (a,a)gf. Then we can choose some b0B s.t. (a,b0)f and (b0,a)g. Since (a,b)f, (a,b0)f and f is a function, so b=b0. Hence (b,a)g.


Ex-11:
(a) Since fg=iB, so by theorem 5.3.3(2) f is onto. Since f is one-to-one and onto, so f-1f=iA.
Then, g = iAg = (f-1f)g = f-1(fg) = f-1iB = f-1

(b) Since gf=iA, so by theorem 5.3.3(1) f is one-to-one. Since f is one-to-one and onto, so ff-1=iB.
Then, g = giB = g(ff-1) = (gf)f-1 = iAf-1 = f-1

(c) Since fg=iB, so by theorem 5.3.3(2) f is onto. We will prove by contradiction that f is not one-to-one. Assume f is one-to-one. Since f is one-to-one and fg=iB, using part(a) g = f-1. Since f is one-to-one and onto, so f-1f=iA. Then gf=iA, but this contradicts with the given. Hence the assumption is false and f is not one-to-one.

Since fg=iB, so by theorem 5.3.3(1) g is one-to-one. We will prove by contradiction that g is not onto. Assume g is onto. Then using part(2) f = g-1. Since g is one-to-one and onto, so gg-1=iA. Then gf=iA, but this contradicts with the given. Hence the assumption is false and g is not onto.


Ex-12: Let B' = Ran(f). We'll prove that f-1:B' -> A.
Existence:
Let b be an arbitrary element of B'. Since B' = Ran(f), so we can choose some aA s.t. (a,b)f. Then (b,a)f-1.

Uniqueness:
Let b be an arbitrary element of B' and a1, a2 be two arbitrary elements of A s.t. (b,a1)f-1 and (b,a2)f-1. Then (a1,b)f and (a2,b)f. Since f is one-to-one, so a1=a2.

Hence bB!aA(f-1(b)=a). Thus f-1:B' -> A


Ex-13:
(a) Its trivial to see that xAyA(xRyf(x)=f(y)). So f is compatible with R. By using result of ex-18(a) in section-5.1 there exists a function h:A/R -> B s.t. for all xA, h([x]R) = f(x)

(b) It follows straightforward from the result of ex-16, sec-5.2 that h is one-to-one.

Proof for h is onto:
Let b be an arbitrary element of B. Since f is onto, so we can choose aA s.t. f(a) = b. clearly a[a]R, so h([a]R) = f(a) = b. Hence, h is onto.

(c) Let g(b) = {xAf(x)=b}
Let a be an arbitrary element of A. Then
(gh)([a]R) = g(h([a]R)) = g(f(a)) = {xAf(x)=f(a)} = {xA(x,a)R} = [a]R. Thus, gh = iA/R

Let b be an arbitrary element of B. Then
(hg)(b) = h(g(b)) = h({xAf(x)=b})

Since f is onto, so we can choose some aA s.t. f(a) = b. Then
{xAf(x)=b} = {xAf(x)=f(a)} = {xAxRa} = [a]R

Then (hg)(b) = h([a]R) = f(a) = b. Thus hg = iB

Since gh = iA/R and hg = iB, so h-1(b) = g(b) = {xAf(x)=b}


NOTE: In all the exercises below, f|A denotes restriction of f to set A.


Ex-14:
(a) Let a be an arbitrary element of A'. Then we can choose some bB s.t. g(b) = a.
Now (gf)(a) = (gf)(g(b)) = (g(fg))(b) = (giB)(b) = g(iB(b)) = g(b) = a. Since a is arbitrary, so for any xAʹ, (gf)(x)=x

(b) Its easy to see that (fAʹ)g=iB and g(fAʹ)=iAʹ. Hence by theorem 5.3.4, f|A' is one-to-one and onto function from A' to B. And g = (fAʹ)-1


Ex-15: Let A' = Ran(g). It follows from result of ex-14(b) that g = (fAʹ)-1. Also, its trivial to find that Ran(g) = B, hence A' = B. Thus g = (fB)-1


Ex-16:
(a) Let b be some real number s.t. f(x) = b.
Then 4x-x2=b
=> x2-4x+b=0

This quadratic equation has real roots if (-4)2-4(1)(b)0 16-4b0 b4.

Hence B = {xRx4}

(b) Scratchwork:
Using ex-14 result, basically we want to find a function g:R -> R s.t. fg=iR. Then A = Ran(g) and g = (fA)-1.

(fg)(x)=x
=> f(g(x)) = x

Let g(x) = y, then
f(y) = x
=> 4y-y2=x

one root of above quadratic equation is, y = g(x) = 2+4-x

Formal Proof:
Let g(x) = 2+4-x.

(fg)(x) = f(g(x)) = f(2+4-x) = 4(2+4-x)-(2+4-x)2 = 8+44-x-(4+4-x+44-x) = x

Hence fg=iR

It follows from ex-14 result that A = Ran(g) = {xRx2} and (fA)-1(x) = g(x) = 2+4-x


Ex-17: Scratchwork:
If we prove that gf=iP and fg=iS, then it follows from theorem 5.3.3 and 5.3.5 that f is one-to-one and onto and g = f-1

Formal Proof:
Proof for gf=iP:
Let R be an arbitrary element of P.
Then, (gf)(R) = g(f(R)) = g(R\iA) = (R\iA)iA = R. Since R is arbitrary, so gf=iP

Proof for fg=iS:
Let R be an arbitrary element of S.
Then, (fg)(R) = f(g(R)) = f(RiA) = (RiA)\iA

Since R is strict partial order on A, hence irreflexive and hence R and iA are disjoint. Then (RiA)\iA = R. Then (fg)(R)=R. Since R is arbitrary, so fg=iS

Then it follows from theorem 5.3.3 and 5.3.5 that f is one-to-one and onto and g = f-1


Ex-18:
(a) First, we prove that R is reflexive on F
Let f be an arbitrary function in F. Let h = iA. Then h-1fh = f. Hence fRf. Since f is arbitrary, so R is reflexive.

Second, we prove that R is symmetric on F
Let (f,g) be arbitrary ordered pair in FxF s.t. (f,g)R. Then we can choose a function hP s.t. f = h-1gh. Then hf=gh. Then g=hfh-1. Let j = h-1. Then g = j-1fj. Hence (g,h)R. Since (f,g) is arbitrary, so R is symmetric.

Third, we prove that R is transitive on F
Let (f,g) and (g,h) be arbitrary elements of R. So we can choose functions u,v in P s.t.
f = u-1gu and g = v-1hv.

Then f = u-1gu = u-1(v-1hv)u = (vu)-1h(vu). Let j = vu. Then f = j-1hj. Hence (f,h)R. Hence R is transitive.


Thus R is equivalence relation on F.

(b) Suppose fRg, then we can choose hP s.t. f = h-1gh.

Then ff
= (h-1gh)(h-1gh)
= h-1(gg)h

Hence (ff)R(gg)

(c) Suppose f has a fixed point and fRg. Then we can choose some aA s.t. f(a) = a. We can choose hP s.t. f = h-1gh.
So f(a) = (h-1gh)(a)

Let h(a) = b. Then
f(a) = (h-1g)(b)
=> a = h-1(g(b))

Thus (g(b),a)h-1
=> (a,g(b))h.

we assumed h(a) = b, that is (a,b)h

Since h is one-to-one, hence g(b) = b. So g has a fixed point.

Saturday, June 19, 2010

how to prove it - ch5, sec5.2(One-to-one and Onto) ex

This section talks about definition of a one-to-one and/or onto function. The logic formulae for them are used to prove whether a function is one-to-one and/or onto.

One-To-One:
A function f:A -> B is called one-to-one if ¬a1Aa2A(f(a1)=f(a2)a1a2). That is, there don't exists two different elements in A whose value of f is same.
Its easy to see that positive version of above formula(which is used more for proofs) is a1Aa2A(f(a1)=f(a2)a1=a2)

Onto:
A function f:A -> B is called onto if bBaA(f(a)=b) or that every element b in B has some element a in A s.t. (a,b)f. That means, Ran(f) = B.

One-to-One functions are also called injections and Onto functions are also called surjections. The functions that are both one-to-one and onto are called one-to-one correspondence or bijections.

===========================================================================================

Ex-1:
(a) Its not One-to-one as f(1) = f(2) = f(3). It is Onto.
(b) not a function
(c) It is one-to-one but not onto


Ex-2:
(a) Not a function
(b) g is not one-to-one as (ab,a) and (ac,a) both are in g. However, g is onto.
(c) Its both one-to-one and onto.


Ex-3:
(a) Its not one-to-one as f(a) = f(b). However, it is onto.
(b) Its not one-to-one as f(0) = f(2) = 0. It is not onto either as proven below.
We'll prove it by contradiction. Assume its onto. Let c be arbitrary real number. Then we can choose a real number x s.t.
x2-2x=c
=> x2-2x-c=0

For this quadratic equation, D = (4 + 4c), which is negative for any c < -1, Hence no real roots possible if c < 1, which is a contradiction and the function is not onto.
(c) Its not one-to-one as f(2.1) = f(2.2) = 2. However, it is onto.


Ex-4:
(a) It is one-to-one but not onto as there are many cities which are not capital of any nation.
(b) It is both one-to-one and onto.
(c) It is also both one-to-one and onto.


Ex-5:
(a) Prove that f is one-to-one.
Let x,y be arbitrary elements of A s.t. f(x) = f(y).
=> x+1x-1=y+1y-1
=> (x+1)+(x-1)(x+1)-(x-1)=(y+1)+(y-1)(y+1)-(y-1)
=> x = y

So, If f(x) = f(y) then x = y. Since x and y are arbitrary, so f is one-to-one.

Prove that f is onto.
Scratchwork: For any arbitrary b in A, we want to find out an a in A s.t. f(a) = b
=> a+1a-1=b
=> (a+1)+(a-1)(a+1)-(a-1)=b+1b-1
=> a=b+1b-1

Formal Proof: Let b be an arbitrary element of A. Let us choose x = b+1b-1.
Then f(x)
= b+1b-1+1b+1b-1-1
= 2b2
= b

Since b is arbitrary, so f is Onto.

(b) () Let (x,y) be an arbtirary element in ff.
So, y =(ff)(x)
= f(f(x))
= f(x+1x-1)
= x+1x-1+1x+1x-1-1
= x

So, y = x. Then (x,y)iA.

() Let (x,x) be an arbitrary element of ia. Since (ff)(x) = x, so (x,x)ff. Since x is arbitrary, so iAff.

Hence ff=iA


Ex-6:
(a) f(2) = {yRy2<2}
(b) It is ont-to-one but not onto, for example There does not exist any real number s.t. f(x) = {1,2,3}


Ex-7:
(a) f({{1,2},{3,4}}) = {1,2} {3,4} = {1,2,3,4}
(b) It is not one-to-one because f({{1,2},{3}}) = f({{1},{2,3}}) = {1,2,3}. However, it is onto.


Ex-8:
(a) Suppose gf is onto. Let c be an arbitrary element of C, then we can choose some aA s.t. (gf)(a)=c. Then g(f(a)) = c. Let f(a) = b, then g(b) = c. So, for any arbitrary cC we can choose bB s.t. g(b) = c. Hence g is onto.

(b) Suppose gf is one-to-one. Let x and y be arbitrary elements of A s.t. f(x) = f(y) = u.
Now (gf)(x) = g(f(x)) = g(u)
Also (gf)(y) = g(f(y)) = g(u)

Since gf is one-to-one, so x = y. Since x and y are arbitrary, so f is one-to-one.


Ex-9:
(a) Suppose f is onto and g is not one-to-one.
Since g is not one-to-one, so we can choose some b1 and b2 in B s.t. g(b1)=g(b2) but b1b2. Since f is onto, so we can choose a1 and a2 in A s.t. f(a1)=b1 and f(a2)=b2 and a1a2. Thus (gf)(a1) = (gf)(a2) and a1a2. Thus gf is not one-to-one

(b) Suppose f is not onto and g is one-to-one. We will prove by contradiction that gf is not onto. Assume gf is onto.
Since f is not onto, so we can choose a bB s.t. there is no aA s.t. f(a) = b. Let g(b) = c. Since gf is onto, we can choose some aA s.t. (gf)(a)=c. Then g(f(a)) = c. But such a is not possible. This is a contradiction. Hence gf is not onto.


Ex-10: Note: In this exercise f|C denotes the restriction of f to C.
(a) Suppose f is one-to-one. Let c and d be arbitrary elements of C s.t. (f|C)(c) = (f|C)(d) = b, where b is some element of B. Since, CA, so c and d are elements of A also. Then f(c) = b and f(d) = b. Since f is one-to-one so c = d. Since c and d are arbitrary, so If f is one-to-one, then so is f|C.

(b) Suppose f|C is onto. Let b be arbitrary element of B. Since f|C is onto, so we can choose some c in C s.t. (f|C)(c) = b. Then f(c) = b. Since c is arbitrary, so If f|C is onto, then so is f.

(c) Let A = B = R and C = R+. For (a), use f(x) = |x| and for (b) use f(x) = x


Ex-11:
(a) Suppose A has more than one element. Then we can find two different arbitrary elements x and y in A s.t. xy. Since f(x) = f(y) = b, so f is not one-to-one.

(b) Suppose B has more than one element. Then we can choose another element cB s.t. bc. Then there does not exist any xA s.t. f(x) = c. Hence f is not onto.


Ex-12: () Suppose fg is one-to-one. We will prove it by contradiction that Ran(f) and Ran(g) are disjoint. Assume Ran(f) and Ran(g) are not disjoint. Then we can choose some cC s.t. there exist aA and bB s.t. f(a) = c and g(b) = c. Then (fg)(a)=(fg)(b)=c. But fg is one-to-one, so this is contradiction. Hence Ran(f) and Ran(g) are disjoint.
() Suppose Ran(f) and Ran(g) are disjoint. Let x and y be arbitrary elements of AB s.t. (fg)(x)=(fg)(y)=c, where cC. Then either (x,c)f or (x,c)g and either (y,c)f or (y,c)g. Let us consider all the cases

Case#1: (x,c)f and (y,c)f
Since f is one-to-one, so x = y

Case#2: (x,c)g and (y,c)g.
Since g is one-to-one so x = y

Case#3: (x,c)f and (y,c)g
Since Ran(f) and Ran(g) are not disjoint, so this case is not possible

Case#4: (x,c)g and (y,c)f
Since Ran(f) and Ran(g) are not disjoint, so this case is not possible

From all these cases, it is clear that x = y. Since x and y are arbitrary, so f is one-to-one.

Hence, fg is one-to-one iff Ran(f) and Ran(g) are disjoint.


Ex-13: Suppose S is one-to-one.

First, we prove that for every aA, there exists atleast one bB s.t. (a,b)R.
Let a be arbitrary element of A. Since SR is a function, so there exists unique cC s.t. (a,c)SR. Then we can choose some bB s.t. (b,c)S and (a,b)R.

Second, we prove that such a bB is unique.
Let there exists another element dB s.t. (a,d)R. Since Ran(R) = Dom(S) = B, so we can choose some c0C s.t. (d,c0)S. Then (a,c0)SR. Since SR is a function and (a,c)SR and (a,c0)S, so c=c0. Then (d,c)S and (b,c)S. Since S is one-to-one, so b = d. Hence b is unique.

Hence If S is one-to-one, then R: A -> B


Ex-14:
(a) Suppose R is reflexive and f is onto. Let b be an arbitrary element of B. Since f is onto, so we can choose some aA s.t. f(a) = b. Since R is reflexive, so (a,a)R and hence (b,b)S. Since b is arbitrary, so S is reflexive on B.

(b) Suppose R is transitive and f is one-to-one. Let (x,y) and (y,z) be arbitrary elements of S. So there exist unique(unique because f is function) u,v and w s.t. f(u) = x, f(v) = y, f(w) = z and (u,v)R, (v,w)R. Since R is transitive, so (u.w)R. Then (x,z)S. Since (x,y) and (y,z) are arbitrary, so S is transitive.


Ex-15:
(a) Let X be arbitrary element of A/R, so we can choose some xA s.t. X = [x]R. Then g(x) = X. Since X is arbitrary, so g is onto
(b) () Suppose g is one-to-one. Since R is equivalence relation and hence reflexive, so iAR.
Let (x,y) be arbitrary element of R. Then y = [x]R.. Then g(x) = [x]R = g(y). But g is one-to-one, so x = y. Hence RiA.
Thus R = iA

() Suppose R = iA. Let x,y be arbitrary elements of A s.t. g(x) = g(y). Then [x]R=[y]R. Then y[x]R. Then (y,x)R. Then x = y and hence g is one-to-one

So g is one-to-one iff R = iA


Ex-16: () Suppose h is one-to-one. Let x,y be arbitrary elements of A s.t. f(x) = f(y). Then h([x]R) = h([y]R). Since h is one-to-one so [x]R=[y]R. Then xRy
() Suppose xAyA(f(x)=f(y)x=y). Let [x]R, [y]R are arbitrary elements of A/R s.t. h([x]R) = h([y]R). Then f(x) = f(y). Then xRy and then [x]R=[y]R.

Hence h is one-to-one iff xAyA(f(x)=f(y)x=y)


Ex-17: Suppose f is onto, g:B -> C , h:B -> C and gf = hf.
(a) () Let (b,c) be arbitrary element in g. Since f is onto so we can choose aA s.t. f(a) = b. So (a,c)gf. Then (a,c)hf. Then (b,c)h. Hence gh
() Using a similar argument, we can prove that hg.
Hence h = g

(b) [this one is copied from solutions given in the book]
Let c1 and c2 be two distinct elements of C. Suppose bB. Let g and h be functions from B to C s.t. xB(g(x)=c1), xB\{b}(h(x)=c1) and h(b) = c2. Then gh, so gfhf and therefore we can choose some aA s.t. g(f(a)) h(f(a)). But by definition of g and h, there is only one xB s.t. g(x) h(x) is x = b, so it follows that f(a) = b. Since b was arbitrary, so f is onto.


Ex-18:
(a) Suppose f is one-to-one, g:A -> B, h:A -> B and fg=fh.
() Let (a,b) be arbitrary element of g. So we can choose cC s.t. (b,c)f. Then (a,c)fg. Then (a,c)fh. Then we can choose a b0B s.t. (a,b0)f. Since f is one-to-one, so b=b0. Hence (a,b)h. Thus gh.
() Using a similar argument, hg.

Thus g = h.

(b) Let b1 and b2 be arbitrary elements of B s.t. f(b1) = f(b2). Let us define g,h s.t. xA(g(x)=b1) and xA(h(x)=b2).
Now for every xA, (fg)(x) = f(g(x)) = f(b1) = f(b2) = f(h(x)) = (fh)(x). Thus fg = fh. Then g = h. Then for any xA, g(x) = h(x) and hence b1 = b2. Since b1 and b2 are arbitrary, so f is one-to-one.


Ex-19:
(a) Proof for hRf:
Consider j: R -> R defined as j(x) = (x-1)2+1

Let x be an arbitrary real number, then (jf)(x) = j(f(x)) = j(x2+1) = x4+1 = h(x). Since x is arbitrary, so h = jf. Hence hRf.

Proof for gRf is not true:
We will prove it by contradiction. Assume we can choose a function jF s.t. g = jf. Let x be an arbitrary real number. Then, g(x) = (jf)(x)
=> x3+1 = j(x2+1)
=> j(x) = x-13+1

But then j is undefined for anything less than 1 and then jF, which is a contradiction. Hence such a function can't exist and hence gRf is not true.

(b) First, we prove that R is reflexive.
Let f be an arbitrary function in F. Let x be an arbitrary real number. Then (iRf)(x) = iR(f(x)) = f(x). Since x is arbitrary, so f = iRf. Thus fRf. Since f is arbitrary, so R is reflexive on F.

Second, we prove that R is transitive.
Let (f,g) and (g,h) be arbitrary elements of R. Then we can choose two functions j1 and j2 s.t. f = j1g and g = j2h. Let x be arbitrary real number. Then (j1g)(x) = j1(g(x)) = j1(j2(h(x))) = (j1j2)(h(x)). Let j = j1j2. Then (j1g)(x) = (jh)(x). Since x is arbitrary, so f = jh. Thus fRh. So R is transitive.

Hence R is preorder.

(c) Let f be an arbitrary function in F. Let x be an arbitrary real number. (fiR)(x) = f(iR(x)) = f(x). Since x is arbitrary, so f = fiR. So (f,iR)R.

(d) Suppose f is arbitrary function in F.
() Suppose iRRf. Then we can choose jF s.t. iR=jf. Let x and y be arbitrary real numbers s.t. f(x) = f(y).
Then x = iR(x) = (jf)(x) = j(f(x)) = j(f(y)) = (jf)(y) = iR(y) = y. Thus x = y and hence f is one-to-one.

() Suppose f is one-to-one. Let A = Ran(f) and h = f-1((R\A)X{0}).
Proof for h:R -> R :
Existence And Uniqueness: Let x be an arbitrary real number. Let us consider following exhaustive set of cases.

Case#1: xA
Then we can choose a unique(unique because f is one-to-one) real number y s.t. f(y) = x. Then (y,x)f. Then (x,y)f-1. Then (x,y)h. So h(x) = y.

Case#2: xA
Then xR\A. Then (x,0)((R\A)X{0}). Then (x,0)h. So h(x) = 0

hence h is a function from R to R.

Proof for iR=hf:
Let x be an arbitrary real number. Then (hf)(x) = h(f(x)) = x = iR(x). Since x is arbitrary, so iR=hf

Hence iRRf

(e) Let f be an arbitrary element in F. Using result of Ex.14(a) of section 5.1, g = gf. Hence gRf.

(f) Suppose g is a constant function, then we can choose a real number c s.t. for every real number x, g(x) = c.

() Suppose fF(fRg). Then we can choose some function j s.t. f = jg. Let x be an arbitrary real number. Then f(x) = (jg)(x) = j(g(x)) = j(c) = constant. Hence f is a constant function.

() Suppose f is a constant function. Then there is some real number d s.t. for every real number x, f(x) = d. Let us define a function j s.t. j(c) = d. Let x be an arbitrary real number. Then (jg)(x) = j(g(x)) = j(c) = d = f(x). Since x is arbitrary so f = jg. Hence fRg.

(g) Proof for ": set of all one-to-one functions from R to R is the largest element of F/S ":
Let [g]S be the set of all one-to-one functions in F. Using result of part(d), we know that iRRg. Hence we can choose a j1F s.t. iR=j1g.
Let f be an arbitrary function in F. Then using result of part(c) fRiR. Then we can choose a function j2F s.t. f=j2iR. Let us define a function h = j2j1. Let x be an arbitrary real number.
Then (hg)(x)
= h(g(x))
= (j2j1)(g(x))
= j2(j1(g(x)))
= j2((j1g)(x))
= j2(iR(x))
= (j2iR)(x)
= f(x)

Thus f = hg. Hence fRg. And, so [f]ST[g]S. Since f is arbitrary so fF([f]ST[g]S), where [g]S is set of all one-to-one functions in F. Hence Set of all one-to-one functions in F is the largest element of F/S in T.

Proof for ": set of all constant functions from R to R is the smallest element of F/S ":
Let g be a constant function and f be an arbitrary function in F. Using the result of part(e) gRf. Then [g]ST[f]S. Hence set of all constant functions is smallest element of F/S

Wednesday, June 16, 2010

how to prove it - ch5, sec5.1(Functions) ex

Function:
Suppose F is a relation from A to B. Then F is called a function from A to B if for every aA there is *exactly one* bB s.t. (a,b)F. In other words, F is a function if
  aA!bB((a,b)F)
This unique bB is called "the valuf of F at a", "the image of a under F", "the result of applying F on a" or just "F of a" or F(a).

If F is a function from A to B, its denoted by, F:A -> B

Often a function f from A to B is specified by giving a rule that can be used to determine f(a). However, one should always remember that such a rule is not mandatory and any subset of A X B that satisfies the requirements of function definition, is a function from A to B.

Note that, a relation is a function can be proved by proving the existence and uniqueness of a bB for every aA.

Some Important Theorems:

1. Suppose f and g are functions from A to B. If aA(f(a)=g(a)) then f = g
2. Suppose f:A -> B and g:B -> C. Then gf:A -> C and (gf)(a) = g(f(a)). Note that gf is also the composition of g and f, so all the properties of composition are still valid.

=============================================================================================

Ex-1:
(a) Yes
(b) No, because f(1) is not unique
(c) Yes


Ex-2:
(a) No, f(d) is undefined
(b) No, for example f(ab) = a = b
(c) Yes


Ex-3:
(a) f(a) = b, f(b) = b, f(c) = a
(b) f(2) = 2*2 - 2(2) = 0
(c) f(pi) = f(3.14) = 3, f(-pi) = f(-3.14) = -4


Ex-4:
(a) Rome
(b) {1,2,3}\{1,3} = {2}
(c) f(2) = (3,1)


Ex-5: LH is identity relation on N. HL of a city c is the name of the city that is capital of the nation that has c.


Ex-6:
fg(x)
= f(g(x))
= f(2x - 1)
= 1(2x-1)2+2
= 14x2+1-4x+2
= 14x2-4x+3

gf(x)
= g(f(x))
= g(1x2+2)
= 21x2+2-1
= 2-x2-2x2+2
= -x2x2+2


Ex-7: Note: in this exercixe I'm denoting restriction of f to C as f|C
(a) Existence:
Let c be an arbitrary element of C. Since CA, so cA. Since f:A -> B, so we can choose some bB s.t. (c,b)f. Also, (c,b) C x B. Then (c,b)fCxB. Thus b = (f|C)(c).
Uniqueness:
Let c be an arbitrary clement of C. Assume b,d are arbitrary elements of B s.t. (c,b)fC and (c,d)fC. Then (c,b)f and (c,d)f. Since f is a function, so b = d.

Hence f|C is a function.

Now, prove that f(c) = f|C.
clearly (c,f(c))f. Since f:A->B, so f(c)B and hence (c,f(C))CxB. Then (c,f(c))fCxB. Thus (c,f(c))fC. So f(c) = (f|C)(c)

(b) () Suppose g = (f|C). Let (c,b) be an arbitrary element of g. It follows from the assumption that (c,b)(fC). Then (c,b)f. Since (c,b) is arbitrary, so gf.
() Suppose gf.
Let (c,b) be an arbitrary element of g. Since gf, so (c,b)f and also (c,b)CxB. Then (c,b)fCxB. Then (c,b)fC. Since (c,b) is arbitrary, so gfC.
Let (c,b) be an arbitrary element of f|C. Then (c,b)f and (c,b)CxB. Since cC and g:C -> B, so we can choose a particular dB s.t. (c,d)g. Since gf, so (c,d)f. Since (c,b)f and and (c,d)f and f is a function, so b = d. Since (c,d)g, so (c,b)g. Since (c,b) is arbitrary, so (fC)g.
Hence g = f|C

(c) g:ZR, g(x) = 2x + 3
h:RR, h(x) = 2x + 3

Prove that g = h|Z = hZxR

() Let (z,2z + 3) be arbitrary element of g. Since zZ, so zR also. Then (z,2z+3)h. Also (z,2z+3)ZxR. Thus (z,2z+3)hZ. Hence ghZ
() Let (r,s) be arbitrary element of h|Z. Then (r,s)h and (r,s)ZxR. Then rZ and so (r,2r+3)g. Since (r,s)h, so s = 2r + 3. Then (r,s)g. Since (r,s) is arbitrary so hZg.

Hence g = hZ


Ex-8: We will prove by contradiction that iA is the only relation on A that is equivalence relation on A and a function from A to A as well.
Proof: Suppose iA is not the only such relation. Assume there is another relation h which is equivalence relation on A and a function as well. Let (x,y) be an arbitrary element in h. Since h reflexive, so (x,x)h as well. Since h is a function, so x = y. Then h is iA.


Ex-9:In this exercise f|C denotes restriction of f to C.
(a) Existence:
Let x be an arbitrary element of AB. Let us consider the two possible cases.
Case#1: xA
Then we can choose a particular cC s.t. (x,c)f. Then (x,c)gf

Case#2: xB
Then we can choose a particular cC s.t. (x,c)g. Then (x,c)gf

From above cases its proven that we can always find a cC s.t. (x,c)gf

Uniqueness:
Let x be an arbitrary element of AB. Assume c,d be arbitrary elements of C s.t. (x,c)gf and (x,d)gf. Let us consider all the possible cases
Case#1: (x,c)g and (x,d)g
Then c = d

Case#2: (x,c)f and (x,d)f
Then c = d

Case#3: (x,c)f and (x,d)g
Since (x,c)f, so xA. Since (x,d)g, so xB. But A and B are disjoint, so x can't belong to both and hence this case is not possible

Case#4: (x,c)g and (x,d)f
This case is also not possible for the same reason as above

Hence c = d

Thus gf is a function from AB to C.
(b) () Suppose fg:AB -> C.
Let (a,c) be an arbitrary element of f|(AB). Then (a,c)f and (a,c)ABxC. Then aB, so we can choose a particular dC s.t. (a,d)g. Then (a,d)fg. Since (a,c)f, so (a,c)fg. Then c = d. Hence (a,c)g. Thus (a,c)gAB. Since (a,c) is arbitrary, so fABgAB
By a similar argument, we can prove that gABfAB
Hence fAB = gAB

() Suppose fAB = gAB.
Existence:
Let x be an arbitrary element of AB. Then either xA or xB. In both the cases there exists some cC s.t. (x,c)fg.

Uniqueness:
Let x be an arbitrary element of AB. Let c,d be arbitrary elements of C s.t. (x,c)fg and (x,d)fg. Now let us consider all possible cases
Case#1: (x,c)f and (x,d)f
Then c = d

Case#2: (x,c)g and (x,d)g
Then c = d

Case#3: (x,c)f and (x,d)g
Then xAB. Since (x,c)(AB)xC, so (x,c)fAB. By similar argument, (x,d)gAB. Since fAB=gAB, so (x,d)fAB as well. Hence c = d

Case#4: (x,c)g and (x,d)f
By using similar argument as above, c = d

Hence fg:AB -> C


Ex-10:
(a) Existence:
Let b be an arbitrary element of B. Since Dom(S) = B, so we can choose some cC s.t. (b,c)S

Uniqueness:
Let b be an arbitrary element of B. Let c,d be arbitrary elements of C s.t. (b,c)S and (b,d)S. Since Ran(R) = B, so we can choose some aA s.t. (a,b)R. Then (a,c)SR and (a,d)SR. So c = d.

Hence S:B -> C

(b) Here is such an example.
A = {1}
B = {1,2}
C = {3}

S = {(1,3),(2,3)}
R = {(1,1),(1,2)}
SR = {(1,3)}


Ex-11:
(a) Suppose S is reflexive. Let x be an arbitrary element of A. f(x)B, so (f(x),(f(x)))S because S is reflexive. Then (x,x)R. Since x is arbitrary, so R is reflexive.

Using similar arguments, we can prove part(b) and part(c) also


Ex-12:
(a) No, Here is the counterexample.
A = {1,2}
B = {3,4,5}
f = {(1,3),(2,4)}
R = {(1,1),(2,2),(1,2)}

S = {(3,4),(3,3),(4,4)}, Its not reflexive as (5,5)S

(b) Yes, Proof:
Suppose R is symmetric. Let (x,y) be arbitrary element of S, then we can choose u and v in A s.t.
f(u) = x
f(v) = y and (u,v)R.
Since R is symmetric, so (v,u)R and hence (y,x)S. Since (x,y) is arbitrary, so S is symmetric.

(c) Yes, Proof:
Suppose R is transitive. Let (x,y) and (y,z) be arbitrary ordered pairs in B x B s.t. (x,y)S and (y,z)S. Then we can choose u,v,w in A s.t.
f(u) = x
f(v) = y
f(w) = z and (u,v)R and (v,w)R.
Since R is transitive, so (u,w)R and hence (x,z)S. Thus S is transitive.

Note: The book solution says its not and counterexample given is wrong as R given in the example is not transitive because R = {(1,2),(3,4)} and (1,4)R.


Ex-13:
(a) Suppose R is reflexive. Let f be an arbitrary function in F and let x be an arbitrary element of A. Then f(x)B. Since R is reflexive, so (f(x),f(x))R. Since x is arbitrary so (f,f)S. And since f is arbitrary, so S is reflexive.

(b) Suppose R is symmetric. Let (f,g) is an arbitrary ordered pair in S. Let x be an arbitrary element of A. Then (f(x),g(x))R. Since R is symmetric, so (g(x),f(x))R. Then (g,f)S. Since (f,g) is arbitrary so S is symmetric.

(c) Suppose R is transitive. Let (f,g) and (g,h) be ordered pairs in S. Let x be an arbitrary element of A. Then ((f(x),g(x))R and (g(x),h(x))R. Since R is transitive, so (f(x),h(x))R. Then (f,h)S. Since (f,g) and (g,h) are arbitrary so S is transitive.


Ex-14:
(a) Let x be an arbitrary element of A.
Then, (fg)(x) = f(g(x)) = a = f(x).

(b) Let x be an arbitrary element of A. Then (fg)(x) = f(g(x)). Since (fg) = f, so f(g(x)) = f(x). Since g is arbitrary, so it can be a constant function. Let g(x) = b. Then f(b) = f(x). Since f(b) is constant and x is arbitrary, so f is a constant function.


Ex-15:
(a) Since x>0(x=x), so (x,x)R. Thus (f,g)R.

(b) First, we prove that R is reflexive on F.
Since for any arbitrary x in A, any arbitrary function f in F, f(x) = f(x). Then (f,f)R. Since f is arbitrary, so R is reflexive.

Second, we prove that R is symmetric on F.
Let (f,g) be an arbitrary ordered pair in R. Then we can choose an aR s.t. for every x > a, f(x) = g(x). Then g(x) = f(x) also. Then (g,f)R. Since (f,g) is arbitrary, so R is symmetric.

Third, we prove that R is transitive on F.
Let (f,g) and (g,h) be arbitrary ordered pairs in R. Then we can choose real numbers a and b s.t. for every
x > a, f(x) = g(x) and
x > b, g(x) = h(x).

Let c = maximum of a and b. Then for every x > c, f(x) = g(x) = h(x). Then (f,h)R. Since (f,g) and (g,h) are arbitrary, so R is transitive.

Hence R is equivalence relation on F.



Ex-16:
(a) Proof for fO(g):
Let a = 3 and c = 8. Then for any x > a = 3,
|f(x)| = |7x + 3| = 7x + 3 < 7x + x = 8x < 8x2 = c|g(x)|
Hence fO(g)

Proof for gO(f):
We'll prove it by contradiction. Assume gO(f). Then we can choose some az+ and cR+ s.t.for every positive integer x > a, x2c7x+3. For a x greater than a and 10c,
We have x > 10c
=> x2 > 10cx ...(i)

Since x2c7x+3
=> x2c7x+3x
=> x210cx ...(ii)

clearly there is a contradiction between eq (i) and (ii), so our assumption is correct and gO(f)

(b) First, we prove that S is reflexive in F.
For any arbitrary function fF and for any arbitrary x, clearly |f(x)| = |f(x)|. So fO(f). Then (f,f)S. Since f is arbitrary, so S is reflexive.

Second, we prove that S transitive in F.
Let (f,g) and (g,h) be two arbitrary elements in S. Then we can choose some positive integers a,b and positive real numbers c,d s.t.
x>a(f(x)cg(x)) and
x>b(g(x)dh(x))

Let e be the maximum of a and b. Let x be an arbitrary integer s.t. x > e. Then
f(x)cg(x) and
g(x)dh(x)

Then f(x)cdh(x). Since x is arbitrary, so fO(h). Thus (f,h)S. Since (f,g) and (g,h) are arbitrary, so S is transitive.

Hence S is a preorder.

(c) Since f1O(g), so we can choose some aZ+ and cR+ s.t. x>a(f1(x)cg(x)).
Since f2O(g), so we can choose some bZ+ and dR+ s.t. x>b(f2(x)dg(x)).

Let e be the maximum of a and b. Then for any arbitrary positive integer x > e,
|f(x)|
= sf1(x)+tf2(x) (using triangle inequality)
sf1(x)+tf2(x)
cg(x)+dg(x) = (c+d)g(x)

Thus fO(g).


Ex-17:
(a) First, we prove that R is reflexive on A.
Let x be an arbitrary element of A. Then g(x) = g(x). Then (x,x)R. Since x is arbitrary, so R is reflexive.

Second, we prove that R is symmetric on A.
Let (x,y) be arbitrary element of R. Then g(x) = g(y). Then g(y) = g(x). Then (y,x)R. Since (x,y) is arbitrary, so R is symmetric.

Third, we prove that R is transitive on A.
Let (x,y) and (y,z) be arbitrary elements of R. Then g(x) = g(y) = g(z). Then (x,z)R. Since (x,y) and (y,z) are arbitrary, so R is transitive.

Hence R is equivalence relation on A.

(b) () Let (x,y) be arbitrary element of R. Since R is equivalence relation, hence symmetric. Then (y,x)R. So [x]R=[y]R. Then g(x) = g(y). Since (x,y) is arbitrary so R{(x,y)AxAg(x)=g(y)}.
() Let (x,y) be arbitrary element of {(x,y)AxAg(x)=g(y)}. Then g(x) = g(y). Then [x]R=[y]R. Then (x,y)R. Since (x,y) is arbitrary so {(x,y)AxAg(x)=g(y)}R

Hence R = {(x,y)AxAg(x)=g(y)}


Ex-18:
(a)Existence:
Let us consider h = {(X,y)A/RxBxX(f(x)=y)}

clearly ([x]R,x)h as f(x) = f(x)

Uniqueness:
Let say there exists another function g s.t. g([x]R) = f(x).
Let (X,y) be arbitrary element of g. Since Dom(g) = A/R. So we can choose some xA s.t. [x]R=X and then y=f(x). Then (X,y)h, where h is choosen above. so, gh. Also, clearly using the similar argument hg. So h = g. hence h is unique.

(b) Let x,y be arbitrary elements of A s.t. xRy. Since R is symmetric, so yRx also. Hence [x]R=[y]R. Then h[x]R=h[y]R. Then f(x) = f(y). Since x and y are arbitrary, so we can say that xAyA(xRyf(x)=f(y))


Ex-19:
(a) Assume a function f s.t. f(x) = [x2]R
Let (x,y) be arbitrary element of R.
Then x y(mod m)
so, we can choose some kZ s.t.
x - y = km
=> x = y + km
=> x2=y2+k2m2+2ykm
=> x2-y2=m(k2m+2yk)

Since (k2m+2yk) is also an integer, so x2y2(mod m). Thus (x2,y2)R. Since R is equivalence relation, so [x2]R=[y2]R. So f(x) = f(y). Since x and y are arbitrary so f is compatible with R.

So using the result of Ex-18(a), we can say that there exists an unique function h s.t. h([x]R) = f(x) = [x2]R

(b) We will prove it by contradiction. Assume there exists a function h:Z/R -> Z/R s.t. h([x]R) = [2x]R.
Let (x,y) be arbitrary element in R. Then [x]R=[y]R. Then h([x]R)=h([y]R). Then [2x]R=[2y]R. Then (2x,2y)R.
Then 2x2y(mod m)

So we can choose an integer k s.t.
2x-2y = km ...(i)

Since (x,y)R also so x y(mod m). Hence we can choose an integer l s.t. (x - y) = lm ...(ii)

From eq(i) and eq(ii) we get
2x-2yx-y = kl

RHS is a constant, but LHS can't be, which is a contradiction and hence such a function as assumed can not exist.