Problem Detail: If $f(x_1,dots, x_n)$ is a total function that for some constant $K$, $f(x_1,dots, x_n) leq K$ for all $x_1,dots, x_n$ then $f$ is computable. I want some hints on how to prove/disprove the above claim. This an exercise from Read More …
Author: ignougroup
[Solved]: Are numbers types and what is “Number”?
Problem Detail: I was pondering about what are the numbers. It seems like a number is data type. I mean, like Maybe in Haskell. Because, for instance, one on its own means nothing for me. However, one apple tells me about Read More …
[Solved]: Quantum algorithms and quantum computation
Problem Detail: Is my (very high-level) understanding correct here regarding quantum algorithms — Quantum computers can process a massive amount of operations in parallel to the nature of qubits and their ability to have states that are superpositions of $|0rangle$ and Read More …
[Solved]: Issue understanding the reduction of SAT to 3-SAT in poly time
Problem Detail: Reading this http://classes.soe.ucsc.edu/cmps102/Spring10/lect/17/SAT-3SAT-and-other-red.pdf, I came to know that reducing a clause $C_i$ from a $SAT$ instance containing more than 3 literals to a $3-SAT$ instance is done this way, Suppose $C_1$ is ${x_1, x_2, x_3, x_4}$. It’s equivalent representation Read More …
[Solved]: Regularity of unary languages with word lengths the sum of two resp. three squares
Problem Detail: I think about unary languages $L_k$, where $L_k$ is set of all words which length is the sum of $k$ squares. Formally: $$L_k={a^nmid n=sum_{i=1}^k {n_i}^2,;;n_iinmathbb{N_0};(1le ile k)} $$ It is easy to show that $L_1={a^{n^2}mid ninmathbb{N_0}}$ is not regular Read More …
[Solved]: Could an NP-hard problem have a mechanical or physical solution method?
Problem Detail: Is there any NP-hard problem that we can find a mechanical “polynomial time” solution to? For example, suppose we construct a graph out of something physical, e.g. we have have pipes through which we can move water. If this Read More …
[Solved]: Single-source shortest paths as a linear program
Problem Detail: I saw that I can formulate single-source shortest path as the following linear program: Given $G=(V,E)$ and $wcolon Eto R$ and with negative cycles, find $max,d(s,t)$ such that begin{align*} d(s,v) &le d(s,u)+w(u,v) quad forall (u,v)in E d(s,s) &=0 end{align*} Read More …
[Solved]: Want to know the time complexity inner for loop which is partially iterating the array
Problem Detail: Question: Find out next increasing value of each element in this below array. int[] array = { 5, 2, 7, 10, 4, 12} e.g) 5’s nextIncreasingValue: 7 2’s nextIncreasingValue: 7 7’s nextIncreasingValue: 10 … 12’s nextIncreasingValue: -1 Implementation: for(int Read More …
[Solved]: Expressive power of lexer + parser
Problem Detail: Most modern compilers split their syntax analysis into a lexical phase that is followed by a parsing phase. The lexical phase is given by a regular expression, while parsing is guided by a context-free grammar. What class of languages Read More …
[Solved]: How is IO a monad?
Problem Detail: I am learning the Haskell programming language. From what I am reading, Input/Ouput (IO) raises challenges for Haskell’s purity, since by definition we are interacting with the outside world. From Wikipedia: In a purely functional language, such as Haskell, Read More …