Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
o2
- Page 1
Re: o notation problem
Programming
Computer Science
10 Years Ago
by sepp2k
O (and o, which the OP asked about) describes the growth of a function. That function often describes the running time of an algorithm, but that's not important here. A statement like "2^n = O(n!)" (or "2^n = o(n!)") does not mean that the running time of an algorithm to compute 2^n is in O(n!)¹, it means that the asymptotic …
O-notation
Programming
Software Development
19 Years Ago
by jack223
What is the O-notation for the following code? [code] cin >> N; for (int count = 1; count <= N; count++) { for (int count2 = 1; count2 <= count; count2++) } [/code] a) O (log N) b) O (N) c) O (N^2) d) O (N^3) outer loop is O(N) and the inner loop is also O(N) so you multiply these together.. i'll get N*N = N^2 …
Re: O-notation
Programming
Software Development
19 Years Ago
by WolfPack
Intuitively my answer will be O(N^2). Will look for a way to prove it( if that is correct). Edit. Hey. I just had a look at your first piece of code. What is the difference? The loops are the same. The only difference is that the first one does nothing and the other adds and outputs the two counters. I dont think that will affect the O …
Re: O-notation
Programming
Software Development
19 Years Ago
by iamthwee
[QUOTE=WolfPack]Intuitively my answer will be O(N^2). Will look for a way to prove it( if that is correct).[/QUOTE] Don't be tricked into doing his homework 4 him. Tee he he, unless u feel the need to. :-)
Re: o notation problem
Programming
Computer Science
10 Years Ago
by Maritimo
I don´t think that a^n = O(n!). Supposing that O(x) means the order of magnitude of the number of computer operations you need to compute something, this means that O(2) need 2 computer operations to compute something and O(4) needs 4. Now suppose that a^n = O(n!) is true, then this means that a^2 needs O(2!) = 2 operations. That is 2^2 needs 2 …
O-notation
Programming
Computer Science
18 Years Ago
by skeet123
Having trouble understanding O-notation. This is the question: 10. The approximate number of iterations of an algorithm with data size N is determined to be: 1 + 2 + 3 + ... + N a. Write a table that shows N and the number of iterations for the first 10 values of N. b. What is the O-notation for this algorithm? I think the O-notation is O…
O-Notation
Programming
Computer Science
17 Years Ago
by locy
1 proof that: n! = O(n^n). 2.proof that: ln n = O(square of n). 3.proof that: ln(n!) ="theta"(n ln n). 4.proof that from: f(n) = O(g(n)) next 2^f(n) = O^(2g(n)).
O'Reilly to launch DRM-free developer ebooks
Community Center
16 Years Ago
by newsguy
As publishers go, O'Reilly has managed to build itself quite a reputation as a forward thinking company. Not only for the way in which it tackles emerging and niche technologies from the developer perspective, but also for being something of a pioneer in making them available in a digital format. The Safari Books Online service being a hugely …
Big O Notation Proofs
Programming
Computer Science
15 Years Ago
by needhelp83
O-notation – O(g(n)) = { f (n) : there exist positive constants c and n0 such that 0 ≤ f (n) ≤ cg(n) for all n ≥ n0} – g(n) is an upper bound of f(n), may not be tight Ω-notation – Ω(g(n)) = { f (n) : there exist positive constants c and n0such that 0 ≤ cg(n) ≤ f(n) for all n ≥ n0} – g(n) is an lower …
Re: o notation problem
Programming
Computer Science
10 Years Ago
by sepp2k
> I just understood that big O is an asymptotic notation and used to classify algorithms according to their response time and memory they take. and I have no idea how to apply that def on this equatn. That's not a definition; it's a description and not a very descriptive one at that. That description doesn't even explain the difference between …
Re: O-notation
Programming
Computer Science
18 Years Ago
by Rashakil Fol
[QUOTE=WolfPack][tex]\lim_{N\to\infty}{N^2 \over 2} + {N \over 2} = N^2[/tex][/QUOTE] Don't use fake mathematics. For starters, N^2/2 is nowhere near N^2. And even if you wrote N^2/2, the distance away as N appoaches infinity would be infinity also. The reason the function is [tex]O(N^2)[/tex] is that, with [tex]N_0 = 5[/tex] and [tex]k = 1[/…
Re: O-notation
Programming
Computer Science
18 Years Ago
by WolfPack
[quote=Rashakil Fol]Don't use fake mathematics. For starters, N^2/2 is nowhere near N^2. And even if you wrote N^2/2, the distance away as N appoaches infinity would be infinity also. [tex]\frac{N^2}2 + \frac{N}2 \leq k N^2[/tex], for all [tex]N \geq N_0[/tex], where in this particular case, [tex]N_0 = 5[/tex] and [tex]k = 1[/tex] are …
O notation ????! Could you help me
Programming
Software Development
14 Years Ago
by it-lady
1. Suppose we have three functions f(n), g(n), and h(n) such that f(n) = O(h(n)) and g(n) = O(h(n)). Must it be the case that f(n) = O(g(n))? Explain why or give a counterexample showing why not. I think it is equal ! what you think ? 2. Write a recurrence describing the number of times the following algorithm compares two members …
Re: O-notation
Programming
Computer Science
18 Years Ago
by ithelp
It is O(N*N)
Re: O-notation
Programming
Computer Science
18 Years Ago
by WolfPack
[tex]1+2+3+...+N[/tex] = [tex]N*(N+1)\over 2[/tex] Geometrical Series Addition = [tex] {N^2 \over 2} + {N \over 2}[/tex] [tex]\lim_{N\to\infty}{N^2 \over 2} + {N \over 2} = N^2[/tex] So it is [tex]O(N^2)[/tex]
Re: O-Notation
Programming
Computer Science
17 Years Ago
by Rashakil Fol
f is O(g) if and only if for some positive C, for some value m, for all n > m, f(n) <= C * g(n). Good luck.
Re: O notation
Programming
Software Development
19 Years Ago
by Rashakil Fol
Here is Narue's tutorial on finding O notation bounds, which has had success with some learners: [url]http://eternallyconfuzzled.com/articles/bigo.html[/url] Here is my tutorial, which was helpful to one person looking for a more precise definition. It was written more as a clarification than an introduction. [url]http://shobadobs.com/tuts/…
Re: o notation problem
Programming
Computer Science
10 Years Ago
by sepp2k
What's the definition of `o` that you learned? Do you understand that definition? What are your thoughts on how that definition may apply to `a^n = o(n!)`?
O notation
Programming
Software Development
19 Years Ago
by thehakan
Hi everone. I need some help about o-notation. Actually I don't know so much things about that and I want to learn. If somebody send me some powerpoint documents, lecture notes or links about that, I will be happy:)
O/R mapper LLBLGen Pro or do you know better alternative in .NET?
Programming
Software Development
18 Years Ago
by cyberjoe
What experience do you have with O/R mapper in .NET? I need to choose one for use in my company Which one is the best for you? I have seen lots of positive feedback about this one: LLBLGen Pro What do you thing about this? Is it good or can I find better alternative? Regards cyberjoe
o s development in c. how?
Programming
Software Development
16 Years Ago
by smart_pc
using c we can develop an o s but where will it run or start to execute. who will execute the instructions of the kernel ? how to make a kernel,any idea or hint ? where do we get those low level services provided by assembly language functions ? there are no drivers on a blank machine ? any hint about what is pentium INT instructions ? really, …
.o and .depend files
Programming
Software Development
13 Years Ago
by sha11e
After some google-ing I found a page saying that .o files are " “Object Code” is just the translation of “Source Code”, which can be referred as machine language code." What .depend files are I didn't really understand. Someone said it... kinda... links to libraries or something? Else my exe would be much bigger in file size. But …
o/p question
Programming
Software Development
11 Years Ago
by nitin1
#include main() { int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris"); } how many times sun will be printed and how many times solaris will be printed ? and reason also. i know the fundamentals of …
o notation problem
Programming
Computer Science
10 Years Ago
by zeedote
Let a be any positive number. Show that a^n = o(n!). I am a beginner at this course and nead a head start. can anyone please help me solving this problem?
Re: run time of a algorithm O(n) HELPP!!!
Programming
Software Development
13 Years Ago
by hwoarang69
o also do you see a faster way of find value from array. in ex 5.
A brief introduction to Big-O Notation (The Big-Oh! Notation)
Programming
Computer Science
14 Years Ago
by apines
I see that there are many questions here regarding complexity analysis, specifically regarding the Big-O notation of algorithms. I will attempt to shed some light on the subject. I will start with an introduction, after which I will go over some common complexities and last we will solve a few simple examples for practice. [U][B]1. Introduction…
Understanding Big O Notation
Programming
Computer Science
16 Years Ago
by beaute
Hello, I'm trying to understand Big O notation, specifically to understand how to calculate it for a given program. I have my lecture notes but I don't exactly get what they're saying. I understand that there is a solid definition of O(N). For example; [code]F(N) = O(G(N)) reads that F of N is Big O of G of N[/code] Then my lecture notes…
2D Array - Moving o's and x's
Programming
Software Development
14 Years Ago
by lightshift
Hey all, am stuck! Basically I have a version of the Game of Life to create and I am currently having trouble with moving the items in the array. Basically my code shows the 20x20 grid, populates it with .'s to start, then adds 5 x's and 100 o's. That works (although the o's overwrite, also need help with that?) but the movement code doesn't, …
Re: 2D Array - Moving o's and x's
Programming
Software Development
14 Years Ago
by lightshift
Yes I have done as you said, still does not work. Doesn't error but doesn't do as supposed to when moving randomly. Also, the counter code still doesn't do 100 exactly :/ [CODE]counter = 0; while(counter < 100) { x = rand()%20; y = rand()%20; if(board[x][y]=='.') {…
Re: A brief introduction to Big-O Notation (The Big-Oh! Notation)
Programming
Computer Science
14 Years Ago
by apines
The examples that are mostly used for [TEX]O(n\cdot logn)[/TEX] are a little more complex, like the [URL="http://en.wikipedia.org/wiki/Merge_sort"]Merge Sort[/URL]. Those examples use things like the [URL="http://en.wikipedia.org/wiki/Master_theorem"]Master Theorem[/URL], which is outside the scope of this brief introduction. If…
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC