Solving Nested Exponents - A Programmer's Headache

  • Context: Undergrad 
  • Thread starter Thread starter zyflair
  • Start date Start date
  • Tags Tags
    Exponents
Click For Summary
SUMMARY

The discussion centers on the computational challenges of evaluating nested exponents, specifically the expression α0α1α2...αn, where each α is a positive integer greater than one. The primary concern is the inefficiency of calculating these exponents from right to left, leading to multiple operations for each nesting. Participants suggest reviewing the rules of exponents and provide examples to clarify the differences between nested and grouped exponentiation. The conversation highlights the need for a closed-form solution to streamline the calculation process.

PREREQUISITES
  • Understanding of exponentiation rules
  • Familiarity with programming concepts related to mathematical operations
  • Knowledge of integer properties
  • Experience with mathematical notation and simplification techniques
NEXT STEPS
  • Research closed-form solutions for nested exponentiation
  • Explore programming libraries that optimize mathematical computations, such as NumPy for Python
  • Learn about operator precedence and evaluation strategies in programming languages
  • Investigate mathematical proofs related to exponentiation and their computational implications
USEFUL FOR

Programmers, mathematicians, and anyone interested in optimizing calculations involving nested exponents will benefit from this discussion.

zyflair
Messages
1
Reaction score
0
Hello everyone, I have stumbled across a curious question while programming.

To start the process, say I have a a positive integer greater than one: α0
Nesting that in an exponent is a simple operation and a common occurrence: α0α1
1 is also a positive integer greater than 1. In fact, all numbers mentioned in this problem of mine are in that given set)

But then I run into a problem when I nest this number with yet another exponent: α0α1α2
See, the exponent for me is calculated from right to left, so I can't simply store α0α1 into memory and then set that to the α2 power, because that only works on operators that are calculated left to right.

So my question is this: Given a chain of nested exponents α0α1α2...αn, is there a closed form means to determine α0α1α2...αnαn+1 without having to recalculate the exponents from right to left?

I apologize if this is the wrong place to ask, but as a programmer, nested exponents are causing me a headache, because I have to spend n operations to calculate the nested exponent every time I nest it. While not completely slow, I would enjoy a faster means of computing this. I am also aware my question might not seem completely clear, so please ask for clarifications if you require any.

Thanks for your time.
 
Mathematics news on Phys.org
Try reviewing rules of exponents using some simple example.

Find 2^{{3}^{2}^{5}}. Try doing the exponents from right to left; and also try doing from left to right. See what results.

format tags not working right. 2^3^2^5
Using TexAide: \[<br /> 2^{3^{2^5 } } <br /> \]<br />

[STRIKE]Should be the same as 2^{3*2*5}[/STRIKE]Obviuos mistake. That would not be result of the nesting. See next member's post.
 
Last edited:
symbolipoint said:
Try reviewing rules of exponents using some simple example.
By nesting the OP means 2^(3^4) = 2^81 = 2417851639229258349412352, this is different than (2^3)^4 = 8^4 = 4096.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
11K
  • · Replies 8 ·
Replies
8
Views
3K