0 Daumen
568 Aufrufe

Aufgabe:

blob.png

Text erkannt:

b) Gegeben f(n)=log(n2) f(n)=\log \left(n^{2}\right) , zeigen Sie: f(n)=O(log(n)) f(n)=O(\log (n))

Avatar von

2 Antworten

0 Daumen
 
Beste Antwort

Hallo :-)

Du musst doch noch ein Logarithmusgesetz hier anwenden:

f(n)=log(n2)=2log(n)f(n)=\log(n^2)=2\cdot \log(n)

Mit n0=1n_0=1 und α=2\alpha=2 ist also für alle n1n\geq 1

0f(n)=αlog(n)0\leq f(n)=\alpha\cdot \log(n)

Gleiche das mal mit der Definition zur O-Notation ab:

Es sei g : NRg: \mathbb{N}\rightarrow \mathbb{R}. Dann istO(g) : ={f :  NR :  α>0 n0N nn0 :  0f(n)αg(n)0f(n) f(n)αg(n)} \mathcal{O}(g):=\{f:\ \mathbb{N}\rightarrow \mathbb{R}:\ \exists \alpha>0 \ \exists n_0 \in \mathbb{N} \ \forall n\geq n_0:\ \underbrace{0\leq f(n) \leq \alpha \cdot g(n)}_{0\leq f(n) \ \land f(n)\leq \alpha\cdot g(n) } \}

Avatar von 15 k
0 Daumen

Hallo,

log(n²) = 2log(n) und das ist Element von O(log(n)).


Avatar von

Ein anderes Problem?

Stell deine Frage