File size: 9,010 Bytes
c19a575
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2ef7752
c19a575
 
 
 
 
2ef7752
c19a575
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2ef7752
c19a575
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
[
  {
    "homework": "hw1",
    "exercise_number": "1",
    "content": "Prove\n\n$$\\frac{1}{2\\ln 2} + \\frac{1}{3\\ln 3} + \\ldots + \\frac{1}{n\\ln n} = \\ln\\ln n + O(1)$$\n\nand\n\n$$\\frac{1}{1^{1.1}} + \\frac{1}{2^{1.1}} + \\ldots \\frac{1}{n^{1.1}} = O(1).$$",
    "full_id": "hw1_ex1"
  },
  {
    "homework": "hw1",
    "exercise_number": "2",
    "content": "Order the following functions by asymptotic growth. Place $f$ before $g$ if $f(n) = O(g(n))$.\n\n* $n^n$\n* $\\sqrt{n}$\n* $\\log\\log n$\n* $0.001n^7$\n* $5000n$\n* $e^n$\n* $2^{\\log^2 n}$\n* $10^{10^{10}}$\n* $n!$\n* $2^{2^n}$",
    "full_id": "hw1_ex2"
  },
  {
    "homework": "hw1",
    "exercise_number": "3",
    "content": "Let $\\Sigma = \\{0, 1\\}$. Let language\n\n$$L = \\{w \\in \\{0, 1\\}^* : w \\text{ has an unequal number of 0's and 1's}\\}.$$\n\nProve $L^* = \\Sigma^*$.",
    "full_id": "hw1_ex3"
  },
  {
    "homework": "hw10",
    "exercise_number": "1",
    "content": "Use first-order Peano arithmetic formulas to express \"$m = 2^n$\".",
    "full_id": "hw10_ex1"
  },
  {
    "homework": "hw10",
    "exercise_number": "2",
    "content": "Prove P is closed under Kleene star. In other words, if a language $L$ belongs to P, then so does $L^*$.",
    "full_id": "hw10_ex2"
  },
  {
    "homework": "hw10",
    "exercise_number": "3",
    "content": "Let\n\n$$L_1 = \\{(\\alpha, x) : \\text{TM } M_\\alpha \\text{ accepts input } x\\},$$\n\nand\n\n$$L_2 = \\{\\alpha : \\text{TM } M_\\alpha \\text{ halts on the empty input}\\}.$$\n\nProve that $L_1 \\leq_T L_2$.",
    "full_id": "hw10_ex3"
  },
  {
    "homework": "hw11",
    "exercise_number": "1",
    "content": "Define the problem QUADEQ as follows: given m quadratic equations in n variables over the finite field GF(2),\n\n$$p_1(x_1, x_2, \\ldots, x_n) = 0,$$\n$$p_2(x_1, x_2, \\ldots, x_n) = 0,$$\n$$\\vdots$$\n$$p_m(x_1, x_2, \\ldots, x_n) = 0,$$\n\ndetermine whether there exists at least one solution. Prove that QUADEQ ∈ NP.",
    "full_id": "hw11_ex1"
  },
  {
    "homework": "hw11",
    "exercise_number": "2",
    "content": "Prove if L is NP-hard and L ∈ P, then P = NP.",
    "full_id": "hw11_ex2"
  },
  {
    "homework": "hw11",
    "exercise_number": "3",
    "content": "Prove that $L_1 \\leq_P L_2$ and $L_2 \\in$ NP, then $L_1 \\in$ NP.",
    "full_id": "hw11_ex3"
  },
  {
    "homework": "hw13",
    "exercise_number": "1",
    "content": "Construct a function $T(n)$ that satisfies $n \\leq T(n) \\leq n^2$ and is not time-constructible.",
    "full_id": "hw13_ex1"
  },
  {
    "homework": "hw13",
    "exercise_number": "2",
    "content": "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.",
    "full_id": "hw13_ex2"
  },
  {
    "homework": "hw13",
    "exercise_number": "3",
    "content": "Let\n\n$$\\text{DOUBLE-SAT} = \\{\\langle \\varphi \\rangle \\mid \\text{formula } \\varphi \\text{ has at least two satisfying assignments}\\}.$$\n\nProve that DOUBLE-SAT is NP-complete.",
    "full_id": "hw13_ex3"
  },
  {
    "homework": "hw2",
    "exercise_number": "1",
    "content": "Design a finite automaton that accepts the following language\n\n$$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\\}.$$\n\nIn 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.",
    "full_id": "hw2_ex1"
  },
  {
    "homework": "hw2",
    "exercise_number": "2",
    "content": "Design a finite automaton that recognizes the following language\n\n$$L = \\{w \\in \\{0, 1\\}^* : w \\text{ does not contain substring } 10\\}.$$\n\nDraw its state diagram.",
    "full_id": "hw2_ex2"
  },
  {
    "homework": "hw2",
    "exercise_number": "3",
    "content": "Use the definition of big-O notation to prove the following:\n\n1) If $f_1 = O(g_1)$ and $f_2 = O(g_2)$, then $f_1f_2 = O(g_1g_2)$.\n\n2) If $f_1 = O(g)$ and $f_2 = O(g)$, then $f_1 + f_2 = O(g)$.",
    "full_id": "hw2_ex3"
  },
  {
    "homework": "hw3",
    "exercise_number": "1",
    "content": "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.",
    "full_id": "hw3_ex1"
  },
  {
    "homework": "hw3",
    "exercise_number": "2",
    "content": "Give a regular expression for language\n\n$$L = \\{w \\in \\{0, 1\\}^* : \\text{ the number of 1's in } w \\text{ is even, and the number of 0's is even}\\}.$$",
    "full_id": "hw3_ex2"
  },
  {
    "homework": "hw3",
    "exercise_number": "3",
    "content": "Construct NFAs corresponding to the following regular expressions:\n\n* $0^+ \\cup (01)^*$;\n* $(0 \\cup 1^+)0^*1^+$.",
    "full_id": "hw3_ex3"
  },
  {
    "homework": "hw5",
    "exercise_number": "1",
    "content": "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.\n\nDraw the state diagram of the corresponding Turing machine and submit its source code on eLearning.",
    "full_id": "hw5_ex1"
  },
  {
    "homework": "hw5",
    "exercise_number": "2",
    "content": "Let language\n\n$$L = \\{0^n : n \\text{ is a Fibonacci number}\\}.$$\n\nDesign a Turing machine that decides L. Draw the state diagram of the corresponding Turing machine and submit its source code on eLearning.",
    "full_id": "hw5_ex2"
  },
  {
    "homework": "hw5",
    "exercise_number": "3",
    "content": "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:\n\n$$\\delta : Q \\times \\Gamma \\to Q \\times \\Gamma \\times \\{L, R, S\\}.$$\n\nProve 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.",
    "full_id": "hw5_ex3"
  },
  {
    "homework": "hw6",
    "exercise_number": "1",
    "content": "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).\n\nShow that if language L can be decided in time T(n) by a two-dimensional TM then L ∈ DTIME(T(n)<sup>2</sup>).",
    "full_id": "hw6_ex1"
  },
  {
    "homework": "hw6",
    "exercise_number": "2",
    "content": "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:\n\n* If both heads attempt to write to the same cell simultaneously, the first head goes first, and the second head overwrites any previous content.\n\n* 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.\n\n* 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.\n\nShow 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>).",
    "full_id": "hw6_ex2"
  },
  {
    "homework": "hw6",
    "exercise_number": "3",
    "content": "Prove the number of multitape Turing machines is countable.",
    "full_id": "hw6_ex3"
  },
  {
    "homework": "hw9",
    "exercise_number": "1",
    "content": "Prove that the Post Correspondence Problem is decidable over the unary alphabet Σ = {1}.",
    "full_id": "hw9_ex1"
  },
  {
    "homework": "hw9",
    "exercise_number": "2",
    "content": "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.",
    "full_id": "hw9_ex2"
  },
  {
    "homework": "hw9",
    "exercise_number": "3",
    "content": "Express the *Twin Prime Conjecture* in first-order Peano Arithmetic using only the symbols 0, S, +, ×, = and quantifiers ∀, ∃.\n\n(a) Define a formula Prime(x) expressing that x is a prime number.\n\n(b) Define a formula TwinPrime(p) expressing that p is the smaller number of a twin prime pair.\n\n(c) Write a single first-order PA formula that states: *for every number x, there exists a larger twin prime p > x*.",
    "full_id": "hw9_ex3"
  }
]