Problem Detail: Let $$f(x)=begin{cases} x quad text{if Goldbach’s conjecture is true } 0 quad text{otherwise}end{cases}$$ Show that f(x) is primitive recursive. I know a primitive recursive function is obtained by composition or recursion, but I don’t know what should I Read More …
Category: Uncategorized
[Solved]: Prove finding a near clique is NP-complete
Problem Detail: An undirected graph is a near clique if adding an additional edge would make it a clique. Formally, a graph $G = (V,E)$ contains a near clique of size $k$ where $k$ is a positive integer in $G$ if Read More …
[Solved]: Showing that the pumping lemma cannot prove that some language is not regular
Problem Detail: I have this language $ L = a^* cup left { a^mb^n|m>ngeq 0 right }^* $ I have to prove that this language is not regular but still satisfies the pumping lemma for regular languages (Since the pumping lemma Read More …
[Solved]: DFA that recognizes 0 in every odd position
Problem Detail: I had a question that asked for the DFA that accepts the following language: {w | every odd position of w is a 0 } Should this DFA accept the empty string, since it doesn’t have an odd position? Read More …
[Solved]: Algorithm Complexity Analysis on functional programming language implementations
Problem Detail: I’ve learned today that algorithm analysis differs based on computational model. It is something I’ve never thought about or heard of. An example given to me, that illustrated it further, by User @chi was: E.g. consider the task: given Read More …
[Solved]: How does CPU actually retrieve data from memory when you call a variable in a programming language?
Problem Detail: As I have understood from all the internet sources I can get to, when you declare and initialize a variable in java, you are allocating this data, say an 8-byte float, in a particular memory cell in the RAM, Read More …
[Solved]: Regular expressions and semi-linear sets
Problem Detail: In proving Parikh’s Theorem, my Theory of Computer Science textbook defines a linear set as: $u_0 + langle u_1, dots, u_m rangle = {u_0 + a_1u_1 + dots + a_mu_m mid a_1, dots, a_m in mathbb{N}}$ where $u_i$ are Read More …
[Solved]: Broken stick problem
Problem Detail: We have a broken stick. For every part, we know it’s length. Our task is to connect all parts (glue them), that we will use as small amount of glue as possible. The amount of glue need to connect Read More …
[Solved]: Is it $mathsf{NP}$-hard to decide whether $mathsf{P}=mathsf{NP}$?
Problem Detail: Is it $mathsf{NP}$-hard to decide whether $mathsf{P}=mathsf{NP}$ ? If so, what are the implications ? Is there result suggesting that it is the case ? Asked By : eig Answered By : Mike B. A similar question is this: Is Read More …
[Solved]: Number of Final States Subset Construction for NFA to DFA
Problem Detail: “Suppose we use the subset construction to convert a $7$-state NFA $M = (Q,Sigma, delta, q_0, F)$ into a DFA $M’ = (Q’, Sigma, delta’, q_0, F’)$ for the same language. Then $M’$ will have $|Q’| = 128$ states. Read More …