# Thread:

1. ## Simple log question for algorithm

I'm terrible with logs (just can't get my head around them).

The question is about big-O notation but the part I don't understand is about logarithms.

I've been told the following:
$\log_3 N = O(\log_2 N)$ because $\log_3 N = \log_3 2 \times \log_2 N$.

I don't understand why. Can someone go over the simple rules of why that is (the bit after "because")?

And isn't the implication of that, that any $\log_b N$ will be $O(\log_2 N)$

2. Originally Posted by Pan
I'm terrible with logs (just can't get my head around them).

The question is about big-O notation but the part I don't understand is about logarithms.

I've been told the following:
$\log_3 N = O(\log_2 N)$ because $\log_3 N = \log_3 2 \times \log_2 N$.

I don't understand why. Can someone go over the simple rules of why that is (the bit after "because")?

And isn't the implication of that, that any $\log_b N$ will be $O(\log_2 N)$
$\log_3{2} \cdot \log_2{N} =$

change of base for the 2nd factor ...

$\log_3{2} \cdot \frac{\log_3{N}}{\log_3{2}} = \log_3{N}$

3. Originally Posted by skeeter
$\log_3{2} \cdot \log_2{N} =$

change of base for the 2nd factor ...

$\log_3{2} \cdot \frac{\log_3{N}}{\log_3{2}} = \log_3{N}$
If you had $log_b{N}$

Can it be made equal to $\log_b{c} \cdot \log_2{N}$, where $c$ is just some number that doesn't change.

In other words, any log can be made so that the dominant factor (for large N) is a base 2 log.
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 15, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9781505465507507, "perplexity_flag": "middle"}