instruction stringlengths 35 11.4k |
|---|
The book I am learning about compilers from states that $M \to \alpha N \beta$
will generate a constraint that $\mathrm{FOLLOW}(M)$ is contained in $\mathrm{FOLLOW}(N)$ when $\beta$ is nullable.
This is a bit confusing because there can be other productions such as $M\to \gamma K \theta $. Logically, then, the set of ... |
Are there any NP-hard problems that are considered kind of the standard for reductions? There's so many but it feels like some come up more often than others (for example Vertex Cover, Independent Set, 3-SAT, etc.). I'm sure people just pick whatever is most convenient, but where's the boundary between "more useful" an... |
Suppose a deterministic Turing machine T decides language L and L is in NP. Then must it be provable in ZF that T decides L?
|
For any simple, connected, undirected graph $G(V,E,w)$ with each carrying distinct positive edge weights, is it true that MST will contain all the edges which do not lie in any cycle of $G$?
I think MST can take any edge of irrespective of the fact whether it is an edge of cycle (like I simply use Kruskal's), Also I am... |
Given a matrix $A \in \{0,1\}^{n \times n}$, use network flows to describe an algorithm that finds the minimal set $I$ of rows and columns such that any non-zero entry is in one of the rows or columns in $I$.
What I have tried
Create an intermediate column (between $s$ and $t$) for every column and row.
For every c... |
As the title suggests, I want to take a look at resources (books, lectures or papers) that are available (free or paid) on computation over reals. Thanks in advance!
|
It has been shown of course that the halting problem is undecidable. That is, we cannot formulate a Turing machine that will decide for any arbitrary turing machine whether it will halt or not.
However, I'm wondering, if we want to decide for the set of Turing machines $T$, whether a turing machine $t$ halts, and we s... |
I always tend to think of information as follows: If we have an information set $I$, and it is possible to derive from $I$ another information set $X$, then $I$ really contained $X$ all along, and we haven't actually discovered "new information". We've merely found out something new about the information we already had... |
Can someone please tell me the difference between Non re and CoRE languages with an example?
|
Let's assume we're talking about real functions purely for clarity purposes, but my question is more general.
We say that a function $f$ is computable, if for a given $x$, a turing machine can output $y$ such that $f(x)=y$.
However, I'm wondering whether there is some concept of "computability for the expresssion of a ... |
This is a very vague question, so I don't know if people will understand it (I'm not even sure I understand the question myself), but here goes. Also, I'm not sure if this is really the right forum to ask, but I thought that it relates to computer science because of the connection to function calls (see comment at bott... |
I have recently studied about interrupts and context switch i have read that the hardware interrupts cause the interrupt service subroutine to execute for this i read mixed articles saying that there no need for a context switch to kernel mode and some say we need a context switch to kernel mode from user mode do we n... |
I have been working for some time in several kinds of image recognition. They work well. One example is , character or shape recognition. I have implemented this in an embedded processor and I can recognize shapes and letters with this.
Now I am working on implementing this with a Hololens. Using my algorithms I have ... |
I came across following fact in Automata book by Hopcroft, Ullman:
Theorem 1: For every PDA accepting by empty stack (PDAeS), there is an equivalent one state PDA accepting by empty stack.
I was wondering how this applies to:
PDA accepting by final state (PDAfS)
Deterministic PDA accepting by empty stack (DPDAeS)
De... |
I have two endpoints, $a$ and $b$, that can communicate through a channel. $a$ is storing a set of fixed-length strings $A = \{a_1, \ldots, a_{N_A}\}$, and $b$ is storing another set of fixed-length strings $B = \{b_1, \ldots, b_{N_B}\}$, with in general $A \cap B \neq \emptyset$.
Now, I would like to run a procedure t... |
I'm trying to formulate a greedy algorithm for the Max k-cut problem:
Let's have an not oriented graph $G(V,E)$, each edge $e \in E$ has its weight $w_e$. The goal of the algorithm is to divide all vertices $v\in V$ to $k$ disjunct sets $V_1,\dots,V_k$ and maximize the weight of the edges that are connecting these sets... |
We are given a graph $G=(V,E)$ and we want an algorithm to find a set of vertices $U$ to maximize the following quantity : $\frac{|E(U)|}{|U|}$ where $E(U)$ denotes the number of edges in the subgraph made with vertex set $U$.
|
We know there is $B$ with $P^B \neq NP^B$, and we know there is $C$ with $coNP^C=NP^C$, what happens if we want to mix?
|
Are these languages in D, SD/D, or not in SD?
$$L_1 = \{\langle M \rangle\mid L(M)\cap (ab)^*\text{ is infinite}\}$$
I kind of understand decidability and undecidability problems, but the "$\cap(ab)^*$" here threw me off a little. but I'm thinking that maybe I should deal with this as if it's just $L(M)$ basically sinc... |
Given a directed graph such that at least an Eulerian path exists, how to determine efficiently if there is exactly one Eulerian path?
Of course if there is an Eulerian circuit then there is more than one Eulerian path, so we will assume that no Eulerian circuit exists.
In other words, just to fix some notation, we as... |
In general, context-free algorithm are not closed under intersection but the intersection between a regular language and a CF language is known to be context-free.
My question is: does exist an algorithm to compute intersection in these special cases?
Thanks.
|
I'm not sure how lower bounds affect the question to the P=NP problem.
I.e. :
Let a SAT instance with a size of n be transformed into an instance of a problem X with a size of n3.
If you find a lower bound of the SAT problem which is
$$\Omega(c^n) \ \ \ \ c > 1 $$
What would be the consequence to the problem P=NP?
We ... |
Given these two arrays:
[5, 3, 4, 1, 2]
[1, 3, 2, 4, 5]
Find the maximum subsequence in both arrays that the index of the elements are in a crescent order:
Example: [3, 4] it's an answer because the indexes are in a crescent way in both arrays. (same as [1, 2]). Therefore, the subsequence the answer [3, 4, 1] is wron... |
I was looking at Turing machines and Turing completeness and I was wondering whether it is possible to prove that there is a problem which cannot be solved by a Turing complete computer or whether it is possible to prove the opposite.
|
Does NP ⊆ Co-NP imply NP = Co-NP?
And also, does Co-NP ⊆ NP imply NP = Co-NP?
And does either statement imply P = NP?
Thank you very much in advance.
|
If we know the number of keys that we are going to get ,how do we calculate the size of the array we will need to store our separate chains in the hashtable?
All that using the mod hashfunction
|
I am trying to understand Time Hierarchy. I have an example that is solvable using the rules of Time Hierarchy. I would like an explanation on how to solve so that I may understand better how to use Time Hierarchy.
I need to show that the following are either equal, on inclusive of one another...
TIME($2^{n^2}$) and TI... |
I have started pumping lemma for context-free grammar by reading Sipser's book and there are two questions right at the end end of the topic which I don't understand how to solve or where to start from?
I have to show that the following languages are not context-free
L = { w | w = 0a 1 b 2 ab where a, b are >= 1... |
I am trying to prove what the maximum number of edges that can be added to the petersen graph is without changing the crossing number of 2.
|
I am trying to prove that the crossing number of complete graph with 7 vertices is greater than or equal to 7. I know that edges (m)=21 if it is complete, and if the graph were planer 2n = degree of faces, which I think is a minimum of 3 per face. So 2m gte 3f. Based on Euler's formula 3n-3m+3f gte 6 (scaled by 3) then... |
You are given a tree decomposition of a large graph with not so small bounded tree-width.
Suppose now you need to solve a dynamic programming problem inside a subgraph and does not have time to do another costly tree decomposition.
How do I find the tree decomposition of a subgraph given the decomposition of its "fathe... |
I have a difficult time understanding hashed page tables used in virtual memory management. Here is picture of the slide that I am referring to:
I understand that p is hashed and then the hash is checked in the page table for a match. What is elements referring to here? Is it the page table entry? What does chain mea... |
So, if there is something that is turing computable, I know it is in NP (is that right?).
If M is computable, does it mean M is in NP?
M computable IFF in NP (is that true)?
And does all computable machines exist under NPSPACE?
|
Consider for example the following recursive program:
function fibonacci(int n) {
if (n < 2) {
return 1;
} else {
return fibonacci(n - 2) + fibonacci(n - 1);
}
}
The question is now, why recursive programs are problematic for branch predictors? I think that this is due to the fact that the ... |
Given two positive integers $c_1$ and $c_2$ such that $c_1 < c_2$, it's easy to prove that $n^{c_1}$ is $\mathcal{O}(n^{c_2})$ while $n^{c_2}$ is not $\mathcal{O}(n^{c_1})$. In general, for any functions $f(n)$ and $g(n)$ it is possible to determine which one (or both) is true, $f \in \mathcal{O}(g)$ or $g \in \mathcal... |
I understand what the halting problem describes, but I do not understand how the proof by contradiction associated with it proves that it is impossible to solve.
The proof by contradiction can be defined as having a function Halt() which could determine whether a program will halt. One could then call this function in ... |
$L = (0^i 1)^n$ where i=1,2,3,4...n and n>=0
For eg :- 00010001 doesn't belong to the language as n=2 but i=3 at the beginning.
001001001 belongs to L as n=3 and i=2 in all cases.
I know the above language is not regular for sure as value of 'i' depends on value of 'n' and it requires comparison. So DFA not possible.... |
It seems that Functor definitions in Haskell can be accepted if the type is correct.
This code compiles, but it doesn't satisfy the functor law:
data Bst a = NIL | Node a (Bst a) (Bst a) deriving (Eq, Ord, Show)
instance Functor Bst where
fmap _ NIL = NIL
fmap f (Node v left right) = Node (f v) (fmap f right) (fma... |
For given positive integer $n$ find the first number $x$ with exactly $n$ divisors. For simplicity of the problem we can assume that $x$ will always fit in integer size and $n \leq 1000$.
Example
If $n=4, x = 6, \text{ divisors of 6 are } \{1, 2, 3, 6\}\\n=6, x=12, \text{divisors of 12 are } \{1,2,3,4,6,12\}$
I was th... |
One of my final exam questions asked me to give a Turing-unrecognizable language over an unary alphabet, which I wasn't able to complete, but I ended using the Busy Beaver function (BB(k)) which is known to be something intractable or uncomputable so that I constructed the language as a set of strings 1^BB(k) for natu... |
I am trying to prove decidability of problem whether language described by Turing machine is regular. My idea is that I can simulate finite automaton with a subset of Turing machine instructions, namely ones that check for symbol and then move right. If the language is not regular, then simulated FA will eventually com... |
Given a CFG G in Chomsky Normal Form with n variables. Prove that
$|L(G)| = \infty \iff \exists w \in L(G)$ such that $2^n<|w|\le2^{n+1}$
Now, proving left to right I've encountered a problem.
I am trying to prove it by taking a word above the pumping length, and "pumping down" till I get a word of length in the c... |
This problem has been heavily studied, and at last may have a potential solution.
The concept I have come up with was made entirely on my own, but is close to some other theories that will be referenced.
The intended purpose for posting here is to have more experienced software developers review my theory. Should it pr... |
Prove or disprove: Complement of language
$L=\left\{baba^2ba^3b...ba^{n-1}ba^nb \, | \, n \geq 1\right\}$ is
context-free.
I'm not quite sure how this is done. I would first try to find out whether $L=\left\{baba^2ba^3b...ba^{n-1}ba^nb \, | \, n \geq 1\right\}$ itself is context-free.
The language creates words $... |
Consider the formal problem:
Given a context-free grammar $G$, is the language $L(G)$ empty?
Can we determine if the problem is recursively enumerable, recursive, in NP, or in P? Can the entire procedure be explained?
|
How to find, or prove impossible, apolynomial time verifier for $\overline { EQ_{CFG}}$?
$\overline { EQ_{CFG}}$ means all pairs G and H, which are CFGs such that L(G) is not equal to L(H)
|
After Omer Reingold's famous proof (from 2005?) that SL = L, the distinction between natural L complete problems and natural SL complete problems has been mostly dropped, so that it became difficult for me to find examples of natural L complete problems. (Here "difficult" means article behind paywall and google book wi... |
I know that some operations are definitely constant time, such as accessing an item in a list, however there are other operations that are assumed constant time sometimes, but non-constant other times, such as multiplication.
So if we were to deal with very, very large operations, which operations would be truly const... |
How would I design an NFA that accepts all strings don't end in a certain sequence over the alphabet {0,1}.
Designing a DFA that does the job is fairly straight forward, but I can't find out how to make my Automata Non-Deterministic.
|
I'm a beginner. I would like to know if the size of a variable (and generally speaking of a storage space) is:
Its capacity (the amount of data that can be put in it).
The amount of data it contains
|
I have a made up machine, which has the same definition as Turing machine, but the transition function and the step of computation of the machine. What would be the approach of the proof that the language accepted by this machine is (or is not) equal to L0 (recursively enumerable language)?
|
If we have two $NP$ complete problems $\Pi_1$ and $\Pi_2$ such that yes instances of $\Pi_1$ are no instances of $\Pi_2$ and vice versa then we know $NP=coNP$.
Is the converse true as well?
That is if $NP=coNP$ then can we find two $NP$ complete problems $\Pi_1$ and $\Pi_2$ such that yes instances of $\Pi_1$ are no ... |
Let $p$ be a number represented in binary of length $n$. We'll divide $p$ into $\frac{n}{k}$ parts, each of length $k$ (let each part be $p_i$, $0 \le i\le \frac{n}{k}$) where $k=\lg n$. Now we want to represent $p$ as a sum:
$$
\sum_{i=0}^{\frac{n}{k}} p_i\cdot 2^{ik} \qquad(*)
$$
I know that multiplying a number in b... |
Given a $\lambda$-term $t\in \Lambda$ and an integer $k$, we say that $t$ behave likes the identity when applied to $k$ if $tk\to_\beta^*k$ (where the integer is represented as a church numeral). We will write $BI(t,k)$ for this property.
Given a term $t$, we define $a(t)$ as the smallest natural number that allows to ... |
what I understand is that, the file dependency is organized as a graph. Make/scons check the timestamp of each file, when a source file's timestamp is newer than the output, it re-compile everything depend on this file.
What kind of algorithm does Make/scons use to travel the graph? what if there are circles?
I have be... |
Given a threshold $t$ and a list of numbers $N$. $\forall n \in N: n \leq t$
Now group the numbers so that the sum of the numbers $s$ is lower or equal $t$. Minimize the amount of groups.
Example: $N={20,19,18,17,14,12,9,5,4}$ and $t = 40$
Possible Grouping: ${(20,19),(18,17,4),(14,12,9,5)}$ (Greedy)
Is greedy a strat... |
Let $X$ be an algorithm whose correctness supposed to be proved. What is the best practice to write the corresponding theorem?
For example:
Theorem: Algorithm $X$ correctly computes its output.
|
We talked about the following theorem in class but I am still having problems to understand it:
For a NP-complete decision problem "Does a valid solution with a value $\leq K$ exist?" there is no approximation algorithm for the corresponding minimization problem with an approximation factor $\lt 1 + 1/K$.
Why is this n... |
I'm trying to optimize a set of patterns in an image, but unfortunately they only way I have of evaluating the images results in smaller versions of the pattern scoring much better than larger versions.
As a result, the optimization methods I've tried all just end up shrinking the pattern down until they run into alias... |
How can we show $P/poly^{P/poly}=P/poly$?
What tricks are generally used for self lowness of a class such as $BPP$, $SPP$ etc?
|
I'm writing a program where I have a bounded semilattice (it has a root element at the top, all edges point downwards, and a node may have multiple parents). I need to precompute each node's depth (the max number of edges from the root node) and height (the max number of edges to any leaf). I have a naive implementatio... |
Suppose I have 2 intervals C1 = [x1, x2] and C2 = [y1, y2], where x1,x2,y1,y2 are variables in an Integer program, I want to compute the overlap of C1 and C2. I am interested in a tight formulation for computing the overlap as an another variable with as few big M constraints as possible. Any references or formulations... |
Is the question above still NP? I've been stuck on this question for couple of days now... I know k-Clique problem is NP-complete generally, but the problem is k = |V|-d where d is some integer constant...My current guess is that for large |V|,
d << |V| => Finding all subsets of size k = (V choose V-d) so this questio... |
Suppose $A$ depends on $B$ or $C$, but not necessarily exclusively. Is it possible to model this in a dependency graph?
Can we just link $A$ to $B$ and $C$ via a diamond (like in UML) (though I don't see how this can be represented mathematically)? Or do we have to condense $B$ and $C$ to a single node $D$?
|
Considering $n$ number of pieces of data, what would Dijkstra's shortest path algorithm time complexity be if it was stored using a data structure with following properties?
• delete the record with the minimum value of the key (complexity $O(log n)$);
• decrease the key of some record (complexity $O(1)$);
• find the... |
Okay can't figure this out. I want to make sure I understand it.
There are n random keys each being float numbers with p decimal places.
So, for example,
123.456,
343.645,
234.543,
863.238,
956.043,
etc.
For which values of p should you use counting sort, radix sort, and merge sort to make it the fastest.
I know cou... |
I am building genetic algorithm for feature selection. But there are vague things to me.
For example, there are 100 individuals with crossover probability 0.8. Does it mean I take 80 parents (40 couples), or 80 offsprings?
I'm using linear ranking as the parent selection because of the fitness values are close to each... |
I have noticed that I find it far easier to write down mathematical proofs without making any mistakes, than to write down a computer program without bugs.
It seems that this is something more widespread than just my experience. Most people make software bugs all the time in their programming, and they have the compile... |
This question is already asked:
To find a subsequence having largest sum among n positive integers by not choosing 3 consecutive elements
https://stackoverflow.com/questions/29249104/maximum-sum-in-ipl-matches
Problem Statement: https://www.codechef.com/ZCOPRAC/problems/ZCO14004/
Bonus/Similar link: https://discuss.cod... |
To describe the implementation of a dynamic programming language, I have seen the terms "Runtime" (e.g. Security transparency in the Python runtime), "Virtual Machine" (Python Virtual Machine (PVM), YARV (Yet another Ruby VM)) and "Interpreter" (Matz's Ruby Interpreter) used. JavaScript also uses the word "Engine".
IMO... |
Having trouble figuring this out.
If I have 2 sets of integers how would I use a hash table to test if set A is a subset of set B (in pseudocode).
I think I understand that basically I would need to create a hash table for all the elements of B. Then, the traverse A and search for each element in the hash table. If th... |
I'm interested to read about type theory, but I'm quite a beginner. I know what sets are and how to work with them, but I don't have a deep understanding of set theory. I don't really understand the motivation behind type theory, other than that it was first developed to solve the problems with naive set theory.
I'm ma... |
I've encountered this problem in a program analysis project I'm working on, where I've got a bunch of functions defined in terms of each other, and because I'm using SMT which doesn't support recursion, I'd like to define as many functions outright as possible, so that fewer are left to be solved by the SMT solver.
In... |
Given a set of $n$ items, each represented by $t_i=(w_i,v_i)$ for $1 \le i \le n$, the weighted average value of those items is defined as:
$$
\frac{\sum_{i=1}^{n}v_iw_i}{\sum_{i=1}^nw_i}
$$
The goal is to find a subset of items to double their weight, such that the weighted average value is maximized.
For example, s... |
I'm wondering if if is possible to have a function $f$ such that there exists $x,y$ such that we have $f_t(x) > f_t(y)$ where $f_t$ denotes the true value of $f$ and $f_a(x)<f_a(y)$ where $f_a$ denotes the value of f as stored in a computer? (I am referring to floating point numbers and numerical analysis)
I am looking... |
How to Think About Algorithms - Jeff Edmonds
Exercise 2.2.2
The problem asks to find $\sum$, Q, δ, s, and F of this program if we see it as an automaton. Edmonds characterized this as deterministic non-finite automaton since 'n' is not bounded.
$\sum$ is {0,1} but I'm not sure how to model Q and the transition functi... |
Recently I was reading again this propositions as types paper by Philip Wadler:
http://homepages.inf.ed.ac.uk/wadler/papers/propositions-as-types/propositions-as-types.pdf
It gives an impression, that programs are proofs. So my first question was that why they are not enough for mathematical proofs then, for example in... |
I've been trying to find the most efficient unification algorithm by following reference chains on the Wikipedia article on unification. As far as I can tell, the fastest one is the one presented in "A Practical Unification Algorithm", but is there a faster one?
|
On wikipedia page of register machines it says that all register machines defined appropriately are equivalent to Turing machines but that
Computational speed is very dependent on the model specifics.
Does this mean that when we say a problem has complexity $O(n^2)$ or is a polynomial time problem, or something like... |
I'm reading Wattenhofer's The Science of the Blockchain. On page 87, he states the following thoerem:
Theorem 7.22. Forks are eventually resolved and all nodes eventually agree on which is the longest blockchain. The system therefore guarantees eventual consistency.
Proof. In order for the fork to continue to exist, p... |
I have a query regarding the below information in http://duartes.org/gustavo/blog/post/motherboard-chipsets-memory-map/
"In 64-bit mode it is possible to use physical addresses above the total RAM in the system to access the RAM regions that correspond to physical addresses stolen by motherboard devices. This is called... |
The Church-Turing thesis states that everything that can physically be computed, can be computed on a Turing Machine.
The paper
"Analog computation via neural networks" (Siegelmannn and Sontag, Theoretical Computer Science, 131:331–360, 1994; PDF) claims that a neural net of a certain form (the settings are presented i... |
Let N be any positive integer, then is following language regular for every $N$?
$L$ = { $B_n : B_n(modN) == 0$ } where $B_n$ is binary representation of a number.
E.g, $L=\lbrace B_n : B_nmod31 == 0,B_n \ is \ a \ binary \ number \rbrace$ is regular? Will the language be regular for any positive number in place of $... |
I'm struggling to understand this question using pumping lemma to prove a language is not regular. Any help would be appreciated.
Prove using the Pumping Lemma that the following language is not regular.
{0^n^3 |n ≥ 0 is an integer}
From my understanding a language isn't regular if the power is linear. But I just can... |
Let's say I have a 3D space containing spheres (for simplicity, all with the same radius). All spheres are in two disjoint sets, $A$ and $B$. It is guaranteed that spheres from $A$ do not intersect with spheres from $B$.
How can I find the smallest possible set $C$ of spheres (of any radius) that covers all spheres fro... |
I think I have a hard time understanding the definition for NP. It says: "All decision problem where every yes-instance can be verified in polynomial time". But doesn't this just mean that every possible solution can be verified to be yes or no in polynomial time? If co-NP then is verifying no-instances isn't NP alread... |
Define $Tape_M(t, i)$ as the symbol in the $i$-th cell of the tape of Turing machine $M$ with empty input at step $t$.
Does there exist a Turing machine $M$ such that no algorithm can compute $Tape_M(t, i)$ within $o(t)$ (or $o(t/\log(t))$ ) time?
Actually, it is inspired by the celebrated time hierarchy theorem. I b... |
It is an interview question:
Given a binary tree print the path of the tree which has
the highest number of bends.
I could come up with a solution which will keep track the left or right child being called but interviewer was not satisfied with that solution. Has anyone better solution for this problem?
|
Suppose algorithm $A$ on a digital computer takes as input integers $x$ and $y$ in binary. The algorithm outputs one if $x=y$, and zero if $x \neq y$. Is there a proof that for any input $x$ and $y$ in which $x=y$, there exists a one-to-one function $f: \mathbb Z \rightarrow \mathbb Z$ such that $A$ compares all of the... |
I have been thinking on this problem but couldn't come up with a good reduction yet. First part of the proof, i.e L is being in NP, is okay. However, I cannot find a proper reduction from 3-CNF-SAT to MAXIMUM-DISJOINT-SET problem.
Edit 1: MDS definition
MAXIMUM-DISJOINT-SET problem: We are given a collection S of
sets.... |
There was a question connected with one of the video lecture lessons that I'm currently watching.
Let two trees be given - the original and the tree after the zig-zig step:
Calculate the cost of this operation.
Where it is: the sum of the ranks of the new tree (after the zig-zig step) minus the sum of the ranks of ... |
Given a matrix $A \in \mathbb{R}^{n \times n}$ with no zero rows, what is the complexity of deterministically finding a vector $x \in \mathbb{R}^n$ such that every entry of $Ax$ is nonzero?
It is easy to see that a vector whose entries are realizations of Gaussian random variables works. Indeed, in this case every e... |
In Splay trees, by definition - the required element x - rises to the root of the tree, using the operations: zig, zig-zig, zig-zag. And the formula zig of the step is this: 1 + 3 (r '(v) -r (v)), where - r' (v) -r (v) is the length of the path before the path x is raised to the vertex, and the coefficient 1 is " actua... |
If $\mathcal C=\mathcal D$ then does $\mathcal A^\mathcal C=\mathcal A^\mathcal D$ hold ($\mathcal C^A=\mathcal D^A$ need not hold)? The class $\mathcal A$ could query same for $\mathcal C$ and $\mathcal D$ since $\mathcal C=\mathcal D$ as languages. Correct? Is there a counterexample?
If $\mathcal C\subseteq\mathcal ... |
We know $NP=\bigcup_{k\in\Bbb N}NTIME(n^k)$ and $\Sigma_2^P=NP^{NP}$.
Does $\Sigma_2^P\subseteq\bigcup_{k\in\Bbb N}NTIME(n^k)$ also hold (we can do $O(n^k)$ queries to $NP$ oracle which runs in non-deterministic $O((n^k)^c)$ time which is non-deterministic $O(poly(n))$ time)?
Is there a reason we cannot conclude $NP=... |
I'm looking for a hint to help me think through/solve the problem of finding the median of two sorted lists/arrays in O(log(m+n)) time, where m,n are the sizes/lengths of each list, respectively.
I can immediately think of an obvious O(m+n) time algorithm using big-theta of m+n space, as follows: Merge the two lists in... |
I have been taught that the A* algorithm visits every node on the graph, like Dijkstra's does, prioritising nodes with the smallest cost. However, visualisations of the algorithm, such as this one, appear to show the algorithm stopping after finding the first path as the white blocks spreading out on the linked video d... |
I recently came across a handwritten note with directions to push a string of text into a database. There was a strange character in the string I've never seen before, a lower case 'b' with a forward slash through it:
I asked the author about it and he said it was an old-school way of representing a space.
My question... |
I'm formalizing some properties of lambda calculus in Coq and I have some problems proving termination of substitution. My terms are defined as:
Inductive Term :=
TVar: nat -> Term
| TAbs: nat -> Term -> Term
| TApp: Term -> Term -> Term.
and I have a way of generating fresh variables using a function
fresh: Term ->... |
Does recursive enumeration implies countability?
Does countability implies recursive enumeration?
I believe the first implication holds but not sure about the second. A good example would suffice.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.