• O(10^N): trying to break a password by testing every possible combination (assuming numerical password of length N)

p.s. why is your last example is of complexity O(infinity) ? it's linear search O(N) .. there are less than 7 billion people in the world.

Answer from Aziz on Stack Overflow
  • O(10^N): trying to break a password by testing every possible combination (assuming numerical password of length N)

p.s. why is your last example is of complexity O(infinity) ? it's linear search O(N) .. there are less than 7 billion people in the world.

Answer from Aziz on Stack Overflow
🌐
Wikipedia
en.wikipedia.org › wiki › Time_complexity
Time complexity - Wikipedia
January 18, 2026 - Sometimes, exponential time is used to refer to algorithms that have T(n) = 2O(n), where the exponent is at most a linear function of n. This gives rise to the complexity class E. ... An algorithm is said to be factorial time if T(n) is upper bounded by the factorial function n!. Factorial time is a subset of exponential time (EXP) because ... An example of an algorithm that runs in factorial time is bogosort, a notoriously inefficient sorting algorithm based on trial and error.
Discussions

Examples of problems where the best known algorithm is super-exponential time? Are improvements to this complexity classes open questions?
Quantifier elimination over the reals More on reddit.com
🌐 r/math
7
12
April 27, 2020
algorithm - What constitutes exponential time complexity? - Stack Overflow
This pseudocode runs in half the time as the previous example, but I'm struggling to understand if the time complexity is still O(2^n) or not: Prime(n): for i in range(2, (n/2+1)) if n % i == 0 return False return True ... The fact that it runs in less/more time is not really relevant towards time complexity. There are exponential ... More on stackoverflow.com
🌐 stackoverflow.com
algorithm - Polynomial time and exponential time - Stack Overflow
Exponential examples: 2^n, 3^n, 100^n, 5^(7n), etc…. ... Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. 2022-03-29T15:50:59.88Z+00:00 ... o(n sequre) is polynimal time complexity ... More on stackoverflow.com
🌐 stackoverflow.com
Are there problems that are proven to have exponential worst case time complexity?
The k-step halting problem (whether a deterministic Turning machine halts within k steps for a given problem) is the best known example. To solve this you just run the problem in a simulator for k steps and see if it halts; this is O(k) and it is relatively easy to prove that no shorter solution is possible. This is called pseudopolynomial since the running time is polynomial in the magnitude of the input. But the time complexity is in terms of the size of the input, not the magnitude. If you want to count to binary 11 it takes 4 steps; to count to 111 is 8 steps, and so on. Each time you add a bit, you double the running time. So if n is the number of bits in k, the running time of the k-step halting problem is O(2n). The complexity class of exponential time problems is called EXPTIME. The fact that the k-step halting problem is in EXPTIME but not P proves that EXPTIME is larger than P. Also, the k-step halting problem is EXPTIME-complete. For any given decision problem p in EXPTIME, we can just add "if accept then halt else goto infinite_loop" at the end, and we can always calculate the maximum possible steps a solution could take. This reduces an instance of p into an instance of the k-step halting problem. So if we had a magic box that solved the k-step halting problem instantly, we could use it to solve any problem in EXPTIME in polynomial time. This is also a good example of how asymptotic time complexity doesn't necessarily say anything about how hard smaller problems are. For n=15, the k-step halting problem only takes 32768 steps; an O(n4) problem, despite being in P, is potentially harder than O(2n) at n=15. More on reddit.com
🌐 r/AskComputerScience
14
8
April 25, 2023
🌐
Reddit
reddit.com › r/askcomputerscience › are there problems that are proven to have exponential worst case time complexity?
r/AskComputerScience on Reddit: Are there problems that are proven to have exponential worst case time complexity?
April 25, 2023 -

I wanted to ask if there are any problems in computer science that are PROVEN to have exponential worst case time complexity for the best known solution algorithm. The reason I stress on proven is because I know about NP-complete problems and that they are conjectured to have exponential complexities. And if there aren't any proven problems, what are the NP-Complete problems that are a nightmare to approximate; even for small input size like n<15?

Top answer
1 of 5
13
the towers of hanoi is an exponential problem. it requires O(2n ) steps to solve the n disk case.
2 of 5
11
The k-step halting problem (whether a deterministic Turning machine halts within k steps for a given problem) is the best known example. To solve this you just run the problem in a simulator for k steps and see if it halts; this is O(k) and it is relatively easy to prove that no shorter solution is possible. This is called pseudopolynomial since the running time is polynomial in the magnitude of the input. But the time complexity is in terms of the size of the input, not the magnitude. If you want to count to binary 11 it takes 4 steps; to count to 111 is 8 steps, and so on. Each time you add a bit, you double the running time. So if n is the number of bits in k, the running time of the k-step halting problem is O(2n). The complexity class of exponential time problems is called EXPTIME. The fact that the k-step halting problem is in EXPTIME but not P proves that EXPTIME is larger than P. Also, the k-step halting problem is EXPTIME-complete. For any given decision problem p in EXPTIME, we can just add "if accept then halt else goto infinite_loop" at the end, and we can always calculate the maximum possible steps a solution could take. This reduces an instance of p into an instance of the k-step halting problem. So if we had a magic box that solved the k-step halting problem instantly, we could use it to solve any problem in EXPTIME in polynomial time. This is also a good example of how asymptotic time complexity doesn't necessarily say anything about how hard smaller problems are. For n=15, the k-step halting problem only takes 32768 steps; an O(n4) problem, despite being in P, is potentially harder than O(2n) at n=15.
🌐
freeCodeCamp
freecodecamp.org › news › big-o-cheat-sheet-time-complexity-chart
Big O Cheat Sheet – Time Complexity Chart
November 7, 2024 - In the example above, there is a nested loop, meaning that the time complexity is quadratic with the order O(n^2). You get exponential time complexity when the growth rate doubles with each addition to the input (n), often iterating through all subsets of the input elements.
🌐
ScienceDirect
sciencedirect.com › topics › computer-science › exponential-complexity
Exponential Complexity - an overview | ScienceDirect Topics
The time complexity of a heuristic search algorithm depends on the accuracy of the heuristic function. For example, if the heuristic evaluation function is an exact estimator, then A* runs in linear time, expanding only those nodes on an optimal solution path. Conversely, with a heuristic that returns zero everywhere, A* becomes a brute-force uniform-cost search, with exponential complexity.
🌐
Sololearn
sololearn.com › en › Discuss › 2716451 › exponential-time-complexity
Exponential time complexity | Sololearn: Learn to code for FREE!
Another example would be the fibonacci function fun fib ( n ) = if n < 2 then n else fib ( n - 1 ) + fib ( n - 2 ) which has exponential complexity as well, although not quite O( 2^n ). In terms of a loop, I think the following loop would have ...
Find elsewhere
🌐
Medium
medium.com › @terencewong.work › meet-in-the-middle-hacking-exponential-time-complexity-91e6a6e5ee94
Meet in the middle: hacking exponential time complexity | by Terence | Medium
September 28, 2022 - Hence, we are able to take an algorithm with exponential time complexity and improve it’s speed drastically by performing the same algorithm twice on two halves of the input. In this example, we’re not exactly trying to find a path between two selective states, so ‘meet in the middle’ doesn’t have it’s visual analogy here.
🌐
Learn2torials
learn2torials.com › a › exponential-time-complexity
Part-7: Exponential Time Complexity O(c^n)
Discover the latest articles, tips, and insights on programming, software development, and technology at the Learn2torials Blog.
🌐
Superwits
superwits.com › library › design-analysis-of-algorithm › course-content-daa › polynomialvsexponentialrunningtime
Polynomial vs. Exponential Running Time - About Us
November 1, 2013 - Equations that show a polynomial time complexity have variables in the bases of their terms. Examples: n3 + 2n2 + 1. Notice n is in the base, NOT the exponent. In exponential equations, the variable is in the exponent.
🌐
GeeksforGeeks
geeksforgeeks.org › dsa › difference-between-exponential-and-polynomial-complexities
Difference Between Exponential and Polynomial Complexities - GeeksforGeeks
July 23, 2025 - Two of the most common types of complexities are exponential and polynomial complexities. This article will provided the differences between these two, explaining their characteristics, implications, and examples. Computational complexity refers to the amount of resources required by an algorithm to solve a problem as a function of the size of the input. These resources are typically time ...
🌐
Wikipedia
en.wikipedia.org › wiki › EXPTIME
EXPTIME - Wikipedia
August 25, 2025 - It is EXPTIME-complete because, ... in unary is P-complete. Other examples of EXPTIME-complete problems include the problem of evaluating a position in generalized chess, checkers, or Go (with Japanese ko rules)....
🌐
Reddit
reddit.com › r/math › examples of problems where the best known algorithm is super-exponential time? are improvements to this complexity classes open questions?
r/math on Reddit: Examples of problems where the best known algorithm is super-exponential time? Are improvements to this complexity classes open questions?
April 27, 2020 -

Most of the time when we think of polynomial time algorithms, or even polylog, they arise as clever solutions to some brute force algorithm of exponential time.

There are some super-exponential algorithms, for example the 2-EXPTIME class ( https://en.wikipedia.org/wiki/2-EXPTIME), however the purpose and algorithms given in the examples are quite inaccessible to the casual reader. Are there any problems where it can be more intuitive why one would need super-exponential time to solve naively?

Are any of these problems still open, as in the brute force solution is super exponential, but it is not known or unknown whether there exists a exponential or polynomial time algorithm?

🌐
Ucc
cs.ucc.ie › ~dgb › courses › toc › handout25.pdf pdf
Exponentiation Factorial The n-Queens Problem Module Home Page Title Page ◀◀ ▶▶
And this may make the curves cross in different places. But the exponential functions · will still grow much faster than the polynomial ones. For example, suppose algorithm A’s worst-case time complexity tA(n) =def 10n2 +
🌐
Medium
medium.com › @ariel.salem1989 › an-easy-to-use-guide-to-big-o-time-complexity-5dcf4be8a444
An Easy-To-Use Guide to Big-O Time Complexity | by Ariel Salem | Medium
March 1, 2017 - Once you were sure that all the duplicates were removed, you’d continue doing the same thing for second card, and third, and so on until you reached the end of the deck. This is an example of Quadratic Time Complexity. O(2^N) — Exponential Time Exponential Time complexity denotes an algorithm ...
Top answer
1 of 3
4

As a simple intuition of what big-O (big-O) and big-Θ (big-Theta) are about, they are about how changes the number of operations you need to do when you significantly increase the size of the problem (for example by a factor of 2).

The linear time complexity means that you increase the size by a factor of 2, the number of steps you need to perform also increases by about 2 times. This is what called Θ(n) and often interchangeably but not accurate O(n) (the difference between O and Θ is that O provides only an upper bound but Θ guarantees both upper and lower bounds).

The logarithmic time complexity (Θ(log(N))) means that when increase the size by a factor of 2, the number of steps you need to perform increases by some fixed amount of operations. For example, using binary search you can find given element in twice as long list using just one ore loop iterations.

Similarly the exponential time complexity (Θ(a^N) for some constant a > 1) means that if you increase that size of the problem just by 1, you need a times more operations. (Note that there is a subtle difference between Θ(2^N) and 2^Θ(N) and actually the second one is more generic, both lie inside the exponential time but neither of two covers it all, see wiki for some more details)

Note that those definition significantly depend on how you define "the size of the task"

As @DavidEisenstat correctly pointed out there are two possible context in which your algorithm can be seen:

  1. Some fixed width numbers (for example 32-bit numbers). In such a context an obvious measure of the complexity of the prime-testing algorithm is the value being tested itself. In such case your algorithm is linear.

  2. In practice there are many contexts where prime testing algorithm should work for really big numbers. For example many crypto-algorithms used today (such as Diffie–Hellman key exchange or RSA) rely on very big prime numbers like 512-bits, 1024-bits and so on. Also in those context the security is measured in the number of those bits rather than particular prime value. So in such contexts a natural way to measure the size of the task is the number of bits. And now the question arises: how many operations do we need to perform to check a value of known size in bits using your algorithm? Obviously if the value N has m bits it is about N ≈ 2^m. So your algorithm from linear Θ(N) converts into exponential 2^Θ(m). In other words to solve the problem for a value just 1 bit longer, you need to do about 2 times more work.

2 of 3
1

Exponential versus linear is a question of how the input is represented and the machine model. If the input is represented in unary (e.g., 7 is sent as 1111111) and the machine can do constant time division on numbers, then yes, the algorithm is linear time. A binary representation of n, however, uses about lg n bits, and the quantity n has an exponential relationship to lg n (n = 2^(lg n)).

Given that the number of loop iterations is within a constant factor for both solutions, they are in the same big O class, Theta(n). This is exponential if the input has lg n bits, and linear if it has n.

🌐
Launch School
launchschool.com › books › dsa › read › exploring_time_complexities
Exploring Various Time Complexities in Algorithms
A common example of an algorithm with exponential time complexity is non-memoized recursion.
🌐
University of Iowa
homepage.cs.uiowa.edu › ~sriram › 80 › spring2009 › notes › exponentialRunningTime.html
Exponential Running Time
A program or a function that has exponential running time is bad news because such programs run extremely slowly! Example. Suppose the running time of a function is 2n. Further suppose that each primitive operation can be executed in one micro second (i.e., 10-6 seconds).
🌐
YouTube
youtube.com › quanticdev
Big O Time/Space Complexity Types Explained - Logarithmic, Polynomial, Exponential, and More - YouTube
Today we will investigate the most important time and space complexity types. Time and space complexities are a measure of a function's processing power and ...
Published   August 18, 2020
Views   7K
🌐
Quora
quora.com › What-is-the-definition-of-an-exponential-time-complexity-Why-is-this-important-to-consider-when-solving-problems
What is the definition of an exponential time complexity? Why is this important to consider when solving problems? - Quora
Answer: Time complexity—Big O notation—is a guide to understand how much time or resource is needed to complete a task as the number of elements to be processed increases. So, think of the graph of t = O(n^2) (n squared) or t = O(n^3) (n cubed). ...