instruction stringlengths 35 11.4k |
|---|
Neural networks are the base for all(most?) of the machine learning / deep learning algorithms/programs.
Humans don't have fixed algorithms to decide or do something. Initially, we don't know how a snake is supposed to look. We learn that from experience. But our learning is never perfect. Once in a while, we mistake a... |
According to complexity zoo:
Class UP (Unambiguous Polynomial-Time) is defined as:
The class of decision problems solvable by an NP machine such that
If the answer is “yes,” exactly one computation path accepts.
If the answer is “no,” all computation paths reject.
Class US (Unique Polynomial-Time) is defined as:
Th... |
Does $BPP^{NP}\subseteq\Sigma_k^P\cap P/poly^{NP}\subseteq BPP^{\oplus P}$ hold at some $3\leq k<\infty$?
Also is $BPP^{BPP^{\oplus P}}\subseteq BPP^{\oplus P}$ known?
Note Sipser gives $BPP\subseteq \Sigma_2P$ and Adleman gives $BPP\subseteq P/poly$ and so I am tempted to say $k=3$ in $1.$ works. I am not sure relat... |
I did exercise problem from Pittsburgh university cs department.
homework.
Question 8 is somewhat exciting. Q8 is solved using greedy algorithm but I have no idea how to prove. Below is Question.
Consider the following problem. The input consists of the lengths $l_1, \cdots, l_n, $ and access probabilities $p_1, \cdo... |
I have a connected and undirected graph without cycles (i.e. a tree), and I am trying to find a single cut vertex that, when removed, disconnects the graph into a set of connected components. The largest of these components should not have size greater than some threshold. So if one such cut vertex exists, I need to fi... |
Foreword : by "typeless programming language", I naively mean "language in which you don't write statements like type x (=) ... to declare(define) x". Maybe there is an internal typing deduced from what is in ... but I suppose that this is not the case, as it is not the case in the example interesting me. (If "typeless... |
I've written an algorithm for integer factorization (specifically RSA-like coprimes - products of two large primes, roughly of the same number of decimal digits) which is not based on QS, GNFS or any similar known one. https://github.com/plktrautman/BlueShift
For any given n=p*q, consider a quadron with 5 parameters: U... |
I am not able to understand below problem, mainly the example. I have tried to ask explanation in their website but not received help yet.
how they are calculating 36 and 43? and why 36+43 = 30$ is written?
Can I get a diagram visualizing this, because I think wood cutter should cost 12$ because only 3*4 area is needed... |
Can we convert an NFA having $n$ states to a regular expression of length $\mathrm{poly}(n)$?
In contrast, it is well known that a regular expression of length $n$ can be easily converted to an $\mathcal{O}(n)$-state NFA.
|
Let's say we have given array $A = \{a_1, a_2, a_3,\dots,a_n\}$ of size $n$, and integer $L$, we want to find biggest integer $K$, such that the array without any subset of size $x, x\leq K$ will have sum greater or equal to $L$.
Example
$A = \{1, 2,3\}, L = 2$, in this case $K = 1$, because any subset of size $1$ will... |
It seems, intuitively, that determining if an program halts when running on a TM should be as difficult as determining if a sentence is provable within a finite set of logical rules. Furthermore, there are as many sentences as there are program and there are as many finite set of logic rules are there are TM (there are... |
Let's imagine a situation in order to fully understand the problem : let's say a lone human is walking back home at a very late time. He needs to find the safest path home. He naturally use the GPS with a start point A and a destination point B. Now the data I have may be GPS locations with an information stating the d... |
A language $L$ is in $SPP$ if there is a $GapP$ function $f$ such that
$x\in L\implies f(x)=1$ and $x\not\in L\implies f(x)=0$.
By $x\not\in L$ I think we mean $x\not\in SPP$ correct?
I would have thought $x\not\in L$ if there is no such $f$. Why is it not defined this way? In this case we have $x:f(x)\not\in\{0,1\}$.... |
I am currently taking a class in complexity theory and I am struggling with this question.
We define a TM with Oracle per. Sipser 6.18 as:
"An oracle for language $B$ is an external device that is capable of reporting whether any string $w$ is a member of $B$. An oracle Turing machine is a modified Turing machine tha... |
Let $L$ be the language$\{\langle G \rangle : G\text{ is a CFG and L(G) accepts at least one odd-length strings}\}$.
Prove that $L$ is decidable or undecidable.
Here is my attempt:
$L$ = On input $\langle G \rangle$, where $\langle G \rangle$ is a CFG:
Construct CFG, such that $L(O)$ contains only odd length strings... |
Consider the following problem:
Input: We are given a set $S$ of $n$ binary vectors. A binary vector is of the form $(b_0, b_1, ... b_n)$, where $b_i \in \{0, 1\}$. Therefore, there are $n$ vectors of size $n$.
Output: For each vector in $S$, we would like to (efficiently) compute a list of binary vectors from $S$ wh... |
I am looking for an efficient algorithm to solve the following problem:
Given $n$ points in 2D Cartesian space $p_1,\dots,p_n \in \mathbb{R}^2$ and an integer $m$, we want to find $s_1,\dots,s_m$ such that $1 \le s_1 < s_2 < \cdots < s_m \le n$ and that maximizes
$$\sum_{i=1}^{m} \|p_{s_i} - p_{s_{i+1}}\|_2,$$
where $\... |
An AVL tree is a BST, and a BST is a complete tree, but AVL tree doesn't necessarily have to be complete. Thus, why do we define AVL tree a BST?
|
http://jgaa.info/accepted/2011/HasheminezhadMcKayReeves2011.15.3.pdf
Hello I stumbled upon this paper. On page $4/20$ the figure shows an infinite sequence of $5-$regular, connected planar graphs. But they do not define it rigorously. The first graph of the sequence is clearly the icosahedron, and I feel that the next... |
For this question, I implemented this:
public void setZeros (int[][] matrix) {
firstScan(matrix);
secondScan(matrix);
}
public void firstScan(int[][] matrix) {
int i, j;
for (i =0; i < matrix.length; i++) {
for (j = 0; j < matrix[0].length; j++)
{if (matrix[i][j] == 0) {markRowsAndColu... |
I'm having problem trying to determine if all square numbers (1, 4, 9, 16, ...) written in binary form (1, 100, 1001, ...) is a regular language.
After some attempts to find a common pattern of those numbers, I found out that for any square number $n^2$, $n^2 mod 4$ either equals to 0 or 1, and so I am able to draw a D... |
It consists of one read only input memory and write only output medium. The computation proper takes place in a working memory of limited size. When stating that a problem can be solved with a certain number of bits, what we mean is that the working memory consists of that many bits. The input and working memories are ... |
Are languages whose sets are empty recursively enumerable or recursive? For example, consider the language $L$ $\subseteq$ {0,1}*:
$L$ = { $w$ | $w$ consists of only 0's} $\cap$ { $w$ | $w$ consists of only 1's }
I believe this language creates an empty set. There are many different ways to design a Turing Machine th... |
Let $$A= (Q,Σ,δ,s,F)$$ be a NFA. Prove the following statement:
$∀q ∈ Q: (∃ w_2 ∈ Σ^* :δ (q, w_2) ∩ F \ne ∅ ⇒ ∃w_1 ∈ Σ^*:w_1w_2 ∈ L(A))$
I figured out that it means that if all the states have a path to the final state, that the word describing their path is a suffix of a word that is accepted from the NEA.
The thing... |
I have an NP-hard problem which I'm not going to tell you, and I suspect it becomes easier on planar graphs. I tried method Baker but it did not work because we have a restriction on vertices that avoid us to solve the problem in part of the graph then calculate the union of the solution in each part. Also, we try bidi... |
Example of start top-left, Coin Collecting problem in grid:
https://www.youtube.com/watch?v=94FEC_uNwVM
Example of start bottom-right, Dungeon Game problem in grid: https://leetcode.com/problems/dungeon-game/description/
I knew the Coin Collecting problem, so I started trying to solve Dungeon Game the same way, startin... |
Write $\bar n$ for the decimal expansion of $n$ (with no leading 0). For a set $S$ of natural numbers, let its set of expansions (in base 10) be $\bar S = \{\bar n \mid n \in S\}$. Is there a nice characterization of the sets $S$ such that $\bar S$ is a regular language?
Obviously adding or removing a finite number of ... |
There are two definitions of NP I found:
1) NP is a set of problems that have poly-size certificates, and with a given input, there is a poly-time certifier that checks the proposed solution.
2) NP is a set of problems that can be solved by non-deterministic algorithm in polynomial time.
I think (1) is a standard def... |
If the regular language $L$ is defined as $\{ w \in \Sigma^* \mid |w| \leq 140 \}$. Why does any DFA for it must have at least 142 states? Why not only 140 states?
|
I got recently confused when I noticed that there exists 2 types of polytime reductions, which lead to 2 different concepts of NP-hardness.
This is well explained in the answer to this question:
Can one show NP-hardness by Turing reductions?
While a Karp reduction is required to show whether a problem is NP-Hard or co-... |
Say I have a simple program that has the pseudocode like this:
min = 1
max = 100
c = 5
random = randomInt(min,max)
while(c != random):
random = randomInt(min,max);
Theoretically, from what I understand, I cannot guarantee this will halt. However, is this true for both PRNGs and say, random integers generated using... |
Let $M=(m_1, m_2)$, $M'= (m_0', m_1')$ be two two-block messages.
In other words, $|m_1|=|m_2|=|m_1'|=|m_2'|=n$.
We say that $M, M'$ collide for key $k$ if
$$E_k(E_k(m_1)⊕m_2) = E_k(E_k(m_1')⊕m_2').$$
How many two-block messages should one sample from $\{0, 1\}^{2n}$
s.t. with probability $≥ 1/2$ two (distinct) sample... |
One used equivalence relation in regular languages is that for a language $L$ over alphabet $\Sigma$, $(x\sim^Ly)\Leftrightarrow (\forall w\in \Sigma^* xw\in L \Leftrightarrow yw\in L)$.
That means, if two words $x,y$ are not in the same class, there exists $w\in \Sigma^*$ such that $xw\in L$ but $yw \notin L$.
It is i... |
I have a good idea of how deletion can be decoded in VT codes using Levenshtein algorithm. However, I don't have any idea how can an insertion be decoded? Can anybody give me a small example using a short VT code? Mostly papers say that a 1-deletion code can handle 1-insertion error as well, but I don't know how?
|
let ${L^*}$ be the Kleene star language which is definded like that :
$${L^*}=\{w_1,w_2, \dots ,w_n\mid n \geq0 \text{ and each $w_i \in L$}\}$$
I have to show of this correct or not !
$$ {L^*} \text{is decidable } \Rightarrow {L} \text{ is decidable} $$
$\textbf{my idea was to use the reduction function }$
le... |
How to solve this problem efficiently?
You are to find all pairs of integers such that their sum is equal to the given integer number N and the second number results from the first one by striking out one of its digits. The first integer always has at least two digits and starts with a non-zero digit.
The second intege... |
If i want to calculate the movements of each moving objects driven by regular algorithm, then how to measure required computing power? Is required computing power proportional to the quantity of the objects? If so, how can i measure required computing power?
|
Consider a directed graph G = (V,E) with non-negative costs on each edge.
With s being a starting vertex. Prove that by adding a constant k to each edge
(s,u) ∈ E such as u ∈ V, the shortest path tree starting from s will remain the same.
In an attempt to solve the above question (with a proof)
I thought that if... |
We define a language $L$:
$\qquad L=\{\langle M,w,k \rangle \mid M(w) \text{ reaches configuration } \alpha q \beta \text{ with } |\alpha \beta| \geq k \}$
with $M$ Turing machines with state set $Q$ and tape alphabet $\Gamma$, $\alpha$ and $\beta \in \Gamma^*$ , and $q \in {Q}$.
A configuration like this : 10q11 or B... |
I am currently going over this paper, and in fact have already tried to implement it:
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4634483/ [1]
Paper looks at the amplitude of the step and the time between the swings. ALthough I seem to understand the general idea, I am slightly confused about one of the formulas, whic... |
Problem:
Let $\varphi = \varphi_1 \land \varphi_2$ be Deterministic Buchi Automata (DBA) expressible LTL formulas.
Let $A$, $A_1$ and $A_2$ be translated DBAs such that ${\cal{L}}(A) = {\cal{L}}(A_1) \cap {\cal{L}}(A_2)$.
What can be said about the relation between the number of states in $A$ and that in the synchrono... |
I'm trying to come up with an algorithm for optimizing cutting a rod. Most of the examples I see online are for a stock of rod of a single length and optimizing the way to cut it up for max price.
I need something where the user enters length cuts they want (e.g. 2 of 1" length, 5 of 6" length, 10 of 8" length) and th... |
I know that the clock speed is determined by the slowest stage within the processor (usually fetch) because one clock cycle will take as much time as the slowest pipeline stage to ensure everything is synchronized.
So as fetching from DRAM is usually the slowest stage (for example during LDR instruction to memory whic... |
The problem I have been given is to find a two-tape ND Turing Machine over {a,b,c} that only accepts odd length strings with a c in the middle position. The problem with this is that the question specifies that it must be done in n+2 transitions.
I can figure out how to do it in 1.5 * n transitions, by iterating over t... |
I want to write a CFG that generates the words over {a,b} with the same number of ocurrences of a's and b's.
I have come up with a couple of possibilties so far. I think they're correct but they're all ambiguous, and I want the grammar to be non-ambiguous, this is one option:
S -> aX | bY | ε
X -> bS
Y -> aS
This is... |
I want to remove the epsilon transition from following grammar:
\begin{eqnarray}
S & \rightarrow & A | B \\
A & \rightarrow & \epsilon \\
B & \rightarrow & aBa \\
B & \rightarrow & b \\
\end{eqnarray}
This is the result of removing $\epsilon$ transition:
\begin{eqnarray}
S & \rightarrow & \epsilon | B \\
B & \rightar... |
Suppose $G$ is a CNF (Chomsky normal form ) grammar which has $v$
variables. ($|V| = v$) If there is a string that $G$ derivatives in
more than $2^v$ steps, prove that $L(G)$ is infinite.
Any ideas how can i prove this?
I know derivation tree in a CNF grammar is binary. So my idea is to calculate maximum number ... |
Just as the title says, I wish to check the position of a point relative to polygon in $\mathbb{R}^2$. My take on this problem is the following:
1) draw a horizontal line to the right of each point and extend it to "infinity".
2) cnt = number of times the line intersects with polygon edges.
3) if(cnt is odd or point i... |
Lets consider the class of "simple" LOOP-Programs.
A LOOP-Program P is inducively defined as:
$P_1: x_i = x_j$ and $P_2:x_i = x_i +1$ are LOOP-Programs. We also define a length property $l(P)$ where $l(P_1) = l(P_2) = 1$
P: $P_1;P_2$ is also LOOP. (sequential execution of statements). The length of these programs is $... |
I came about this problem looking for interesting DP problems. I tried with no luck to find which could be the overlapping sub-problems to explore and solve and tabulate. But it is my belief there are none and this problem can't be solved using DP.
Explanation of the problem rules can be seen here:
A turskish Roulette... |
Define a "non-standard" flow to be a flow where the quantity flowing through an edge may be negative.
Formally, given a directed graph $G$, and two designated and distinct
vertices $s$ and $t$ (such that no edges are leaving $t$, and no edges
are entering $s$), a non-standard flow $f : G_E \to \mathbb{R}$ is a
v... |
You are given a Graph G and an integer k.
The question is: Does G contain a vertex set X of size at most k such that deleting X results in a graph of degree at most 1?
Design an FPT (or a kernelization) algorithm for this problem and argue why it is correct.
Hint: Observe that vertices of higher degree must be "dealt w... |
I'm still confused with the terms Weakly NP-complete and strongly NP-complete.
Many people states that weakly NP-complete problems are the problems with time complexity growing as a polynomial in the magnitude of the input, while strongly NP-complete problems are the problems with time complexity growing as a polynomia... |
At section 8 of the paper On the Synthesis of a Reactive Module, the authors state the following theorem:
Proposition 2 (Non-Emptiness Condition)
Let $A = (Q, \delta, Q_0, \Omega)$ be a tree automaton with
$\Omega = \{(L_i, U_i) | 1 \leq i \leq m\}$ and $|Q|=n$.
Then, $T_\omega(A) \neq \emptyset$ if and only if for so... |
BQP : (bounded-error quantum polynomial time) is the class of decision problems solvable by a quantum computer in polynomial time, with an error probability of at most 1/3 for all instances.
Question : We know that $\mathsf{P}$ and $\mathsf{NP}$ classes are defined on Turing model of computation where as $\mathsf{BQP}$... |
My confusion arises when solving the average case. I thought that it would be: 1/n * (number of elements)
But in the solution, they do 1/n * (sum of all the elements). I know that this all goes down to N when in big-o notation but why are they summing all elements of the array and how did they get to just the sum formu... |
If a CNF contains only Horn and Xor clauses, and does not contain clauses of other types, then can its Satisfiability be determined in polynomial time?
|
My intuition says it would simply be the number of edges leaving s.
I'm assuming it's a valid flow network so sum of capacities leaving s is the same as the sum of capacities entering t, so a max flow exists.
This variation simplifies the running time because for any augmenting path, we can add the same amount of posit... |
According to "Constructible function", Wikipedia:
In complexity theory, a time-constructible function is a function f from natural numbers to natural numbers with the property that f(n) can be constructed from n by a Turing machine in the time of order f(n).
But $\log\left(n\right)$ doesn't map onto natural numbers b... |
I want to show this problem is decidable by describing a TM that answers the question.
I originally thought this was quite simple, and that the answer would just be a TM that outputs "yes" for any valid input of a TM M. My reasoning was that given any TM M, we can just add a new unreachable state to it and the new mach... |
Assuming the edges are undirected, have unique weight, and no negative paths, do these algorithms produce the same Minimum Spanning Trees?
|
I have started study of approximation algorithms and have confusion about the definition of approximation algorithm. I have two textbooks: by Cormen and the second one by Williamson.
Cormen's textbook says
If an algorithm achieves an approximation ratio of $\rho(n)$, we call it a $\rho(n)$-approximation
algorithm.
... |
I have the following example that I have to prove
{a>7 ^ b>=0} n:=a-b {n<a ^ a+b>=0}
Using the Consequence Rule I assumed that the P is true
{true} n=a-b {n<a ^ a+b>=0}
so logically, the Q should be true, but I'm not sure if that'd be enough.
|
The normal Ford-Fulkerson method finds augmenting paths (as long as one exists) while including "back-flows", but if those back-flows are ignored, does there exist a flow network for which algorithm will not terminate? Assume integer capacities for each edge.
Edit: I learned that even if the back-flows are ignored, wit... |
I was just wondering, I think merge sort is more efficient but not sure if that is true. I know it's to do with the complexities but am still struggling to understand.
|
I understand how bubble sort works and why it is O(n^2) conceptually but I would like to do a proof of this for a paper using the master theorem.
As an example: The recurrence form for merge sort is T(n) = 2T(n/2) + O(n) which, using the master theorem, gives us O(n log(n)).
I am unsure of how to do this process with... |
Recently I came across some news that Google and IBM are planning to unveil a 50 qubit quantum computer. I read that in this design, each qubit is not connected to all other qubits rather only to the two nearby qubits(neighours). In layman terms, what difference will this create in terms of the system's computational... |
What are the drawbacks of Normalized Mutual Information (NMI) clustering evaluation method?
For evaluating what clustering algorithms, is the NMI evaluation method suitable?
|
I am looking for an example that shows how to canonically label a graph using brute-force approach. An example with a 3 vertex or 4 vertex simple graph is preferred.
|
We're given $T$ a minimal spanning tree (MST) of a non-directed, connected graph $G=(V,E)$ with non-negative weights for each edge $e \in E$. Let $e^* \in T$ be an edge in $T$ and let $G'=(V,E')$ be the graph which we get after removing $e^*$ ($E'=E\setminus \{e^*\}$). $G'$ is also connected.
I need to propose an al... |
I learned in my data structures class that QuickSort can be optimized by calling the InsertionSort method when the length of the subarray is less than a certain threshold. However, when it comes to the actual time complexity calculation of the optimized version of QuickSort, I'm having trouble finding the result. The p... |
How to prove that for a full (each node that's not a leaf has 2 nodes) binary tree $T$ of $n$ leaves there's a series of frequencies $f_1,f_2,...,f_n$ such that if we use Huffman algorithm on the series we'll get $T$?
First in order to get frequencies from $T$ we can assign the probability of $\frac{1}{2^d}$ to each ... |
Imagine any object oriented PL based around the idea of message sends: some method basically performs something like this:
send(target=someTarget, sender=self, message=someMessage)
Also, most of the PL allow for async message communications, where you can issue multiple messages to multiple targets and then "yield" to... |
Given a language $L$ over the alphabet $\{0,1\}$. Let $L^*= \{ w_1w_2...w_n | n \ge 0, w_1,...,w_n \in L\}$.
Prove:
If $L$ is recursive, then $L^*$ is recursive as well.
If $L^*$ is recursive, then $L$ is recursive as well.
For the first proof I have this idea:
If $L$ is recursive, then a turing machine $M_L$ can dec... |
Exactly as the title says, I'm looking for a DFA for an even number of A, odd number of B, and exactly one C, can anyone help with this?
Thanks
|
Why are programs kept in main memory for execution? As per my understanding, we need a memory management scheme to manage several processes in the main memory. These things can be done in secondary memory as well (I think). Just to improve performance, we need main memory or there is something more to it?
|
Title states the question.
We have as inputs a list of elements, that we can compare (determine which is greatest). No element can be equal.
Key points:
Comparison is not transitive (think rock paper scissors): this can be true: A > B, B > C, C > A (note this is not a valid input since there is no valid answer here, I... |
I'm searching the space of length $n$ strings (a-z lowercase), which I suppose we could represent as a large graph of strings and hamming distances between the strings.
I'm given some pairs of strings and distances $v_i, d_i$ . I need to find a string which has distance $d_i$ from each each string $v_i$ .
Does there ex... |
Given is DFA M:
1.) abb and bbb
2.) baa and ab
3.) a and ε (where ε is the empty word)
4.) abb and baa
If I understood correctly, x and y are equivalent to each other (in terms of Nerode), if you add the same suffix for both such that they can be read by the DFA, e.g. they are in L(M)
Thus 1.) is false because abb t... |
Imagine you have N distinct people and that you have a record of where these people are, exactly M of these records to be exact.
For example
1,50,299
1,2,3,4,5,50,287
1,50,294
So you can see that 'person 1' is at the same place with 'person 50' three times. Here M = 3 obviously since there's only 3 lines. My question... |
I was looking through some papers online on the equivalence of 2-way DFA and 1-way DFA and I couldn't find a simpler explanation on why 2DFAs are no more powerful than ordinary DFA. I wanted to write a simpler explanation of why this is the case so anyone who is new to the topic could understand without much trouble.
I... |
I know there may be no definitive answer to theses question, since they are rather broad and opinion based.
I have a solid CS background and want to continue (post)graduate study research in CS. In particular, I am interested in questions like "What is source of uncomputability in CS/Math?", "The reason behind why DFA... |
At the end of section 12.4 in the Local Search chapter from Kleinberg-Tardos's book "Algorithm Design" we are told that we can bound the running time of a proposed Maximum-Cut approximation algorithm via using "big-improvement-flips". The goal here is to use these flips to then place a bound on the running time of our ... |
I only just recently learned about the P=NP problem in introduction to algorithms class, and I'm still trying to wrap my head around it. I thought of this situation while cleaning my room today and couldn't think of a way to disprove it to myself. Perhaps it
Obviously, the algorithm described in the title would have to... |
I can't count the number of times I've seen questions on StackOverflow related to regular expressions where the problem was due to the programmer not understanding the impact of greedy quantifiers. Most recently, Python regex issue — [\S\s]* vs \d*.
I wonder why regular expression quantifiers were defined to be greedy.... |
Let h(x) be the integer n such that $n \leq \sqrt2 < n+1$ Show that h(x) is primitive recursive.
I know how primitive recursive functions are defined, but showing an integer is primitive recursive is throwing me off. I need some help starting the proof.
|
The notion of state I'm referring to is the one described in this wikipedia page : https://en.m.wikipedia.org/wiki/State_(computer_science)
Which defines it in this way:
"a program is described as stateful if it is designed to remember preceding events or user interactions; [1] the remembered information is c... |
I'm trying to find the best position in a set of points where each point p has a weight w. I need to take into account the distance between each point and the weight of the points, the point with the lowest weight to distance value is the solution. (A more detailed description can be found a bit further down the page.)... |
T(n) = 2T(n-1) + n
Using back Substitution at first step we get
T(n) = 4 T(n-2) + 2(n-1) +n
If i go further one more step then what i am getting is
T(n) = 16 T(n-4) + 8(n-3) +4(n-2) + 2(n-1) +n
|
I need to prove whether the language $ L = \{w \in \{0,1\}^* \mid |w|_0 = |w|_1 \}$ can be written as a regular grammar. Obviously it can, but how do I prove it?
|
Consider the following streaming ``algorithms'':
When an element $x$ arrives, flip a fair coin until it shows ``heads''.
Fix a random hash function $h:U\to\{0,1\}^\infty$ (i.e., it maps elements into infinite bit strings). When an element $x$ arrives, do $LZ(h(x))$ operations, where $LZ$ is the number of leading zeros... |
Bin packing problem is a problem, where one has to find the minimum number of bins of size $v$ required to store $n$ objects of sizes $s_1, \ldots, s_n$. Object sizes are never greater than $v$.
For example, if $v = 10$ and the objects sizes are $2, 5, 4, 7, 1, 3, 8$, we can store objects with 3 bins: [8, 2], [7, 3], [... |
I know $USELESS_{TM}$ is undecidable, but am having trouble showing that it is recursively enumerable. I wanted to reduce $USELESS_{TM}$ to the halting problem, which would show that $USELESS_{TM}$ is recursively enumerable but don't see a way to go about doing this. (I think I would need to check every possible input ... |
My instinctual response is that it is possible, but I can't see how to simulate the oracle tape on a 1-d CA.
If not, are they able to be simulated on n-dimensional CA? My thought is that the oracle tape could be simulated on another row in, say, a 2+1-dimensional cellular automaton.
|
Given a language $L=\{ 0^m1^n | m \neq n \}$ over $\Sigma = \{ 0,1 \}$, how would one go about characterizing the equivalence classes of this language?
I know there isn't a formal algorithm for that, but still, can some steps always be taken?
|
I'm working on a project that needs an advertisement targeting algorithm. I don't know much about the space, so I'm here to ask how to get started.
The interesting thing about this problem is that I have no access to ad performance metrics. So the targeting algorithm will have to be rule based, not an ML algorithm th... |
This is from CLRS problem 24.3-5:
Professor Gaedel has written a program that he claims implements
Dijkstra’s algorithm. The program produces $v.d$ and $v.\pi$ for each vertex
$v \in V$ . Give an $\mathrm{O}(V+E)$ time algorithm to check the output of the
professor’s program. It should determine whether the $d$ ... |
It is well-known that the problem of deciding if a graph contains a clique of size $k$ is W[1]-hard with respect to parameter $k$.
Is it also known to W[1]-hard (or perhaps FPT) in parameter $n - k$, where $n$ is the number of vertices of the graph?
|
Let's say that I have one task to perform $n$, $n<250000$ times and it takes $p$, $p < 700000$ time to complete it once.
I have list of time constraints ${t_1, t_2, ..., t_n}$ where $t_1\le t_2\le \cdots\le t_n\le 10^9$.
This list says that the $i$-th execution of task cannot be ended earlier than $t_i$.
I want to mini... |
I have directed Graph G(V,E) with weight function w. so that weight of each (u,v) is a positive value.
I need to find the most lightweight circle in the graph that vertex k' is part of it.
I've also given an algorithm i can use which can find the most lightweight path for a graph with positives weights ( i can use it o... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.