更改

跳到导航 跳到搜索
添加83字节 、 2021年1月26日 (二) 17:54
第89行: 第89行:  
For clarity, only time complexity is considered in this section, but everything applies (with slight modifications) to the complexity with respect to other resources.  
 
For clarity, only time complexity is considered in this section, but everything applies (with slight modifications) to the complexity with respect to other resources.  
   −
为了清晰起见,本节只考虑时间复杂性,但是对于其他资源,所有内容都适用于(稍加修改)复杂性。
+
为了清晰起见,本节只考虑时间复杂度,不过所有内容(稍加修改)也都适用于其他资源的复杂度。
    
It is impossible to count the number of steps of an algorithm on all possible inputs. As the complexity generally increases with the size of the input, the complexity is typically expressed as a function of the size {{math|''n''}} (in [[bit]]s) of the input, and therefore, the complexity is a function of {{math|''n''}}. However, the complexity of an algorithm may vary dramatically for different inputs of the same size. Therefore, several complexity functions are commonly used.
 
It is impossible to count the number of steps of an algorithm on all possible inputs. As the complexity generally increases with the size of the input, the complexity is typically expressed as a function of the size {{math|''n''}} (in [[bit]]s) of the input, and therefore, the complexity is a function of {{math|''n''}}. However, the complexity of an algorithm may vary dramatically for different inputs of the same size. Therefore, several complexity functions are commonly used.
第95行: 第95行:  
It is impossible to count the number of steps of an algorithm on all possible inputs. As the complexity generally increases with the size of the input, the complexity is typically expressed as a function of the size  (in bits) of the input, and therefore, the complexity is a function of . However, the complexity of an algorithm may vary dramatically for different inputs of the same size. Therefore, several complexity functions are commonly used.
 
It is impossible to count the number of steps of an algorithm on all possible inputs. As the complexity generally increases with the size of the input, the complexity is typically expressed as a function of the size  (in bits) of the input, and therefore, the complexity is a function of . However, the complexity of an algorithm may vary dramatically for different inputs of the same size. Therefore, several complexity functions are commonly used.
   −
在所有可能的输入上计算一个算法的步数是不可能的。由于复杂度通常随着输入的大小而增加,复杂度通常表示为输入大小(以位为单位)的函数,因此,复杂度是。然而,对于同样大小的不同输入,一个算法的复杂度可能会大不相同。因此,一些复杂性函数被广泛使用。
+
在所有可能的输入上计算一个算法的步数是不可能的。由于复杂度通常随着输入的长度而增加,复杂度通常表示为输入值{{math|''n''}}长度(以'''<font color="#ff8000">比特 bit</font>'''为单位)的函数,因此,复杂度是一个关于{{math|''n''}}的函数。然而,对于同样长度的不同输入,算法的复杂度可能会大不相同。因此,一些复杂度函数被广泛使用。
      第104行: 第104行:     
最坏情况复杂性是所有大小输入的最大复杂性,平均情况复杂性是所有大小输入的平均复杂性(这是有道理的,因为给定大小的可能输入的数量是有限的)。一般来说,如果不进一步说明就使用“复杂性” ,那么这就是考虑的最坏情况时间复杂性。
 
最坏情况复杂性是所有大小输入的最大复杂性,平均情况复杂性是所有大小输入的平均复杂性(这是有道理的,因为给定大小的可能输入的数量是有限的)。一般来说,如果不进一步说明就使用“复杂性” ,那么这就是考虑的最坏情况时间复杂性。
−
  −
      
==Asymptotic complexity==
 
==Asymptotic complexity==
307

个编辑

导航菜单