# Need help Please! Java and Data Structures)

Discussion in 'OT Technology' started by xcustom, Feb 4, 2004.

Not open for further replies.

Joined:
Oct 7, 2001
Messages:
1,172
1
Location:
Ottawa
Comp2 Abstract Data Structures and Algorithms

(I) For each of the following pairs of functions f(n) and g(n) determine if
1. f(n) = O(g(n)) but g(n) is not O(f(n))
2. g(n) = O(f(n)) but f(n) is not O(g(n))
3. f(n) = O(g(n)) and g(n) = O(f(n)).

• f(n) = 2n2, g(n) = n3
• f(n) = n + 2pn, g(n) = 3n
• f(n) = 3n log n − n, g(n) = 17n
• f(n) = 2(log n)2, g(n) = pn

(II) Prove or disprove the following:
• 3n^2 = (n)
• 2n^3 − n^2 = (n^3)
• n − 1/n =
(n log n)
• 2n = O(n^50)
• log n = O(n^2)

Joined:
Oct 7, 2001
Messages:
1,172
1
Location:
Ottawa
I will Paypal anyone \$5 if their answers turn up right.

Joined:
Oct 7, 2001
Messages:
1,172
1
Location:
Ottawa
due feb 4, b4 3pm

Joined:
Apr 3, 2002
Messages:
2,354
0
Location:
Texas
5. ### SLEDcustom title

Joined:
Sep 20, 2001
Messages:
28,123
12
you are taking the class.... read the book... do the work