Anda di halaman 1dari 3

COMS 331: Theory of Computing, Fall 2014 Homework

Assignment 1
Monica Kozbial
September 5, 2014
Problem 1. Prove or disprove: If A = {0
n
1
n
|n N}, then A

= A
Proof by counterexample:
C = {0101, 1001} A

C A
A

A
A

= A
The statement is false.
Problem 2. Prove or disprove: If B = {x {0, 1}

|#(0, x) = #(1, x)} then B

= B.
Proof: B = {x {0, 1}

|#(0, x) = #(1, x)} then B

= B.
By denition B B

since
B

i=0
B
i
= B B
2
B
3
...
Let x B

There must be some n N where x B


n
This can be re-written as a concatenation of n elements from B where each element has an equal number of
0s and 1s (by denition of B). Since each element contains an equal number of 0s and 1s, the sum of 0s and
1s of x is also equal thus fullling the criteria of the denition of B and making x B.
The statement is true.
Problem 3. Prove: For every positive integer n,
n

k=1
1
k
2
2
1
n
Base case: n = 1
1

k=1
1
k
2
=
1
1
2
= 1 2
1
1
= 1
Assume that statement is true for all n > 0 n Z.
Proof for n + 1 where n > 0
n+1

k=1
1
k
2
=
n

k=1
1
k
2
+
1
n + 1
2
2
1
n
+
1
n + 1
2
1
Monica Kozbial CS331 HW1
2
1
n
+
1
n + 1
2
= (2
1
n + 1
) + (
1
n + 1
2

1
n(n + 1)
) 2
1
n + 1
Therefore
n+1

k=1
1
k
2
2
1
n + 1
The statement is true for all n > 0 n Z.
Problem 4. Prove: For every language A, A

= A

.
By denition A

i=0
(A

)
i
= A

A
2
A
3
...
Let x A

There must be an n N where x (A

)
n
(A

)
n
= A
i
1
+A
i
2
+...A
i
n
= A
j
Where j = i
1
+i
2
+... +i
n
and i
k
from 1 to n N
Since each i N, j N, A
j
A

= A

The statement is true.


Problem 5. Prove: If S = {0, 1} and Tx {0, 1}

then

= T

S T.
Proof by counterexample:
Assume that:
S = {0, 1}
T = {00, 01, 10, 11}
Then
S T S

= T

The statement is false.


Problem 6. Exhibit languages S, T {0, 1}

such that S

= T

and {0, 1} S T
S = {0, 1}
T = {0, 1, 00, 01, 10, 11}
Done.
Problem 7. Dene an (innite) binary symbol s {0, 1}

to be prex-repetitive if there are innitely


many strings w {0, 1}

such that ww s.
Prove: If the bits of a string s {0, 1}

are chosen by independent tosses of a fair coin, then


Prob[s is prex-repetitive ] = 0.
Page 2
Monica Kozbial CS331 HW1
For all m N we can state
Prob[s is prex-repetitive] Prob[w {0, 1}

||w| > m ww s]
Prob[w {0, 1}

||w| > m ww s]
m

i=1
Prob[w {0, 1}

||w| = i ww s]
m

i=1
Prob[w {0, 1}

||w| = i ww s]
This sum is bounded by 2
m
Since this statement is true for all m,
Prob[s is prex-repetitive] lim
m
2
m
= 0
The statement is true.
Problem 8.
Let S {0, 1}

. Let tails be dened as T {0, 1}

Such that wT = S.
Let S {0, 1}

be prex-red if, for all w {0, 1}

such that w S, w is red.


We consider there to be two cases:
1. S has an innite number of tails that are prex-red.
When S has an innite number of tails that are prex-colored, we split up the sequence in a particular way.
We assign the rst string w
0
to start at the beginning of the sequence and to end at the beginning of the
rst prex-red tail. Then we assign the next strings w
1
, w
2
, w
3
... to start at the beginning of a prex-red tail
and to end at the beginning of the next. This will fulll the criteria of (i) and (ii).
2. S has a nite number of tails that are prex-red
When there are a nite number of tails that are prex red, then this must mean that there are an innite
number of prex-blue tails that begin after the start of the last prex-red tail. Given this, we would also be
able to split up the sequence in the same way as in the rst case, where w
0
begins at the beginning of the
sequence and ends at the beginning of the start of the rst of the innite prex-blue tails.
These two cases cover all the possibilities.
The statement is true.
Acknowledgement
Gopalakrishnan Krishnaswamy Sivaprakasam - clarifying problem statements and terms in recitation
Adam Case - explaining problem statements and assisting in understanding as well as where to begin for
problems 7 and 8 at oce hours
Page 3

Anda mungkin juga menyukai