[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 2 KB, 244x226, 1348764844816.png [View same] [iqdb] [saucenao] [google]
8701578 No.8701578 [Reply] [Original]

I need some known non trivial algorithms that run in O(2^n^2) or O(2^n^4). tnx

>> No.8701629

>>8701578
O(2^n) is for example a recursive fibonacci, figure the rest out yourself.

>> No.8701654

>>8701629

wow so helpful

>> No.8701667

>>8701654

What an ingrate.

>> No.8701703

>>8701578
Homework threads go on >>>/hm/

>> No.8701818
File: 1.13 MB, 1800x1200, 1487447458427.jpg [View same] [iqdb] [saucenao] [google]
8701818

>>8701629
What a retard.

1) The shit you proposed is naive as fuck, and OP especially asked for a nontrivial algorithm.
2) You can solve fibonacci in O(n) and even in O(log n).
3) You can create a recursive version out of any algorithm.

>> No.8701829

>>8701629
Recursive fibonacci is [math]O \left(2^{2^n} \right) [/math].

>> No.8701969

>>8701703

kill yourself retard, this isn't homework, pls kill yourself and don't forget to kill yourself you fucking subhuman trash

>> No.8703167

>>8701829
http://stackoverflow.com/questions/360748/computational-complexity-of-fibonacci-sequence

>> No.8703481

Do the homewo.... oh wait your a CS Major.

>> No.8703688

Dude, just print everything from 1 to 2^n^2.

>> No.8703712

>>8703688
kek

>> No.8703717

>>8703167
He took [math]n[/math] to be the number of bits used to represent the input. Any sane computer scientist would do that when the input is a simple integer.

>> No.8703790

>>8703688
i was gonna say this

OP, this question is not answerable if you don't say what counts as a "non-trivial" algorithm

>> No.8704192

>>8703688
Somehow I feel that this is wrong but I don't know why it's wrong.