instruction stringlengths 35 29.1k |
|---|
What I mean by a "symbolic regular expression" (if there already is a different name for this I'm not aware of it) is a regular expression that may include exponents that are symbolic arithmetic expressions.
Example 1: $a^k|b^*$ means "either $k$ copies of $a$ or zero or more copies of $b$".
Example 2: $a^{k+1}|a^k$ ... |
Background: Some people consider Software Engineering as a branch of Computer Science, while others consider that they are, or should be, separate. The former stance seems to be well presented in written works. On Wikipedia, Software Engineering is classified as Applied Computer Science, along with, e.g., Artificial In... |
I have these questions from an old exam I'm trying to solve. For each problem, the input is an encoding of some Turing machine $M$.
For an integer $c>1$, and the following three problems:
Is it true that for every input $x$, M does not pass the $|x|+c$ position when running on $x$?
Is it true that for every input $x$... |
I notice that in a few CS research papers, to compare the efficiency of two algorithms, the total number of key comparison in the algorithms is used rather than the real computing times themselves. Why can't we compare which one is better by running both programs and counting the total time needed to run the algorithms... |
How does the computational complexity of the Subset Sum problem depend on the parameter $\alpha(S)$ of the input $(S, t)$,
defined as follows?
Considering $S$ under the divisibility partial order, i.e. $s_1 \prec s_2 \iff s_1 \mid s_2$, define
$\qquad\qquad \displaystyle \alpha(S) = \max \{|V| \mid V\subseteq S, V$ an ... |
The complexity class $\newcommand{\sharpp}{\mathsf{\#P}}\sharpp$ is defined as
$\qquad \displaystyle \sharpp = \{f \mid \exists \text{ polynomial-time NTM } M\ \forall x.\, f(x) = \#\operatorname{accept}_{M}(x)\}$.
It is known that $\sharpp$ is closed under addition, multiplication and binomial coefficient. I was won... |
I'm trying to implement the Pastry Distributed Hash Table, but some things are escaping my understanding. I was hoping someone could clarify.
Disclaimer: I'm not a computer science student. I've taken precisely two computer science courses in my life, and neither dealt with anything remotely complex. I've worked with s... |
For fun I am trying to make a wire-frame viewer for the DCPU-16. I understand how do do everything except how to hide the lines that are hidden in the wire frame. All of the questions here on SO all assume you have access to OpenGL, unfortunately I do not have access to anything like that for the DCPU-16 (or any kind o... |
I'm interested in a discrete max-convolution problem, which is to compute
$$r(c) = \max_{x | x \ge 0, \sum_k x_k = c} \left[ \sum_{k=1} f_k(x_k) \right] $$
for all values $c=0, \ldots, C$, where $x=(x_1, \ldots, x_k)$ is a vector of non-negative integers.
If we assume that $f_k$ are all concave functions i.e., $f(i+1)... |
A pizza commercial claims that you can combine their ingredients to 34 million different combinations. I didn't believe it, so I dusted off my rusty combinatorics skills and tried to figure it out. Here's what I have so far:
From the online ordering site I got the choices
crust (4 types, choose 1)
size (4 types, cho... |
This is a basic question, but I'm thinking that $O(m+n)$ is the same as $O(\max(m,n))$, since the larger term should dominate as we go to infinity? Also, that would be different from $O(\min(m,n))$. Is that right? I keep seeing this notation, especially when discussing graph algorithms. For example, you routinely see: ... |
I am studying for an AI exam and I'm looking for a better way of solving the following problem:
Graph shows a classification problem in the unit square $[0,1]^2$, where Class A
is denoted by the grey area in the figure (not including the points on the dotted lines),
and Class B occurs otherwise.
To solve this pr... |
I'm seeking explanation on how one could prove that two models of computation are equivalent. I have been reading books on the subject except that equivalence proofs are omitted. I have a basic idea about what it means for two models of computation to be equivalent (the automata view: if they accept the same languages)... |
I am looking for references and papers on the following topic.
In general, some programming languages allow dynamic changes to classes. As an example, a new instance variable ‘weight’ can be added to the class Edge (the class of unweighted edges of graphs). But what should happen with existing edge objects?
They can b... |
Below, assume we're working with an infinite-tape Turing machine.
When explaining the notion of time complexity to someone, and why it is measured relative to the input size of an instance, I stumbled across the following claim:
[..] For example, it's natural that you'd need more steps to multiply two integers with 10... |
Is there an algorithm to perform batch processing in the increase-key operation? Let us say, a binary heap (min-heap) is used. In the normal increase-key function, if we perform increase key on one node, then we have to traverse paths from the node towards the children to re balance the heap. If we want to increase the... |
I am looking for answers which provide short overview of models and current state of research for auto-parallelisation of sequential code.
|
Let's say I have a bunch of cards or dominoes with one color on the left side of the
card and another color on the right. (The two colors could be the same.)
Dominoes can't be rotated so the color on each side is fixed. There is no
limit on the number of colors and colors can be repeated on cards.
Dominoes are placed i... |
S --> Ta | b | Sc
T --> Tc | λ
This isn't an LL grammar but I need it to be so I can do a parse table. The problem is that no matter how much I try I never manage to do make it an LL grammar. Can someone please help by making it a LL grammar? It isn't that big and I'm very confused.
|
I have been taking a compiler course of Stanford on coursera. I have a slight misunderstanding on the parsing table of the following grammar:
S -> Sa | b
According to the professor parsing table looks like this:
If the leftmost nonterminal is S and the input is 'a', the production is nothing.
If the leftmost nontermin... |
There is an obvious similarity in workings between Prim's algorithm and Dijkstra's algorithm, however I see no reason for Prim's algorithm to keep track of a node's parent. In Dijkstra's algorithm, the parent of the node needs to be tracked in order to follow the chain back to the original node to determine the dista... |
The requirement of the encoding to be prefix free results in large trees due to the tree having to be complete. Is there a threshold where fixed-length non-encoded storage of data would be more efficient than encoding the data?
|
I need help finding an algorithm which, given a Turing machine description $\langle M \rangle$, decides whether there exists an input $w$ such that in the computation of $M(w)$, the head only moves right and $M$ never stops.
|
I am looking at a modelling tool and are trying to determine all the types of ways that you can model (at a rudimentary level)
I remember seeing a list of ways in which you can connect or categorise information elements. basically the types were as follows:
Lists - constitute a list of information elements
Hierarchie... |
Can an IEEE-754 floating point number < 1 (i.e. generated with a random number generator which generates a number >= 0.0 and < 1.0) ever be multiplied by some integer (in floating point form) to get a number equal to or larger than that integer due to rounding?
i.e.
double r = random() ; // generates a floating point n... |
I need to show that
$\qquad \displaystyle S = \{(10^p)^m \mid p \geq 0, m \geq 0\}$
is not a regular language using pumping lemma.
Can I multiply the product of the powers and express it to: $S = \{ 1^m 0^{pm} \mid \dots \}$ and apply the pumping lemma where I pump 1's then say that the language doesn't accept the new... |
Possible Duplicate:
Is this language Context-Free?
The language is defined by
$$(a+b)^*-\{(a^nb^n)^n\mid n \geq1 \}$$
is Context-Free Language? I believe that the answer is that it is not a CFL's, but I can't prove it by Ogden lemma or pumping lemma.
chazisop, (a+b)* means {a,b}*. That's all strings that you can for... |
I have been studying Spiking Neural Networks online from various papers, mainly Maass (1997). I am not entirely sure I understand what makes SNN's pulse-code in contrast to earlier ANNs which are considered rate-code.
I have background in neuroscience so I understand the terms and ratio, I'm asking regarding the actua... |
A classic application of divide and conquer is to solve the following problem:
Given an array $a[1\dots n]$ of distinct, comparable elements, count the number of inversion pairs in the array: pairs $(i,j)$ such that $a[i] \gt a[j]$ and $i \lt j$.
One approach to this is to do a Merge Sort, but also counting of the numb... |
Where should I look for a good introductory text in algorithm complexity? So far, I have had an Algorithms class, and several language classes, but nothing with a theoretical backbone. I get the whole complexity, but sometimes it's hard for me to differentiate between O(1) and O(n) plus there's the whole theta notation... |
hope it's possible for this question to be answered in an objective manner.
I'm not studying in a liberal arts college so basically I only get to study one subject. Which would be the better preparation for future research (probably grad school) into theoretical CS? The standard undergraduate math course with analysis ... |
Thw Wikipedia article on Pushdown automata doesn't explain what the receiving state is for the generated PDA it just states that there is but one state.
|
What is the difference between programming language and a scripting language?
For example, consider C versus Perl.
Is the only difference that scripting languages require only the interpreter and don't require compile and linking?
|
Over at this question about inversion counting, I found a paper that proves a lower bound on space complexity for all (exact) streaming algorithms. I have claimed that this bound extends to all linear time algorithms. This is a bit bold as in general, a linear time algorithm can jump around at will (random access) whic... |
I have read many documents about convolution in image processing, and most of them say about its formula, some additional parameters. No one explains the intuition and real meaning behind doing convolution on an image. For example, intuition of derivation on the graph is make it more linear for example.
I think a quick... |
After looking at other questions and my textbook, I seem to get some confusion.
I do get that when there is a polynomial algorithm of NPC, there is a polynomial algorithm for a NP problem.
But the statement describing reduction seems obscure to me at least in the beginning of my studies in computational complexity.
... |
I'm reading few proofs which prove a given problem is NP complete. The proof technique has following steps.
Prove that current problem is NP, i.e., given a certificate, prove
that it can be verified in polynomial time.
Take any known NP-complete problem (call "Easy") and reduce all
of it's instances to few instances o... |
I am looking for an algorithm to generate an array of N random numbers, such that the sum of the N numbers is 1, and all numbers lie within 0 and 1. For example, N=3, the random point (x, y, z) should lie within the triangle:
x + y + z = 1
0 < x < 1
0 < y < 1
0 < z < 1
Ideally I want each point within the area to have... |
Let $f : \mathbb{R} \rightarrow \mathbb{R}$ be a continuous positive function, where $f(n)$ is integer for each integer $n$. Prove or disprove whether the following always holds:
$\qquad f(n+1) = \Theta(f(n))$
|
Abstract problem description
The way I see it, unparsing means to create a token stream from an AST, which when parsed again produces an equal AST, i.e. parse(unparse(AST)) = AST should hold.
This is the equal to finding a valid parse tree which would produce the same AST.
The language is described by a context free... |
In Cormen's Algorithms book on NP-completeness they prove various problems are NP-complete by reducing a previously proved NP-complete problem (call $K$) to current problem (call $L$). Each proof involves some clever construction which reduces all instances of $K$ to few instances of $L$. Here is the proof order they f... |
So I have this question to prove a statement:
$O(n)\subset\Theta(n)$...
I don't need to know how to prove it, just that in my mind this makes no sense and I think it should rather be that $\Theta(n)\subset O(n)$.
My understanding is that $O(n)$ is the set of all functions who do no worse than $n$ while $\Theta(n)$ is ... |
If $L$ is an APX-hard language, doesn't the existence of a PTAS for $L$ trivially imply $\mathsf{P} = \mathsf{NP}$?
Since for example metric-TSP is in APX, but it is not approximable within 220/219 of OPT [1] unless $\mathsf{P} = \mathsf{NP}$. Thus if there was a PTAS for $L$ we could reduce metric-TSP using a PTAS red... |
Intuitively, every derivation in a context-free grammar corresponds to a parse-tree and vise versa.
Is this intuition correct? If so how can I formalize and prove such a thing?
|
I'm stuck on the following question:
"Regular languages are precisely those accepted by finite automata. Given this fact, show that if the language $L$ is accepted by some finite automaton, then $L^{R}$ is also accepted by some finite; $L^{R}$ consists of all words of $L$ reversed."
|
For some graphs, DFS and BFS search algorithms process nodes in the exact same order provided that they both start at the same node. Two examples are graphs that are paths and graphs that are star-shaped (trees of depth $1$ with an arbitrary number of children). Is there some way for categorizing graphs that satisfy th... |
I have two questions. Both are about finding any of the 3 largest among $n$ elements.
How to show that $n-3$ comparisons suffice to find any of the $3$ largest among $n$ given numbers $(n \geq 4)$?
How to show that $n-3$ comparisons are necessary to find any of the $3$ largest among $n$ given numbers $(n \geq 6)$?
My... |
Problem : Given a (one dimensional) row containing $2N$ tiles arranged in $2N + 1$ spaces. There are $N$ black tiles (B), $N$ white tiles (W), and a single empty space. The tiles are initially in an arbitrary ordering. Our goal is to arrange the tiles such that all white tiles are positioned to the left of the black o... |
If we suppose that we start with an instance of $k$-SAT, and try converting the problem to an instance of $(k+m)$-SAT, where there are $(k+m)$ literals per clause, can we guarantee a reduction in the total amount of clauses?
I realized after posting that we can't guarantee that the number of clauses can be reduced. Ho... |
We know the halting problem (on Turing Machines) is undecidable for Turing Machines. Is there some research into how well the human mind can deal with this problem, possibly aided by Turing Machines or general purpose computers?
Note: Obviously, in the strictest sense, you can always say no, because there are Turing Ma... |
Updated Algorithm: There was a major flaw in my original presentation of the algorithm which could have impacted the results. I apologize for the same. The correction has been posted underneath.
The original algorithm posted had a major flaw in its working. I tried my best but could not get the desired accuracy in pre... |
I was solving exercises on Lambda calculus. However, my solutions are different from the answers and I cannot see what is wrong.
Find free variables of $(\lambda x.xy)x$.
My workings: $FV((\lambda x.xy)x)=FV(\lambda x.xy) \cup FV(x)=\{y\} \cup \{x\}=\{x,y\}$.
The model answer: $FV((\lambda x.xy)x)=\{x\}$.
Find bound v... |
Given a set $\mathbf{S}$ of sets, I’d like to find a set $M$ such that every set $S$ in $\mathbf{S}$ contains at least one element of $M$. I’d also like $M$ to contain as few elements as possible while still meeting this criterion, although there may exist more than one smallest $M$ with this property (the solution is ... |
I am reading Programming Language Pragmatics by Michael Scott. He says that on a first pass, a compiler will break a program into a series of tokens. He says that it will check for malformed tokens, like 123abc or $@foo (in C).
What is a malformed token? A variable that does not meet the rules of variable-naming? An o... |
I was solving this equation:
$$\text{key}=\left(\sum_{K=0}^n\frac{1}{a^K}\right)\bmod{m}.$$
Given
$$ 1,000,000,000 < a, n, m \; < 5,000,000,000, $$
$$ a, m \text{ are coprime}. $$
I solved it by brute force, but it won't work in the given constrains so I need a faster algorithm or is there is something I can notice to ... |
Let A be reducible to B, i.e., $A \leq B$. Hence, the Turing machine accepting $A$ has access to an oracle for $B$. Let the Turing machine accepting $A$ be $M_{A}$ and the oracle for $B$ be $O_{B}$. The types of reductions:
Turing reduction: $M_{A}$ can make multiple queries to $O_{B}$.
Karp reduction: Also called "po... |
Is there any book or tutorial that teaches us how to efficiently apply the common algorithms (sorting, searching, etc.) on large data (i.e. data that cannot be fully loaded into main memory) and how to efficiently apply those algorithms considering the cost of block transfer from external memory ? For example, almost a... |
Say you have $m$ boolean inputs, and you are given a threshold $n$. You need to construct a boolean circuit that evaluates to true if at least $n$ of the inputs true. You may use AND, OR, NOT, or XOR gates (restricted to fan-in two, with arbitrary fan-out). Asymptotically how small can you make this circuit?
Any reas... |
An optimisation problem requires minimising some function $f(x)$, where $x$ is a
vector of integers. What is the corresponding decision version of the problem?
|
The $\text{NP-Complete}$ class of problems is defined w.r.t Karp Reductions, which are polytime many-one reductions. However, they need not necessarily preserve the number of solutions. A more restrictive type: polytime one-one reductions do indeed preserve the number of solutions.
Suppose $f:\Sigma^{\ast}\to \mathbb{N... |
In Tom Mitchell's book "Machine Learning", Chap.1, a checkers game is used to illustrate how machine learning can be applied solve problems.
An experience propagation rule is described for iterative learning of a hypothesis. Suppose a game has been played and watched by the program, the state of the endgame is labeled ... |
I'm now doing exam revision, and from some past year exam papers, I noticed some questions that ask to write a recursive method with signature like
public void run(int n)
that must have a time complexity of like : $O(n^2), O(n^3), O(n^7), O(n^2!), O(2^n), O(9^n)$.
Can anyone give some idea on how to solve this kind of... |
I am coding a neural network implementation, but a I have problems in the design. I was wondering about how to compare the output with the target, my neural networks has three outputs
groups = {'Iris-virginica':[0,0,1], 'Iris-setosa':[0,1,0], 'Iris-versicolor':[1,0,0]}
I know I must translate each output to 0 and 1.
... |
Please consider the following triple-nested loop:
for (int i = 1; i <= n; ++i)
for (int j = i; j <= n; ++j)
for (int k = j; k <= n; ++k)
// statement
The statement here is executed exactly $n(n+1)(n+2)\over6$ times. Could someone please explain how this formula was obtained? Thank you.
|
In computer vision, scales are important when we carry out a scene analysis. Choosing different scales affect the result of the analysis. For example, if a face is relatively small in the scene, then the details including nose, eyes will be omitted. On the other hand, details on larger faces become relatively more sali... |
Is the following FOL-problem (equality is a logical symbol)
effectively decidable?
Given. A finite equation system $E$ and an equation $s = t$.
Question. Is there a substitution $\sigma$, such that $\sigma(E)
\models \sigma(s = t)$?
Some useful information.
Obviously one can restrict $\sigma$ to be a ground substi... |
I am about to implement a domain specific language for representation of social learning conventions. Part of the implementation is a formal description of a language - its 'calculus', symbols and logical expressions.
My approach would be to describe the language by describing its grammar but there are also concepts su... |
The rules are that you can only build from an existing part, so in the example below, B is the only option for the first move = A.
A mechanical assembly might be represented as follows:
E
|
C
|
A-B
|
D
|
F
Where the valid assembly paths when starting from A are:
A, B, C, E, D, F
A, B, C, D, E, F
A, B, ... |
Is Huffman coding always optimal since it uses Shanon's ideas?
What about text, image, video, ... compression?
Is this subject still active in the field? What classical or modern references should I read?
|
Just thinking of Counter Strike as a canonical example, if you have a coordinate representation of the map and for every player you have a complete history of everything you might need for every moment of time, say every 10 miliseconds or something and you just recorded where the players went around the map, and what t... |
Say we're given $n$ sets and the size of their union is $m$. We would like to construct a small set which contains at least $k$ of the $n$ given sets.
Lets assume that $m$ is less than some polynomial in $n$, i.e.: $m < P(n)$. In this case is there an efficient (polynomial) algorithm for the optimization problem:
Find... |
I got one grammar:
re2: re1 $
re1: expr == expr | expr != expr | expr < expr | expr <= expr | expr >= expr | expr > expr | expr
expr: expr + term | expr - term | term
term: term * factor | term / factor | factor
factor: (expr) | num | id
num: (0|1|2|3|4|5|6|7|8|9)num | ε
id: (a|b|....|z|A|B|....|Z|)id | ε
Here a... |
Possible Duplicate:
How can we assume comparison, addition, … between numbers is $O(1)$
When we calculate the time-complexity of some algorithm we make many simplifications (or assumptions) on our calculation. For instance we say that assume basic arithmetic operations are all constant time and we assume reading/wri... |
$$L=\{a^n \mid \text{\(n\) is even}\}$$
This is regular but fails in the pumping Lemma.
Assuming $m=4$, $w=aaaaaa$, $|w|=6$ (even).
Let $w=xyz$,
$x=a$,
$y=aaa$.
We have $|y|>0$ and $|xy| \le m$.
Let $w_i=xy^iz$.
For $i=2$,
$w_2=xy^2z=aaaaaaaaa$.
$|w_2|=9$ therefore it is not regular.
Where am I going wrong?
|
I need to calculate the output of the sequence generated by this shift register but I cannot find anywhere how to do it. Everywhere the results are just given but there is no explanation how to do compute them. I know the the sequence will repeat every 2^3-1=7 times. Could anyone explain me how to do it. Thank you.
|
New to the world of software verification and synthesis. It was suggested to me that the book "Principles of Model Checking" is a good reference for verification, but I am clueless about synthesis. Could someone refer a good book?
|
I found this problem while I was reading an ACM problem and it is about dynamic programming. The problem says that you have a square matrix $n\times n$ filled with 1's or 0's, like this:
$$\begin{bmatrix} 1 &1 &1 &0\\ 1 &1 &1 &1\\ 0 &0 &1 &0\\ 1 &1 &1 &1 \end{bmatrix}$$
Now you have to find the biggest square matrix ... |
In the book 'Introduction to Algorithms 3/e', I have found the following definition of Binary Search Tree property:
Let $x$ be a node in a binary search tree. If $y$ is a node in the left subtree
of $x$, then $y.key \leq x.key$. If $y$ is a node in the right subtree of $x$, then $y.key \geq x.key$.
My confusion is ... |
Given a connected and directed graph $G=(V,E)$ with positive weights on the edges. for every $t>0$ we define $E(t)$ to be the group of edges with weight lower or equal than $t$. I need to find an efficient algorithm which computes the minimal $t$ such that $G(t)=(V,E(t))$ is connected.
I can sort all the edges with $|... |
I tried to find a simple example for a language that is not parseable with an LL(1) parser. I finally found this language.
$$L=\{\,a^nb^m\mid n,m\in\mathbb N,\>n\ge m\,\}$$
Is my hypothesis true or is this language parseable with an LL(1) parser?
One can use this simple grammar to describe $L$ (of course it is isn't LL... |
Given a directed and strongly connected graph $G=(V,E)$, weight function $w: E \to \mathbb{R}$ and two distinct vertices $u,v \in V$. We know that there aren't negative cycles.
I need to find algorithm, efficient as possible,such that for every value of $k$, $2 \leq k \leq |V|-1$, it will find the lightest weight of a ... |
Although the reduction from vertex cover problem to set cover problem is quite simple, I did not find anywhere the reduction in the opposite direction. From the similarity in the type of problems, I guess this reduction should be simple too. However, despite trying for some time, I could not develop this. So, any ideas... |
I am currently working my way through An Introduction to Analysis of Algorithms to stay sharp with recurrences as well as learn generating function techniques. However my analyses and the books analyses for the first few sample problems on ordinary generating functions differ. I've checked and rechecked [my work as wel... |
what is the complexity of below relation
$ T(n) = 2*T(\sqrt n) + \log n$
and $T(2) = 1$
Is it $\Theta (\log n * \log \log n)$ ?
|
For the branch-and-cut method, it is essential to know many facets of the polytopes generated by the problem. However, it is currently one of the hardest problems to actually calculate all facets of such polytopes as they rapidly grow in size.
For an arbitrary optimization problem, the polytope used by branch-and-cut o... |
Construct an NFA over $\{0, 1\}$ whose language contains only words that do not end with $10$.
This is one of the first problems in the book, so it's supposedly easy. I just can't figure it out. It's easy using a DFA, but I'm not so sure using an NFA. Maybe I'm not understanding a particular concept in the NFA.
|
This is a problem from CLRS 23-2 that I'm trying to solve. The problem assumes that given graph G is very sparse connected. It wants to improve further over Prim's algorithm $O(E + V \lg V)$. The idea is to contract the graph, i.e. collapse two or more nodes into one node. So each reduction will reduce the graph by at ... |
If you have a quick-sort algorithm, and you always select the smallest (or largest) element as your pivot; am I right in assuming that if you provide an already sorted data set, you will always get worst-case performance regardless of whether your 'already sorted' list is in ascending or descending order?
My thinking ... |
How can I build an example of a regular language where the minimal DFA has $2^n$ states and the minimal NFA has $n$ states? Obviously the DFA's state-set should contain all subsets of the the NFA's state-set, but I don't know how to start. Any suggestions to put me on the right track?
|
When converting a DFA to a regular expression using the transitive closure method, what is the significance of state $k$ and what values $k$ takes? If $k$ represents the intermediate states then what are the values for $k$? That is while applying the method, for which value of $k$ should we stop finding the regular exp... |
I have been a computer nerd for many many years. I can program in quite a few languages, and I can even build them. I sat down with a buddy the other day and asked how a computer actually takes electricity and does something with it, and we just couldnt figure it out, and Google wasn't much help either.
I mean, how do... |
Here's a question from a past exam I'm trying to solve:
For an undirected graph $G$ with positive weights $w(e) \geq 0$, I'm trying to find the minimum cut. I don't know other ways of doing that besides using the max-flow min-cut theorem. But the graph is undirected, so how should I direct it? I thought of directing e... |
Suppose that we redefine the residual network to disallow edges into $s$. Argue that the procedure FORD-FULKERSON still correctly computes a maximum flow.
I was thinking that when we augment a path the residual capacity of reverse edge increases and can be used to decrease the flow in that edge (but overall increas... |
Let $L$ a regular language and define the subsequence closure of $L$ as
$\qquad \displaystyle S(L) = \{ w \mid \exists w' \in L.\ w \text{ subsequence of } w'\}$.
The problem I want to solve is to find for such subsequences $w \in S(L)$ which letters can be inserted into them so that the result is also in $S(L)$. Forma... |
This is homework and I'm looking for a push in the right direction. Proofs were never something I was properly taught, so now they're kind of a weak point.
Here's the problem:
The following grammar generates numbers in binary notation ($C$ is the
start symbol):
$\qquad \begin{align}C &\to C 0 \mid A 1 \mid 0 \\
... |
A partition of a set S is a separation of the set into an arbitrary number of non-empty, pairwise disjoint subsets whose union is exactly S. What manner of a data structure should be used to represent a partition of a set if the following methods need to be optimized:
moving an element from one part to another, possib... |
I want to filter efficiently a list of integers for duplicates in a way that only the resulting set needs to be stored.
One way this can be seen:
we have a range of integers $S = \{1, \dots{}, N\}$ with $N$ big (say $2^{40}$)
we have a function $f : S \to S$ with, supposedly, many collisions (the images are uniformly ... |
I am going to attempt to write a random number generator using exisiting randomize algorithms. Can you suggest which algorithm has the biggest sequence that never repeats? I don't care if they are fast or slow.
|
I just started reading "Parsing Techniques, A Practical Guide", Second Edition, by Dick Grune and Ceriel J.H. Jacobs.
On page 12, the authors start describing a set of rules that can be used to generate the set of all enumerations of names of the type "tom, dick and harry": the rules allow single names (e.g. "tom") as... |
In resolution theorem proving, it is normally assumed variables in different clauses are distinct. This is not something that happens automatically; it requires significant extra code and computation to implement. Given that, I'm looking for a test case for it.
The problem is, in all the test cases I've tried so far, i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.