instruction stringlengths 35 29.1k |
|---|
I searched the exchange and couldn't seem to find an answer to this.
I am trying to find an algorithm that, given a directed acyclic graph (DAG) $G = (N,E)$ with a single root node $r\in N$, finds all connected subgraphs $G_i\subseteq G$ that contain r.
What I've attempted so far
Consider the following DAG,
To start... |
Would an optimum combination of weights for a given topology necessarily be the the optimum for a different topology ?
|
I want to compute the average number of collisions before sucessfully adding an item into a hash table. Let $m$ be the size of a hash table $H$.
I was thinking that since it is a linear probing and we do not know where the free slots in the hash table are, the probability that first slot is free is $(m-n)/m$ where $n$ ... |
I am aware of three approaches to prevent over-fitting of data when trying to model it on a neural net.
The first two approaches I know suggest to train on more data and employ bootstrap aggregating. The third approach is to use a model that has the right capacity, one that has enough to fit the true regularities but n... |
As programmers, we are always trying to find the most efficient space and time complexity solutions to algorithms.
Is it forseeable in the future that we have languages or techniques such as AI/machine learning to automatically find such optimum solutions to any generic algorithm?
|
A computer has a 32K main memory and a 4K fully associative cache memory. The block size is 8 words. The access time for main memory is 10 times that of main memory.
a. What is the size of tag field
b. If direct mapping scheme was used instead what will be the size of the tag field?
|
I have seen many solutions to critical section problems in process synchronization chapter . Many of them first acquire resources , execute critical section and leave . My Question is a process exiting from the critical section should always call $V(S)$ (or release/signal/ up ) instruction ? Can any process exit from c... |
The answers to this question on Crypto Stack Exchange basically says that, to measure the complexity of the logarithm problem, we have to take the length of the number representing the size of the group into account. It seems arbitrary, why don't we chose the size of the group as the argument? Is there a criterion to k... |
In many Digital functions we come across don't care conditions where we use don't cares to minimize functions.
What is the significance of these don't cares in real world scenario where we actually implement the functions using logic gates?
|
I am trying to find the regular expression of this automata using the Arden's Lemma:
Let $L_{i}$ be the language accepted from the state $i$, this is what I got:
$L_{1} = 1^{*}0L_{2}$
$L_{2} = 1L_{1} + 0L_{3}$
$L_{3} = \epsilon + 0^{*}1L_{2}$
As the first state is the initial one, I have to solve $L_{1}$. As $L_{1}$... |
Is there a complete problem for $P/poly$?
Decision version of permanent more or less acts as a complete problem for $PP$ while its weaker sibling has no known complete language. Why? I saw wiki reason but it is not clear to me. In https://en.wikipedia.org/wiki/PP_(complexity)#Complete_problems_and_other_properties it i... |
I'm looking for a solutions or book references to a given variation of a job scheduling problem:
Given $n$ machines (let's denote it by $m_1, m_2, \ldots, m_n$) and $r$ tasks ($t_1, t_2, \ldots, t_r$). Each task $t$ can be described as a tuple $\left( (a_1, b_1), (a_2, b_2), \ldots, (a_k, b_k) \right)$, where $a_i$ is ... |
My idea of analogue computers had been that they were the discrete version of digital computers, with fuzzy logic operations returning values in the interval [0, 1] instead of Boolean operations.
However looking at schematics, they seem to be built for directly computing differential equations.
I'm struggling to connec... |
I have seen in some text books that they have started talking about a tree and then they use the terms such as vertices and edges and treat is as a graph.
What makes a graph a graph and what makes a tree a tree?
I am getting the impression that a tree is a subset of a graph but what are these properties that make a gra... |
Suppose you have three states in an DFA $q_{1}$, $q_{2}$ and $q_{3}$, all non-accepting. Suppose $a$ and $b$ are two symbols, such that:
$\delta(q_{1},a)=q_{2}\\ \delta(q_{2},a)=q_{1}$
and
$\delta(q_{1},b)=q_{3}\\ \delta(q_{2},b)=q_{3}$
Are the states $q_{1}$ and $q_{2}$ considered equivalent?
|
What is MSB and LSB in significant of a floating point number? If I have a significant for example 0011010000 (half-precision) but 1. bit is implicit what is MSB: 0 or 1? In this case LSB is 0, because it is on the end of significant?
|
According to answers here Are there subexponential-time algorithms for NP-complete problems? $\mathsf{NP}$ complete problems can be in $DTIME[2^{n^{1/\alpha}}]$ for $\alpha>1$.
Now supposing $DTIME[2^{n^{1/\alpha}}]\subseteq\mathsf{P/Poly}$ holds for every $\alpha>1$ then does it mean $\mathsf{NP}\subseteq\mathsf{P/Pol... |
We all know about the djikstra's algorithm for computing single source shortest path and the complexity for the same as O(m log n)
( m being the number of edges and n the number of vertices ), this complexity results from using the heap as a data structure for the algorithm
However I recently came across a statement w... |
Suppose $\Sigma = \{ a,b \}$ and the regular expression $(a^*b+dc)^*(b^*d + ad)^*$. Is it equal to $\varnothing$?
So I have a regular expression like this: $(a^*b+dc)^*$. As only $(a,b) \in \Sigma$, I see that:
$dc=\varnothing$
So $(a^*b+dc)^*=(a^*b)^*$.
Then:
$(b^*d + ad)^* = (\varnothing + \varnothing)^*=(\varnoth... |
Lets consider two node-labeled rooted trees Q and D.
According to wikipedia definition ( https://en.wikipedia.org/wiki/Tree_homomorphism ) a mapping m from the nodes of Q to the nodes of D is a tree homomorphism iff :
m maps the root of Q to the root of D
if node c is a child node of p in Q then m(c) is a child of m(p... |
I faced this Boolean expression:
$C'(A'B+A)+C(A'+AB')$
It was solved as follows:
$C'(A'B+A)+C(A'+AB')$
$=C'(A+B)+C(A'+B') $ ...by applying absorption laws $(I)$
$=C'A+C'B+CA'+CB'$
$=(C\oplus A)+(C\oplus B)$
However somehow it did not clicked to me to apply absorption laws. So I did following:
$C'(A'B+A)+C(A'+AB... |
So I'm working on a problem at work related to the matching of authors of millions of documents. I currently have minhash sets for each document's syntax (sets of 10 numbers with 8-10 digits each), however I need to figure out the most efficient way to partition the documents by their minhash sets so that I can simply ... |
Given an undirected graph $G$, where nodes represent towns and edges represent roads, and given a positive integer $k$, is there a way to build $k$ McDonald's at $k$ different towns so that every town either has its own McDonald's, or is connected by a (direct) road to a town that does have a McDonald's?
I believe th... |
I'm reading Product Quantization for Nearest Neighbor Search. Quoting page 4:
The strength of a product quantizer is to produce a large set of
centroids from several small sets of centroids: those associated with
the subquantizers
Can someone please try to explain why this happens?
My interpretation so far is th... |
the language is: L={{0,1}*|strings that contain the same number of 1's and 0's , plus there can't be three (or more) aces or zeros one after another}
for example the string cannot be: 111001 because the subword 111 contains three aces one after another (plus the number of aces is bigger than that of the zeros)
some of ... |
If a type system can assign a type to λ x . x x, or to the non-terminating (λx . x x) (λ x . x x), then is that system inconsistent as a consequence? Is every type under that system inhabited? Can you prove false?
|
I was given problem 6.7 out of the book "Networks: An Introduction" as a question. The problem is defined as follows:
Consider the set of all paths from node $s$ to node $t$ on an undirected network with adjacency matrix A. Let us give each path a weight equal to $\alpha^r$, where $r$ is the length of the path.
a) Sho... |
Recall that $G$ has a clique of size $k$ if it has a complete sub graph consisting of $k$ vertices. Define CLIQUE as the decision problem
$$\{ \langle G, c \rangle \mid G \text{ has a clique of size } c\}$$
Define the problem $\sqrt{n}$-CLIQUE as follows:
$$\{\langle G \rangle \mid G \text{ has a clique of at least siz... |
I have the following binary tree, which I'm trying to convert into the target binary tree (second tree in the post) using minimum number of tree rotations. The theoretical minimum number of rotations for this tree is 5, however, the smallest value I can figure out is 6 rotations, I have copied the rotations as well, wh... |
So here, I am not sure what the while statement means. In the lecture note there is no definition for T or N or u or v. My guess is T is the minimum spinning tree, but is N the node? Why condition T to be smaller than N - 1?
And how about the case of a cycle? shouldn't we take that into consideration as well?
I unde... |
I'm a bit confused about stopping at Kth iteration on the Bellman-Ford algorithm to find the shortest path of at most length k from s to t.
Let me show you a graph and explain you what I understand:
At first iteration, I will have:
Shortest path to get to A is S->A (cost 1)
Shortest path to get to B is S->B (cost 4)
... |
This is our alphabet: $\{0,1,2\}$
And lets say I have two regular expressions:
Regular expression 1. $(1|22|0)^* (2|0)^*$
Regular expression 2. $(0|1)^* (1|20|1)^*$
How can I give three words each over the alphabet such that they are:
in both languages
in the first language but not in the second language
not in the fi... |
Suppose $NP\subseteq DTIME[n^{f(n)}]$ where $f(n)$ is any function satisfying $\omega(1)$ then is it true $P=NP$ holds?
Ladner's theorem states infinite time hierarchy between $P$ and $NP$. That is there are $NP$ problems in $DTIME[n^{g(n)}]$ for any $g(n)$ such that $n^c\leq n^{g(n)}\leq 2^{n^{1/c}}$ at some fixed ... |
I have the following problem to solve:
Given a set of buckets $B=\{b_0,\dots b_n\}$ of known size, a constant $k$ < |B| and a set of symbols $S=\{s_0,\dots, s_?\}$ with unknown size.
Place a total of $k$ instances of each symbol into some of the buckets of B, whereas there must not be two symbols of the same kind with... |
If accepted by dpda and npda,then it is regular. Is it correct?.I had confusion that some where I studied that a regular language is exactly should accepted by finite automata.....
|
The problem is designing context-free grammars generating the following languages.
The set of strings over the alphabet Σ = {a, b} with twice as many a’s as b’s.
I found a solution but I don't know how to get this.
S → SS | aaSb | bSaa | aSbSa | $\epsilon$
|
It is known that finding chromatic number $\chi(G)$ and clique number $\omega(G)$ are both NP-complete problems.
Is the problem
Given graph $G$, is $\omega(G)=\chi(G)$?
NP-complete as well?
Side question: is there a name for such graphs?
|
In the slides given by my teacher, the third automaton is the product of the first two:
I tried to do the product myself by doing the transition table of both automata at the same time. I got stuck when I realised that the second automaton has no transition from state $2$ with $a$ as input symbol, thus the automaton s... |
It seems to me that in order to construct the union and the product of two DFA we use basically the same method.
The difference is that when we make the accepting states for the resulting DFA. Suppose $A_{1}$ an DFA with $F_{1}$ as an accepting state, and $A_{2}$ an DFA with $F_{2}$ as an accepting state. In the case... |
I am trying to prove that the problem of having a person at the minimum x number of intersections to be able to see each street is NP-Complete. I think that the street problem is very similar to the Vertex Set problem, and to prove it is NP-Complete I could some form of reduction like 3-SAT to Vertex Set but with my pr... |
We designed in the lecture of Distributed algorithm an algorithm to emulate a FIFO network as far as an asynchronous network isn't unavoidably FIFO.
Yet I have some difficultes to understand the condition of sending messages. Here is the algorithm:
Facteur_i
Begin
While(True)
Wait (buffer_i.test(T,∀k, conn... |
I remember seeing a Computer Science jargon which means multiple computers connected together; a network. It ends in the word "complex" and the first word (I cannot remember this but I shall guess to the best of my memory) is taken from some science-fiction franchise or from mythology. It could also be a proper noun us... |
I was wondering if a computational problem exists with the following properties:
It should be solvable only having $K$ bytes of memory, or solvable with $K' < K$ bytes of memory only in exponential time on $K - K'$ (or such an high degree polynomial in $K - K'$ that for any practical purpose the computation is unfeasi... |
I am dealing with the Shortest path tree problem in the specific synchronous environment.
In the following algorithm, initiator begin the execution calling primitives Construct. This primitive offers every neighbors but its father to be linked to the tree by a construction message cons.
Construct()
Begin
F... |
Suppose that $G = (V,E)$ is a 3-regular graph on $n$ vertices and $m$ edges. Below I propose a randomized algorithm for obtaining an independent set for $G$.
Step $1$: Delete each vertex (independently) with $\frac{2}{3}$ probability.
Step $2$: For each remaining edge, delete one of its endvertices.
I want to upper b... |
This is a fairly common problem:
Given coins of integer denominations $v_1 < v_2< ... < v_n$, make change for an amount A using as few coins as possible.
Given an input of powers of $p$,
$V = [1, 3, 9, 27]$
How would a dynamic programming vs greedy approach differ in this algorithm? I don't have a good general idea... |
Haskell is said to be a pure language because the language features are directly translatable into lambda calculus.
My question is: for languages considered to be non-pure functional languages (e.g. Scala, OCaml), which aspects of those languages are not translatable into lambda calculus?
|
We are given a simple, undirected, weighted, incomplete graph $G=(V,E)$, where $V$ is the set of vertices, and $E$ is the set of edges. In addition, a collection of sets $S$ is given, which fully partitions $E$.
For any two vertices in $V$, I need to find the shortest path between them.
The additional caveat is that no... |
I have a small question regarding the ECLOSURE of a certain state in an ε-NFA.
If we have a transition that has both a and ε transitions, is the ECLOSURE affected?
Also is there any rule that in ECLOSURE we should include the states that are accessible only from transitions containing ε?
|
This paper describes a computable normal number. One property of normal numbers is that, written in binary, the $i^{th}$ bit is equally likely to be 0 or 1 (in the sense that as $n$ gets large, the number of 1-bits and 0-bits before the $n^{th}$ bit are about the same). Doesn't this mean that the algorithm that compute... |
Suppose I just invented merge sort, but due to my limited ability was only able to prove that the running time is $O(n^2)$. However, I suspect that the running time is actually better (in reality it's $O(n \log n)$).
Technically in my paper I should say “runtime $=O(n^2)$”, but it’s somewhat misleading because people t... |
A bipartite graph is planar iff it has no $K_{3, 3}$ or $K_5$ minors.
I am looking for a necessary or/and sufficient conditions to allow planar drawings with no edges "going around" sets of vertices. These are drawings satisfying:
All vertices of one part are drawn on a single vertical line. Vertices of the other part... |
Arden's lemma is applied in cases where we have an equation that looks like this: $$ X_{i}=AX_{i} + B, $$ with the condition that $\epsilon \notin A$.
But if I have such situation: $$X_{i}=AX_{i},$$ so there's no B, or simply talking we have $B= \varnothing $, thus by the Lemma, we have $$X_{i}=A^{*}\cdot\varnothing$$ ... |
I posted this on MathUnderflow but got no answers, so thought I'd try it here,
I am reading Rabin and Fischer's old paper [will post a link when possible] where among other things, the doubly exponential complexity of Presburger arithmetics is proven.
The proof relies on the existence of a formula $I_{n}(x)$ informally... |
Lossless Data compression (source coding) algorithms heavily rely on repetitive pattern (redundancy).
Is there a Lossless Data compression method/algorithm that is independent of repetitive pattern (redundancy)?
Note:
Most lossless compression programs do two things in sequence: the first step generates a statistical... |
I'm designing puzzles by running a MAX-CSP solver, and it works nicely in practice. For concreteness, my problems have the following form (in a pseudo-modeling language):
# set up vars & their domains
x_1 {1}
x_2 {0,1}
x_3 {0}
x_4 {0,1}
# constraints
(x_1 != x_2)
(x_2 = x_3)
(x_3 = x_4)
(x_1 != x_4)
(x_2 = x_4)
The ob... |
I'm currently working through some regular expression questions and I've got a solution for one of the problems that I'm not certain is correct.
The question has this preface.
We only consider languages over the alphabet $\{0, 1, 2\}$.
We also view words over this alphabet as ternary numbers. For the language below g... |
Here I have created 2 classes , $A$ is the super class of $B$ , i.e , $B$ inherits the features of class $A$.
Now I don't know exactly what statement (1) does but I am speculating as follows ,kindly correct me if I am wrong ,
An object of $B$ is created whose address has been assigned to the variable $ob$ of class $A$... |
Say, I have an image of bit depth 1 (i.e. binary matrix) and I cropped the image to form a smaller matrix. From the cropped matrix (of a reasonable size). I need to know the starting coordinates from where the matrix was cropped from.
I encoded some lines at regular intervals. The position of the lines follow the equa... |
Consider the language of even-length palindromes $L = \{ WW^R \mid W \in \{0,1\}^* \}$. This language is surely context free and I need an NPDA to recognize it.
But, what if we replace the stack with a queue which supports insert and delete operations? Can a queue automaton accept $L$?
|
I wonder if you have an idea over the time complexity of the following problem, or a problem similar to this one (generally a selection problem)
[Assuming operations on integers take O(1) time]
We are given a set $N$ of $n$ items, that are subject to general precedence constraints (a partial order $E$ on $N$). The prob... |
The origin problem is here. Now it is deleted.
Suppose I have 3 'available' copies of a, 2 of b, 3 of c, and 4 of d.
I want to know the number of different strings with length $l$ using these characters (but no more than the available copies).
Is there an efficient (i.e. $o(k)$) algorithm for computing the $k$-th smal... |
So far I have learned how to write proofs by induction and it went fine until I got this recursive problem, which I'm not quite sure how to begin and how to prove that with induction.
P(2·a,⌊b/2⌋) : b>1 and b is even number
P(a,b):= P(2·a,⌊b/2⌋)+a : b>1 and b is odd number
a :b=1
to prove i... |
It is known that a Turing machine cannot predict the outcome of another Turing machine. Given a machine $M$ less powerful than any Turing machine (i.e. able to decide less languages, i.e. a subset of langauges, than any Turing machine), does there exist a Turing machine $T$ which can always compute $M$ such that $T(M, ... |
Let's take this algorithm as an example.
$PATH$ = {$G$, s, t | $G$ is a directed graph that has a directed path from s to t }.
Prove that $PATH \in P $.
Ok, I know the basic algorithm is to start from node s, place a mark on it, and then look over the rest of the edges and place a mark from node s to node x if there ex... |
I know that to find an error in signal we have to divide given signal with given polynomial and if 0 remains there is no error. But if I have received signal: 0000 0101 0101 0000 1010 0101 and polynomial 10001000000100001(CRC-CCITT) how do I Xor them:
1010101000010100101 (signal without zeroes)
XOR
10001000000100001
... |
Given two polynomials of degree $n$ and $m$ over $\Bbb F_q[x]$ it takes about $O((n+m)\log ((n+m)))$ operations ring operations over $\Bbb F_q[x]$ to multiply them.
What is the corresponding bit operations?
What is the corresponding ring and bit operation count for remainder operations in $\Bbb F_q[x]$.
|
Minimize
$$\sum_{i=1}^{n}\sum_{j=1}^{m_i}w_{i,j}v_{i,j}$$
subject to
$$\sum_{i=1}^{n}\frac{m_i}{m_i+\sum_{j=1}^{m_i}v_{i,j}} < \theta$$
$$v_{i,j}\in\{0,1\}~\forall i,~j$$
where
$w_{i,j}$ and $m_i$ are positive integers (constants)
$\theta$ is a positive real number (constant)
$v_{i,j}$ are 0-1 variables
is this pro... |
I am given two sets $S, T$ each of $n$ points in $\mathbb{R}^k$, I want to find a bijection $a : S \rightarrow T$, such that $$\sum_{s \in S} d(s, a(s))$$ gets minimized, with $d$ being the Euclidean distance.
I am aware that this transportation problem is a special case of the earth mover distance problem, but since ... |
I want to denote the class of problems solvable by linear space multi-tape Turing machines. I have seem in many places this class being denoted by $SPACE(n)$. But why is the notation $SPACE(O(n))$ not preferred in this case? In particular, I'm writing a project in which I need to distinguish between problems solvable i... |
We need to have a precise definition for what a constraint satisfaction problem (CSP) is to study it formally. Looking at a survey by Libor Barto, titled "The Constraint Satisfaction Problem and Universal Algebra", a definition is given in Definition 2.1. Further, it is claimed this is a "standard formal definition of ... |
Currently I'm reading about the Halting problem. $H(\langle M,w\rangle)$ is a machine which will solve the Halting problem, and then using machine $H$ one creates a new machine $D$ and we run $H$ on input $\langle M, \langle M\rangle\rangle$.
My question is: What is the significance of giving a description of Turing m... |
So I know that scheduling has been covered in other articles, but because my provided values are different and decimals are used, I am having difficulty wrapping my head around it. I have reviewed all of the other posts already but would like clarification on my specific values if possible.
What is the average turnar... |
I want to ask, consider we want to compute the slope of x-direction of the following step
.
The slope for it would be
$m =\frac{0}{m_2 - m_1} =\frac{0}{5 - 2}$ which is 0.
But the derivate for image in x-direction computed with (something like, some symbols aren't existed in my phone so lets just say $\frac{df}{dx}$)
$... |
Is there a context-free language that can be expressed with an unambiguous grammar but can't be expressed with a grammar that would result in linear-time backtracking recursive descent parsing?
The motivation for this question is the fact that backtracking recursive descent parsing has a bad reputation for worst-case e... |
I am studying some lecture notes on the complexity of algorithms.
The notes give a proof that NP is not a proper subset of coNP.
However, they still assert that NP is a subset of coNP (which I agree with).
So, in this case, why does it not follow that NP is equal to coNP?
|
I would like to implement the multi-fragment heuristics algorithm for finding a solution to the traveling salesman problem.
The algorithm is described here as follows:
This seriation method re-organises the $D$ matrix by iteratively placing the smallest distances in matrix $D$ in the $n-1$ cells contiguous to the diag... |
I'm having a difficult time understanding time complexities of algorithm. I know that a polynomial time is of the form O(n^m) where m is a constant. Consider the following case where A is a list of elements:
Foo(A)
for each element a in A:
for each element b in A-a:
Polynomial-Time-Algorithm-Bar(A, a, b)
I... |
can someone provide a proof with induction on why the Russian peasant multiplication work ?
if you don't know what that is , here is the algorithm :
P(2·a,⌊b/2⌋) : b>1 and b is even number
P(a,b):= P(2·a,⌊b/2⌋)+a : b>1 and b is odd number
a :b=1
|
I'm building a chatbot that would respond to text messages.
Let's say that my chatbot works for customers of an internet provider and it can respond to the following things:
Problems:
About payment;
About internet connection.
General requests:
Change user's account e-mail;
Call for technical assistance.
My ques... |
Let $A$ be a regular set. Consider the two sets below.
\begin{align*}
L_1 &= \{ x \mid \exists{n}\geq 0 , \exists{y} \in A : y =x^{n} \}, \\
L_2 &= \{ x \mid \exists{n}\geq 0 , \exists{y} \in A : x =y^{n} \}.
\end{align*}
Which of the following is true?
$L_1$ and $L_2$ are regular
$L_1$ is regular but $L_2$ is not
$L_... |
I am interested in understanding the DCMST problem, explained in this paper (http://www.dcc.ic.uff.br/~celso/artigos/cpdcmst.pdf). I don't think I understand it as I should. Here is how I understand it, we have a undirected connected graph $G=(V,E)$, a cost $c$ for every edge $e(i,j) \in E$ and a value $d$ we want to f... |
I am trying to understand how many states should be there in a Finite Automata which does not accept anything.
I thought it to be containing only one non-final state, the starting state, with all transitions going to itself.
But one of my teachers mentioned that the set of final states cannot be empty. Does that mean... |
I'm just getting started with cs. In school I heard about that modern micro processor are not perfect. So what are the issues? Are does problems related to energy(power draw)/ time /speed(clock speed)? Or is the design faulty?
So if you could design the perfect cpu what would it look like?
|
The pumping lemma states that if we can split a string w (taken from a context-free language L) as uvxyz with conditions |vy|>=1 |vxy|<=p |w|>=p for some p then $uv^ixy^iz$ is in L for any i.
However, some context-free languages include the empty string, which has length 0. How can we possibly split the empty string to... |
Where does the assembler live in the system? I understand that assembly language gets converted to machine code (binary) and that the processor then follows these instructions.
Where does the assembler live? Does it live in some kind of Read Only memory?
|
Are there any types of distributed databases which allows untrusted peers, like Blockchain?
If it exist, can I look its whitepapers and/or implementations?
|
This is the original problem:
And this is 1-in-3-SAT:
I am using the 1-in-3-SAT problem (Pc) to reduce from, in order to prove that the original problem (P) is NP-complete. I am stuck at finding a transformation T to prove that Pc <= P, such that every instance X of Pc is transformed into an instance T(X) of P, and ... |
I was wondering recently what would happen if we'd allow context-free grammars to have an infinite number of rules. Clearly, if we'd allow arbitrary such infinite sets of rules, every language $L$ over some alphabet $\Sigma$ could be described by a CFG $G = (\{S\},\Sigma,R,S)$ with $R = \{S \rightarrow w \mid w \in L ... |
In papers usually Cross-Lingual Information Retrieval (CLIR) and Multi-Lingual Information Retrieval (MLIR) use equivalently or distinctly. I want to know is there any difference between these two terms?
|
I know that with graph coloring we can build a simple schedule with maybe 9 students and 9 lectures (i.e. these notes) and determine the minimum number of meeting times, but is this feasible in a real world scenario? Say I have 30 professors and 200 students, can we determine a minimum number of meeting times with a gr... |
I am in search of a linear-time sorting algorithm that is capable of returning an array B of indices A, sorted on the value of the corresponding element of A.
For example:
Input = [2, 6, 8, 9, 1, 7, 0]
Output = [6, 4, 0, 1, 5, 2, 3]
Things I have tried:
Storing the index and value in one number, using something like ... |
To prove that $L=\{0^m1^n|n \text{ divides } m,\text{ } m,n\gt0\}$ is not a CFG, I applied the pumping lemma. I chose $w=0^{21p}1^{7p}$ for the pumping constant p. By the pumping lemma, $w=xyuvz, |yuv|\leq p, |w|\geq p, |yv|>0, xy^iuv^iz \in L \forall i>0$
Take $i=0$ then consider 3 cases:
Case 1:$yuv$ is only a substr... |
In all the examples of ALOHA I've seen, the Poisson distribution is used. Theoretically, how could the throughput be calculated if a Binomial distribution was used instead?
For example, in the case that the offered load follows a Binomial distribution with probability $p$, I know that the probability of $k$ attempts wi... |
This week I read something about network flow from Algorithm Design. But I am confused about some concepts.
We say, if a graph G contains some nodes with demands, positive or negative, how to define the min cut for these graphs? If we still use the definition for simple graph, the value of max flow is not equal to the... |
I haven't been able to find literature on the efficient solving of the following problem.
Given $n$ random points $x_i \in (0, 1)^2$ the unit square, obtain the flat clusters of points, such that two points are in the same cluster if their pairwise distance $d(x_i, x_j) < r$, where $r < 1$ is a fixed parameter of the p... |
I was wondering how would I go about constructing a Turing machine that accepts $u < v$ with $u$ and $v$ positive binary numbers: for example $10<100$ is accepted but $11<10$ would not be. (We can assume that the leftmost digit is always a $1$). I was thinking that I should start by changing the $1$s to $X$s but that d... |
I'm trying to solve an exercise in which I have to find the strongest post-condition of the two Hoare triples.
\begin{gather*}
(| a=9 |)\ a=2; b=a+1; a=b*b;\ (| ?? |)\\
(| i=-j |)\ i=i+1; j=j-1;\ (| ?? |)
\end{gather*}
For the first one, I found post condition as $a > b$. For the second one, I found $j = |i|$.... |
I'm confused about the intended meaning of the following passage from Bob Harper's Practical Foundations for Programming Languages:
A collection of rules is considered to define the strongest judgment form that is closed under, or respects, those rules.
The author goes on to explain the italicized words.
Is this to b... |
We have a normal knapsack problem but we can choose up to $t_i$ of the $i$-th object. How would you solve this problem with complexity less than $O(V(n + \sigma(t_i)))$ where $n$ is number of objects and $V$ is the total volume?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.