120Theta notationTheta:Often confused with Big-Ohnotation !Example:Claim: Low order terms do not matter. Needs a proof ! (HW?)f ng nc c nnnc g nf nc g n( )( ( )),,.:( )( )( ) const s.t12120002200222222222212/22()Proof:take 8, then for :/22/4/42/48 /42/4On the other hand, we have: /22/2Thus: /4/22/2 i.e. 1/4,1/2.nnnnnnnnnnnnnnnnnnnnnnccLecture 2, Sept. 23, 201021Simple TheoremClaim: f(n) = O(g(n)) and g(n) = O(f(n)) ⇒f(n) = (g(n)) 111122221212Proof:,s.t. nn : 0( )( ),s.t. nn : 0( )( )1max(,): 0( )( )( ) QEDn cf nc g nncg nc f nnn ng nf nc g nc
has intentionally blurred sections.
Sign up to view the full version.
222SummaryRemember the definitions.Formally prove from definitions.Use intuition from the properties of “”, ““, etc.Consider behavior of f(n)/g(n) as n→ ∞Example of an algorithmStable Marriagenman and nwomenEach woman ranks all men and each man ranks all womenFind a way to match (marry) all men and women such thatthere are no two pairs (m,w) and (m’,w’) that are marriedand such that »mprefers w’ to w»w’prefers mto m’In other words, mwill “steal” w’from m’and w’will agreeRed line shows “instability”23mm’ww’