instruction stringlengths 35 29.1k |
|---|
Let $L$ be a regular language over $\Sigma=\{a,b,c\}$. Build a finite automaton for $L/\{a\}$.
Because $L$ is regular then a DFA exists for it: $A=(\Sigma, Q, q_0, F, \delta)$.
Let $M$ be a finite automaton, $L(M)=L/\{a\}$.
$M=(\Sigma, Q\times\{0,1\}, (q_0,0), \delta', F\times\{1\})$ with the transition function def... |
The following comment on an other question says that if we have an infinite language L that satisfies the pumping lemma for regular languages then we have a word with n≤|w|≤2n which is in L. (n is the constant in the pumping lemma)
https://cs.stackexchange.com/a/55606/99669
Why is this the case? The lower limit can be ... |
Wikipedia says that in order to prove EXPTIME-hardness of our problem, we need to prove that every EXPTIME problem can be poly-time reduced to our problem. Here is a "counter-example" that bugs me.
Suppose our problem can be solved in time $O(2^k)$, where $k$ is an input number to our problem instance; let it be in bin... |
I'm trying to understand the approach to constructing an grammar which accepts the language
${a^ib^j \mid i>0\ and \hspace{2.5mm}i\leq j \leq(2*i)}$ }
Thanks.
|
Prove that the following algorithm has STOP property. I am not sure if this term is widely know, so the definition of STOP property that I got during classes looks as follows:
STOP property (for all input data satisfying $ \alpha $ the computation halts - the number of steps is finite)
$\alpha: x \in N $
void BB(int ... |
I've more than 10 million strings of length 1-100 characters. This number will be even bigger in the future. I'm interested in clustering this data, but I'm not quite sure what would be effective at this scale.
These are the clustering algorithms I've been looking into:
Affinity propagation:: seems like a good soluti... |
John lives in a city whose streets has the same length. His apartment is located at a specified node H. John need to do his errands where he visits each of k different shop in order. However, each store have more than one location in his city. More particularly, for each 1 ≤ i ≤ k there is a set $S_{i}$ of vertices a... |
Let's say we have the following rule:
p -: X ≠ Y, X = Y
Stating that $\forall x.y. x \neq y \land x = y \implies p$. Now let us suppose that we are searching for a proof of $p$. Such a proof does not exist, of course, but we will search for it.
Our starting goal is p. We replace it with the subgoals X ≠ Y and X = Y. T... |
In the CLRS chapter 3: When $x → 0$, the approximation of $e^x$ by $1+x$ is quite good:
$$e^x = 1 + x + Θ(x^2).$$
How is it to be interpreted, what is the role of asymptotic notation here?
|
How to find minimum cardinality maximal matching?
I tried that pick a edge from highest degree vertex remove other edges from same vertex and so on.
|
Why the single layer perceptron has a linear activation function while the Multi Layer Perceptron has a non-linear activation function ?
What is the potential of the Multi Layer Perceptron respect of the Single Layer perceptron ?
|
When studying about splay trees, I found the following statement:
Suppose we have a splay tree and a sequence of Find operations, where the elements we are searching for are in increasing order. Then the total time necessary to run the sequence is $\mathcal{O}(n)$ ($n$ is the number of nodes in the tree).
I looked ar... |
EDIT: The most general case I need is not a tree but any Directed Acyclic Graph.
I have a directed acyclic graph.
I need to sort it in a list so that in the list every node comes after any node it can walk to in the graph.
So far so good, just use a topological sorting algorithm.
However, I have an additional constrain... |
I have numerous records, composed of words. Each word gets translated into vectors, with a variable number of channels, provided that that word exists in a specific lookup dictionary.
For n number of words in every record, based upon c number of channels that each vector-based representation of the words possesses, a f... |
I have the following task and its solution.
Question
Given the language
$$ A \triangleq\left\{1^{n} 0^{n} \mid n \in \mathbb{N}\right\} \text { with } \Sigma_{A} \triangleq\{1,0\}, $$
give all equivalence classes of the Myhill-Nerode relation.
Solution
$[1^k]_{\equiv A} = \{1^k\}$ for $k \in \mathbb N$.
$[1^\ell0]_... |
Say you are parsing a complicated binary file but there is 1 extra byte inserted somewhere. This could completely mess up the entire parse, but if you just looked ahead one token you would see the whole file is in tact minus that extra byte (or bit, whatever). You could have a record in the binary file like this:
heade... |
Motivation
Recently I was trying to optimize some API calls and reduced the problem to optimization of a cumulative number of identifiers across all the requests. I put some considerable effort into solving the problem but I'm still unsatisfied with my solution.
Problem formulation
You are given a list of unique sets ... |
I'm given $L_\cap=\{\langle M_1\rangle\#\langle M_2\rangle\mid L(M_1)\cap L(M_2)\neq\emptyset\}$ and $L_U=\{\langle M\rangle\#w|M \text{ accepts } w\}$.
How can I reduce the former to the latter: $L_\cap\leq_RL_U$? My idea was to build a machine $M$ simulating $M_1$ and $M_2$ in series. $M$ accepts a word if and only ... |
I have proposed a load balancing algorithm for distributed systems which monitors the load on each device in this system and moves excess load from over-loaded device to less-loaded device. What are best metrics for evaluating the result before and after load balancing?
I studied several papers and found metrics like "... |
Let $L$ be recursively enumerable and $U$ be non-recursively-enumerable. Is it possible to reduce $U$ to $L$ recursively, $U\leq_R L$? Personally, I do not think this is possible. If we can reduce $U$ to $L$ by a Turing machine that always halt and we also have an Turing machine that compute $L$ (may not halt), then we... |
I think that, since graph isomorphism is not known to be $\textbf{NP}$-complete, we can not reduce all problems in $\textbf{NP}$ to it, and therefore the implication does not hold.
Additionally, in the accepted answer to this question it is stated, that a proof that graph isomorphism is not $\textbf{NP}$-complete would... |
I want to find set cover of this problem.
I have sets, each of cardinality 3. I want to find set cover.
This is what I am doing.
Treat each set as an edge, which is incident on each of its element.
I am considering each element as a vertex.
Now I will find minimum edge cover of this (hyper)graph.
Is this the right way ... |
Suppose we have an infinite sequence over the decimal alphabet, call it $w$. For $k\in \{0,1,2,3,4,5,6,7,8,9\}$, let $L_k = \{m\geq 0: \text{$w$ contains a run of $m$ $k$'s}\}$ be a language. Here a run denotes a contiguous block of the sequences. Prove that $L_k$ is a regular language.
Here is my idea. Clearly, if $w$... |
Given a set S = { $x_{1}$, $x_{2}$, . . . , $x_{n}$} where $x_{i} \in Z$ . and a K and it is $Z^{+}$ . The goal is to find k intervals
$I_{1}, I_{2}, . . . , I_{k}$ so that each $x_{i}$ is in one of the
intervals $I_{j}$ and so that the sum of the squared lengths of the
intervals $I_{k}$ is as small as possible. For ... |
Consider the following CFG.
$S \rightarrow \epsilon\ |\ aSbS\ |\ bSaS$
Can we prove formally that an equivalent $LL(1)$ grammar does not exist? I feel that intuitively an equivalent $LL(1)$ grammar doesn't exist, but I'm unable to prove this formally.
|
Given a LTL formula $\phi$ and a transition system $T$ we have to do following steps:
Build a (non deterministic) Büchi automaton for $T$
Build a (non deterministic) Büchi automaton for $\phi$
Compute the intersection of these automatons and check for emptyness
Step 1 can be done in $\mathcal{O}(|T|)$ time and space.... |
Need idea for solving the following pushdown automata:
$\mathcal{L}=\{w\in\sum ^* | \#a(w)=\#b(w),|w|\geqslant 0\} \,\,\,\, \sum=\{a,b\}$
In the beginning I thought to PUSH A for input a, and then to POP A for input b, but it doesn't work well for the word ba for example
|
I am still confused over my professor's explanation on why this problem is not a DFA.
The Problem: Explain why $L = \{p^kq^k \mid k>0\}$ cannot be recognized by a DFA
My professor explained it as that it was because the DFA could not store the $k$ iterations in memory. But I still don't get it. In my mind, you just dra... |
Problem is as following:
We are 8 trumpet players in an orchestra.
There are for example 4 parts so there are always two players on the same part.
Now, there are not always the same two players playing the same part meaning the combination of players that play the same part change from piece to piece.
What is the cheap... |
I am wondering what the time complexity of a for loop that increments the control variable, but also multiplies it inside the loop. For example
for (int k = 0; k < n; k++)
{
stuff
k *= 2;
}
I am thinking it must be something like O(log n), but I know that is not it. Any help would be appreciated.
|
My textbook says that the Dijkstra algorithm's runtime is $O(n) + O(m \log(n)) = O((n+m) \log(n))$. How did they come up with that?
Dijkstra algorithm pseudocode:
1. Dijkstra(V, E, s):
2. Create an empty priority queue
3. for each v ≠ s:
4. d(v) ← ∞
5. d(s) ← 0
6. for each v ∈ V:
7. ... |
Given a dictionary of words and their frequencies (how many times they appear in a universe and given a string(no spaces, punctuation, etc.). What is the best way to segment into individual words? I believe a dynamic programming approach would be best. But I am not sure how to proceed about throwing away unnecessary pr... |
I don't understand why when proving if Halting on all inputs problem si not in RE using the complement of the halting problem, I have to take a turing machine and simulate the machine M(the machine that the halting problem receives as input) on w(the word received as input) for n steps.
Can somebody explain to me who i... |
I have recently learned about artificial neural networks (very interesting) and genetic algorithms (also very interesting). I have read some suggestions concerning how to crossover two parent neural networks to produce a child. For example, randomly selecting weights and biases from either one parent or the other, or s... |
So, if you have an 8-bit computer and it can perform a fetch cycle, meaning it can access its memory, how do you create words the computer understands.
If LDA "load the accumulator" is in the instruction set and its just something we named for humans and the computer understands binary...
How was this idea communicated... |
Let G be a connected, undirected graph containing some vertex s. let's say that BFS and DFS are both run on G starting at s and that the breadth first search and depth
first search trees produced are the same. Show that G is a tree.
Would this be good enough?
In order to show that G is a tree Let ... |
I have a problem that asks me to consider the string abbbaacc. I'm supposed to figure out which of the following lexical specification produces the tokenization ab/bb/a/acc.
The options are:
A.
a(b+c)*
b+
B.
ab
b+
ac*
C.
c*
b+
ab
ac*
D.
b+
ab*
ac*
I just learned ab... |
Given a state $s$, and a value function $v^i$ that determines the expected payoff for the i-th agent in that state, can the two definitions below, one of Nash equilibrium and another of Pareto optimality be compared to one another?
Nash equilibrium:
$$v^i(s, \pi^i_*, \pi^{-i}_*) \ge v^i(s, \pi^i, \pi^{-i}_*)\ \ \ \for... |
We know that minimal edge cover for the normal graph is polynomial time solvable.
Is it also true for hypergraph?
|
I came across this question in a coding interview and couldn't figure out a good solution.
You are given 6 dominoes. A domino has 2 halves each with a number of spots. You are building a 3-level pyramid of dominoes. The bottom level has 3 dominoes, the middle level has 2, and the top has 1.
The arrangement is such that... |
I have the following task (no homework).
Find all equivalence classes of the Myhill-Nerode relation of the language $$ \mathrm{A} \triangleq\{w \in \Sigma^{*} | w\text{ does not end with }01\}\,. $$
Because I have no Idea how I to find does classes -I know the theory, but I can't use it -.
So I build a DFA (what i sh... |
Let $\Sigma = \left\{ 0,\,1,\,2\right\}$. I want to look at the following language: $L=\left\{ xyz \, | \, |x|_0 + |z|_0 = |x|_2 +|z|_2 \wedge y \in \left\{ 1 \right\} ^{*} \right\}$.
I would like to prove or disprove $L$ being context-free
I'm having a very hard time to construct a context-free grammer for $L$, so I ... |
I have a problem like the knapsack problem, except instead of finding the max value, I'm trying to find the closest value to a given value.
Anyone know where to start, have a name for this problem, or can point me to an example?
Thank you!
|
I have an undirected weighted graph.
I want to find the path from A to B which length (sum of the weights) is as close as possible to a specific value "L".
To do that, I have been doing a DFS to check all the possible paths... When L is relatively small, it's ok. But when I ask for a bigger L, it takes too much time to... |
I am reading https://www.irif.fr/~mellies/mpri/mpri-ens/biblio/Selinger-Lambda-Calculus-Notes.pdf and would like to know, what the following statement means:
Lambda terms: M,N ::= x | (M N) | (λx.M).
It is from page 11.
What does for example mean? Is x a type of M and N?
|
So I’m making a program where I generate a computation graph that will be executed on an external device, where the goal is to order the computations in the graph so that the whole computation is done as efficiently as possible. I wonder if any of you know how my problem can be mapped to existing compiler or graph algo... |
There are many different explanations of the Hungarian algorithm. My favorite explanation is the one based on matrices, for example here, since it is very intuitive and easy to carry out in a spreadsheet.
The problem is, I could not understand the argument of why this algorithm, in its matrix formalism, is polynomial i... |
Suppose I have $n$ horizontal segments in the plane (i.e. their end points share the same $y$ value). I want to determine if there exists a line that intersects all such segments.
I think I can assert that (by some argument based on shifting the line), there exists such line iif there exists a line positioned on some e... |
Say you have a bunch of rectangles like these:
They get organized into 3 distinct final shapes like this:
As you can see, there are a few "complete contours", as in here:
The way you figure out the contour of the thing is by visually going around the edge of the final shape, sort of like this:
The question is, give... |
we have a six-sided dice numbered from 1 to 6, and each has the probability $p =\frac{1}{6}$. My task is to create a unbiased method to generate a random number from 1 to 10 using the given dice.
I am aware that the method should maps the following set $$ \{1,\dots 6\}^k\mapsto \{1,\dots, 10\}$$, with $k$ is the num... |
Tarski proved that the first-order theory of real-closed fields is decidable. Is the exact computational complexity known? The best upper bound I could find is EXPSPACE [1], where it is also conjectured to be EXPSPACE-hard.
Update: The complexity without multiplication, i.e., of FO$(\mathbb{R},+,<)$, is complete for t... |
Pushdown automata have an interesting property: non-deterministic ones belong to a different computational class than deterministic ones. This is in contrast to finite state and turing machines, for which adding nondeterminism does not change the computational class.
Is there a class of automata that is not Turing comp... |
For example, a sequence has the defined growth property: if it is a
sequence of positive integers $a_{1}, a_{2}, a_{3}....a_{n}$ and such
that:
$a_{1}=1.$
$a_{n+1} \leq$ Max$_{1\leq i \leq n}$ ($a_{i}+1$)
We can quickly compute the number of such sequences of length n with the power of dynamic programing:
Let s... |
Not having received a satisfactory response to this question in math.SE, I am asking it here:
In this question, it is mentioned that the best known Boolean circuits for the Clique problem are non-monotone circuits that are smaller than monotone circuits for Clique. I’m looking for a reference to these best-known circui... |
I'm wondering if anyone has experience trying to solve a weighted set cover problem over the power set (i.e. all possible subsets) of an $n$-element ground set where the number of sets included in the cover is limited by some constant $k$.
This post indicates that the problem is in $\mathcal{P}$ with running time $\m... |
I am self studying automata theory and I found a problem set from an old class I took a few years ago, but I have no clue how to solve the following problem, any help would be appreciated.
Suppose we have a regular language $L \subseteq \{0,1\}^*$ and the language $ \mathbf{S} = \{uu: u\in \{0,1\}^*\}$ is a subset of $... |
Let $e_1,e_2,\cdots,e_n$ are some events are given by their starting time and ending time.
I have to find an event that conflict with maximum number of other events.
Conflicts means interval overlaps
The idea is as follows: Sort events according to their starting times and then for each event check whether it conflic... |
Given a tree $T$ rooted at $1$. Each node might have more than 2 children. You want to create a tree $S$ where each node have $2$ or less children or a binary tree. For each node $u$ in $T$ which had more than $2$ children. Let $D$ be the number of $u$'s children. You can add $D-2$ node to replace the edge connecting $... |
This is a problem I found in an old exam in my school.
I have to solve this Genetic Algorithm problem:
N students $x_{1},..,x_{N}$ have answered a quiz of 10 questions (True or False questions) and have obtained scors $s_{1},..,s_{N}$ (score can go from 0 to 10).
From these scores we would likw to deduce what are the c... |
Sorry for asking such a dumb question.
I am CS student and I am trying to understand the basic tenets of Logic. I am new to the subject and I am lost understanding Implication.
In formal logic, $(P\rightarrow Q)$, The sentence letter $P$ is premise and $Q$ is conclusion, right?
Now, we know that $(P\rightarrow Q)$ is ... |
I'm trying to allow an empty transition in a PDA for the following language:
Alphabet: $Σ = \{a, b, c\}$
Language: $L = \{ a^ib^j \mid i \neq j \} \cdot \{ c \}^\ast$
Examples of words in $L$:
$\varepsilon$
$aabccc$
$abbccc$
Not in $L$:
$abcc$
$aabbc$
Here is what I came up with:
The diagram above uses JFLAP - w... |
I read that "Memory Mapping Segment"/"memory mapped file" is a segment of the virtual memory of a process, where a file or file-like Ressource is loaded into. It is for high performance file I/O.
I wonder..
(1) Is this normally done automatically by the OS?
(2) What are reasons to do this other than loading shared lib... |
Given the following recursive equation
$T(n)=3T(\dfrac{n}{8})+ Θ(n^{1/3})$
I want to know how to explain the applicability of the Master theorem in a rigorous
way and what means asymtotic limits of complexity exactly?
I remarked the two cases are not satisfied. So I have to check the third case and i saw that
$n^{1/3}... |
I am trying to prove that $L = \{\langle M \rangle \mid L(M) = \{\langle M \rangle \}\}$ is undecidable, where $\langle M \rangle$ is the code of the TM $M$, and $L(M)$ the language recognized by $M$.
I think I can't use Rice's theorem, so I tried to find a reduction. The halting problem for example does not help me i... |
I wonder if there are more things we can do with bits aside from NOT, AND, OR, XOR operations? I got this question from my teacher and I'm not really sure. How about bit shifting ">>"? Could we count this?
Thanks for replying.
|
My understanding is that a production is a 'rule' of a grammar which defines how a symbol sequence can be rewritten into another symbol sequence.
A derivation on the other hand is the process of forming a new symbol sequence by following the rules (productions?) of the grammar.
The Wikipedia-page in my language contra... |
wondering if you can help me with the following problem.
I have one table consisting of items in each person's bag:
name | item1 | item2 | item3
____________________________________
jack | pen | pencil | eraser
____________________________________
jane | phone | pen | camera
________________________... |
On the boolean cube $\mathcal{B}=\{0,1\}^n$, we assign each vertex a value by $p:\mathcal{B}\rightarrow[0,1]$. Let
$$\tilde{p}_i=\sum_{x\in\mathcal{B}}(-1)^{x_i}p(x).$$
What is the value of $\max_p\sum_{i=1}^n|\tilde{p}_i|$?
Since the objective $\sum_{i=1}^n|\tilde{p}_i|$ is convex on $p$, we can safely assume that $p... |
In the CLRS, there's this part, where it's shown that $$\lim_{n\to\infty}\frac{(n^b)}{(a^n)} = 0$$ In the same chapter, it uses the aforementioned equation to prove that any polylogarithm function grows slower than any polynomial one, thus, $$\lim_{n\to\infty}\frac{\log b^n}{ n^a}$$ It does that by substituting lgn for... |
The Church-Turing thesis proves that there is no algorithm (or program) $H$ that says whether a program $P$ written in a language, say $C$, on an input $I$ outputs the sentence Hello World or not. This is his proof, visit Hopcraft and etc. introduction to automata theory languages and computation, chapter 8.
The proof ... |
I have a sequence of points $(x_1, \ldots, x_n)$ and a function $f$ that maps every consecutive subsequence (ie. of the form $(x_i, x_{i+1}, \ldots, x_j)$) to a real number. I want to split this sequence into partitions of consecutive subsequences so that the sum of $f$ on each partition is maximized.
For example, supp... |
Let $T:Σ^*\to Σ^*$ be an operation such that $T(L)$ is regular for all regular languages $L \in Σ^*$.
Is it possible to prove $T^∞(L)$ is regular?
$T^∞(L)=\bigcup_{i=1}^{\infty}{T^{i}\left(L\right)}$
|
I have a question about makespan calculation. I know that makespan formula is like this:
Makespan = Time of completion of last job - Starting time of the first
job
but I can't figure out how we should use it for several machines. I have a load balancing algorithm that helps in processing of several independent jobs... |
I have a question about method that I saw on internet and method that my professor showed me. I have this finite state machine:
q1(a)=q1
q1(b)=q2
q2(a)=q2
q2(b)=q3
qf3(a)=qf3
qf3(b)=qf3
My professor using a method
r(p,q,k+1)=r(p,q,k)|r(p,k+1,k)r(k+1,k+1,k)*r(k+1,q,k)
and he start from (1,3,3). He get r(1,3,3)=a*ba*b... |
Given $n$ arrays. Each has size of $h$. Let $a_{i, j} \in \mathbb{I}$ be the $i$-th element of $j$-th array. You can select at most $k$ numbers from all arrays but if you pick $a_{i, j}$, you have to pick $a_{1, j}, a_{2, j}, \dots, a_{i-1, j}$ as well. Each element can only be picked once. Find maximum sum of elements... |
I saw a question similar to this one, and it was answered but the answer was kind of vague and I'm looking for a little more detail than that. The question I'm referring to is this one.
The answer simply states that there are more page tables, one for each process. And the same thing is said in the book that I'm studyi... |
I am trying to implement a 3-term recurrence relation:
$$
p_{n+1} = ap_n + bp_{n-1}
$$
This can be implemented as
p0 = P0 // starting value p_0
p1 = P1 // starting value p_1
loop n = 2,...,N
pn = a*p1 + b*p0
p0 = p1
p1 = pn
Depending on $(a,b)$ and also the stopping point $N$, this can sometimes over... |
I'm new to the CS stack exchange, so a fond hello to you all!
I joined since I have a question I've been curious about. I have recently been running some experiments in transfer learning - specifically I train a network to recognise a certain image, let's say a cat, and then I transfer the input and hidden layers of th... |
NP COMPLETE problems are hard in the worst case (assuming $P \neq NP$). What that means is that for every polynomial $p$, sufficiently large integer $n$, and algorithm $A$, there is an instance $x$ of size $n$ for which the algorithm takes more than $p(n)$ time. But this is one instance for every (sufficiently large) $... |
This was a question from the 2016 local (selection) contest in ETHZ, You have a high-precision alarm clock with three operations:
1) reset wake-up time to midnight (00:00:00.000000)
2) modify the wake-up time by ± 1 microsecond (wrapping around at midnight).
You know your wake-up time ("hh:mm:ss.yyyyyy") for the next ... |
Simulated annealing and genetic algorithm are examples of evolutionary optimisation algorithms. Both of these methods entail doing a search on a graph of candidate solutions.
Do all other evolutionary algorithms too entail - performing search on a graph?
|
This is a problem from Skiena's excellent book The Algorithm Design Manual:
Give an algorithm for finding an ordered word pair(e.g."New York")
occurring with the greatest frequency in a given webpage. Which data
structure would you use? Optimize both time and space.
We need to look at all the words, so clearly we... |
Finding sum of a geometric progression is simple when we just need to report the sum,
but when some modulo or multiplicative inverse is asked of that sum the task become tedious for me.
I have a geometric progression: $$\frac{1}{n} + \frac{n-1}{n^2} + \frac{(n-1)^2}{n^3} + \dots$$
Now the sum will be something like
$$... |
this is my first post on this exchange.
I am looking for some help with defining a proof that a set of operations I have designed forms a commutative monoid.
(Disclaimer: I am not sure that I have phrased the question properly so I will be very grateful for restructuring it if necessary.)
I think it will be better if ... |
Consider the following statement
In FOL, we can reduce entailment checking to satisfiability checking:
$S \models S' \iff S \land \neg S'$ is satisfiable (This proof
strategy is called refutation).
Is the above statement true? If yes, then I got confusion because of the following steps
$ S \models S' \iff S\impl... |
I'm not sure how to solve apply the master theorem in order to solve this recurrence:
$$ T(n) = 4T(n/3) +O(n\log n),\text{ where } T(1) = 1.$$
The master theorem I have been shown is normally used to solve recurrences of the slightly different form
$$ T(n) = aT(n/b) +O(n^d),\text{ where }T(1) = 1.$$
|
Let's say I have a hash table of 10 buckets where each bucket is of a number of bits. However each bucket doesn't have to have the same number of bits. Is it possible to achieve this? Or does it require padding every entry?
For example:
Index 0 has 12 bits.
Index 6 has 5 bits.
Index 1-5, 7-9 are empty.
Does this imply ... |
John joined a meetup where organize day long fishing trip once a
month. The organizers are vary poor at planning, so will organize
fishing on a random day of the month without any advance notice.
Sadly, John needs to inform his boss in order to get time off from
work at least a day in advance. With this situat... |
The base scenario is this: We're given a weighted, directed graph $G= (V,E)$, and are tasked to find an approximating algorithm which returns a digraph $G' = (V,E')$ (i.e. which only deletes edges) so that $G'$ is acyclic, and so that the sum of the weights of the remaining edges $\sum_{e\in E'} weight(e)$ is as big as... |
I understand the differences between Regular, Context-Free, and Context-Sensitive languages. Designing a Regular Grammar can be easier if you have a DFA. Designing a CFG isn't too hard for the palindromic strings, but not easy per say for other combinations. But when asked to produce a CSG for Context-Sensitive languag... |
In some scientific work describing Discrete Fourier Transform-algorithms, such as the well-known Cooley-Tukey algorithm, I came across the term 'Butterfly operations' and 'Butterfly combinations', which seem to refer to the fact that an algorithm takes elements that are half an array away (where the array itself is a p... |
Does language $L ={\varepsilon}$, where $\varepsilon$ - empty word has suffix/prefix property?
The definition says that language has prefix/suffix property requires that there is no code word in the system that is a prefix (initial segment) of any other code word in the system.
So if we have this finite language with $... |
We are given a set of names and a set of papers with names written on each side of the paper (not necessarily different ones and either side of the paper can be empty). Can we place the sheets on a table such that every name shows up? Show that this problem is NP-complete.
I have difficulty in finding out an NP-complet... |
As far as I can tell, these two directed graphs are reflexive, symmetric and transitive.
|
The Short Story
A famous computer scientist, Tarjan, wrote a book years ago. It contains absolutely bizarre pseudocode. Would someone please explain it?
The Long Story
Tarjan is known for many accomplishments, including the fact that he was the coinventor of splay trees. He published a book, "Data Structures and Networ... |
Given a graph $G$ with weights $w_e$ on the edges, choose a subset $S$ of the ''edges'' such that $S$ doesn't contain any 3-cycles, maximizing $\sum_{e\in S} w_e$.
Is this problem NP-hard? I thought I saw some mention or folk-theorems that it was, but I can't find anything. There is a similar problem which is known to ... |
I have read Chater 17. Balanced Allocations and
Cuckoo Hashing in Mitzenmacher. Upfal. Probability and Computing: Randomization and Probabilistic Techniques in Algorithms and Data Analysis and got stuck with a problem.
We have $m$ elements and $n$ buckets. Each element is hashed into two random buckets (we assume that ... |
There is D-dimensional array A. The number D and the size Sd of every dimension d=1..D is input from keyboard. There is also 1-dimensional array E of size N. It consists of unique integer numbers 0..N-1. N is also input from keyboard.
First we need to fill A with elements of E so that every element is presented at leas... |
I have an exercise:
We are given a finite deterministic automaton. It has 5 states and is
based on the alphabet $\{a, b, c\}$. It can accept $n$ different words, $n <\infty$. What maximum value can $n$ be?
W have 5 states so it should be something like this:
$\varepsilon \ | \ (a|b|c) \ | \ (a|b|c)(a|b|c) \ | \ (a|b|c)... |
I am studying CSP problems in artificial intelligence. I don't understand the MAC-3 algorithm especially line number 10. Could you tell me with step by step?
1. Function AC-3MAC(Q,CV)
1.1 Q ← {(V i ,V cv ) in arcs(G),i>cv} % start with arcs going to cv
cv means current variable
2. Begin
3. consistent := tru... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.