算法

小学数学中的竖式计算,就是一个算法,曾被用于设计乘法电路......小到Sorting或Searching,大到AI,算法统治着一切!

suanfa

Algorithm is a procedure of Finite Steps to solve problem in an efficient way hopefully. Take algorithm as a Technology!

Sequence, If...Else..., Loop, and (algorithmic) Recurrence! Recurrence is essentially loop, but more powerful! Loop is for items. Recurrence is for subproblems!

Data structure is used to hold and manipulate data! Using appropriate data structure is an important part of algorithm design. Sometimes, different data structure would cause different asymptotic performance of algorithm.

Facts

Proof of the Halting Problem

def halt(func, *args, **kwargs) -> bool:
    """ Return True if func(args,kwargs) would stop, otherwist False. """
    ...  # ??

def magic(*args, **kwargs):
    while halt(magic,*args,**kwargs):
        pass

For the Halting Problem and other unsolvable problems, there are proofs that no algorithm can exist that, for every input, eventually produces the correct answer. A procedure attempting to solve an unsolvable problem might always produce an answer but is sometimes incorrect, or all the answers it produces might be correct but for some inputs it never produces an answer. ---- 《CLRS》

Subproblems

-- 目录[6] --

-- 文章[20] --