User Name
Password

Go Back   Planetarion Forums > Non Planetarion Discussions > Programming and Discussion
Register FAQ Members List Calendar Arcade Today's Posts

Reply
Thread Tools Display Modes
Unread 5 Jan 2004, 13:23   #1
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Search complexity

Ok, this isn't actually programming related but I figured someone on here probably knows.

Some of my AI notes I'm reading up on have confused me, and I suspect it's cos I copied them down wrong. The section that's got me going "eh?" is related to a bi-directional search.
The note in question is:

* If branching factor is b in both directions (this is best case scenario for implementation) and shallowest solution is at depth d, then Space and Time complexities are both:
O(2b^(d/2)) = O(b^(d/2))

How can they both be equal? Have I just forgotten how big O notation works (very probable), have I written nonsense, or is it a combination of both? I can't remember this lecture AT ALL and my mate can't find her notes for it either (a right pair WE are).

Ta.
__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.
meglamaniac is offline   Reply With Quote
Unread 5 Jan 2004, 16:37   #2
SbOlly
Spelling is for pussies
 
SbOlly's Avatar
 
Join Date: Mar 2003
Location: Actually, where the feck am I........?
Posts: 446
SbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant futureSbOlly has a brilliant future
Re: Search complexity

O(2b^(d/2)) = O(b^(d/2))

Ok, I'm going to jump in without reading the question first, but aren't they not equal because of the 2? Or something....?
__________________
If God made me in his image, he's one fat ugly biatch.

I always get the soggy biscuit

Veni Vidi Codi
SbOlly is offline   Reply With Quote
Unread 5 Jan 2004, 17:29   #3
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Re: Search complexity

O(2) = O(1). Big-O notation ignores coefficients. Go back to your definitions.

do you mean how can space and time complexity be equal? blah, I'll have to actually get a pen and paper for that one. basically because you're exploring a tree, and keeping it in memory, so the memory and time used are similar.

Last edited by queball; 5 Jan 2004 at 17:47.
queball is offline   Reply With Quote
Unread 5 Jan 2004, 21:19   #4
meglamaniac
Born Sinful
 
meglamaniac's Avatar
 
Join Date: Nov 2000
Location: Loughborough, UK
Posts: 4,059
meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.meglamaniac has ascended to a higher existance and no longer needs rep points to prove the size of his e-penis.
Re: Search complexity

No, nothing that complex (in fact I more or less get that).
I've just completely lost track of how to "do" Big-O and the definitions are the other thing I can't find heh.

Is O(2b^(d/2) meant to be read, in strict terms, as O(2(b^(d/2)))?
If so I can see why we lose the 2, if not I need to hunt down those definitions I think.
__________________
Worth dying for. Worth killing for. Worth going to hell for. Amen.
meglamaniac is offline   Reply With Quote
Unread 5 Jan 2004, 22:01   #5
W
Gubbish
 
Join Date: Sep 2000
Location: #FoW
Posts: 2,323
W is a jewel in the roughW is a jewel in the roughW is a jewel in the rough
Re: Search complexity

Quote:
Originally Posted by meglamaniac
No, nothing that complex (in fact I more or less get that).
I've just completely lost track of how to "do" Big-O and the definitions are the other thing I can't find heh.

Is O(2b^(d/2) meant to be read, in strict terms, as O(2(b^(d/2)))?
If so I can see why we lose the 2, if not I need to hunt down those definitions I think.
It makes a difference whether both b and d are dimensions of the task or if just one of them is. If both are, O(2b^(d/2)) is the same as O(b^d) no matter what.

Each dimension, and the end result, can each be multiplied by an arbitrary constant.
__________________
Gubble gubble gubble gubble
W is offline   Reply With Quote
Unread 6 Jan 2004, 15:14   #6
queball
Ball
 
queball's Avatar
 
Join Date: Oct 2001
Posts: 4,410
queball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so littlequeball contributes so much and asks for so little
Re: Search complexity

Quote:
Originally Posted by meglamaniac
Is O(2b^(d/2) meant to be read, in strict terms, as O(2(b^(d/2)))?
Yes. (Unless you got the formula wrong and have weird notation)

Quote:
Originally Posted by W
It makes a difference whether both b and d are dimensions of the task or if just one of them is. If both are, O(2b^(d/2)) is the same as O(b^d) no matter what.

Each dimension, and the end result, can each be multiplied by an arbitrary constant.
I haven't seen a convention where the dimensions can be multiplied by arbitrary constants.
queball is offline   Reply With Quote
Unread 6 Jan 2004, 19:45   #7
SYMM
Love's Sweet Exile
 
SYMM's Avatar
 
Join Date: May 2001
Location: Living on a Stair (Now Sword-less)
Posts: 2,371
SYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better placeSYMM single handedly makes these forums a better place
Re: Search complexity

Isn't that what the Principle of Invariance is all about?
__________________
--SYMM--
Ba Ba Ti Ki Di Do
SYMM is offline   Reply With Quote
Unread 7 Jan 2004, 19:28   #8
W
Gubbish
 
Join Date: Sep 2000
Location: #FoW
Posts: 2,323
W is a jewel in the roughW is a jewel in the roughW is a jewel in the rough
Re: Search complexity

Quote:
Originally Posted by queball
I haven't seen a convention where the dimensions can be multiplied by arbitrary constants.
I'm sure I've thrown away my textbook on algoritm analysis by now, but I remember it containing the proof of this.
__________________
Gubble gubble gubble gubble
W is offline   Reply With Quote
Reply



Forum Jump


All times are GMT +1. The time now is 21:42.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2002 - 2018