Skip to content

Commit fef303b

Browse files
authored
Update appendix-b.md
1 parent 3352b67 commit fef303b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

discrete-maths/appendix-b.md

+6-3
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,19 @@ $$Then, f(n) = N^{n_l} = N^2$$; where ${n_l}$ is the number of loop closures to
3232
```
3333

3434
### 2) Main loops - An Insider look:
35+
- Proof:
36+
$$Since, f(N) = C(N) * \sum_{n=1}^N N_c$$ ;where $N_c$ is the clock-comolexity function of the sub-closure.
37+
3538
- Base idea: _Apply additive identities on the previous exponential transcendentals._
3639
- Recall, _Closure B_:
3740
```java
3841
IF (MAT[I,J] = 1) THEN
3942
// execute commands (conditions - statements - operations - compound closures)
4043
END
4144
```
42-
- Let $P$ be the number of elements in $M_R$ relations matrix, whose value is 1, in other words whose relations are positive in the set $R$.
43-
- Then, the following applies, if $N^2=N_P+N_{\phi}$, then $$N{\phi}=N^2-N_P$$; where $N_P$ represents the number of ordered pairs that are evaluated to 1s in the $M_R$ data structure, and $N_{\phi}$ represents the number of the ordered pairs that are evaluated to 0s in the ${M_R}$ data structure.
44-
- Thence, the total number of execution of _Closure B_ is $$N_e=N^2-N_{\phi}$$ which is the same as ${N_P}$, while the total number of the non-execution of _Closure B_ is $$N_{\phi}=N^2-P$$
45+
- Then, it follows that the clock-complexity can be evaluated as follows:
46+
$$ f(N) = C(N) * \sum_{c=1}^C N_c = C(N) * (N_{0} + N_{1} + ... + N_{C-1} + N_{C})$$
47+
$$Thence, f(N) = N_c = (1) * (N_c_b + N_{\phi})$$ ;where $N_c$ is the complexity of the closure.
4548

4649
### 3) Second-order loops - Closures analysis:
4750
- Base idea: Further loops apply the principles of _exponentiation or in other words repeated multiplication_.

0 commit comments

Comments
 (0)