Problem Detail: I’m considering an automaton $A$ over a alphabet $Sigma$, with a set of states $Q$, such that $Sigma subset Q$, which includes special “accept” and “blank” states not in $Sigma$. It also has an infinite list of cells, which Read More …
Author: ignougroup
[Solved]: For what special cases does this vertex cover algorithm fail or work?
Problem Detail: I’m trying to find a polynomial time algorithm for finding the minimum vertex cover for a graph. I’ve written the algorithm below; I know this problem is $mathsf{NP}$-hard, which means there are probably some graphs for which this algorithm Read More …
[Solved]: Why is deciding regularity of a context-free language undecidable?
Problem Detail: As I have studied, deciding regularity of context-free languages is undecidable. However, we can test for regularity using the Myhill–Nerode theorem which provides a necessary and sufficient condition. So the problem should be decidable. Where is my mistake? Asked Read More …
[Solved]: Algorithm to find a line that divides the number of points equally
Problem Detail: I have recently been asked in an interview to devise an algorithm that divides a set of points in a coordinate system so that half of the points lie on one side of the line, and the rest on Read More …
[Solved]: When are 2 decision/optimization problems equivalent?
Problem Detail: Does anybody know a good definition of 2 decision / optimization problems being equivalent? I am asking since for example allowing polynomial time computations any 2 problems in NP could be considered equivalent. Asked By : Reb Answered By : Yuval Read More …
[Solved]: Does this DFA have a solution?
Problem Detail: I am trying to create a DFA that can recognize strings with alphabet ${a,b,c}$ where $a$ and $c$ appear even number of times and where $b$ appears odd number of times. I am wondering that this may only be Read More …
[Solved]: Nth number in a infinite sequence of numbers
Problem Detail: This was interview question. When the input is a infinite sequence of numbers starting from 1, what is the nth digit? e.g.) 123456789101112131415161718192021….. here 28th digit is 1. Asked By : Sungguk Lim Answered By : wvxvw Just to add a Read More …
[Solved]: How to find the element of the Digit Sum sequence efficiently?
Problem Detail: Just out of interest I tried to solve a problem from “Recent” category of Project Euler ( Digit Sum sequence ). But I am unable to think of a way to solve the problem efficiently. The problem is as Read More …
[Solved]: How to prove P$neq$NP?
Problem Detail: I am aware that this seems a very stupid (or too obvious to state) question. However, I am confused at some point. We can show that P $=$ NP if and only if we can design an algorithm that Read More …
[Solved]: Getting minimum DFA for regular expression (11)*+(111)*
Problem Detail: (sorry beforehand I know putting scanned diagrams may seem not-so-professional but this problem is sticking for long and its interesting too) The language corresponding to given regex seems to accepts all strings of 1’s with length in multiple of Read More …