冬来冬往的博客

linear VS linearithmic

2023-12-24

What is the difference between linear and linearithmic?

The terms “linear” and “linearithmic” refer to different types of relationships or functions in mathematics.

Linear

A linear relationship between two variables means that when one variable changes, the other changes proportionally.
In the context of functions, a linear function is one where the graph is a straight line.
The general form of a linear function is often written as
y=mx+b, where m is the slope of the line, and b is the y-intercept.
Alt text

Linearithmic (or Logarithmic Linear)

The term “linearithmic” is a combination of “linear” and “logarithmic.”
In this context, it usually refers to a function that combines linear and logarithmic components.
A linearithmic function might have the form
y=a⋅x+b⋅log(x), where a and b are constants.
Alt text

The logarithmic component introduces a logarithmic term, which can result in a curve that grows more slowly than a purely linear function.

In summary, the key difference lies in the inclusion of a logarithmic term. Linear functions are straight lines, while linearithmic functions have a combination of linear and logarithmic components, leading to a more complex relationship between the variables.

Tags: 算法

扫描二维码,分享此文章