Problem Detail: I am given the following decision problem: A program $ Pi $ takes as input a pair of strings and outputs either $true$ or $false$. It is guaranteed that $Pi$ terminates on any input. Does there exist a pair Read More …
Author: ignougroup
[Solved]: Efficiently selecting the median and elements to its left and right
Problem Detail: Suppose we have a set $S = { a_1,a_2,a_3,ldots , a_N }$ of $N$ coders. Each Coders has rating $R_i$ and the number of gold medals $E_i$, they had won so far. A Software Company wants to hire exactly Read More …
[Solved]: The $text{k-key}$ problem
Problem Detail: Given an undirected graph, I define a structure called k-key as a path containing $k$ vertices which are connected to a simple cycle which contains $k$ vertices as well. Here’s the k-key problem: given an undirected graph $G$ and Read More …
[Solved]: Exponential reduction vs Polynomial Reduction
Problem Detail: I’m having trouble understanding reduction. Lets say you have a decision problem A that is NP-Complete. Also, another problem B the can be reduced from A. What can you say about B if: 1) The reduction is done in Read More …
[Solved]: How do you describe a language that is generated by Context Free Grammer
Problem Detail: I am familiar with describing Regular Expressions but when it comes to describing CFG I get confused. Do you describe it in words like you would regular expressions or do you do something like this ? this is the Read More …
[Solved]: Are two elements always in a relation within a partially ordered set?
Problem Detail: In a partially ordered set, am I always able to order two arbitrary elements out of the set? Or is it possible that two elements within the set have no order relation to each other? For example if there Read More …
[Solved]: Are compilers able to detect alternating accesses to arrays and interleave them in memory?
Problem Detail: Is it possible to design a compiler which optimizes a loop in which arrays are accessed in alternate fashion? For example like this: // int[] a,b int sum = 0; for(int i = 0; i < n; i++) { Read More …
[Solved]: Deterministic Turing Machine with infine tape in both directions
Problem Detail: Consider a deterministic Turing Machine $D$ which has an infinite tape in both directions. We don’t have exact information about it; what we know is that its alphabet is ${a, b, c}$ and there are at least three states Read More …
[Solved]: Using Clique decision to solve Clique optimization
Problem Detail: How can you perform the clique decision algorithm fewer than $ O(n) $ times to solve clique optimization? I’m not sure if my approach is right but this is my thought process: you would pick vertices in a graph Read More …
[Solved]: regular expression in license plates
Problem Detail: I’m trying to write a regular expression for some particular license plates. They consist of one up to three capital letters, a hyphen, one up to two capitol letters and one up to four numbers. The license plate should Read More …