Skip to main content

Questions tagged [big-o-notation]

Big O Notation is an informal name of the "O(x)" notation used to describe asymptotic behaviour of functions. It is a special case of Landau notation, where the O is the Greek letter capital omicron. Please consider using the [landau-notation] tag instead if your question is related to small omicron, omega, or theta in Landau notation.

Filter by
Sorted by
Tagged with
1 vote
1 answer
66 views

So I understand that O is an upper bound and omega is a lower bound. I also understand that case is different than bounds, i.e worst case can have O/Theta/Omega different from best case. My question: ...
user1497350's user avatar
2 votes
1 answer
76 views

How does one go about proving that the lowest possible time complexity for traversing an array is $O(n)$?, it is easy to see that this is the case. But how could I formally prove that this is true?, ...
Ignaciof's user avatar
-1 votes
1 answer
69 views

LeetCode Problem 347. Top K Frequent Elements asks the user to return a list of the $k$ most frequently occurring numbers from a list of numbers. The following solution uses bucket sort: ...
user1446642's user avatar
2 votes
4 answers
316 views

I haven't seen any estimation with big O of tangent, I tried to use limit for the proof, however for it's oscillating behaviour I find it hard to prove that $tan(x)\neq O(2^x)$ where x is all real ...
math boy's user avatar
  • 394
2 votes
0 answers
73 views

I've been scouring around looking for a definition for Big-O when you have multiple input variables. For context, I'm an undergraduate student. Wikipedia mentions $$f(\mathbf{x})\text{ is }O(g(\mathbf{...
proof-of-correctness's user avatar
0 votes
0 answers
97 views

I'm trying to devise an algorithm for the following prompt from LeetCode's daily challenge: You are given an undirected weighted graph of n nodes (0-indexed), represented by an edge list where edges[...
Abhay Agarwal's user avatar
2 votes
3 answers
221 views

I have a problem with this time complexity: $\log (n!)+\frac{5}{2}n\log\log n$. I'm not sure how to deal with the $n!$ term. I know from calculus class that the sequence $n!$ is bigger than any ...
Crash's user avatar
  • 31
1 vote
1 answer
83 views

To show $n\log n + n \log(\log n) = \Theta(\log n)$. Is this even correct? It can be easily shown that, $n \log n + n \log(\log n)$ is $O(n\log n)$ and also $\Omega(n\log n)$, with constants $2$ and $...
Sandipan Majhi's user avatar
0 votes
1 answer
131 views

I am reading Arora and Barak's book "Computational Complexity: A Modern Approach". I am doing exercise 0.2. (b): For each of the following recursively defined functions $f$, find a closed (...
Wei-Cheng Liu's user avatar
2 votes
3 answers
188 views

I am reading Arora and Barak's book "Computational Complexity: A Modern Approach". I am doing EXERCISE 0.1.(b): $f(n) = n^{100}$, $g(n)=2^{n/100}$, determine whether $f=O(g)$. Here's what I ...
Wei-Cheng Liu's user avatar
1 vote
1 answer
71 views

I am trying to understand the correct application of Big O notation to polynomial expressions, including terms with negative coefficients. For example, consider the polynomial $2n^3-2n^2+n+1$, where $...
Byeongyong Park's user avatar
0 votes
0 answers
35 views

How can this relation : $$ T(n)=4^n + 12 \cdot \sum^{n-2}_{i=1}{T(i)} $$ $$ T(1) = 1 $$ be evaluated to asysmtotic bound (Big O notation)? It could be easy if the upper bound of the sum were ...
User1342221's user avatar
4 votes
2 answers
259 views

I'm struggling to determine the correct time complexity of a recursive function from an exam question. The function definition is as follows: fun (n) { ...
deaa aldeen's user avatar
2 votes
2 answers
684 views

I'm currently studying the 3x3x3 rubik-cube-solving algorithms developed by Kociemba, Korf, and Thistlethwaite and I'm interested in understanding their computational complexities. Could someone ...
Lisa's user avatar
  • 23
1 vote
0 answers
138 views

We know that $\widetilde{O}(f(n))$ — $O$ with a tilde above it — which means $O(f(n) \text {polylog}(f(n)))$, i.e., $O(f(n) (\log f(n))^k)$ for some $k$. Also I have seen in Wikipedia that $n2^n=\...
user avatar
2 votes
2 answers
143 views

I'm new to the complexity theory and have a basic question about the big-O notation that I encountered. I came across a complexity of $O\big(\frac{n}{m-n}\big)$, where both $n$ and $m$ are independent ...
user185671631's user avatar
1 vote
1 answer
99 views

I am trying to find the Big O notation of this code below, really its the big theta, but whatever I believe its the same in this case. ...
Kuro's user avatar
  • 15
-1 votes
2 answers
136 views

I have a function $f$ such that is the sum of big O terms, such as $$f=\left[\sum_{i=1}^x \frac{1}{i}\right] +O\left(\frac{\ln^4 x}{x}\right)+O\left(\frac{\ln^4 x-1}{x-1}\right)+O\left(\frac{\ln^4 x-2}...
fox's user avatar
  • 185
-1 votes
3 answers
269 views

Me again. This time I have a more general question. Suppose I have the following code snippet: ...
john doe's user avatar
  • 185
0 votes
1 answer
180 views

Given a string length $S$, find a substring length $k$ that has the most occurrences in the given string. We want $O(S)$ time complexity in an average case. I think the solution lies in sophisticated ...
popcorn's user avatar
  • 183
0 votes
1 answer
271 views

I have the following recurrence relation that I am trying to solve using the telescoping approach: $T(n) = \begin{cases} T(\frac{n}{4})+ n^2 & \text{for } n \geq 4 \\ 1 & \text{otherwise} \...
Nancy Drake's user avatar
0 votes
1 answer
120 views

Let $f(n) = n \cdot \sqrt n$ and $g(n)= \frac{n^2}{\log n}$. Why is $f(n) = o(g(n))$? Could you please explain to me why this is so? I have tried l'Hôpital's rule but it doesn't add any ...
kjkjkjkjkj's user avatar
5 votes
5 answers
4k views

I am currently watching the FreeCodeCamp Algorithms and Data Structures Tutorial. In the explanation for exponential time complexity, they explain that using a brute force attack on a combination lock ...
jacoboneill2000's user avatar
0 votes
3 answers
154 views

How to get an estimation of an O(n) function to modern multi-core CPU time? For instance, how can I find the time it takes to run an algorithm in a 4-core/8-core CPU when I know its O(n) ? I searched ...
student's user avatar
  • 137

1
2 3 4 5
8