From 6db1a2cdd3b96731f2e092d55d8c2136eabc52d0 Mon Sep 17 00:00:00 2001 From: Julian T Date: Tue, 11 Feb 2020 12:24:56 +0100 Subject: Rename and cleanup --- sem1/algo/mm3/opgaver.md | 49 ------------------------------------------------ 1 file changed, 49 deletions(-) delete mode 100644 sem1/algo/mm3/opgaver.md (limited to 'sem1/algo/mm3/opgaver.md') diff --git a/sem1/algo/mm3/opgaver.md b/sem1/algo/mm3/opgaver.md deleted file mode 100644 index a6e560c..0000000 --- a/sem1/algo/mm3/opgaver.md +++ /dev/null @@ -1,49 +0,0 @@ -# Opgave 1 - -## Exercise 9.2 - -**T(n) = 3T(n/2) + n** - -a = 3 -b = 2 -d(n) = n - -a ? d(b) -> 3 > 2 - -Svaret er derfor O(n^log2(3)) = O(n^1.59) - -**T(n) = 3T(n/2) + n^2** - -3 ? 2^2 -> 3 < 4 - -d(n) = n^2 hvilket betyder at O(n^2) - -**T(n) = 8T(n/2) + n^2** - -8 ? 2^3 -> 8 = 8 - -d(n) = n^3 hvilket betyder at O(n^3 log2(n)) - -## Evercise 9.3 - -**T(n) = 4T(n/3) + n** - -a = 4 -b = 3 -d(n) = n - -4 ? 3 -> 4 > 3 - -Derfor er svaret O(n^log3(4)) = O(n^1.26) - -**T(n) = 4T(n/3) + n^2** - -4 ? 3^2 -> 4 < 9 - -d(n) = n^2 hvilket betyder at O(n^2) - -**T(n) = 9T(n/3) + n^2** - -9 ? 3^2 -> 9 = 9 - -d(n) = n^2 hvilket betyder at O(n^2 log2(n)) -- cgit v1.2.3