Commit 69bfa9de by 20200519053

第一次作业的python代码

parent cf23bbb7
# -*- coding: UTF-8 -*-
# 运行本文件得到本次作业题答案
print('''
1. Fibonacci sequence closed-form
为了便于公式阅读,此部分书写在word文档中,见相应的word文件 20190519053-work1.docx。
''')
print('''
2. Algorithm complexity asc
O(1)
O(logN)
O(N)
O(NlogN)
O(N^2)
O(N^(2.1))
O(N^2logN)
O(2^N)
O(3^N)
O(N!)
''')
print('''
3. Levenshetein string distance
''')
stra = input('input first string:')
strb = input('input second string:')
arra = []
arrb = []
for c in stra:
arra.append(c)
for c in strb:
arrb.append(c)
lena = len(arra)
lenb = len(arrb)
lenboud = max(lena,lenb)
arrf = [[0 for i in range(0,lenboud+2)]for i in range(0,lenboud+2)]
for i in range(1,lenboud+2):
arrf[i][0]=i
arrf[0][i]=i
for i in range(1,lena+1):
for j in range(1,lenb+1):
if (arra[i-1]==arrb[j-1]):
arrf[i][j]=arrf[i-1][j-1]
else:
arrf[i][j]=min(arrf[i][j-1],min(arrf[i-1][j],arrf[i-1][j-1]))+1
print('Levenshetein string distance = ',arrf[lena][lenb])
print('''
4. Nontechnical problem
Q1
没做过
Q2
我的公司栗子树科技目前为新零售和物联网方面的解决方案开发商,日常开发所使用的多为传统方法(之前没有自行开发AI领域的东西),
之前有类似图像识别之类的需求,也都是购买现成的第三方库或者服务来实现,
未来想做自己的产品,所以想先广泛了解各种技术的具体实现原理,以便于未来决策。
之前看到课程大纲介绍感觉这个课程比市面上的其他课程更贴近本质方法而不是简单的复制一堆案例,所以选择了这个课程。
Q3
各种算法的本质原理和细节,剖析的越深入详细越好。
了解AI领域最新进展,最好能有近期相对重要的论文的解读和实验复现。
''')
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment