We use Python 3 in this course this semester. - AnswersTrue
Python is a compiled language like C++. - AnswersFalse
Python 3 is very broadly used in the real world. - AnswersTrue
Python is hard to learn. - AnswersFalse
Python uses indentation spaces to specify code blocks. - AnswersTrue
Elements in a Python list must be in the same type. - AnswersFalse
Set is a built-in datatype in Python. - AnswersTrue
There is not a built-in datatype available for relations in Python. - AnswersFalse
Linearly searching an element in an n-element array is O(n). - AnswersTrue
Binary searching an element in a sorted n-element array is O(log n). - AnswersTrue
Locating the value of the 100th element in an n-element array (n is at least 100) is O(1). - AnswersTrue
In analyzing the asymptotic complexity of f(n) in Big-Oh, we only need to consier the highest term of f(n).
- AnswersTrue
n^(1/5) = O(logn) - AnswersFalse
In analyzing the asymptotic complexity of f(n), we should replace all constant factors with 1. -
AnswersTrue
The time complexity of a double loop is O(n^2) always. - AnswersFalse
If f = O(g), then g = O(f) cannot be true. - AnswersFalse
The code segment below finds the greatest number from a, an array of 500 integers. Its time complexity
is O(n).
greatest = a[0]
for i from 1 to 499:
if greatest < a[i]:
greatest = a[i] - AnswersFalse
The eighth Fibonacci number is 13. - AnswersTrue
, The recursive implementation of finding the n-th Fibonacci number is mathematically correct. Therefore,
we can apply it in practice even when n is big. - AnswersFalse
There is a linear algorithm to find the n-th Fibonacci number. - AnswersTrue
Any computational problem can be expressed as a True/False decision problem. - AnswersTrue
All decidable problems are tractable. - AnswersFalse
All computational problems are decidable if provide unlimited computational resources. - AnswersFalse
A non-deterministic decision problem contains a guess step and a verification step. - AnswersTrue
A problem is NP-hard if it at least NP-complete. - AnswersTrue
Both 3SAT and set cover problems are NP-complete. - AnswersTrue
In NP-completeness, the "NP" means non-polynomial. - AnswersFalse
If one NP-complete problem is tractable, then all NP-complete problems are tractable. - AnswersTrue
One should not try to solve any NP-hard problems because they are rarely appear in real world
applications. - AnswersFalse
One may apply both greedy and dynamic programming to tackle NP-hard problems for approximated
solutions. - AnswersTrue
There are definitely no polynomial algorithms to solve any NP-hard problem. - AnswersFalse
To prove a problem is NP-hard, one only need to show it is at least NP-complete. - AnswersTrue
Nothing needs to be agreed in a symmetric cryptosystem. - AnswersFalse
An encrypt function should be a bijection. - AnswersTrue
The multiplicative inverse of 7 in Z subscript 11 is 5. - AnswersFalse
Alice and Bob may establish a secure communication even they have never known each other before. -
AnswersTrue
Alice must have both public and private keys for her to send a message to Bob. - AnswersFalse
The security of RSA relies on the fact: it is computationally hard to factor a large integer. - AnswersTrue
Proposition:, then has a multiplicative inverse. Question 7, quiz 1 - AnswersTrue
Proposition:, then has a multiplicative inverse. Question 8, quiz 1 - AnswersFalse
The integer pair (77, 5) can be a public key in RSA. - AnswersFalse