instruction stringlengths 35 29.1k |
|---|
This is a true/false question:
For each integer $k > 1$, define the complexity class $\sf QP_k := \bigcup_{c > 0} Time(2^{c \log^k n})$. Then for all integers $k > 1$, $\sf QP_k \subsetneq QP_{k+1}$.
I have to prove it is true, or I have to give a counter example as to why it is not true.
I am having a lot of difficu... |
Let $\mathcal G = (\mathcal V, \mathcal A)$ be directed graph with associated edge costs $c_{i,j}$ that has at least one directed cycle.
Define the directed cycle mean cost to be $\frac {\{\text {sum of cost of arcs}\}} { \text {# arcs}}$.
Consider the LP:
$\max \lambda$
s.t: $p_i + \lambda \le p_j + c_{i,j}$ where $... |
Let $\mathcal{B} = \{v_1,v_2,\ldots,v_k\} \in \mathbb{R}^n$ be linearly independent vectors.
Recall that the integer lattice of $\mathcal{B}$ is the set $L(\mathcal{B})$ of all linear combinations of elements of $\mathcal{B}$ using only integers as coefficients. That is $$L(\mathcal{B}) = \{ \sum_{i=1}^k c_i b_i \mid ... |
I have several lists of varying size, each index of the list contains both a key and an object : list1.add('Key', obj).
The lists are all sorted.
My aim is to iterate through the list and match 1 or more items in list 2,3,4 or n to an item in the mainList using the key.
Currently I do something along the lines of:
for ... |
Let $\mathcal G = (\mathcal V, \mathcal A)$ be directed graph with associated edge costs $c_{i,j}$ that has at least one directed cycle.
Define the directed cycle mean cost to be $\frac {\{\text {sum of cost of arcs}\}} { \text {# arcs}}$.
Set $p_i(0) = 0$ and $p_i(t+1) = \min_{j \in O(i)} \{ c_{i,j} + p_j(t) \}$ for a... |
I am currently reading the lecture slides from Princeton regarding network flows but I cannot understand how they manage to find out minimum cuts from a directed graph.
Could someone explain how to find the minimum cut of this graph? I THINK the minimum capacity is 4.
|
Currently learning about topological sorting.
My teacher gave us this problem.
The answer given to us is : B,A,C,E,D,G,F,H in lexicographical order.
Why does the order go from B,A,C THEN go to E and then D IF it is in lexicographical order?
Also, can another topological sort of this graph be: B,A,C,D,E,G,F,H?
|
I was programming a little Secret Santa tool for my extended family's gift exchange. We had a few constraints:
No recipients within the immediate family
Nobody should get who they got last year
The whole thing should be a cycle (Sandy gives to George, George to Tom, Tom to Susan, Susan back to Sandy)
So at this poin... |
Definitions
According to my UML teacher formal means strictly according to rules, officially and how it's supposed to be. He says a formal language = syntax + symbols + spelling. Another term he uses is deterministic. According to him it means "strictly predictable", which means its only interpretable in a single way. ... |
I'm studying random tries in one of my classes, and was wondering if anyone could offer any guidance regarding a problem.
Question:
Given a random $m$-ary trie with $n$ total leaves, letting $I$ be the number of internal nodes in the tree (that is, nodes which aren't a leaf), show that $E(I)$ is $O(n)$.
About the distr... |
I am trying to solve for my exam coming up and have no clue how to generate the grammar for Context sensitive languages
for example how do i proceed on this kind of question.
Give a context-sensitive (not just length-increasing) grammar for $\{www : w ∈ \{a, b\}^⋆\}$.
Ideas or approaches on how to deal with this kind... |
I am wondering, is there a method for automatic runtime analysis that works at least on a relevant subset of algorithms (algorithms that can be analyzed)?
I googled "Automatic algorithm analysis" which gave me this but it is too mathy. I just want a simple example in psuedocode that I can understand. Might be too speci... |
An NP Problem Named All But Five Three Colorable(AB53C) is defined as follows :- Input : Connected Graph G(V,E) The Connected Graph is AB53C, iff the Given Graph is 3-Colorable by leaving UPTO 5 Vertices Uncolored.
Question:- The Problem is in NP. Show the reduction from 3-Colorable Problem.
The Proposed Solution is :-... |
Let sensitivity be defined as in Sensitivity and Block sensitivity
Is there an example of a boolean function in $n$ variables that depends on all $n$ inputs whose sensitivity is $O(\log n)$?
Is there an example of a boolean function in $n$ variables that depends on all $n$ inputs whose average sensitivity is $O(\log n)... |
I'm writing a technical paper and the review committee wants my methodology to be represented in a conventional algorithm format.
I've been searching all over the web for the conventional structure of an algorithm with little luck. Can someone tell me the conventional format of an algorithm or any specification from I... |
Supposing we have a problem $P$ with input size $n$ encoded as a boolean formula $f$ in $n$ variabes which is a multilinear polynomial. Let $f$ have the smallest degree.
Is there a connection between time complexity of $P$ and degree of $f$ and number of monomials in $f$?
|
We want to transform $3DM$ to $PARTITION$, I am reading Garey and Johnson book and I really don't understand how they do the transformation, I know how they create elements $a_i$ from triples of set $M = W \times X \times Y$, but I don't know why they add two other elements $b_1$ and $b_2$ with definition
$$
s(b_1) = 2... |
There are $n$ students and $m$ courses. Each student $i$ wants to attend a subset $C_i \subseteq \{1,\ldots,m\}$ of the courses. There are $k$ time slots on a weekly schedule. The goal is to select a time slot for each course such that the students can attend as many courses as possible, that is, find a mapping $f: \{1... |
Suppose I have these values with weights --
$$
x_1 = 2\\
x_2 = 4\\
x_3 = 5\\
$$
There is no negative or $0$ value. I need to find $2$ element subset with maximum value computed from a function $f(\cdot,\cdot)$, lets say the function values are like this --
$$
f(x_1,x_2) = 10\\
f(x_2,x_3) = 12\\
f(x_3,x_1) = 14\\
$$
Wha... |
I would like to write an algorithm that lists all the ways a natural number $m \in \mathbb{N}$ can be written as the sum of three squares $m = x^2 + y^2 + z^2$ with integers $x,y,z \in \mathbb{Z}$.
Legendre's theorem says $m$ has such a representation if $m \neq 4^a(8b+7)$ with $a,b \in \mathbb{N}$. See on MathOverfl... |
Let A be a subset of N n
Definition1 of RE
DEF1_RE = A is RE iff there is a TM M st M(x) = 1 iff x belongs to A, 0/undefined otherwise
Definition2 of RE
DEF2_RE = A is RE iff there is a recursive/Turing-decidable relation R subset of Nn+1 st
x belongs to A <=> there exists a y R(x,y)
So I have proved that
if A bel... |
I know that the general consensus among CS researchers is that non-relativizing techniques will be needed to separate P and NP. However, if there is an oracle language $A \in \textbf{P}$ such that ${\textbf{P}}^A \neq {\textbf{NP}}^A$ would that necessarily imply ${\textbf{P}} \neq {\textbf{NP}}$? I read somewhere th... |
NOTE: The statement of this question has a LOT of misconceptions.
Is there any relation between the Complexity Classes (like P or NP) and Language hierarchies (like REC or RE) ?
Form what I understand: (easy things are the things that can be done in polynomial time span, as opposed to tough things. Tough things requi... |
I think it stores the address of the current instruction. And if this instruction is completed the program counter is incremented by 1, to get the next instruction.
But now my question is, how do you increment the program counter by 1? It would mean you increment an address by 1, how does this work?
|
In finding the values of x and y, if (x567) + (2yx5) = (71yx) ( all in base 8) I proceeded as under.
I assumed x=abc and y=def and followed.
(abc+010 def+101 110+abc 111+101)=(111 001 def abc) //adding ()+()=() and equating LHS=RHS.
abc=111-010=101 which is 5 in base 8 and then def=001-101 which is -4
so x=5 and... |
I tried to solve the recurrence $T(n) = \sqrt{n}\,T(\sqrt{n}) + n\log n$ with the master theorem but I can't get it to work.
How many arrays exist in each step in the recursion tree?
Or can I solve this problem some other way?
Thanks.
|
You often want to implement an array $A$ where the length fluctuates over time. If at some point $A$ has length $n$, then you would like to use space $O(n)$. Consider the following: At all moments, a virtual array $A[0...n-1]$ is simulated by an actual array $B[0...m-1]$ where $m\ge n\ge 1$. Initially, $m=n=1$.
Extend:... |
So, let's say we have two languages $L$ (which is any context-free language) and $M$ which is the basic CFL $\{0^n1^n: n\geq 0\}$.
Can $L \le_p M$ ? Why or why not? How do polynomial time reductions even work with CFLs in general?
|
The mathematical aspect of particle physics theory are interesting and there seems to be a lot more connections being made to computation and information (like with complexity theory having some impact of physics and the whole quantum computation thing). Does it make sense (or is even possible) to work on some of these... |
Perhaps a way to better understand the Halting Problem's importance is to know what would happen or what could be possible if this was solved.
What would be the Halting Problem's implications in today's technology, mathematics and its practical applications, if it was somehow solved?
|
Is Dijkstra's algorithm used in modern route-finding systems such as Google maps or the satnav in your car? If not, then what is?
|
I'm preparing an Formal language exam, One question from previous year's final is:
Prove or disprove:If L is a context free language, then there exists a language P that is generated by a pure context-free grammar and a regular language R so that $L = P \cap R$.
My solution to this question is quite simple. Assume cont... |
I was researching dynamic programming and read the following:
Often when using a more naive method, many of the subproblems are
generated and solved many times.
What is a naive method?
|
I'm still a bit confused with the terms "input length" and "input size" when used to analyze and describe the asymptomatic upper bound for an algorithm
Seems that input length for the algorithm depends a lot of the kind of data and the algorithm you are talking about.
Some authors refer to input length to the size of c... |
How can I find the degree of a vertex in a De Bruijn graph? Also, given a vertex, is there an easy way to find which other vertices it is connected to?
|
In my formal language class, we define a language called PAL, which is on a alphabet set $\Sigma = \{0,1\}$. $PAL = \{w \in \{0,1\}^* : w = w^R\}$. We have proved that every string in this language will be pairwise inequivalent, i.e. every string is in its own Myhill-Nerode equivalence class.
However, what if we extend... |
This grammar is supposed to give priority to multiplication:
E -> E + T | T.
T -> T * F | F.
F -> x.
A derivation for "x + x * x" would be (unless I'm wrong):
E => E + T => T + T => F + T => x + T => x + T * F => x + F * F => x + x * F => x + x * x.
So how is multiplication given priority over addition? It appears th... |
How is it possible to print all patterns of length $k$ contained in a string, using the FM-index and Burrows-Wheeler transform?
PROBLEM DETAIL:
The input I have is:
the text encoded with the Burrows-Wheeler Transform
the data structure of the FM-Index.
In particularly for the second element listed, I have:
$C(c)$ i... |
I have proved that language $L$ is not regular and think that it is recognizable by a Turing machine. I want to prove it by constructing a Turing machine for it.
$L=\{0^n|n \in A\}$
where $A$ is set of all numbers that do not contain 1 in their base 3 representation. However, n is in base 10.
What I have done so f... |
Given a list of $N$ coins, their values $V_1, V_2, \cdots , V_N$, and a parameter of a total sum $S$. Find the coins the sum of which is S (we can use each coin at most once).
I was recently studying the very same problem from topcoder.com but there "we can use each coin any number of times". I am just stuck here if we... |
What is the complexity of the following problem?
Given a mixed (some edges directed, some undirected) graph, assign a direction to all the undirected edges to make the graph contain a cycle.
It doesn't "feel" like an NP-hard problem, but I can't think of an easy poly-time algorithm.
What about to make the graph acycli... |
How can we ensure that we are continuing to make sound and valid statements about complexity classes when using oracle Turing Machines? According to my understanding (based on the definitions given in introductory textbooks on the subject) oracle Turing machines can determine the membership status of a string with re... |
Given language $L$, I want to show that its Myhill-Nerode equivalence classes are the same as for its complement $\overline{L}$.
I am thinking of constructing a DFA $M$ for the Language $L$ so the DFA for the language of its complement will be just changing the final states to non final states but the states will be sa... |
An algorithm in Artificial Intelligence: A Modern Approach for planning in stochastic, fully observable environments is called And-Or-Graph-Search, implying that it's a search algorithm. However, I don't see how it is one. Wikipedia defines search algorithms as, "an algorithm for finding an item with specified properti... |
I am have a difficult time understanding when a direct map cache is a hit or a miss. My understanding is that when and index matches, but a tag doesn't it is still a miss but the new tag then takes over the previous tag on that index.
Address Binary Address Tag Index H/M
3 00000011 0000 ... |
Strictly in the context of computer science, what is the difference between a spanning tree, and minimum spanning tree? I read this posts but was unsatisfied with the answer because it did not seem relevant to computer science. My professor in my algorithms class makes the distinction between a spanning tree and a regu... |
Say you have an arithmetic problem involving two variables, how do you give a Boolean formula for that using standard techniques so that one gets a minimal formula for a given number of quantifiers?
Consider for example a function that decides if $(1)$ $x>y$ or $(2)$ a function that decides $x|y$?
|
On wikipedia's article on Polynomial-time reduction it states:
Every nontrivial decision problem in P (the class of polynomial-time
decision problems, where nontrivial means that not every input has the
same output) may be reduced to every other nontrivial decision
problem, by a polynomial-time many-one reductio... |
I've been sitting on this for 20+ minutes and can't seem to generate a string that is ambiguous. Can anyone help me? The grammar is:
$$S \xrightarrow{} SS \mid T$$
$$T \xrightarrow{} aTb \mid ab $$
Strings I have attempted to generate and failed are:
abab
abababab
aabbab
abaabb
And none of these seem to be generat... |
We know Every conflict serializable schedule is serializable, but not all serializable schedules conflict-serializable. (*) so it means there is at least one serializable schedule that not conflict serializable.
One way of Testing conflict serializability is using Directed graph as mentioned http://www.cburch.com/cs/3... |
Elements are stored in a single dynamic data-structure $D$
Element ranks are computed by: $\forall i \in n\quad f(i,\ x_i+1) : x_i \in \mathbb{Z^+}$
The function $f$ is weighting based on the value of $i$
$f$ can be redefined, when it is $D$ is restructured accordingly
Where $D$ supports insert in no more than $\math... |
I'm doing a min cost assignation problem to assign doctors to their working days for a hospital.
After correctly getting the max flow with Ford-Fulkerson algorithm, I would like to use the cycle canceling algorithm to minimze the flow's cost. I'm basically using the Bellman-Ford algorithm from the sink of the residual ... |
I have two sets B which is recursively enumerable and is not recursive, and A which is recursive. Is $A-B$ recursive and / or recursively enumerable? What about $B-A$?
$B-A$ is obviously recursively enumerable (to generate its elements, I can generate B's elements and check if they are in A).
If A is the empty set or $... |
You want to create a data structure that can store 1 dimensional intervals and also support the query for finding the total amount of intervals intersecting a given point.
One solution would be for each query to scan through every interval and see if it is contained in this interval or not, this would give us O(amountO... |
I had an exam on Theory of Computation, and one of the questions was to write down a regular expression for the language over $\{0,1\}$ consisting of all words containing at least one 1. My answer was:
$$ 0^* 1 0^* (0^* 1 0^*)^* \, . $$
My teacher gave me one mark out of 5, yet I can't find a possible string that will ... |
In the following direct cache map, there is a list of 32-bit memory address references, given as word addresses. I gathered that the index size is 3 bit and there is no offset.
However, I used 4 bits to determine the tag--is this correct?
When does the tag bits change? How many bits are typically used?
Address Binary ... |
Given a Set K of n tasks, a set T of t possible time-intervalls to schedule any task, and a number k:
Is there a schedule for the tasks, such that there are at most k conflicts (time - overlaps) of the tasks?
I'm having trouble showing that this is np-complete. I don't know how to reduce it to another np-complete probl... |
I know that $\mathsf{P}^A = \mathsf{EXP}$
for any $\mathsf{EXPTIME}$-complete language $A$.
Is it true that $\mathsf{DTIME}^A(n^k) = \mathsf{EXP}$
for any fixed $k$ and any $\mathsf{EXPTIME}$-complete oracle $A$?
If not, what do these complexity classes equal and why?
I am just confused because then it seems to me t... |
I found the following problem that I am trying to answer:
Consider the three color problem where V, vertex set of a bipartite graph. can be partitioned into three subsets such that there is
no edge between verticies of the same subset. Show that this problem is in NP by describing:
A polynomial time algorithm for v... |
I have a directed graph, where each node has an alphabetical value. The graph is to be traversed with topological DFS by descending alphabetical values (Z-A).
The result is $M,N,P,O,Q,S,R,T$ (after reversing). Several DFS trees are created during this traversal, and it's the edges between the trees that confuse me. I ... |
I am having trouble getting my head wrapped around epsilon transitions while creating an LALR(1) parse table.
Here's a grammar that recognizes any number of 'a' followed by a 'b'. 'S' is an artificial start state. '$' is an artificial 'EOS' token.
0. S -> A $
1. A -> B b
2. B -> B a
3. B -> epsilon
Itemse... |
For each integer k > 1, define the complexity class:
$QP_{k}:= \cup_{c>0} Time(2^{c * log^{k} n})$
Then for all integers k > 1, $QP_{k} \subset QP_{k+1}$.
Would this be a true assertion?
Anyone know? :(
|
For a 3CNF $\phi$, denote by $c(\phi)$ the largest number of clauses satisfied under an assignment. Define:
$\mathrm{MAX3SAT} = \{\langle\phi, k\rangle\mid c(\phi) = k \text{ and }\phi\text{ is a 3CNF}\}$.
Prove that NP = coNP if and only if MAX3SAT is in NP.
I've been working on this forever and can't seem to figure o... |
The first sentence of the Wikipedia article for Parikh's Theorem states:
"Parikh's theorem in theoretical computer science says that if one looks only at the relative number of occurrences of terminal symbols in a context-free language, without regard to their order, then the language is indistinguishable from a regu... |
I apologize, but even after these two other posts: here and here
I'm still having trouble understanding oracle TMs and relativization. This question comes at the issue from a different angle:
Why are non-relativizing proofs considered more valid than arguments based on relativized results?
For example, we have a non... |
I am trying to solve this question which appeared in previous exam paper
Can someone help me what i am failing to understand
For languages $A$ and $B$ define $A \div B = \{x \in \Sigma^{\ast} : xy \in A \text{ for all } y \in B\}$.
If $R$ is regular and $L$ is any language, is it always the case that $R\div L$ is reg... |
Assume we are given two vectors $A,B$ that each contains $c$ numbers: $A=[a_i>0]_{1 \times c}$. We want to see the weighted summation of which one is larger. In other words, given two vectors $A$ and $B$:
$$ws(A) = \sum_{1 \leq i \leq c}{i.a_i}, ~~~~ws(B) = \sum_{1 \leq i \leq c}{i.b_i}$$
we want to know $ws(A)>ws(B)?$... |
Bloom Filters have false positive rate of $\epsilon = 2^{-k}$ with a data structure of size $m = n\log (\frac{1}{\epsilon})\ln 2$. Suppose you fix the number of hash functions at $k \le 3$. What is the correct tradeoff between space ($m$) and false positive rate ($\epsilon$) for $k = 1,2,3$? To get a false positive ra... |
I want to prove that the time complexity of an algorithm is polylogarithmic in the scale of input.
The recurrence relation of this algorithm is $T(2n) \leq T(n) + T(n^a)$, where $a\in(0,1)$.
It seems that $T(n) \leq \log^{\beta}{n}$ for some $\beta$ depends on $a$.
But I can't prove this inequality. How to solve this r... |
This is an exercise problem (Ex.3) from the excellent lecture note by Jeff Erickson Lecture 20: Minimum Spanning Trees [Fa’13]
.
Prove that an edge-weighted graph $G$ has a unique minimum spanning tree if and only if the
following conditions hold
For any partition of the vertices of $G$ into two subsets, the minim... |
I have to prove the following assertion: given a tournament graph with $n$ vertices, $n\geq 5$, there can be made an arrangement of the arcs such that between any two vertices exists at least one way of length at most $2$. Any ideas? Thank you!
|
Is there a minimum limit to a pool (population) size when using the genetic algorithm to solve an optimization problem? For example a population of size 2.
|
Is the following language:
$\qquad\displaystyle L= \{\langle M\rangle \mid M \text{ is a TM }, |L(M)|>1\}$
Turing-decidable?
I think it isn't, because if a Turing machine T can decide L, then T can say if M stops or not (impossible this is the halting problem). So T accepts when M stops and accepts the string (with a... |
An instance of $M$ is a collection of sets $S_1, \dots, S_m$ and a bound $B$. A solution is a set $T$ containing $B$ distinct items, such that
each item in $T$ belongs to some $S_i$, and
each $S_i$ contains at most one item in $T$.
Show that $M$ is NP-complete by giving a reduction $\mathrm{IS} \to M$
Any help on h... |
So this sounds like this might lead to an undecidable theory but I thought I would give it a try and ask about it after I found nothing on the subject. I am somewhat interested in finding functions which are counter examples to predicates (or solutions to the inverse rather). I would like to restrict the functions to s... |
Write a regular expression for all the strings in which every pair of adjacent zeros appears before any pair of adjacent ones. The answer given in the book is:
$$(0+10)^*(00)(1+01)^*(11)(0+10)^*(1+01)^*$$
Is that correct? I fail to see how could you get a string like 10011, but it fits description. I mean even a string... |
Consider the low-rank matrix completion problem:
Given an integer $k$ and a subset of entries of some $n \times n$ matrix, fill in the rest of the entries so that the resulting matrix has rank at most $k$.
This problem is clearly in NP, since the set of additional entries is the required certificate. Therefore, it c... |
Let's denote a total increasing computable function $f: \mathbb{N} \rightarrow \mathbb{N}$. How to prove that the plot of $f$ is a decidable subset of $ \mathbb{N} \times \mathbb{N}$?
My solution:
1) First of all, we consider a plot as a $X \times Y = \{ (x, y) | x, y \in X, Y \} \subset \mathbb{N} \times \mathbb{N} $.... |
In the following, we consider binary trees where only the leaves have weights.
Let $T$ be a binary tree and $W(T)$ be the sum of the weights of its leaves.
Let $T.l$ and $T.r$ be the left child and right child respectively.
We define the imbalance $I(T)$ of a binary tree $T$ as follows:
$$I(T) = \begin{cases}
0 & siz... |
How should I think to choose the potential function in the amortized analysis?
More specifically are there techniques or tips for choosing optimal or good potential functions?
|
I am trying to generate a transition graph for a turing machine that accepts the languages of all strings that do not contain the substring $bbb$ with the input alphabet $\Sigma = \{a, b\}$.
When I implement this graph in JFLAP, I'm receiving an error that there are transitions out of final states. Is it OK to constru... |
Although I have trouble understanding oracle TMs, I appreciate that non-relativizing techniques will be needed to resolve P vs. NP (as well as most other open problems in TCS). However, one of the techniques I've read about that does not relativize is using the fact that all of a Turing machine's computation is local ... |
I'm reading Sipser's Introduction to the Theory of Computation, and I'm reading about space-constructible functions. He gives the following definition:
A function $f: \mathbb{N} \to \mathbb{N}$ is space constructible if the function that maps the string $1^n$ to the binary representation of $f(n)$ is computable in spa... |
I'm studying for a final and the professor gave us a practice problem to prepare, but it's extremely difficult and I've been hacking at it for hours with no luck. Here it is:
It's driving me bonkers so I hope somebody out there can show me how it's done!
Thanks
|
I'm interested in such problem. I have a set of $n$ tasks ${T_i}$ and directed acyclic graph, which nodes correspond to tasks and edges correspond to order of execution two tasks. In other words if I have edge $T_i \rightarrow T_j$ it means that task $T_i$ should be executed in day which strictly before day of executio... |
I watched lecture from MIT about Skip List. Overall, I understand the material, but one thing. What is "with-high-probability"? I really don't get it at all. I've seen the lecture notes but still didn't get it.
They just said, "Event $E$ occurs with high probability (w.h.p.) if, for any $\alpha\geq1$, there is an appr... |
I understand without memoization it is going to be $O(3^{\max\,\{m,n\}})$ because every call results in extra three calls: thus we end up having a call tree with three children for each node, with height $\max\,\{m,n\}$, m and n being lengths of two given strings.
However I am not getting why it is $O(mn)$ after memoiz... |
Given a random directed Graph G:
$$
G=(V,E) \\
\lvert V \rvert = n , \lvert E \rvert = k
$$
where for each vertex, either:
$$
d_{incoming}(v) = 1 , d_{outgoing}(v) = 1
$$
meaning - for each incoming (outgoing) edge to vertex v, there is also an outgoing (incoming) edge from vertex v.
Or:
$$
d(v) = 0
$$
What is the ... |
If I have an ambiguous grammar G and its disambiguated version D.
Then which one is true L(D) ⊂ L(G) , L(G) ⊂ L(D) or L(G)=L(D)?
As I tried with some examples to transform a grammar to it unambiguous version but i found that both are equivalent.
I mean is there a specific set relation between both. Please help me and... |
This is a homework. I'd appreciate if you didn't give away answer straightaway but instead pointed me to the right direction.
From huge majority of sources the definition of $\mathcal{O}(n)$ is:
$f, g : N \to R^+$
$f \in \mathcal{O}(g) \Leftrightarrow \exists{c,n_0} \in N \> \forall n > n_0 : f(n) \leq c\cdot g(n)$
but... |
If we take angle names as shown on the Bloch sphere below and a typical qubit representation written as $\cos(\theta/2)|0\rangle + \mathrm{e}^{-\mathrm{i}\phi}\sin(\theta/2)|1\rangle$, why do we divide $\theta$ by $2$ in the cosine and sine parameters?
|
Are all Morse code strings uniquely decipherable? Without the spaces,
......-...-..---.-----.-..-..-..
could be Hello World but perhaps the first letter is a 5 -- in fact it looks very unlikely an arbitrary sequence of dots and dashes should have a unique translation.
One might possibly use the Kraft inequality but... |
Lambda calculus serves as a foundation for all sorts of functional languages and its various extensions are compiler targets for languages like Haskell, ML, etc. So what is the equivalent for object oriented languages? Is there a minimal object calculus that serves as the foundation for object oriented languages?
|
How is the parity function defined in standard way if inputs are in $\{-1,+1\}$ instead of $\{0,1\}$. For $\{0,1\}$, parity is $x_1\oplus x_2\oplus\cdots\oplus x_{n-1}\oplus x_n$. I am looking for how is inner product mod $2$ defined if inputs are in $\{-1,+1\}$. Is it $\frac{1}{4}\sum_i(x_i+1)(y_i+1)\mod 2$ or just $\... |
Oracles do not exist. If one did exist, then you would replace them with a subroutine with computational requirements and you would no longer need an "Oracle". Thus, Oracles do not exist almost by definition. I don't understand how one can make an mathematical argument based on something that does not exist (excludin... |
Reading about superdense coding I came upon a calculation I can not understand.
We have an EPR entangled pair of qubits $\frac{1}{\sqrt2}(|00\rangle + |11\rangle)$ and we want to apply a Pauli X gate to the first of the entangled qubits. On wikipedia, there is an example showing that such an operation would lead to the... |
The complexity class PP can be defined in many ways, one of which involves randomness - a language $L$ is in PP if there is a polynomial-time, randomized TM $M$ such that $w \in L$ if and only if the probability that $M$ accepts $w$ is greater than 1/2.
I'm curious whether there is a name for the complexity class that ... |
I am trying to rank $\log n $, $\log_{10} n $, $n \log n $, $n \log n^2 $, $n^{0.8}$, $\sqrt{n}$ in increasing asymptotic complexity. $\log n $ has base 2 unless specified otherwise.
The answer I have is $\log_{10} n $, $\log n $, $\sqrt{n}$, $n^{0.8}$, $n \log n$, $n \log n^2$,
Is this right? And possibly explain the ... |
I learned from this post that ${\sf DTIME}^{\text{EXP}}(n^k) \neq \text{EXP}$ for a fixed $k$ for otherwise the Time Hierarchy Theorem would fail in that relativized world. However, is it possible to prove that no oracles exist in which the Time Hierarchy Theorem fails? Or is it just that we have not been able to dis... |
Can anyone give me a proof as to why
Any range over a unviverse {1...n} can be reduced to at most $2log_2n$
disjoint dyadic ranges?
Where a dyadic range is a range of the form $[x2^y+1....(x+1)2^y]$.
This is in reference to the method for answering range queries with a Count-Min Sketch as mentioned in the origin... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.