Problem 1 (20 points) Consider the set of all functions from the natural numbers to the set {a, b, c}. Show that this set is uncountable by using a diagonalization argument. Problem 2 (25 points) Let...

1 answer below »
Work on all assignment in 24hours, do not copy online source


Problem 1 (20 points) Consider the set of all functions from the natural numbers to the set {a, b, c}. Show that this set is uncountable by using a diagonalization argument. Problem 2 (25 points) Let Σ be an alphabet such that {a, b} ⊆ Σ and let L1 be the language {〈M〉 | M is a DFA such that L(M) ⊆ Σ∗ and L(M) contains at least one string with an equal number of as and bs}. Prove that L1 is decidable. Hint: Theorems about context-free languages should be useful in doing this problem. Problem 3 (25 points) Assume an alphabet that contains the letters a and b and let L2 be the language {〈M〉 | M is a Turing machine such that L(M) contains at least one string with an equal number of as and bs}. Use Rice’s theorem to show that L2 is undecidable. You must use Rice’s theorem for credit in this problem. Problem 4 (8 + 14 + 8 points) An (undirected) graph G is k-colorable if we can color the nodes in the graph using at most k colors in such a way that no two adjacent nodes have the same color. For each number k, we can then define a collection of languages that correspond to the descriptions of graphs that are k-colorable as follows: Color(k) = {〈G〉 | G is an undirected graph that is k-colorable} This problem requires you to show that Color(3) ≤P Color(k) for any k ≥ 3. We will do this in the following steps: 1. Describe a polynomial time reduction from Color(3) to Color(k) for k ≥ 3. Note that while you will show that what you describe is a polynomial time reduction only in the next two steps, you will not get credit for this part if it does not have the desired properties. Hint: Think of modifying the given graph by adding some new nodes and edges from them. 2. Show that what you have described is in fact a reduction. In particular, you have to show that the graph it produces is in Color(k) if and only if the original graph is in Color(3). 3. Show that your reduction can be carried out in a number of steps that is polynomial in the size of the input. 2
Answered Same DayDec 17, 2021

Answer To: Problem 1 (20 points) Consider the set of all functions from the natural numbers to the set {a, b,...

Swapnil answered on Dec 18 2021
145 Votes
Problem 1
    Consider the set of all functions from the natural numbers to the set {a, b, c}.
Show that this set is uncountable by using a di
agonalization argument.
    Ans
    
We write f as the sequence of values it generates. That is, say f: N -> N is defined as f(x) = z then we write f as : a, b, c.
Similarly if f : N -> N were f(x) = 2x then we write it as : 2, 4, 6, 8.
Now, assume on the contrary that the set of functions from N to N is countable.
Then,
F1 : f11, f12, f13, ……
F2 : f21, f22, f23, ……
F3 : f31, f32, f33, ……
Here fij = fi(j)
Consider the function f* as :
F* : (f11 + 1), (f22 + 1), (f23 + 1)…..
Then f* wouldn’t appear in the list of the function we had above since any fi would disagree with f* at the i’th place.
That therefore the set of the functions from N to N is an uncountable set.
    Problem 2
    Let Σ be an alphabet such that {a, b} ⊆ Σ and let L1 be the language
{hMi | M is a DFA such that L(M) ⊆ Σ ∗ and L(M) contains at least one string with an equal number of as and bs}.
Prove that L1 is decidable.
Hint: Theorems about context-free languages should be useful in doing this problem.
    Ans
    
In regular languages almost all the problems are decidable.
Let’s see the given L(m) i. e
L(m) contains at least one string with an equal number a’s and b’s.
L(m) could be ab(a+b)** because ab(a+b)** contains at least one string with an equal number at a’s and b’s.
DFA for...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here