homework
string | exercise_number
string | content
string | full_id
string |
|---|---|---|---|
hw1
|
1
|
Prove
$$\frac{1}{2\ln 2} + \frac{1}{3\ln 3} + \ldots + \frac{1}{n\ln n} = \ln\ln n + O(1)$$
and
$$\frac{1}{1^{1.1}} + \frac{1}{2^{1.1}} + \ldots \frac{1}{n^{1.1}} = O(1).$$
|
hw1_ex1
|
hw1
|
2
|
Order the following functions by asymptotic growth. Place $f$ before $g$ if $f(n) = O(g(n))$.
* $n^n$
* $\sqrt{n}$
* $\log\log n$
* $0.001n^7$
* $5000n$
* $e^n$
* $2^{\log^2 n}$
* $10^{10^{10}}$
* $n!$
* $2^{2^n}$
|
hw1_ex2
|
hw1
|
3
|
Let $\Sigma = \{0, 1\}$. Let language
$$L = \{w \in \{0, 1\}^* : w \text{ has an unequal number of 0's and 1's}\}.$$
Prove $L^* = \Sigma^*$.
|
hw1_ex3
|
hw10
|
1
|
Use first-order Peano arithmetic formulas to express "$m = 2^n$".
|
hw10_ex1
|
hw10
|
2
|
Prove P is closed under Kleene star. In other words, if a language $L$ belongs to P, then so does $L^*$.
|
hw10_ex2
|
hw10
|
3
|
Let
$$L_1 = \{(\alpha, x) : \text{TM } M_\alpha \text{ accepts input } x\},$$
and
$$L_2 = \{\alpha : \text{TM } M_\alpha \text{ halts on the empty input}\}.$$
Prove that $L_1 \leq_T L_2$.
|
hw10_ex3
|
hw11
|
1
|
Define the problem QUADEQ as follows: given m quadratic equations in n variables over the finite field GF(2),
$$p_1(x_1, x_2, \ldots, x_n) = 0,$$
$$p_2(x_1, x_2, \ldots, x_n) = 0,$$
$$\vdots$$
$$p_m(x_1, x_2, \ldots, x_n) = 0,$$
determine whether there exists at least one solution. Prove that QUADEQ ∈ NP.
|
hw11_ex1
|
hw11
|
2
|
Prove if L is NP-hard and L ∈ P, then P = NP.
|
hw11_ex2
|
hw11
|
3
|
Prove that $L_1 \leq_P L_2$ and $L_2 \in$ NP, then $L_1 \in$ NP.
|
hw11_ex3
|
hw13
|
1
|
Construct a function $T(n)$ that satisfies $n \leq T(n) \leq n^2$ and is not time-constructible.
|
hw13_ex1
|
hw13
|
2
|
Define the *low-degree clique* (LDC) problem as follows: Given a graph $G = (V, E)$ and an integer $k$, determine whether $G$ contains a clique of size at least $k$ consisting solely of vertices whose degree does not exceed the median vertex degree of $G$. Prove that LDC is NP-complete.
|
hw13_ex2
|
hw13
|
3
|
Let
$$\text{DOUBLE-SAT} = \{\langle \varphi \rangle \mid \text{formula } \varphi \text{ has at least two satisfying assignments}\}.$$
Prove that DOUBLE-SAT is NP-complete.
|
hw13_ex3
|
hw2
|
1
|
Design a finite automaton that accepts the following language
$$L = \left\{ w \in \{0, 1\}^* \mid w = w_1w_2 \cdots w_n \text{ such that } \sum_{i=1}^{n} w_i 2^{n-i} \equiv 0 \pmod{5} \right\}.$$
In other words, the language $L$ is the set of all binary strings that represent multiples of 5, written with the most significant bit first (MSB). Draw the state diagram of the finite automaton.
|
hw2_ex1
|
hw2
|
2
|
Design a finite automaton that recognizes the following language
$$L = \{w \in \{0, 1\}^* : w \text{ does not contain substring } 10\}.$$
Draw its state diagram.
|
hw2_ex2
|
hw2
|
3
|
Use the definition of big-O notation to prove the following:
1) If $f_1 = O(g_1)$ and $f_2 = O(g_2)$, then $f_1f_2 = O(g_1g_2)$.
2) If $f_1 = O(g)$ and $f_2 = O(g)$, then $f_1 + f_2 = O(g)$.
|
hw2_ex3
|
hw3
|
1
|
Define a *backward-read DFA* as a deterministic finite automaton that processes its input string from right to left. Prove that a language is regular if and only if it can be accepted by some backward-read DFA.
|
hw3_ex1
|
hw3
|
2
|
Give a regular expression for language
$$L = \{w \in \{0, 1\}^* : \text{ the number of 1's in } w \text{ is even, and the number of 0's is even}\}.$$
|
hw3_ex2
|
hw3
|
3
|
Construct NFAs corresponding to the following regular expressions:
* $0^+ \cup (01)^*$;
* $(0 \cup 1^+)0^*1^+$.
|
hw3_ex3
|
hw5
|
1
|
The input is two binary numbers, $x$ and $y$ (with the most significant bit on the left), separated by a symbol #, for example, 100#100⊔. (Assume there are no leading zeros unless the number is zero.) Accept if $x$ and $y$ are equal.
Draw the state diagram of the corresponding Turing machine and submit its source code on eLearning.
|
hw5_ex1
|
hw5
|
2
|
Let language
$$L = \{0^n : n \text{ is a Fibonacci number}\}.$$
Design a Turing machine that decides L. Draw the state diagram of the corresponding Turing machine and submit its source code on eLearning.
|
hw5_ex2
|
hw5
|
3
|
In the definition of the Turing machine, the head can move left or right. A Turing machine whose head can move left, right, or stay in place is called a *Turing machine with a stationary move*, or more formally:
$$\delta : Q \times \Gamma \to Q \times \Gamma \times \{L, R, S\}.$$
Prove that if a language $L$ can be decided by a Turing machine with stationary moves, then $L$ can also be decided by a standard Turing machine.
|
hw5_ex3
|
hw6
|
1
|
Define a *two-dimensional* Turing machine to be a TM where each of its tapes is an infinite grid (and the machine can move not only Left and Right but also Up and Down).
Show that if language L can be decided in time T(n) by a two-dimensional TM then L ∈ DTIME(T(n)<sup>2</sup>).
|
hw6_ex1
|
hw6
|
2
|
Define a *one-tape two-head Turing machine* as a Turing machine equipped with a single tape but two independent heads operating on it. Each head can read, write, and move simultaneously and independently of the other. Both heads may read the same tape cell at the same time. Conflicts are resolved as follows:
* If both heads attempt to write to the same cell simultaneously, the first head goes first, and the second head overwrites any previous content.
* If the first head tries to write while the second head tries to read the same cell, the first head goes first, and the second head reads the updated content.
* If the first head tries to read while the second head tries to write the same cell, the first head goes first, reading the old content, and then the second head updates the content.
Show that if language L can be decided in time T(n) by a one-tape two-head Turing machine, then L ∈ DTIME(T(n)<sup>2</sup>).
|
hw6_ex2
|
hw6
|
3
|
Prove the number of multitape Turing machines is countable.
|
hw6_ex3
|
hw9
|
1
|
Prove that the Post Correspondence Problem is decidable over the unary alphabet Σ = {1}.
|
hw9_ex1
|
hw9
|
2
|
Prove that the Post Correspondence Problem is undecidable over the binary alphabet Σ = {0, 1}, assuming that the PCP is undecidable over an arbitrary finite alphabet.
|
hw9_ex2
|
hw9
|
3
|
Express the *Twin Prime Conjecture* in first-order Peano Arithmetic using only the symbols 0, S, +, ×, = and quantifiers ∀, ∃.
(a) Define a formula Prime(x) expressing that x is a prime number.
(b) Define a formula TwinPrime(p) expressing that p is the smaller number of a twin prime pair.
(c) Write a single first-order PA formula that states: *for every number x, there exists a larger twin prime p > x*.
|
hw9_ex3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.