JAVA PROBLEM... Problem: Consider the following function classes ordered by proper inclusion: (a) 𝑂(1000) (b) 𝑂(𝑙𝑜𝑔(𝑙𝑜𝑔(
Posted: Fri Jul 01, 2022 5:51 am
JAVA PROBLEM...
Problem: Consider the following function classes ordered byproper inclusion:
(a) ๐(1000)
(b) ๐(๐๐๐(๐๐๐(๐)))
(c) ๐(๐๐๐(๐))
(d) ๐([๐๐๐(๐)] 4 )
(e) ๐(2๐ + 1)
(f) ๐(๐ ๐๐๐ (๐))
(g) ๐(๐ 2 ๐๐๐ (๐))
(h) ๐(๐ 4 )
(i) ๐(3 ๐ )
(j) ๐(๐ ๐)
(k) ๐ต๐๐๐ข๐ : ๐๐๐ก ๐๐ ๐๐๐ฆ ๐(๐(๐)) ๐คโ๐๐๐ ๐(๐) ๐๐ ๐๐๐๐กโ๐๐๐ก๐๐๐๐๐๐ฅ๐๐๐๐ ๐ ๐๐๐ ๐๐ ๐.
For each big-O class C as above, write a method taking apositive integer k that prints f(k) dots on the console where f(n)is of class C, but f(n) is not in any class appearing listed beforeC. For example, log(n) is in the class listed under (c), but it isneither in the one listed under (b) nor listed under (a). You arelimited to a sub-language of Java. You can ONLY use fixed incrementoperators, variable declarations, assignment operators, methodcalls, Boolean operators, multiplication and division by constants,and control-flow structures. Justify your choice. Avoid librarycalls, except to print a dot on the console.
Problem: Consider the following function classes ordered byproper inclusion:
(a) ๐(1000)
(b) ๐(๐๐๐(๐๐๐(๐)))
(c) ๐(๐๐๐(๐))
(d) ๐([๐๐๐(๐)] 4 )
(e) ๐(2๐ + 1)
(f) ๐(๐ ๐๐๐ (๐))
(g) ๐(๐ 2 ๐๐๐ (๐))
(h) ๐(๐ 4 )
(i) ๐(3 ๐ )
(j) ๐(๐ ๐)
(k) ๐ต๐๐๐ข๐ : ๐๐๐ก ๐๐ ๐๐๐ฆ ๐(๐(๐)) ๐คโ๐๐๐ ๐(๐) ๐๐ ๐๐๐๐กโ๐๐๐ก๐๐๐๐๐๐ฅ๐๐๐๐ ๐ ๐๐๐ ๐๐ ๐.
For each big-O class C as above, write a method taking apositive integer k that prints f(k) dots on the console where f(n)is of class C, but f(n) is not in any class appearing listed beforeC. For example, log(n) is in the class listed under (c), but it isneither in the one listed under (b) nor listed under (a). You arelimited to a sub-language of Java. You can ONLY use fixed incrementoperators, variable declarations, assignment operators, methodcalls, Boolean operators, multiplication and division by constants,and control-flow structures. Justify your choice. Avoid librarycalls, except to print a dot on the console.