需要协助证明嵌套循环和指数

Need assistance with Proof for Nested Loops and Exponentials

是否可以将任何嵌套循环的增长表示为指数?这是我和几个同学的讨论。我试图使用指数定律证明:

If n = the size of the outer loop
If k = the size of the inner loop

Then, if we use n as our base and the value of n is n^1:
Then, if n^x = k, the total = n^(1+x) for any n and k.

这应该适用于我认为的任何基地。此外,只要您使用相同的基数,外环在技术上可以被提升到任何次方。

编辑:用于说明的代码示例:

for (int i =1; i <= n; i++){

  for (int j = 1; j <= k; j++){

   /// whatever

  }

}

Let us say that:
n = 10
k = 5

We would expect that the total would be 10 * 5 = 50
50 maximum loops

I am saying that:
10 = 10^1 -> outer loop
5 = 10^.69897 -> inner loop
10^1.69897 = 50

这应该适用于任何基地。

我不确定这与循环有什么关系,但通常假设您有任意两个数字,nk,并且您想在 n*k 处表示基础 n:

n10 在基数 n k 将是 10^(log k)log 这里表示以 10 为底的对数)

所以n*k = 10 * 10^(log k) = 10^(log k + 1) 所以是的,数学成立。但我不确定你为什么选择这样看。