Skip to content

Commit 3788be8

Browse files
authored
Update appendix-b.md
1 parent 06adf3e commit 3788be8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

discrete-maths/appendix-b.md

+5
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,10 @@ $$Since, f(N) = C(N) * \sum_{n=1}^N N_c$$
6363
- Then, $f(N) = N_c = N * (N_{c_c} + N_{\phi})$.
6464
- Back-substitution yields: $$N_c = N^2 * (N_{c_b} + N_{\phi}) = N^2 * (N_c + N_{\phi}) = N^2 * (N * (N_{c_c} + N''\_{\phi}) + N'\_{\phi})$$
6565
$$= N^3 * (N_{c_c} + N''\_{\phi}) + N^2 * N'\_{\phi}$$
66+
- The following formulas are derivable:
67+
$$ N_{c_c} = [(N_c - N^2 * N'\_{\phi}) / N^3] - N''\_{\phi} $$
68+
$$ N''\_{\phi} = [(N_c - N^2 * N'\_{\phi}) / N^3] - N_{c_c} $$
6669

70+
- Now, if `command()` has a clock-complexity of (1):
71+
$$N_c = N^3 * (N_{c_c} + N''\_{\phi}) + N^2 * N'\_{\phi} = N^3 * (1 + 0) + N^2 * 0 = N^3$$
6772

0 commit comments

Comments
 (0)