instruction stringlengths 35 29.1k |
|---|
I have came accross this link.
I have an integer linear programming (ILP) problem
$$\max_{(x_1, x_2,\ldots, x_n)}\sum_{i=1}^n x_i\cdot f(x_i),$$
$$\text{subject to } \begin{cases}
..., &(1)\\
L≤x_i≤U,&(2)\\
x_i \in \mathbb{Z}, i \in I,&(3)\\
\end{cases}
$$
here $X=\{x_i \in \mathbb{Z}: L \le x_i \le U, L<0, U>0, i\in... |
I am working on a project that involves recognising emotion from images. There are two parts in the project: One where I will generate features from images using API's and then classify the emotion and the other part is where I will first use a CNN on a dataset and then take some layer of features and then give it to S... |
I'm preparing for an exam, and I ran across the following algorithm:
for(int j = 1 to n) {
k=2
while (k < n) {
sum+= a[k] * b[k]
k+= log(k)
}
}
I'm trying to work on finding the complexity of the algorithm. Here's what I have so far.
The outside loop obviously runs in n steps.
The inside l... |
Problems in FPTAS require time which is (at most) polynomial in problem size. Suppose this last requirement is relaxed. What is the corresponding approximability class and where can one read about it? To be more specific, I am interested in learning about problems that can be approximated in time that scales polynomial... |
The set of regular languages $R$ over an alphabet $\Sigma$ can be defined as the smallest set satisfying these 5 axioms:
Empty language: $\{\} \in R$
Singleton languages: $\forall a \in \Sigma : \{a\} \in R$
Closure under union: $\forall A, B \in R : A \cup B \in R$
Closure under concatenation: $\forall A, B \in R : A... |
Given a language $A = \{a^nb^n : n >= 0\}$, how would one go about characterizing the equivalence classes of this language, in order to apply Myhill-Nerode to show it is not regular? The idea and meaning of "characterizing equivalence classes" is what I am struggling with.
|
I am solving a recurrence using repeated substitution method and I am almost done but it seems to me that I need some additional work to finish correctly. I am including an image of my work because typing would be very time-consuming. I will appreciate your feedback.
I can see that the problem says that $n = 2^k$ so $... |
I am looking over the classic Reader and Writer Problem
Just to give a quick overview:
Many readers can be in CS (as long as no writers are)
Only one writer can be in the CS (with no combination of other readers/writers)
So the solution is:
binary semaphore wrt, mutex = 1;
int No_of_Readers = 0;
Writer Process
wai... |
My question is: what language should the following DFA recognise?
It seems that it should contain an odd number of substrings in the form 11*0. However, I am not sure whether there are any other conditions.
|
I usually use the symbol $\varepsilon$ for empty string (empty word or null string). But I know some people use $\lambda$ instead of $\varepsilon$.
I think $\varepsilon$ is derived from the word "Empty". However I don't know what's the origin of $\lambda$.
In automata theory, there is the epsilon transition of automata... |
I'm learning lambda calculus, however I'm quite confused about the quantifiers in lambda calculus. As far as I know, quantifiers such as "∃" are concepts of first order logic (FOL), which are not needed by lambda calculus. Moreover, I didn't find anything about quantifiers in any tutorials I have read.
However, I find ... |
Given a fully connected graph $G(V,E)$ with associated edge weights and a set of constraints specifying distance $D(V_i, V_j) < M_{ij}$, where $\left\{V_{i..j}\right\} ⊂ V$, how can I go about finding the smallest subset graph $G'(V', E')$ such that none of the constraints are violated?
In other words, find the smalles... |
Assume an evaluation-relation on terms $t \Downarrow v$. If I want to prove correctness of a function $\phi$ w.r.t. evaluation, I have to show that the following implication always holds:
$$\frac{\phi(t) \Downarrow \phi(v)}{t \Downarrow v}$$
Naturally, this is a candidate for structural induction. But on what structure... |
I have a collection of objects, and a feasibility property for sets of objects which is slow to compute. If a set is feasible then so is any subset. For example, it could be whether the set of things will fit into a certain-sized packing crate.
I want to compute all feasible sets (equivalently - all maximal feasible se... |
I have used Rabin Karp Rolling Hash for searching a pattern $P$ in a text $T$. Now I am allowing $k$-mismatches, but not able to do a faster implementation.
I tried modifying RK algorithm by splitting the pattern into few blocks, but that does not improve the speed.
I'm trying to use locality sensitive hashing, but no... |
Low-level languages have for a long time dominated the field of embedded systems due to their rapidity and flexibility. As high level languages are becoming faster and faster, might the situation get reversed soon? Can high-level languages become frequent in embedded systems in a near (or not so near) future? What woul... |
Given a set of data points $X = \{x_1, x_2, \ldots, x_m\}$ where $x_i \in \mathbb{R}^d$ we run K-means on $X$ and obtain the clusters $c_1, c_2, \ldots, c_k$.
Now, if we create a new dataset $Y = \{y_1, y_2, \ldots, y_m\}$ where $y_i = Ax_i + b$ and $y_i \in \mathbb{R}^d$ and run K-means on $Y$ to get clusters $g_1, g_... |
I am working with an algorithm to compute the transpose of a directed graph. Here is a rough overview of the algorithm: For each vertex in the graph, traverse each edge and add an edge from the neighbor to the parent node. The adding of an edge takes constant time, $O(1)$. And I figured, if I am traversing each edge, t... |
Apologies if this isn't the correct forum but I thought it would be too academic for the DBA forum. In my work I'm looking to research some of the benefits of using an RDBMS product over traditional files (text, XMLs JSON what have you).
I'm not planning to cover the advantages over Big Data / NoSQL but that would be a... |
I follow Michael Sipser's book, "Introduction to the Theory of Computation".
To be specific, I am trying to understand the proof about the union of regular languages. However, I have a problem grasping how exactly the transition function is defined.
The book says that for each $(r_1, r_2) \in Q$ and each $a \in\sum$, ... |
When transforming terms from one language to another, the intuitively desired property is the preservation of semantics (as used e.g. here for a CPS transformatation):
$$ s \Downarrow v \implies c(s) \Downarrow c(v) $$
I am a little troubled, however, by reconciling this with the classical terms correctness (or soundne... |
The "top k of n" problem: You have n (not necessarily distinct) elements in an array, and you need to return another array containing the k elements with the highest value.
So, I'm going to need a top-k-of-n implementation for something I'm working on. Never mind exactly which programming language and hardware I'm goin... |
I have a directed acyclic graph (DAG). How I can find the longest path using only vertices with degree at most 2?
Currently, I try this
def all_simple_paths(g):
for path in all_paths(g):
if len(path) > 2:
center_path = path[1:-1]
nodes_degree = g.degree(center_path).values()
if ma... |
I'm trying to find a dynamic solution to the nesting boxes problem.
You're basically given a set of "boxes" which all have different dimensions. The goal is to find the maximum set of boxes that can be nested inside of each other.
So more formally,
Given set B = {b_1, b_2, . . . b_n} where each b_i contains a box with ... |
I have the following recurrence relation which I already solved using repeated substitution.
$T(n) = \begin{Bmatrix}
1 & if & n = 1\\
4T(\frac{n}2) + n & if & n >= 2
\end{Bmatrix} where$ $n=2^k$
The result I get is $T(n) = 2n^2 - n$
Let´s suppose my result is correct. Now, I am asked to prove the correctness of the re... |
I recently finished Operating System Concepts. As a follow-up for self-teaching, I am looking for a book on distributed systems (not theory). I've found Tanenbaum's text but it has rather poor reviews. I'm hoping for something with a similar flavor to Concepts: focusing on the general principals and concepts for buildi... |
If array is sorted we can generally find median in O(1) by returning the element at the middle.
But what if there are duplicates?
E.g [2, 2, 3, 3, 3, 3]
|
LOOP:LW R1,0(R2)
ADDI R1,R1,#1
SW R1,0(R2)
ADDI R2,R2,#4
SUB R4,R3,R2
BNEZ R4, LOOP
If we want to move an instruction into a branch delay slot what will be that instruction and the schedule of the instructions?
In the solution they have brought SW R1,0(R2) into the branch delay slot... |
According to the Wikipedia page on the Push-relabel maximum flow algorithm:
Subcubic $O(|V||E| \log\frac{|V|^2}{|E|})$ time complexity can be achieved using dynamic trees, although in practice it is less efficient.
What if $|E| = |V|^2$? Don't we then have this?
$$O(|V||E| \log\frac{|V|^2}{|V|^2})$$
$$O(|V||E| \log 1... |
If we had some $K_n$ subgraph where $K_n \subseteq G$, must the complete subgraph $K_n$ be an induced subgraph from $G$? In other words, can we create a situation where we remove vertices from a simple graph $G$ to obtain some complete subgraph where the subgraph was not complete when it was a part of $G$?
|
I am having some trouble with turning the following mathematical expressions into as balanced binary trees as possible.
This is what I have done so far, but is there a way to make them even more balanced?
$( − 3)(^2 + − 1)$
$4( − 1)( − 2)( − 3)$
|
I am in trouble how to prove that these two regular expressions are equivalent. I know what are closures and all the basics of automata. But the problem is I don't know the method or way of solving this kind of problem.
Question:
Prove that R.H.S regular expression is same as L.H.S
$$ (a+b)^* a (a+b)^* b (a+b)^* = (a+... |
The following is a motivation for penalized logistic regression in some lecture notes I'm following:
Although the cost-function for logistic regression is lower
bounded by 0 we get issues if the data is linearly separable.
That part I can understand it well because the logistic regression cost-function is tak... |
This is not a home work question.
Is that correct to say in a flow network, if min cut is unique then max flow must also be unique?
Assume we have two max flow in a network. Then for each max flow, we can get a min cut and they are surely different.
|
Is there a "intuitive" way of understanding how many possible decidable problems there are, given some formal language to describe them?
|
We need to find unknown 16-bit integer X. We can ask "how many '1'-bits in number X xor Y" (Y is 16-bit too). What best strategy to find X? Or what minimum number of questions?
For example, if answer for Y=0 is 1, we can do binarysearch-like strategy restoring X in 4 additional operations.
I have found set of 10 number... |
The question goes something like this:
Suppose you are living in a country where coins have values that are powers of p, V = [1, 3, 9, 27]. How do you think the dynamic programming and greedy approaches would compare?
Intuitively I want to answer that DP will be faster because greedy runs the same number of comparisons... |
prove/disprove
If inverse homomorphism of languages is regular then languages is also regular?
Let $h$ be a homomorphism , if $h^{-1}(L)$ is regular then $L$ is also regular?
|
what is the difference between the below functions?
$$\lambda x.\lambda y.f(x, y)$$
$$\lambda y.\lambda x.f(x, y)$$
And it appears that there is a $\texttt{reverse operation}$ in lambda calculus which can reverse the order of the arguments. So does the order actually matter?
I am asking this question because I am readi... |
For all regular languages L, by the Myhill-Nerode classes, all state-minimal DFAs for L are isomorphic. On the other hand, "a regular language may have many non-isomorphic state-minimal nfas". What about Unambiguous Finite Automata? Every DFA is also a UFA, so every regular language has at least one UFA. The na... |
I have a bipartite graph $G = (V, E)$ where $V = S \cup T$ is the division into the two halves. I want to select $n$ elements from $S$ and $nk$ elements from $T$ such that the graph they generate has $n$ connected components, each of size $k+1$ and containing one element of $S$. To be clear, $n$ and $k$ are inputs to t... |
I'm working on an I/O generator program for a distributed file system. The problem I need to solve can be worded as a set of requirements:
Reproducible (i.e. given some initial condition, the algorithm must produce the exact same file system).
Concurrent (or at least concurrency-friendly). Since file system itself is ... |
Input: number of edges and vertices, and array of all edges in graph.
Output: array of edges that construct a matching, so that:
$$\frac{\text{the number of edges in this matching}}{\text{the number of edges in maximum matching}} \geq \frac{1}{2}$$
Algorithm I implemented
Loop:
take a random edge (actually in order ... |
Suppose we have two heuristic functions $h_1$ and $h_2$ which are both consistent, that is,
$$h_i(n) \leq c(n,a,n') + h_i(n')\qquad \ i\in\{1,2\}\,,$$
where $c(n,a,n')$ denotes cost of reaching the successor node $n'$ with action $a$.
Can we conclude that the $h_3:=\max(h_1,h_2)$ is also consistent?
|
Say we have N persons and M items (when a person has a certain item, she usually only has one piece). For example,
person 1 has item A, C, D, and wants item F
person 2 has item B, C, and wants E
person 3 has item E, and wants G
...
You get the idea. So it's basically a supply/demand matching problem, and if we rep... |
I learned about amortized analysis and the potential method, I also
leaned an example of a binary counter which I think I understand well.
In the case of the binary counter I understand the choice of the potential
function - we are paying in advance for a transition from one to zero
that must be made in the future when... |
I was reading something about Eulerian Tour and there is one property claiming that:
An undirected graph can be decomposed into edge-disjoint cycles if and only if all of its vertices have even degree.
Can someone explain what is edge-disjoint cycles?
Wikipedia: Eulerian path
|
I am having trouble understanding the terminology with perceptron learning. Is my current understanding correct? Let's say I have some data that classifies what type of flower a particular flower is. And let's say the factors taken into consideration are petal size, petal coloring, and leaf size. So my current understa... |
I'm trying to understand the time complexity of the following code in terms of n.
Pseudocode for trial division:
I understand that the time complexity of the algorithm is O(sqrt(N)). However, can someone explain how the person in the link below came up with O(e^(n/2)). In other words, what's the mathematical relations... |
$A = \{w \in \{a, b\}^* | $ 10th character from the end of $w$ is $b\}$
Prove if DFA $M$ has $L(M) = A$ then $M$ has at least 1024 states.
So there's only 2 characters possible at any state, aside from the 10th character, which has to be $b$. Any character after that can be a or b, since we know the 10th character fr... |
Let me introduce you to my current project (that obviously yields the problem I face hence I post here). I am writing a so-called "compiler" for a simplistic language. I have already built a VM to run the produced bytecode, the associated Lexer (all this project is an optional assignment). My problem lies... |
i read that First-Order Logic is strong enough to formalise all of Set Theory and thereby virtually all of Mathematics. How would you express in First-Order Logic the theorem:
3SAT is NP-complete?
|
Given a format: say 12-bit floating point with sign bit, 5 - bit biased exponent and 6- bit significant with implied bit, how do i go about determining the range of values which can be represented. I have tried various times and each time i got a different answer. I'm afraid i'm not quite sure how to approach this prob... |
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?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.