Download Solution 1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
IDC
Computability and Complexity Theory
R.Zviel-Girshin
L.Epstein
Exercise 1 Solution
Question 1(12)
Write a short English/Hebrew description of each set.
{-3,-6,-9,-12,...}= Set of negative natural numbers that divides by 3 with no
remainder excluding 0.
{1,2,3,4,..}= Set of all natural numbers excluding 0.
{n| n=3m for some mN}= Set of natural numbers that divides by 3 with no
remainder.
{n|n=2i+3j for some iZ and jZ}= Set of linear combination of 2 and 3
with positive coefficients.
{n|n=2i+3j for some iN and jN}= Set of all linear combination of 2 and 3.
Question 2(15)
Write formal descriptions of the following sets.
The set of all negative odd numbers
= { 2n+1|nZ- }= { -2n+1|nZ }
The set containing all palindromes of length 3 over ={0,1,2}
= {w| w=xyx, x,y  {0,1,2} }
The set containing all prefixes and suffixes of the word abbab
= {ε, a, ab, abb, abba, abbab, b, bab, bbab }
Question 3(25)
Determine whether each of the following is true or false (a short explanation
is required).
1.
2.
3.
4.
5.
6.

False, the empty set has no elements.

True, every set is inclusive to itself.
{}
True, the element from the left exists in the right set.
{}
True, the empty set is inclusive to any set.
{a,b,{a,b}} - {a,b}={a,b} False
{a,b}2{a,b,{b,a}}
True, {a,b} exists in the power set of {a,b,{b,a}}
‫גירשין‬-‫רינה צביאל‬
IDC
Computability and Complexity Theory
R.Zviel-Girshin
L.Epstein
Question 4(24)
Given a word w=abcbbbca.
Determine whether each of the following is true or false.
1. bcb is a substring of w.
True
2. bcc is a substring of w.
False
3. abc is a prefix of w. True
4. bbca is a suffix of w.
True
5. The number of substrings of abcb equals to the number of substrings
of bbca. True
Answer the following questions:
6. If u=abc and w=uv, then what is v? bbbca
7. How many prefixes of w are also suffixes of w? 3 (ε, a, w)
8. What is wr? acbbbcba
Question 5(24)
Given the following languages over ={a,b}
L1= {}
L2 = 
L3 = { abc, a, bb }
L4 = {aa, bb,  }
L5 = { a, bb, aaa, aba }
Compute the resulting language of the following operations:
1. L1R = {ε}
2. L12 L5= {a, bb, aaa, aba}
3. L32= {abcabc, abca, abcbb, aabc, aa, abb, bbabc, bba, bbbb}
4. L5R= {a, bb, aaa, aba} = L5
5. L3 L5R= {abca, abcbb, abcaaa, abcaba, aa, abb, aaaa, aaba, bba,
bbbb, bbaaa, bbaba}
6. L4 L3= {aaabc, aaa, aabb, bbabc, bba, bbbb, abc, a, bb}
7. L42= {aaaa, aabb, aa, bbaa, bbbb, bb}
8. L3  L2= 
9. L5 - L4R = L5 – L4 = {a, aaa, aba}
10. L3  L4= {abc, a, bb, aa, ε}
11. L5 L2  L30= 
12. (L3  L5)R= {abc, a, bb, aaa, aba}R = {cba, a, bb, aaa, aba}
13. L1*= {ε}
14. L1+= {ε}
15. L2*= 
16. L2+= 
17. L4*= {L04  L14  L24  }
‫גירשין‬-‫רינה צביאל‬
Related documents