# Introduction to Computer Science Take-home Exam
###### tags: `MyNTUST`
> Due: 12/29 Tuesday 10:20AM
> Name: 李喬安 Student ID: B10915019
This is an open book, open notes, take-home exam. You may consult any of the course materials (and other outside materials if you wish) in figuring out the answers to the questions. However, you may NOT discuss
the exam with ANYONE, whether they are taking the class or not. If you have any questions, direct them to me, either in my office hours, or by e-mail. I will not answer questions that are too specific and would give you an unfair advantage in taking the exam, but will be happy to give clarification on what is meant by a question. Use anything from anyplace, but do not steal. If you make use of an argument from some source, give credit to the source and cite it properly.
1. (5%) What is the sampling rate used for the telephone system? Please explain the reasons why we have that specific value.
Ans.
通常為 8 KHz,因為取樣頻率需大於目標訊號最高頻率的 2 倍,而人類可發出的最高頻率約為 4 KHz 左右。
2. (10%) Please design an algorithm that will find all permutations of n objects. A permutation of a set of objects is a particular ordering of those objects. When we speak of “all permutations” of a set, we mean all possible ways of ordering those objects.
Examples:
A. Given the empty set { }, the only possible permutation is { }
B. Given the set {A}, the only possible permutation is {A}
C. Given the set {A, B}, the possible permutations are {AB, BA}
D. Given the set {A, B, C}, the possible permutations are {ABC, ACB, BAC, BCA, CAB, CBA}
E. Etc.
Ans.(python code)
```python
def enum_it(arr):
if len(arr) == 1: return arr # minimum case
output = set() #儲存結果
for e in arr:
arr_copy = arr.copy()
arr_copy.remove(e)
# 遞迴: 列出扣掉該元素後所有的排列組合
tail = enum_it(arr_copy)
for t in tail:
output.add(e+t)
return output
```
3. (9%) Please prove the following:
a. ln(n) = O(n)
$$O(g(n))=f(n) \text{ if } \lim_{x\to \infty} \frac{f(n)}{g(n)} \text{ exist.}$$
$$
\lim_{x\to\infty} {\ln(n)\over n} = 0 \text{ (by Pinching Theorem)}
$$
$$
\ln(n) = O(n)
$$
ref. [Some Special Limits](http://www.sosmath.com/calculus/sequence/specialim/specialim.html)
b. n+n2 = Ω(n)
$$\Omega(g(n))=f(n) \text{ if } \lim_{n\to \infty} \frac{f(n)}{g(n)} \gt 0 \text{ and exist.}$$
$$
\lim_{n\to \infty} \frac{n+n^2}{n} = \lim_{n\to \infty} {1+n} = \infty
$$
$$n+n2 \ne \Omega(n)$$
c. n = θ (n+sqrt(n))
$$\theta(g(n))=f(n) \text{ if } f(n) \text{ is } O(g(n)) \text{ and } \Omega (g(n))$$
$$
\lim_{n \to \infty} \frac{n}{n+\sqrt n} = \lim_{n \to \infty} \frac{1}{1+\frac{1}{\sqrt n}} = 1
$$
$$
\theta(n+\sqrt n) = n
$$
ref. 課堂投影片
4. (10%) What do you hope to experience and contribute at National Taiwan University of Science and Technology? What are your plans and goals after you receive your degree (22~30 years old, 500- 750 words).
在台科豐富的資源中,我想帶走的有三項。
一是學識,系上的專業課程、校內的通識課程、台大師大的跨校選修、社團、講座等。我認為汲取這些學術知識是讀大學的根本,同時也為未來的發展打下堅實的基礎。
二是許多學長及教授的經驗傳承及生命哲學。在許多次的交流中,我深切地感受到時間及閱歷可以帶來的成長及蛻變,教授們的經驗分享更常常是醍醐灌頂,一語點醒夢中人。因此,我認為經常與前輩們交流是十分有益的。
最後,是冒險的精神。在過去一學期的觀察中,我發現有些同學非常樂於挑戰自我。面對不確定的挑戰時,他們會選擇大膽嘗試,而不是保守退縮。他們並不是有勇無謀,而是比起他人,他們更願意也更有能力承受風險。這樣的特質是我所嚮往的。
在台科獲得許多成長,我也期待自己能夠為這所學校做出貢獻。
自我上大學開始,就會習慣性的將筆記上傳到 GitHub 上並開源分享。除了做為備份外,也可以幫助有需要的同學,還藉機推廣了開源精神。
期待在未來出社會後,可以提供台科學生更多的「機會」。如果我成為企業家,那麼我可以提供未來的學生就業的機會;如果我成為教育者,那麼我可以提供他們翻轉自己生命的機會;如果我只是一位普通的工程師,那麼我也可以提供他們更多認識這個領域的機會。
為什麼我不考慮捐款?因為在我看來,捐款是最沒效率的貢獻。一筆善款從捐贈者手中離開後,經過商業鍊層層剝削,最後剩下的才真正流到受贈者手中。最後,受惠的只是那些相關產業。
取得學位後,我準備投入職場,一邊工作一邊存錢。然而,我認為最有效率的賺錢法是以錢滾錢。因此,我會將收入的一部份用於投資,預備未來可能需要的重大花費。期待早日達成財富自由,可以有更多的時間陪伴家人、從事興趣。
5. (10%) What is your dream? (Dream BIG, 500- 750 words).
- 財富自由
- 可以做自己想做的事
- 人生自由
- 可以不被無謂的規範束縛
- 不用為了生活做自己不想做的事
- 流浪導師
- 巡迴教育者
6. (10%) What are your weaknesses? What is your plan to overcome your weaknesses? (500- 750 words).
- 怠惰
- 拖延
- 執行力不足
- 做一半
- 健康
- 耐力太差
- 戒酒
7. (15%) What have you learned from a few seminars that held in this semester so far? (500- 750 words).
我印象最深刻的是在「IG 與 FB 產品開發」講座中,講者所提到的身為一位好的工程師應該具備的特質。其中,專業技術只是最低門檻,其他還有像是溝通能力、領導能力等。讓我學習到即使是一位技術人才,仍然要具備良好的人際能力才行。
另一方面,多數的講者甚至教授都提出台灣學生比起外國學生相對缺乏野心,總認為自己只要謹守本分就好,害怕踏出舒適圈。我認為這也是值得加強之處,當別人躍躍欲試時,我們也應該當仁不讓。許多講者都認為,公司更喜歡可以主動發掘上司的需求並確實完成的人才。
最後,每一位講者都再三強調的,就是英語的重要性及對於視野的影響力。在這個快速變化的時代,如果無法使用國際語言與人交流,就無法取得最新的情報,永遠落後別人一大截。所以,英文就如同開啟世界的一把鑰匙,學好英文才能接軌世界。
8. (10%) Please compute Fourier Transform of {cos (2πf0 t)}.

ref. https://www.astro.umd.edu/~lgm/ASTR410/ft_ref2.pdf
9. (15%) Please briefly introduce deep learning and explain the difference between deep learning and conventional learning techniques. (500- 750 words).
深度學習是一種製造演算法的方式。藉由串接數層的「神經元層」,每層包含數個「神經元」,在一連串的數學運算中,逐漸逼近目標函數。
神經元是深度學習的基本單位,實質上是一個 $Y=k+\sum_{i=1}^{n} w_ix_i$ 的數學模型,以流水線的方式將每一層的輸出送到下一層的輸入。比起傳統機器學習,深度學習仰賴更多次的運算。傳統機器學習通常只有一次的迴歸分析運算,而深度神經網路通常由數十個以上的神經元組成。
傳統機器學習需要人工設計取出特徵點的函數,而深度學習則是讓模型自己探索出特徵點,這是最大的不同。
10. (6%) Suggestions for the class.
- 更多的問答時間
課堂上或講座上,提供更多的時間給學生提問及和老師/講者討論
- 更多不同面向的知識
例如資訊科技的相關簡史、資訊科技在生活中的實際應用案例及解析...等
- 對資工下不同領域的細分與介紹
資料科學、ML、前端、後端、網路、資安、系統...等不同子領域的分類介紹