Problem Detail: Most tutorials on Lambda Calculus provide example where Positive Integers and Booleans can be represented by Functions. What about -1 and i? Asked By : zcaudate Answered By : Andrej Bauer First encode natural numbers and pairs, as described by jmad. Read More …
Author: ignougroup
Can this algorithm still be considered a Binary Search algorithm?
Problem Detail: While doing the second code kata (which asks you to implement a binary search algorithm five times, each time with a different method), I’ve come up with a slightly different solution which works as follows: If i have a Read More …
Relationship between Undecidable Problems and Recursively Enumerable languages
Problem Detail: I have read the Wikipedia article on Recursively Enumerable languages. The article suggests that the halting problem is recursively enumerable but undecidable. My idea till today was that the halting problem belongs to a class of languages which are Read More …
PDA with 2 stacks
Problem Detail: I urgently need a language which can be recognised by 2 PDA’s but not with 1 PDA. Asked By : nurgasemetey Answered By : Hendrik Jan A machine using two pushdowns accepts the recursively enumerable languages. So there is a lot Read More …
Dijkstra to favor solution with smallest number of edges if several paths have same weight
Problem Detail: You can modify any graph $G$ so that Dijkstra’s finds the solution with the minimal number of edges thusly: Multiply every edge weight with a number $a$, then add $1$ to the weight to penalize each additional edge in Read More …
Deriving the regular expression for C-style /**/ comments
Problem Detail: I’m working on a parser for a C-style language, and for that parser I need the regular expression that matches C-style /**/ comments. Now, I’ve found this expression on the web: /*([^*]**+[^*/])*([^*]**+|[^*]**/ However, as you can see, this is Read More …
DFA to regular expression conversion
Problem Detail: I was looking at the question How to convert finite automata to regular expressions? to convert DFA to regex. The question, I was trying to solve is: I have got the following equations: $Q_0=aQ_0 cup bQ_1 cup epsilon$ $Q_1=aQ_1 Read More …
Can random suitless $52$ playing card data be compressed to approach, match, or even beat entropy encoding storage? If so, how?
Problem Detail: I have real data I am using for a simulated card game. I am only interested in the ranks of the cards, not the suits. However it is a standard $52$ card deck so there are only $4$ of Read More …
Universality of the Toffoli gate
Problem Detail: Regarding the quantum Toffoli gate: is it classicaly universal, and if so, why? is it quantumly universal, and why? Asked By : Ran G. Answered By : Artem Kaznatcheev Toffoli is universal for classical computation (as shown by @Victor). However, Toffoli Read More …
Can a Turing Machine (TM) decide whether the halting problem applies to all TMs?
Problem Detail: On this site there are many variants on the question whether TMs can decide the halting problem, whether for all other TMs or certain subsets. This question is somewhat different. It asks whether the fact the halting problem applies Read More …