Problem Detail: Here is a question from Daniel I. A. Cohen’s book Introduction to Computer Theory: Consider the language: $quad mathrm{PRIME}’ = { a^n mid n text{ is not a prime} } = { varepsilon, a, aaaa, aaaaaa, aaaaaaaa, ldots }$ Read More …
Author: ignougroup
[Solved]: Build a regular grammar for a regular language
Problem Detail: The language considered is the infinite set of all chains that meet the following conditions. Conditions: 1) They consist of symbols from the set {1,a,b}. 2) They always start with the subchain ‘1a’. 3) They always include at least Read More …
[Solved]: Proving that $A vee (neg A wedge B) equiv A vee B$
Problem Detail: I’m reading a book at the moment about logic gates and Boolean simplification. There is a part which I can’t seem to follow. I can easily work out that $A vee (neg A wedge B) equiv A vee B$ Read More …
[Solved]: Efficient algorithm to compute the $n$th Fibonacci number
Problem Detail: The $n$th Fibonacci number can be computed in linear time using the following recurrence: def fib(n): i, j = 1, 1 for k in {1…n-1}: i, j = j, i+j return i The $n$th Fibonacci number can also be Read More …
[Solved]: How To Best Learn About Algorithms In Depth
Problem Detail: I have been reading this site with a great deal of interest, but I find a lot of it goes over my head. This has made me wish to learn a lot more about algorithms and CS in general. Read More …
[Solved]: Understanding the definition of reduction
Problem Detail: From Wikipedia: Given two subsets A and B of N and a set of functions F from N to N which is closed under composition, A is called reducible to B under F if $$ exists f in F Read More …
[Solved]: Why does a suffix tree have a linear number of nodes (relative to input string size)?
Problem Detail: Aren’t there $n^2$ unique substrings of a string (irrespective of the alphabet size)? Perhaps the number of unique suffix substrings is less than the number of unique substrings of a string. Asked By : Wuschelbeutel Kartoffelhuhn Answered By : A.Schulz For Read More …
[Solved]: Is it possible that the union of two undecidable languages is decidable?
Problem Detail: I’m trying to find two languages, $L_1, L_2 in RE setminus R$, such that $L_1 cup L_2 in R$. I have already proved that if $L_1cap L_2 in R$ and $L_1 cup L_2 in R$, such $L_1, L_2$ don’t Read More …
[Solved]: Are permutations of context-free languages context-free?
Problem Detail: Given a context-free language $L$, define the language $p(L)$ as containing all permutations of strings in $L$ (i.e. all strings in $L$ such that the order of symbols is not important). Is $p(L)$ context-free? I found two papers dealing Read More …
[Solved]: Concorde time efficiency
Problem Detail: What is the efficiency of Concorde TSP solver program. And is it have any weaknesses? I build my own exact solver and I want to compare it to Concorde. What would be the best way to do this? Asked Read More …