Re: Reductions in P
- From: ahuznot@xxxxxxxxx
- Date: 16 Jul 2006 18:17:24 -0700
What about this hypothetical scenario: I have P1, P2, P3 in P, and P1
is reducible to P2 via f(), and P2 is reducible to P3 via g().
Something like:
P1 <= _f P2 <=_g P3 f in O(n log n), g in O(^2)
Let's say that I know an O(n^4) algorithm A3 to solve P3. Can I
construct an algorithm for P2 (and P1) using A3 and g (and f)?
My first guess is yes, because I can take an instance p2 of P2, translate
it to an instance p3 of P3 via g(), so effectively I have the following
algorithm
A3(g(p2))
... to solve p2 in P2.
Moreover, I know that it's complexity is
MAX(complexity(A3), complexity(g)) = MAX(O(n^4), O(n^2)).
Not quite. Given what you've said so far, it is possible that g might
take an input of size m and generate an output of size as big as m^2.
I see, because g is O(n^2). Actually, IMHO it would be more precise to
say that output of g() is O(m^2), and not "as big as m^2". (Because the
constant in O for g could be very small, for example.)
This output will become the input for A3, which runs in time proportional
to the 4th power of the size m^2 of *its* input. Since (m^2)^4 = m^8,
the compound algorithm may take as long as the 8th power of the size m
of the original input.
So if output of g() is O(m^2), and A3(g(p2)) is an algorithm for P2,
then the complexity of A3(g()) is O((O(m^2))^4) = O(O(m^8)) = O(m^8).
.
- References:
- Reductions in P
- From: ahuznot
- Re: Reductions in P
- From: tchow
- Re: Reductions in P
- From: ahuznot
- Re: Reductions in P
- From: tchow
- Reductions in P
- Prev by Date: easy combinatorial algorithm, or not??
- Next by Date: Re: Reductions in P
- Previous by thread: Re: Reductions in P
- Next by thread: Re: Reductions in P
- Index(es):
Relevant Pages
|