instruction
stringlengths
35
29.1k
Consider propositional logic over the connectives $\land$, $\lor$, and $\lnot$. Notation: $| \alpha |$ is the length of formula $\alpha$. We are given a formula $\phi$. Cancel all cancellable negations in $\phi$ by applying all possible valid biconditionals (EDIT: such as the examples below) to get $\phi'$; for clarity...
I understand that an NP-hard problem is a problem X such that any problem in NP can be reduced to X in polynomial time. Does there exist a problem that is hard to solve but problems in NP cannot be reduced to it in polynomial time i.e. it does not satisfy the definition of NP-hard but is strictly not in NP? If not, wh...
To illustrate my confusion let's say I'm given this unambiguous grammar in BNF: S ::= T O x T ::= empty T ::= "if" E "then" T x "else" T O ::= empty O ::= "if" E "then" T O Here is the corresponding derivation tree: S ...
I'm following the slides at https://homepage.cs.uiowa.edu/~tinelli/talks/FT-11.pdf where Tinelli explains how k-induction works in the context of SMT based model checking. A parametric and resettable counter is given as a Kripke structure by the following formulas: Variables: $x := (c, n, r, n_0)$, where: $n_0$ is a...
I know that the hitting problem is NP hard, but is it possible to find the magnitude of the smallest set? Also, provide the runtime.
So, in quantum computing, each qbit has a 50/50 chance of being in either the state of 1 or 0 when you measure it. Simple enough. But I've heard reports a while ago about some company having successfully added two relatively small numbers and gotten out the right answer the majority of the time. The question I am tryin...
I read a statement which says Almost all non-embedded processors, and many embedded processors, support virtual memory Anyone who can explain the difference between both types
I have been studying Introduction to Theory of Computation by Micheal Sipser and I just complected it. Now I want to take this a step further what should I do next to increase my skills. I tried looking at some papers from FOCS but they were beyond my understanding. I want to know what should I study next.
So, I know that a normal r-b tree has a height of O(logn). What would happen is we let a red node have a red child if its parent is black? Would the height still be O(logn)? Would you have to have a totally different insertion scheme to maintain the height?
This is a question from CLRS book. (Chapter 32, string matching, the question is the problem for the whole chapter, it's in the end of the chapter) Let $y^i$ denote the concatenation of string y with itself $i$ times. For example, $(ab)^{3}$ = $ababab$. We say that a string $x\in X$ has repetition factor $r$ if x =...
So, we use Cantor's diagonalization argument to prove that the Universal Turing Machine is not a decider. I understand the overall argument but have a problem regarding one caveat mentioned in my book. My book says that some real numbers like 2.000... and 1.999... have different decimal representations but are actually...
So i was reading a post on Minimum pumping length of regular language where Yuval Filmus has proved that a pumping lemma might have lesser number of states than a minimal DFA. But What about NFA's? Are NFA's able to give us minimum pumping length? For example say we have a language L= $(10)^∗$, though for this minimal ...
How can i write instruction in Main memory with using Machine language? I have a problem with righting instruction to store the bit pattern in the register R with value XY. Can anybody solve it?
I’m trying to understand the task performed by Google’s Sycamore that recently achieved alleged Quantum Supremacy. I’ve read the paper in Nature but the actual task that would have taken 10,000 years to compete is over my head. Is anyone able to explain it in simpler terms?
I am trying to find out how they calculated the time complexity of this small function . I am studying for an exam and found this question and the final answer is given, but I am trying to understand how they got to this answer, I tried solving this problem using Iterative but when I tried to find the number of Iterat...
From what I see online, all seem to suggest that heapifying takes $\mathcal O (n)$ time, but it seems like it should always takes $\theta(n)$ time, even in the best case. Is something wrong with my pseudocode? Is there a more optimized way to do heapification? Heapification(H[1...n]) for i <- floor(n/2) downto 1 do k...
Suppose that a problem $P$ is known to be NP-hard. The input to the problem is a set of $k$ lines in 2D, a set of $n$ points, and $m < n$ pairwise distances among the points. The goal is to place each point on one of $k$ lines, satisfying the given pairwise distances. Disclaimer This problem might not be an NP-hard pro...
Given an array with some elements in which elements can occurs multiple times, so now how to arrange them in such order that no two same elements are together using minimum number of swaps.( it may not be possible to arrange all of them.)
I given the following code to write as AST: { a = 4; while (a<10) if (a<5) a = a+5; else a = a+3; } Looking up the solution: PROG | SEQ _______________/ \_______________ SEQ ...
Since duration of an instruction is just the number of cpu cycles needed times the time of a cycle, which is the inverse of the frequency, I do not get why the ratio of cpu benchmark of a two processors of a same trademark is not exactly the inerse of the ratio of the frequencies. Cpu is supposed not to loose time by b...
I'm going over the paper Spatial Transformer Networks (link). On section 3.3 they introduce bilinear sampling kernel (Eq. 5) $$ V_{i}^{c}=\sum_{n}^{H} \sum_{m}^{W} U_{n m}^{c} \max \left(0,1-\left|x_{i}^{s}-m\right|\right) \max \left(0,1-\left|y_{i}^{s}-n\right|\right), $$ and it's partial derivative (Eq. 6) $$ \frac{...
I've been tasked with hashing arbitrary types in C++, with the caveat that A == B implies hash(A) == hash(B) even if equality of A and B is determined by a custom equality function ==. For simplicity we can assume that == is an equivalence relation. For example, the expected behavior of the hash function on std::vecto...
For a job several years ago I worked with a team using technologies built around Virtual Finite State Machine models for system fault analysis and remediation. Since then, I've found it to be a generally useful approach for making control decisions in instances when control logic gets complicated and/or needs to be fac...
Let $p_1, ..., p_n$ distinct prime numbers with $P = \prod_{i=1}^{n}{p_i}$ and $A=(a_1, ..., a_n)$ with $a_i = P/p_i$. Problem Show the SUBSET SUM problem $(A, \alpha)$ can be solved in polynomial (not pseudo-polynomial) time for every $\alpha \in \mathbb{N}$ and $P, p_1, ... , p_n$ unknown. First attempts $P$ and $ p_...
Is every language accepted by a BAFDA regular? I am not even sure what the answer is. I tried thinking around canonical examples of non-regular languages (like $0^n1^n$ or $\{ww | w \in \{0,1\}^{*}\}$ provable by Myhill-Nerode or by the Pumping Lemma) but cannot think of a suitable BAFDA for any of them. Update: I tri...
Given a sorted array of numbers, is there a good algorithm for finding two numbers in that array whose product is as close as possible to a given number N? I know that there is a good O(n) (?) algorithm for the related problem of finding two numbers that sum to a given number N. You begin with ptr1 at the start of the ...
I was learning about polymorphic types but I couldn't understand the notation, can someone explain it means (context cs421 UIUC): $$ \forall \alpha_1, \dots , \alpha_n . \tau $$ its supposed to be a type but I have no idea what it's suppose to mean. Perhaps writing some of my thoughts or questions might be helpful in c...
I am trying to figure out how $(x/y)$ in floating point arithmetic $fl(fl(x) / fl(y))$ where $fl(x) = x(1-\delta_1)$, $fl(y) = y(1-\delta_2)$, $fl = (1-\delta_3)$ I have: $= x/y \cdot ((1-\delta_1)/(1-\delta_2))(1-\delta_3)$ after arithmetic $= x/y \cdot (\delta_3 \delta_1 - \delta_1 - \delta_3 + 1)/(1-\delta_2)$ Not s...
Reasoner is forward chaining inference engine (https://en.wikipedia.org/wiki/Semantic_reasoner) as opposite to Prolog backward chaining SAT solver (for queries). Why there is reasoner for description logics and not for other logics?
What is the difference between $O$ (big oh) and $o$ (small oh) notations in asymptotic analysis? Even though I understand that $o$ is used for a bound that is not tight, is it allowed to use $O$ notaion for a bound that is also not tight? For example can I say that $5n=O(n^3)$? I am also confused by what this statement...
I am trying to find the fastest algorithm to find all the possible paths of length $N$ from a given node in a directed graph. My solution is to do a modification of breadth first search from the given node for $N$ iteration. Its time complexity is around $\theta(V+E)$. But the problem is $|V|$ & $|E|$ becomes exponent...
$L = \{\langle M, k\rangle : M\;\text{is a Turing Machine and } |\{w \in L(M) : w \in a^*b^*\}| \geq k \}$ My Interpretation of language is that $L$ is a language which contains Turing machine whose language contains string greater than equal to $k$ and also strings belong to $a^* b ^*$. My Analysis : Using Rice's...
I asked this question on Stack Overflow, but I have not obtained an actual answer to the question. Tarjan's strongly connected components algorithm is stunningly beautiful, and inexpressible in a literal way in any programming language that I know of. Allow me to refer to the pseudocode in the Wikipedia article. The p...
If we are using numbers and letters, there are $36^{10}$ unique combinations. Collision is already unlikely, but I need it to be impossible, so using hashing is out of the picture(?). The use-case is users redeeming each one if they have been "activated" as redeemable. Think like Webkinz codes. An inefficient solution ...
May a DFA recognize a language which is a proper subset of the set of all accepted inputs? For instance, if there is a DFA which decides if an input $W$ has $w_0 = w_n$, can it recognize a language $L$ where there is some $\sigma \in \Sigma$ that does not exist in any element of $L$?
So, using Church numerals, we define $3 = {\lambda} f. {\lambda}x.f(f(f(x)))$, and $4 = {\lambda} f. {\lambda}x.f(f(f(f(x))))$. We can then add with an expression like $3\ g\ (4\ g\ z)$ And this reduces to: $(g (g (g (g (g (g (g\ z)))))))$ ... but why? $g$ is a free variable in each expression, and my understanding is...
This is really a second part to my first question, but I felt that this was different enough from the first part that it merited its own question. So, using Church numerals, we define $3 = {\lambda} f. {\lambda}x.f(f(f(x)))$, and $4 = {\lambda} f. {\lambda}x.f(f(f(f(x))))$. We can then add with an expression like $3\ ...
When deleting nodes from an R-tree, if a branch underflows, then it's meant to be dissolved and its children are meant to be reinserted into the tree. But most R-tree implementations that I've seen just keep the node until it's completely empty. Does this lead to unbalanced R-trees?
I'm trying to prove that for arbitrary $c > 0$, $f(n) = o(n^c) \rightarrow \exists \epsilon > 0 \ s.t. f(n) = O(n^{c-\epsilon})$ Intuitively, this seems to be true to me (little-o implies some gap "between" $f(n)$ and $n^c$ that we can formally express as $\epsilon$). However, I'm having some trouble formalising this ...
Prove that if $L, G$ are regular languages over $\{a,b,c\}$ then $H=\{w\in L|\exists x\in G: |x|=2\cdot |w|\}$ is a context-free language? I think this could be a good exercise and the conditions are very simple. Because $L,G$ are regular they have corresponding DFA's: $$ L=\bigg(\sum,Q_1, q_{01,\delta_1, F_1}\bigg)...
In the context of Upper bounds computaion and Big Oh Notation, I was wondering if the following could be proved... if they are equivalent. $\mathcal{O}((log(n))^{-1}) = (\mathcal{O}(log(n)))^{-1}$ $\mathcal{O}((log(n))^{-1})$ can be rewritten as $\mathcal{O}(1/(log(n)))$ which is $\mathcal{O}(1)/ \mathcal{O}(log(n))$ ...
I read that the mapping for user-space processes is changed after each process switch. By mapping I mean the translation from virtual addresses to "real" memory address. I thought that processes are loaded into RAM and are held there (that's what the RAM is for). So the addresses in "real" memory addresses shouldn't ch...
I have a set of nodes and a function foo(u,v) that can determine whether two nodes are equal. By "equal" I mean transitive equivalence: If 1==2 and 2==3 then 1==3 and also: If 1==2 and 1!=4 then 2!=4 When given a set of nodes I can find all connected components in the graph by passing every possible combination of nod...
I wanted to know which implementation is better to find the root of the element in the Quick Union implementation of the UnionFind problem. The professor has used a while loop to find the root of the element, while I have implemented it using a recursive approach. Which approach is better in terms of space complexity,...
I have proposed a load balancing algorithm for a group of homogeneous processing devices and now I want to measure the average waiting time to see if my algorithm is successful in decreasing the waiting time. I have considered number of tasks on each device as the load of that device. Imagine at first there are 54 task...
As I'm reading the movfuscator paper by Stephen Dolan, I encounter this claim: In order to have Turing-completeness, we must allow for nontermination. This seems like a reasonable statement. But I'm also aware of this work by Wouter Swierstra which aims to prove quite the opposite (as I see it): that one can simulate...
Prove that if $L$ is regular over $\Sigma=\{0,1,2\}$ then the following language over $\{0,1,2,\$\}$ is also regular: $$ G=\{\$x\$|\exists w\in L: x\text{ is derived from }w\text{ by substituting } 01 \text{ with }\$\$ \} $$ For example, if $10112\in L$ then $\$1\$\$12\$\in G$. I think this can be solved using cl...
I'm looking at the name of a variant of the Stable Roommates Problem, when the rooms have more than 2 mates, ie for example 6 to 8. Does this problem has a specific name? A well-known algorithm? To summarize, the problem is the following: Given a set of $n$ people, and a symetric $n\times n$ affinity matrix between eac...
I have a graph $G$ with $m$ vertices $V$ and $n$ edges $E$. $G$ is weighted, directed, and cyclic. I want to select heaviest $k$ edges from $E$ such that all of the edges form a connected, undirected graph. Note that when selecting these edges, the graph is considered to be connected even when two vertices $v_1$ and $v...
We have a function which takes an array as input. It breaks an array into $\log_2(n)$ parts with equal sizes where $n$ is the size of the subarray. It keeps breaking each of the subarrays until there are only two elements left in it. What is the depth of this recursion? Example of the process: First we have $n$ elemen...
There's a story I've heard a few times in various computer science talks, usually offered as a cautionary tale, that goes something like this: In the late 50s, the British gov't purchased an early computer, and tried to build a computer model of the gov'ts budget, including every variable and factor they could think o...
I'm looking at this pdf for problems: http://www.public.asu.edu/~ccolbou/src/355hw5solf10.pdf I found question 3g to construct a pushdown automata for the following: {$ {a^i b^j}$ | ${i \neq j}$} The solution they provided is below: The issue is, when I use JFLAP to test out, I get aabb to pass - when it should just b...
Consider the following decision problem: Input: a set $X = \{x_1, \ldots, x_n\}$, a mapping $f \colon 2^X \mapsto \mathbb{N}$ such that for $f(Y)$ is computed in polynomial time for any $Y \subseteq X$, and an integer $k \in \mathbb{N}$. Question: does $\sum_{Y \subseteq X}{f(Y)} \geq k$ hold? Is this problem in the c...
Are there conditions under which given text $T$ that huffman code and arithmetic code will produce the exact encoding of $T$?
I can calculate this by trying out manually inserting $n$ keys in $m$ order B Tree as follows: Assume median to be selected for split be left biased. That is $m/2$. For example, if $m=4$, then a node [1,2,3,4] need to be split with 2 as a median and resulting in nodes [1] and [3,4]. So, we selected 2 as a median, wh...
Let's say you want to get the value of all nodes in a binary tree (order doesn't really matter). If in each thread, you spawn two more threads to deal with the left subtree and the right subtree, then wouldn't the big O time complexity be O(log n). I was under the impression that you could never traverse an entire tree...
I am working on some set theory and am trying to prove how a set can have the property $A^* = A$. For set $A=\{0^n1^n \mid n \ge0\}$, I still do not understand exactly what $A^*$ is. For example, I thought $A^*$ is the enumeration of the set $A$ so $A^* = \{\epsilon,01,0011,000111,00001111,....\}$ Any helping in at le...
I am having trouble understanding the following statement. I have understood why in a sensorless/conformant problem, if there exists a solution (a sequence of actions) for a belief state $b$, then it is also a solution for any $b'$ that is a subset $b$. Next claim is what is confusing me. Then in a standard graph searc...
Given a list $C=[c_1,c_2,\dots,c_k]$ of positive integers, representing the values of $k$ varieties of coins, and a positive integer $n$, let $f(n,C)$ be the number of handfuls of coins with total value $n$. The order within the handful does not matter, and there is an infinite supply of each variety of coin. What is...
I was given this question and not sure how to solve this. This is a DP minimization problem ? Problem : There are N stations in a certain region, numbered 1 through N. It takes di,j minutes to travel from Station i to Station j (1 \leq i, j \leq N)$. Note that di,j=dj,i may not hold. You are now at Station 1. From here...
I've been looking over sorting algorithms for linked list and here's what I came up with. As we know, for element access arrays will work better than linked list. Also, there is the benefit of elements being stored in consecutive memory locations: due to spatial locality of cache, arrays give better performance. Thus f...
How to solve this problem? A vertex cover of a graph is a set of vertices such that each edge of the graph is incident to at least one vertex of the set. A minimum vertex cover is a vertex cover with minimal cardinality. Consider a set of all minimum vertex covers of a given bipartite graph. Your task is to divide all...
This is a recreational problem, not sure if it is asked due to my limited knowledge in discrete math. Suppose we have a connected graph (which can be seen as a "map"). We start at an initial vertex, and there is a destination vertex which we do not know, until we reach that vertex. The task is to find out the destinati...
How can I calculate the number of cache lines per set or the cache size with the given information? m (number of physical address bits): 32 C (cache size): unknown B (Block size in bytes): 32 E (number of lines per set): unknown S (number of cache sets): 32 t (tag bits): 22 s (set index bits): 5 b (block offset bits):...
I have such a product example: { "color": ["red", "blue"], "material": ["metal", "textile", "plastic"], "options": ["handle", "wire", "bt"], "textile": ["silk", "cotton"] } I need to know what algorithm can help me to produce all options possible for such product, f.e.: { "color": "red", "material": "metal...
Determine the asymptotic running time of the sorting algorithm maxSort. Algorithm maxSort(A) Input: An integer array A Output: Array A sorted in non-decreasing order 1. for j <- n-1 down to 1 do 2. m <- 0 3. for i = 1 to j do 4. if A[i] > A[m] then m <- i 5. exchange A[m], A[j] Can you say anythin...
Since i don't have a CS background in my career, Built up an openmpi compute platform which succesfully computes from a variable number of available nodes. call this whole, a mpi cluster having N^2 4-Core-CPU + 16-OpenCL-1.1-compute-cores with a reasonable compute power each node. I have no experience in parallel opti...
Let $L$ be a regular language over alphabet $\Sigma$. $L$ is the result of merging $2$ languages letter by letter that is for $a_1a_2...a_n\in L_1, b_1b_2...b_n\in L_2, L=a_1b_1a_2b_2...a_nb_n$. $\epsilon \in L \iff\epsilon \in L_1,L_2$. Does this mean that $L_1$ is necessarily regular? At first I tried to prove that...
Bachmair and Ganzinger 1991, 'Rewrite-Based Equational Theorem Proving With Selection and Simplification', specifies the criterion for using an equation as, by some appropriate ordering, u>v (after substitution, and assuming the terms can be ordered). Equivalently, !(u<=v), after substitution. However, Schulz 2006, 'Al...
int seq(int n) { if(n == 0 || n == 1) return n; return(seq(floor(n/2)) + seq(ceil(n/2)); } Find the computational complexity of the above program. I have tried doing it in the following way: $$\begin{align*} T(0) &= 1 \\ T(1) &= 1 \\ T(2) &= 2T(1) = 2 \\ T(3) &= T(1) + T(2) = 3 \\ T(4) &= 2T(2) = 4 \\ T...
Given some finite set $S := \{x_1,x_2,\ldots,x_k\} \subset \mathbb R^n$ we can define a distance matrix $D = (d(i,j))_{ij}$ with $$d(i,j) = \Vert{x_i - x_j}\Vert$$ where $\Vert \cdot \Vert$ is the euclidean norm. Is there an algorithm to determine the minimal $m$ just from $D$ such that there are $\{y_1,y_2,\ldots,y_k...
Let $L$ be a regular language over $\Sigma=\{a,b,c\}$. Build a finite automaton for $L/\{a\}$. Because $L$ is regular then a DFA exists for it: $A=(\Sigma, Q, q_0, F, \delta)$. Let $M$ be a finite automaton, $L(M)=L/\{a\}$. $M=(\Sigma, Q\times\{0,1\}, (q_0,0), \delta', F\times\{1\})$ with the transition function def...
The following comment on an other question says that if we have an infinite language L that satisfies the pumping lemma for regular languages then we have a word with n≤|w|≤2n which is in L. (n is the constant in the pumping lemma) https://cs.stackexchange.com/a/55606/99669 Why is this the case? The lower limit can be ...
Wikipedia says that in order to prove EXPTIME-hardness of our problem, we need to prove that every EXPTIME problem can be poly-time reduced to our problem. Here is a "counter-example" that bugs me. Suppose our problem can be solved in time $O(2^k)$, where $k$ is an input number to our problem instance; let it be in bin...
I'm trying to understand the approach to constructing an grammar which accepts the language ${a^ib^j \mid i>0\ and \hspace{2.5mm}i\leq j \leq(2*i)}$ } Thanks.
Prove that the following algorithm has STOP property. I am not sure if this term is widely know, so the definition of STOP property that I got during classes looks as follows: STOP property (for all input data satisfying $ \alpha $ the computation halts - the number of steps is finite) $\alpha: x \in N $ void BB(int ...
I've more than 10 million strings of length 1-100 characters. This number will be even bigger in the future. I'm interested in clustering this data, but I'm not quite sure what would be effective at this scale. These are the clustering algorithms I've been looking into: Affinity propagation:: seems like a good soluti...
John lives in a city whose streets has the same length. His apartment is located at a specified node H. John need to do his errands where he visits each of k different shop in order. However, each store have more than one location in his city. More particularly, for each 1 ≤ i ≤ k there is a set $S_{i}$ of vertices a...
Let's say we have the following rule: p -: X ≠ Y, X = Y Stating that $\forall x.y. x \neq y \land x = y \implies p$. Now let us suppose that we are searching for a proof of $p$. Such a proof does not exist, of course, but we will search for it. Our starting goal is p. We replace it with the subgoals X ≠ Y and X = Y. T...
In the CLRS chapter 3: When $x → 0$, the approximation of $e^x$ by $1+x$ is quite good: $$e^x = 1 + x + Θ(x^2).$$ How is it to be interpreted, what is the role of asymptotic notation here?
How to find minimum cardinality maximal matching? I tried that pick a edge from highest degree vertex remove other edges from same vertex and so on.
Why the single layer perceptron has a linear activation function while the Multi Layer Perceptron has a non-linear activation function ? What is the potential of the Multi Layer Perceptron respect of the Single Layer perceptron ?
When studying about splay trees, I found the following statement: Suppose we have a splay tree and a sequence of Find operations, where the elements we are searching for are in increasing order. Then the total time necessary to run the sequence is $\mathcal{O}(n)$ ($n$ is the number of nodes in the tree). I looked ar...
EDIT: The most general case I need is not a tree but any Directed Acyclic Graph. I have a directed acyclic graph. I need to sort it in a list so that in the list every node comes after any node it can walk to in the graph. So far so good, just use a topological sorting algorithm. However, I have an additional constrain...
I have numerous records, composed of words. Each word gets translated into vectors, with a variable number of channels, provided that that word exists in a specific lookup dictionary. For n number of words in every record, based upon c number of channels that each vector-based representation of the words possesses, a f...
I have the following task and its solution. Question Given the language $$ A \triangleq\left\{1^{n} 0^{n} \mid n \in \mathbb{N}\right\} \text { with } \Sigma_{A} \triangleq\{1,0\}, $$ give all equivalence classes of the Myhill-Nerode relation. Solution $[1^k]_{\equiv A} = \{1^k\}$ for $k \in \mathbb N$. $[1^\ell0]_...
Say you are parsing a complicated binary file but there is 1 extra byte inserted somewhere. This could completely mess up the entire parse, but if you just looked ahead one token you would see the whole file is in tact minus that extra byte (or bit, whatever). You could have a record in the binary file like this: heade...
Motivation Recently I was trying to optimize some API calls and reduced the problem to optimization of a cumulative number of identifiers across all the requests. I put some considerable effort into solving the problem but I'm still unsatisfied with my solution. Problem formulation You are given a list of unique sets ...
I'm given $L_\cap=\{\langle M_1\rangle\#\langle M_2\rangle\mid L(M_1)\cap L(M_2)\neq\emptyset\}$ and $L_U=\{\langle M\rangle\#w|M \text{ accepts } w\}$. How can I reduce the former to the latter: $L_\cap\leq_RL_U$? My idea was to build a machine $M$ simulating $M_1$ and $M_2$ in series. $M$ accepts a word if and only ...
I have proposed a load balancing algorithm for distributed systems which monitors the load on each device in this system and moves excess load from over-loaded device to less-loaded device. What are best metrics for evaluating the result before and after load balancing? I studied several papers and found metrics like "...
Let $L$ be recursively enumerable and $U$ be non-recursively-enumerable. Is it possible to reduce $U$ to $L$ recursively, $U\leq_R L$? Personally, I do not think this is possible. If we can reduce $U$ to $L$ by a Turing machine that always halt and we also have an Turing machine that compute $L$ (may not halt), then we...
I think that, since graph isomorphism is not known to be $\textbf{NP}$-complete, we can not reduce all problems in $\textbf{NP}$ to it, and therefore the implication does not hold. Additionally, in the accepted answer to this question it is stated, that a proof that graph isomorphism is not $\textbf{NP}$-complete would...
I want to find set cover of this problem. I have sets, each of cardinality 3. I want to find set cover. This is what I am doing. Treat each set as an edge, which is incident on each of its element. I am considering each element as a vertex. Now I will find minimum edge cover of this (hyper)graph. Is this the right way ...
Suppose we have an infinite sequence over the decimal alphabet, call it $w$. For $k\in \{0,1,2,3,4,5,6,7,8,9\}$, let $L_k = \{m\geq 0: \text{$w$ contains a run of $m$ $k$'s}\}$ be a language. Here a run denotes a contiguous block of the sequences. Prove that $L_k$ is a regular language. Here is my idea. Clearly, if $w$...
Given a set S = { $x_{1}$, $x_{2}$, . . . , $x_{n}$} where $x_{i} \in Z$ . and a K and it is $Z^{+}$ . The goal is to find k intervals $I_{1}, I_{2}, . . . , I_{k}$ so that each $x_{i}$ is in one of the intervals $I_{j}$ and so that the sum of the squared lengths of the intervals $I_{k}$ is as small as possible. For ...
Consider the following CFG. $S \rightarrow \epsilon\ |\ aSbS\ |\ bSaS$ Can we prove formally that an equivalent $LL(1)$ grammar does not exist? I feel that intuitively an equivalent $LL(1)$ grammar doesn't exist, but I'm unable to prove this formally.
Given a LTL formula $\phi$ and a transition system $T$ we have to do following steps: Build a (non deterministic) Büchi automaton for $T$ Build a (non deterministic) Büchi automaton for $\phi$ Compute the intersection of these automatons and check for emptyness Step 1 can be done in $\mathcal{O}(|T|)$ time and space....
Need idea for solving the following pushdown automata: $\mathcal{L}=\{w\in\sum ^* | \#a(w)=\#b(w),|w|\geqslant 0\} \,\,\,\, \sum=\{a,b\}$ In the beginning I thought to PUSH A for input a, and then to POP A for input b, but it doesn't work well for the word ba for example
I am still confused over my professor's explanation on why this problem is not a DFA. The Problem: Explain why $L = \{p^kq^k \mid k>0\}$ cannot be recognized by a DFA My professor explained it as that it was because the DFA could not store the $k$ iterations in memory. But I still don't get it. In my mind, you just dra...
Problem is as following: We are 8 trumpet players in an orchestra. There are for example 4 parts so there are always two players on the same part. Now, there are not always the same two players playing the same part meaning the combination of players that play the same part change from piece to piece. What is the cheap...