Is a finite language always recursive? Justify your answer.
Find a finite automata that recognizes the language composed a set of strings containing one or more zeros followed by an equal number of ones? Justify your answer.
1. If L is the complement of a language recognized by a non-deterministic finite automaton, then L is _______ a) finite b) regular but not necessarily finite c) deterministic context-free but not necessarily regular d) context-free but not necessarily deterministic context-free e) recursive (that is, decidable) but not necessarily context-free f) recursively enumerable (that is, partially decidable) but not necessarily recursive g) not recursively enumerable
true or False with prove? (f) ___ NP =co-NP (g) The complement of any recursive language is recursive. h) The grader's problem is decidable. We say programs Pi and P are equivalent if they give the same output if given the same input. The problem is to decide whether two programs (in C++, Pascal, Java, or some other modern programming language) are equivalent. )Given any CF language L, there is always an unambiguous CF grammar which generates L 6)Given any...
Determining whether languages are finite, regular, context free, or recursive 1. (Each part is worth 2 points) Fill in the blanks with one of the following (some choices might not be used): a) finite b) regular but not finite d) context-free but not deterministic context-free e) recursive (that is, decidable) but not context-free f) recursively enumerable (that is, partially decidable) but not recursive g) not recursively enumerable Recall that if M is a Turing machine then "M" (also written as...
Discrete Math True or false, justify your answer. 1. If A and B are finite collections then |A UBI = |A+ B]. 2. Counting principles may be applied when analyzing the complexity of an algorithm. 3. Let TI and T2 be independent tasks, if T1 can be performed in nl ways and T2 can be completed in n2 ways, then T1 followed by T2 can be realized in n1.n2 ways. 4. For osks, cik, n) · Pſk, k) = Pik,...
4. Answer the following questions. Justify your answers. a. Is the Ratio Test always conclusive? If not, give an example of a series for which the Ratio Test is inconclusive. b. Determine if the series En=1 an is convergent or divergent.
TM, RE, Non-RE Thanks in advance Tell whether the following language L is recursive, RE-but-not-recursive, or non-RE. L is the set of all TM codes for TM's that halt on no input. Prove your answer. TM, RE, Non-RE Thanks in advance
In each case, say whether it is always/sometimes/never true and justify your answer. A. The 5th power of an invertible matrix is invertible B. The product of 2 non zero matrices is a non zero matrix C. A matrix with no eigenvalues is invertible
Will a BGP router always choose the loop-free route with the shortest ASpath length? Justify your answer.
In Prolog language, write a recursive predicate to find the last element of a list. You may not use the built-in last predicate in your answer. E.g., ?- lastEle(X,[how,are,you,today]). X=today.