id
int64
1
141k
title
stringlengths
15
150
body
stringlengths
45
28.5k
tags
stringlengths
1
102
label
int64
1
1
text
stringlengths
128
28.6k
source
stringclasses
1 value
64,584
Are there any type constructors which are *not* functors?
<p>So I'm almost done teaching myself category theory. One of the main take-aways for me is that type constructors (higher-kinded types) are endo-functors.</p>&#xA;&#xA;<p>But it this <em>always</em> the case? What's throwing me off is Haskell's <code>Functor</code> typeclass:</p>&#xA;&#xA;<pre><code>class Functor f ::...
type theory category theory haskell
1
Are there any type constructors which are *not* functors? -- (type theory category theory haskell) <p>So I'm almost done teaching myself category theory. One of the main take-aways for me is that type constructors (higher-kinded types) are endo-functors.</p>&#xA;&#xA;<p>But it this <em>always</em> the case? What's thro...
habedi/stack-exchange-dataset
64,589
Height and depth of every node in Path Compression
<p>If we have an union-find(disjoint-set) data structure and we are doing an union by rank and path compression for a <strong><em>find</em></strong> operation, how would the depth and height of every node change after the <strong><em>find</em></strong> operation?</p>&#xA;&#xA;<p>I am trying to find the amortized cost o...
algorithm analysis data structures amortized analysis union find
1
Height and depth of every node in Path Compression -- (algorithm analysis data structures amortized analysis union find) <p>If we have an union-find(disjoint-set) data structure and we are doing an union by rank and path compression for a <strong><em>find</em></strong> operation, how would the depth and height of every...
habedi/stack-exchange-dataset
64,590
Proving $L = \{a^iba^j|i\ge2j\ge0\}$ isn't regular
<p>I need to prove the following language is not regular, I think I need to use the pumping lemma. The trouble I am having is that there is multiple variables and I am not used to that.&#xA;Could someone tell me if the pumping lemma is the correct proof by contradiction of &#xA;$$L = \{a^iba^j|i\ge2j\ge0\}$$</p>&#xA;&#...
formal languages regular languages pumping lemma
1
Proving $L = \{a^iba^j|i\ge2j\ge0\}$ isn't regular -- (formal languages regular languages pumping lemma) <p>I need to prove the following language is not regular, I think I need to use the pumping lemma. The trouble I am having is that there is multiple variables and I am not used to that.&#xA;Could someone tell me if ...
habedi/stack-exchange-dataset
64,594
Possible solutions how to find all points (given by lat, long) that are within a radius from main point
<p>let's say that I have:</p>&#xA;&#xA;<ul>&#xA;<li><strong>M - Main point</strong> - given by coordinates (lat, long)</li>&#xA;<li><strong>C - Collection of points</strong> - also given by coordinates (lat, long)</li>&#xA;<li><strong>R - Radius</strong> - maximum search distance</li>&#xA;</ul>&#xA;&#xA;<p>I'm trying t...
algorithms computational geometry searching
1
Possible solutions how to find all points (given by lat, long) that are within a radius from main point -- (algorithms computational geometry searching) <p>let's say that I have:</p>&#xA;&#xA;<ul>&#xA;<li><strong>M - Main point</strong> - given by coordinates (lat, long)</li>&#xA;<li><strong>C - Collection of points</s...
habedi/stack-exchange-dataset
64,599
Why does Fleury's algorithm have to return to the starting node?
<p>Recently, I am reading the Fleury's Algorithm part of the document [1]. There is a sentence on page 3 of this document: </p>&#xA;&#xA;<blockquote>&#xA; <p>Note that, when the algorithm terminates, we must return to $v_{start}$ because every vertex has an even degree.</p>&#xA;</blockquote>&#xA;&#xA;<p>I don't unders...
algorithms graphs
1
Why does Fleury's algorithm have to return to the starting node? -- (algorithms graphs) <p>Recently, I am reading the Fleury's Algorithm part of the document [1]. There is a sentence on page 3 of this document: </p>&#xA;&#xA;<blockquote>&#xA; <p>Note that, when the algorithm terminates, we must return to $v_{start}$ b...
habedi/stack-exchange-dataset
64,620
Why contraction and weakening rules are the upside down?
<p>On the <a href="http://homepages.inf.ed.ac.uk/wadler/papers/lineartaste/lineartaste-revised.pdf" rel="noreferrer">A taste of linear logic</a> paper, the author claims that:</p>&#xA;&#xA;<blockquote>&#xA; <p>A rule consists of zero or more judgements written above a line, and one&#xA; judgement written below. If al...
logic
1
Why contraction and weakening rules are the upside down? -- (logic) <p>On the <a href="http://homepages.inf.ed.ac.uk/wadler/papers/lineartaste/lineartaste-revised.pdf" rel="noreferrer">A taste of linear logic</a> paper, the author claims that:</p>&#xA;&#xA;<blockquote>&#xA; <p>A rule consists of zero or more judgement...
habedi/stack-exchange-dataset
64,624
Why is this problem listed as "Dynamic Programming"
<p>I found a problem in the dynamic programming section of <a href="https://www.hackerrank.com/challenges/array-splitting" rel="nofollow">hackerrank</a> but its not clear why dynamic programming should be used to solve it. The problem is as follows:</p>&#xA;&#xA;<blockquote>&#xA; <p>Nikita just came up with a new arra...
algorithms asymptotics dynamic programming recursion
1
Why is this problem listed as "Dynamic Programming" -- (algorithms asymptotics dynamic programming recursion) <p>I found a problem in the dynamic programming section of <a href="https://www.hackerrank.com/challenges/array-splitting" rel="nofollow">hackerrank</a> but its not clear why dynamic programming should be used ...
habedi/stack-exchange-dataset
64,641
Complexity of sorting $A+A$
<p>Is there a proof for the <strong>lower bound</strong> of the problem to create a <strong>sorted list of sums</strong> for a given list of integers with length n. </p>&#xA;&#xA;<p>In this [thread][1] people discuss solving this problem by sorting the list of integers first and then creating the sums. However none of ...
time complexity sorting lower bounds
1
Complexity of sorting $A+A$ -- (time complexity sorting lower bounds) <p>Is there a proof for the <strong>lower bound</strong> of the problem to create a <strong>sorted list of sums</strong> for a given list of integers with length n. </p>&#xA;&#xA;<p>In this [thread][1] people discuss solving this problem by sorting t...
habedi/stack-exchange-dataset
64,657
One-time-pad possible solutions
<p>I am having a very difficult time trying to understand what exactly this question is asking.</p>&#xA;&#xA;<blockquote>&#xA; <p>How many valid English plaintexts are there for the ciphertext message CJU using a length-3, one-time pad of cyclic shifts, (i, j, k)?</p>&#xA;</blockquote>&#xA;&#xA;<p>If the encrypted que...
cryptography encryption
1
One-time-pad possible solutions -- (cryptography encryption) <p>I am having a very difficult time trying to understand what exactly this question is asking.</p>&#xA;&#xA;<blockquote>&#xA; <p>How many valid English plaintexts are there for the ciphertext message CJU using a length-3, one-time pad of cyclic shifts, (i, ...
habedi/stack-exchange-dataset
64,664
Why does computer have branch and jump instructions
<p>I could guess why computers have arithmetic operations like add, sub, and mult instructions. It is to compute numbers, but I don't get why branch and jump instructions exist.&#xA;I am asking what theory or purpose for implementing branch and jump instructions is there?&#xA;I've tried to get rid of branch and jump in...
algorithms turing machines computation models
1
Why does computer have branch and jump instructions -- (algorithms turing machines computation models) <p>I could guess why computers have arithmetic operations like add, sub, and mult instructions. It is to compute numbers, but I don't get why branch and jump instructions exist.&#xA;I am asking what theory or purpose ...
habedi/stack-exchange-dataset
64,665
Does CPU without register exist?
<p>Is existence of registers in CPU an obligation, Or we just do it for performance?</p>&#xA;&#xA;<p>Can we theoretically and practically have computer architectures that don't use registers?&#xA;If yes, please name computer architecture and computer models that doesn't have register.</p>&#xA;&#xA;<p>Update: Do stack m...
computer architecture cpu
1
Does CPU without register exist? -- (computer architecture cpu) <p>Is existence of registers in CPU an obligation, Or we just do it for performance?</p>&#xA;&#xA;<p>Can we theoretically and practically have computer architectures that don't use registers?&#xA;If yes, please name computer architecture and computer model...
habedi/stack-exchange-dataset
64,675
Why does the state remain unchanged in the small-step operational semantics of a while loop?
<p>Usually I see that in the structural operational semantics representation for the while loop, the program state don't change:</p>&#xA;&#xA;<p>$(while \&gt; B \&gt; do \&gt;S, \sigma) \rightarrow (if \&gt;B \&gt; then \&gt;S; (while \&gt; B \&gt; do \&gt;S) \&gt; else \&gt; SKIP, \sigma)$</p>&#xA;&#xA;<p>For me, this...
formal languages programming languages formal methods operational semantics
1
Why does the state remain unchanged in the small-step operational semantics of a while loop? -- (formal languages programming languages formal methods operational semantics) <p>Usually I see that in the structural operational semantics representation for the while loop, the program state don't change:</p>&#xA;&#xA;<p>$...
habedi/stack-exchange-dataset
64,679
NP with a parallelism model?
<p>Can we think of NP using a parallelism model instead of using a "checking relation" without loss of generality?</p>&#xA;&#xA;<p>From what I understand from <a href="http://www.claymath.org/sites/default/files/pvsnp.pdf" rel="nofollow noreferrer">the problem statement given by Stephen Cook</a>, </p>&#xA;&#xA;<blockqu...
complexity theory time complexity computation models np parallel computing
1
NP with a parallelism model? -- (complexity theory time complexity computation models np parallel computing) <p>Can we think of NP using a parallelism model instead of using a "checking relation" without loss of generality?</p>&#xA;&#xA;<p>From what I understand from <a href="http://www.claymath.org/sites/default/files...
habedi/stack-exchange-dataset
64,692
Why does counting sort copy the input elements?
<p>When I was reading about counting sort in <em>Introduction to Algorithms</em> for the first time, I stopped reading after the step where they calculate the number of each element in the input array. It's the first thing we do after allocating an auxiliary array. </p>&#xA;&#xA;<p>I was sure the algorithm would look l...
algorithms sorting algorithm design
1
Why does counting sort copy the input elements? -- (algorithms sorting algorithm design) <p>When I was reading about counting sort in <em>Introduction to Algorithms</em> for the first time, I stopped reading after the step where they calculate the number of each element in the input array. It's the first thing we do af...
habedi/stack-exchange-dataset
64,694
Karger's algorithm: why does every vertex have degree at least the number of edges crossing a min cut?
<p>I'm currently watching a video on the analysis of Krager's Algorithm, and I am confused about something.</p>&#xA;&#xA;<p>The analysis goes as follows:</p>&#xA;&#xA;<p>Fix a min cut $(A,B)$.</p>&#xA;&#xA;<p>Let $k$ = # of edges crossing $(A,B)$ , these edges will be called $F$</p>&#xA;&#xA;<p>Let $S_{i}$ be the event...
algorithm analysis randomized algorithms minimum cuts
1
Karger's algorithm: why does every vertex have degree at least the number of edges crossing a min cut? -- (algorithm analysis randomized algorithms minimum cuts) <p>I'm currently watching a video on the analysis of Krager's Algorithm, and I am confused about something.</p>&#xA;&#xA;<p>The analysis goes as follows:</p>&...
habedi/stack-exchange-dataset
64,698
How to rank these functions in increasing order of complexity [Algorithms]?
<p>I have the following functions:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/O7ibI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O7ibI.png" alt="enter image description here"></a></p>&#xA;&#xA;<ol>&#xA;<li><p>What is the correct order of these functions in increasing complexity?</p></li>&#...
algorithms algorithm analysis
1
How to rank these functions in increasing order of complexity [Algorithms]? -- (algorithms algorithm analysis) <p>I have the following functions:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/O7ibI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/O7ibI.png" alt="enter image description here"></a>...
habedi/stack-exchange-dataset
64,699
Are the words "expression" and "term" interchangeable in programming language theory?
<p>When describing the syntax of a given programming language the words "expression" and "term" are often used to seemingly describe the same things. Are these words interchangeable in the context of programming languages?</p>&#xA;
terminology programming languages functional programming
1
Are the words "expression" and "term" interchangeable in programming language theory? -- (terminology programming languages functional programming) <p>When describing the syntax of a given programming language the words "expression" and "term" are often used to seemingly describe the same things. Are these words interc...
habedi/stack-exchange-dataset
64,714
Proof that PDA's with different definitions have same expressive power
<p>Let $P$ be a <strong><em>push down automaton</em></strong> $(Q,\Sigma,\Gamma,\delta,q_s,F)$, &#xA;where </p>&#xA;&#xA;<ul>&#xA;<li>$Q$ is the set of states,</li>&#xA;<li>$\Sigma$ is the input alphabet</li>&#xA;<li>$\Gamma$ is the stack alphabet</li>&#xA;<li>$\delta$ is the transition function with signature $Q\times...
automata proof techniques pushdown automata simulation
1
Proof that PDA's with different definitions have same expressive power -- (automata proof techniques pushdown automata simulation) <p>Let $P$ be a <strong><em>push down automaton</em></strong> $(Q,\Sigma,\Gamma,\delta,q_s,F)$, &#xA;where </p>&#xA;&#xA;<ul>&#xA;<li>$Q$ is the set of states,</li>&#xA;<li>$\Sigma$ is the ...
habedi/stack-exchange-dataset
64,717
Are LR(k) languages and DCFLs equivalent?
<p>In the familiar book of <em>Theory of Computation</em> by <em>M. Sipser</em>, the author proved that for <em>endmarked</em> context-free languages, the set of languages having a LR(k) grammar for a predefined $k \in \mathbb{N}$ (denoted as LR(k) languages) <em>is</em> the set of deterministic context-free languages ...
formal languages context free lr k
1
Are LR(k) languages and DCFLs equivalent? -- (formal languages context free lr k) <p>In the familiar book of <em>Theory of Computation</em> by <em>M. Sipser</em>, the author proved that for <em>endmarked</em> context-free languages, the set of languages having a LR(k) grammar for a predefined $k \in \mathbb{N}$ (denote...
habedi/stack-exchange-dataset
64,727
Problems with the proof of Huffman Optimality in Cover's book
<p>There is a some question that arise from the proof of Lemma 5.8.1 of Cover's book on information theory that confuse me.</p>&#xA;&#xA;<p>First question is why he assumes that we can "Consider an optimal code $C_m$. Is he assuming that we are encoding a finite number of words so that &#xA;$\sum p_i l_i$ must have a m...
information theory coding theory
1
Problems with the proof of Huffman Optimality in Cover's book -- (information theory coding theory) <p>There is a some question that arise from the proof of Lemma 5.8.1 of Cover's book on information theory that confuse me.</p>&#xA;&#xA;<p>First question is why he assumes that we can "Consider an optimal code $C_m$. Is...
habedi/stack-exchange-dataset
64,732
Automatic Downcasting by Inferring the Type
<p>In java, you must explicitly cast in order to downcast a variable </p>&#xA;&#xA;<pre><code>public class Fruit{} // parent class&#xA;public class Apple extends Fruit{} // child class&#xA;&#xA;public static void main(String args[]) {&#xA; // An implicit upcast&#xA; Fruit parent = new Apple();&#xA; // An exp...
object oriented type inference language design
1
Automatic Downcasting by Inferring the Type -- (object oriented type inference language design) <p>In java, you must explicitly cast in order to downcast a variable </p>&#xA;&#xA;<pre><code>public class Fruit{} // parent class&#xA;public class Apple extends Fruit{} // child class&#xA;&#xA;public static void main(Stri...
habedi/stack-exchange-dataset
64,742
1's complement addition of outer carry to the result
<p>Let's take for example this addition: <strong>3 + (-1)</strong>.</p>&#xA;<ul>&#xA;<li><p>1 in binary is 001, and to obtain it's 1's complement counterpart we&#xA;flip the bits. So it is: <strong>110</strong>.</p>&#xA;</li>&#xA;<li><p>3 in binary is 011.</p>&#xA;</li>&#xA;</ul>&#xA;<blockquote>&#xA;<p>011 + 110 = <st...
arithmetic
1
1's complement addition of outer carry to the result -- (arithmetic) <p>Let's take for example this addition: <strong>3 + (-1)</strong>.</p>&#xA;<ul>&#xA;<li><p>1 in binary is 001, and to obtain it's 1's complement counterpart we&#xA;flip the bits. So it is: <strong>110</strong>.</p>&#xA;</li>&#xA;<li><p>3 in binary is...
habedi/stack-exchange-dataset
64,743
Lambda Calculus Type Inference
<p>I'm currently trying to learn how to infer most general types on lambda calculus, and due to the lack of information on the subject I could find on Google I'm forced to attempt what I think is logical and ask here if it's correct, it's most likely not, so please correct me!</p>&#xA;&#xA;<p>Here's a couple exercises ...
lambda calculus functional programming typing type inference
1
Lambda Calculus Type Inference -- (lambda calculus functional programming typing type inference) <p>I'm currently trying to learn how to infer most general types on lambda calculus, and due to the lack of information on the subject I could find on Google I'm forced to attempt what I think is logical and ask here if it'...
habedi/stack-exchange-dataset
64,747
Anyone knows an algorithm that finds minimum distance for all permutations?
<p>Let <span class="math-container">$A$</span> and <span class="math-container">$B$</span> be two finite sets of the same size <span class="math-container">$n$</span>. Let <span class="math-container">$P(A),P(B)$</span> be the set of all permutations of <span class="math-container">$A,B$</span> respectively. A distance...
algorithms optimization
1
Anyone knows an algorithm that finds minimum distance for all permutations? -- (algorithms optimization) <p>Let <span class="math-container">$A$</span> and <span class="math-container">$B$</span> be two finite sets of the same size <span class="math-container">$n$</span>. Let <span class="math-container">$P(A),P(B)$</s...
habedi/stack-exchange-dataset
64,750
An algorithm to find the maximum profitable assignment
<p>Given a set of workers $w_1,...,w_m$ and and a set of tasks $t_1,...,t_n$, and a $m\times n$ matrix $P$ s.t. $P(i,j)$ is the profit of assigning worker $i$ to task $j$. One worker can only be assigned to one task, and one task can only have one worker. We want to find the maximum profit of all possible assignments....
algorithms optimization assignment problem
1
An algorithm to find the maximum profitable assignment -- (algorithms optimization assignment problem) <p>Given a set of workers $w_1,...,w_m$ and and a set of tasks $t_1,...,t_n$, and a $m\times n$ matrix $P$ s.t. $P(i,j)$ is the profit of assigning worker $i$ to task $j$. One worker can only be assigned to one task,...
habedi/stack-exchange-dataset
64,757
How long will selection sort and merge sort take to sort a certain number of items?
<p>I am dealing with a sample exam question that I cannot understand which is as follows:</p>&#xA;&#xA;<blockquote>&#xA; <p>Selection sort takes one millisecond to sort 1000 items (worst-case time) on a particular computer. Estimate the amount of time it would take to sort 100,000 items. If Mergesort took 1 second for...
algorithm analysis runtime analysis sorting landau notation
1
How long will selection sort and merge sort take to sort a certain number of items? -- (algorithm analysis runtime analysis sorting landau notation) <p>I am dealing with a sample exam question that I cannot understand which is as follows:</p>&#xA;&#xA;<blockquote>&#xA; <p>Selection sort takes one millisecond to sort 1...
habedi/stack-exchange-dataset
64,761
Which of these simple data structures is most efficient when implementing a Dequeue?
<p>A deque is a double ended queue of course. So if I can either use 2 stacks, or 2 queues, or 1 stack and 1 queue, which two would I use to have the fastest implementation? Can we derive the complexity for InsertLeft, InsertRight, and RemoveLeft, and RemoveRight?</p>&#xA;&#xA;<p>I was thinking of using 2 stacks. Call ...
algorithms algorithm analysis data structures
1
Which of these simple data structures is most efficient when implementing a Dequeue? -- (algorithms algorithm analysis data structures) <p>A deque is a double ended queue of course. So if I can either use 2 stacks, or 2 queues, or 1 stack and 1 queue, which two would I use to have the fastest implementation? Can we der...
habedi/stack-exchange-dataset
64,764
Proving an algorithm exists to find independent set from a graph given an oracle
<p>This is the problem that I have been given:</p>&#xA;&#xA;<p>Consider the Independent-Set problem, in which the input is an undirected graph $G = (V,E)$ and a&#xA;parameter $k$, and the goal is to determine if $G$ has an independent set of size $k$. Suppose we have an&#xA;oracle $O$ for solving this decision version ...
algorithms graphs
1
Proving an algorithm exists to find independent set from a graph given an oracle -- (algorithms graphs) <p>This is the problem that I have been given:</p>&#xA;&#xA;<p>Consider the Independent-Set problem, in which the input is an undirected graph $G = (V,E)$ and a&#xA;parameter $k$, and the goal is to determine if $G$ ...
habedi/stack-exchange-dataset
64,769
Triple nested loop where outer and inner loop are dependent on n
<p>I am trying to count the exact/total number of iterations these nested for-loops are executed:</p>&#xA;&#xA;<pre><code>procedure P (integer n);&#xA; for (i: 1 to n)&#xA; for (j: 1 to 10)&#xA; for (k: n to n+5)&#xA; x := x + 1;&#xA;</code></pre>&#xA;&#xA;<p>I know that the first for loop runs (n-1) times, the s...
algorithm analysis runtime analysis loops
1
Triple nested loop where outer and inner loop are dependent on n -- (algorithm analysis runtime analysis loops) <p>I am trying to count the exact/total number of iterations these nested for-loops are executed:</p>&#xA;&#xA;<pre><code>procedure P (integer n);&#xA; for (i: 1 to n)&#xA; for (j: 1 to 10)&#xA; for (k: n ...
habedi/stack-exchange-dataset
64,770
What is the time complexity (upper bound) for this simple recursive function?
<p>So I have function that I have written to return the maximum value between index i and index x of a given array using recursion as follows:</p>&#xA;&#xA;<pre><code>FindMax( A, i, j )&#xA; if (i == j):&#xA; return A[i] &#xA; else:&#xA; k = (i + j) / 2&#xA; return max( FindMax(A, i, k), FindMax(...
algorithm analysis asymptotics runtime analysis recursion
1
What is the time complexity (upper bound) for this simple recursive function? -- (algorithm analysis asymptotics runtime analysis recursion) <p>So I have function that I have written to return the maximum value between index i and index x of a given array using recursion as follows:</p>&#xA;&#xA;<pre><code>FindMax( A, ...
habedi/stack-exchange-dataset
64,773
Practical communication example for a data rate scenario
<p>Having difficulty with the following question.</p>&#xA;<p>I can answer parts I and II but having trouble finding a practical example.</p>&#xA;<p>Question:</p>&#xA;<blockquote>&#xA;<p>Compute the maximum data rate of the following communication links;</p>&#xA;<p>I) 4000Hz bandwidth and a signal to noise ratio(SNR) of...
computer networks
1
Practical communication example for a data rate scenario -- (computer networks) <p>Having difficulty with the following question.</p>&#xA;<p>I can answer parts I and II but having trouble finding a practical example.</p>&#xA;<p>Question:</p>&#xA;<blockquote>&#xA;<p>Compute the maximum data rate of the following communi...
habedi/stack-exchange-dataset
64,777
Counting the number of squares in a graph
<p>Given an undirected graph, how would one go about calculating the number of squares in the graph? That is, a square is a cycle of length 4. </p>&#xA;&#xA;<p>I know that it is possible to count the number of triangles (cycles with length 3) in polynomial time. Is it possible to calculate the number of squares in poly...
graphs combinatorics
1
Counting the number of squares in a graph -- (graphs combinatorics) <p>Given an undirected graph, how would one go about calculating the number of squares in the graph? That is, a square is a cycle of length 4. </p>&#xA;&#xA;<p>I know that it is possible to count the number of triangles (cycles with length 3) in polyno...
habedi/stack-exchange-dataset
64,778
Can we count the number of times a particular state in a DFA is running in a loop?
<p>If in a particular DFA , we are looping in a state for n symbols.... Is there any way to keep track of this 'n'?</p>&#xA;
automata finite automata
1
Can we count the number of times a particular state in a DFA is running in a loop? -- (automata finite automata) <p>If in a particular DFA , we are looping in a state for n symbols.... Is there any way to keep track of this 'n'?</p>&#xA;
habedi/stack-exchange-dataset
64,784
Proof of non-regularity, based on the Kolmogorov complexity
<p>In class our professor showed us 3 methods for proving non-regularity:</p>&#xA;<ol>&#xA;<li>Myhill–Nerode theorem</li>&#xA;<li>Pumping Lemma for regular languages</li>&#xA;<li>Proof of non-regularity, based on the Kolmogorov complexity</li>&#xA;</ol>&#xA;<p>Now the first two, Myhill-Nerode theorem and Pumping lemma,...
formal languages regular languages proof techniques kolmogorov complexity
1
Proof of non-regularity, based on the Kolmogorov complexity -- (formal languages regular languages proof techniques kolmogorov complexity) <p>In class our professor showed us 3 methods for proving non-regularity:</p>&#xA;<ol>&#xA;<li>Myhill–Nerode theorem</li>&#xA;<li>Pumping Lemma for regular languages</li>&#xA;<li>Pr...
habedi/stack-exchange-dataset
64,791
Diameter-constrained Minimum Spanning Tree Problem
<p>The diameter-constrained Minimum Spanning Tree (MST) problem is as follows: you have a undirected weighted graph $G = (V,E)$ of different weights where $V$ is the set of vertices and $E$ is the set of edges between vertices, and a constant $d$. The goal is to find an MST such that the diameter (i.e., the maximum dis...
graphs weighted graphs spanning trees minimum spanning tree
1
Diameter-constrained Minimum Spanning Tree Problem -- (graphs weighted graphs spanning trees minimum spanning tree) <p>The diameter-constrained Minimum Spanning Tree (MST) problem is as follows: you have a undirected weighted graph $G = (V,E)$ of different weights where $V$ is the set of vertices and $E$ is the set of ...
habedi/stack-exchange-dataset
64,795
Where I can I find Pre Trained CNN Datasets for Facial Emotion Recognition?
<p>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 t...
machine learning neural networks image processing pattern recognition data sets
1
Where I can I find Pre Trained CNN Datasets for Facial Emotion Recognition? -- (machine learning neural networks image processing pattern recognition data sets) <p>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 ...
habedi/stack-exchange-dataset
64,805
Characterize the Equivalence Classes of a Language
<p>Given a language $A = \{a^nb^n : n &gt;= 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. </p>&#xA;
formal languages automata finite automata
1
Characterize the Equivalence Classes of a Language -- (formal languages automata finite automata) <p>Given a language $A = \{a^nb^n : n &gt;= 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 "characte...
habedi/stack-exchange-dataset
64,815
Reader and Writer mutex
<p>I am looking over the classic <strong>Reader and Writer Problem</strong></p>&#xA;<p>Just to give a quick overview:</p>&#xA;<ul>&#xA;<li>Many readers can be in CS (<em>as long as no writers are</em>)</li>&#xA;<li>Only one writer can be in the CS (<em>with no combination of other readers/writers</em>)</li>&#xA;</ul>&...
concurrency synchronization mutual exclusion
1
Reader and Writer mutex -- (concurrency synchronization mutual exclusion) <p>I am looking over the classic <strong>Reader and Writer Problem</strong></p>&#xA;<p>Just to give a quick overview:</p>&#xA;<ul>&#xA;<li>Many readers can be in CS (<em>as long as no writers are</em>)</li>&#xA;<li>Only one writer can be in the ...
habedi/stack-exchange-dataset
64,817
What language should the following DFA recognise?
<p><a href="https://i.stack.imgur.com/r0KEK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r0KEK.jpg" alt="enter image description here"></a>&#xA;My question is: what language should the following DFA recognise?</p>&#xA;&#xA;<p>It seems that it should contain an odd number of substrings in the form ...
automata finite automata
1
What language should the following DFA recognise? -- (automata finite automata) <p><a href="https://i.stack.imgur.com/r0KEK.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/r0KEK.jpg" alt="enter image description here"></a>&#xA;My question is: what language should the following DFA recognise?</p>&#xA;...
habedi/stack-exchange-dataset
64,824
Quantifiers in lambda calculus
<p>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.</p>&#xA;&#xA;...
lambda calculus semantics
1
Quantifiers in lambda calculus -- (lambda calculus semantics) <p>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...
habedi/stack-exchange-dataset
64,826
Removing edges from a fully connected weighted graph
<p>Given a fully connected graph $G(V,E)$ with associated edge weights and a set of constraints specifying distance $D(V_i, V_j) &lt; 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?</p>&#xA;&#xA;<p>In other w...
graphs network analysis
1
Removing edges from a fully connected weighted graph -- (graphs network analysis) <p>Given a fully connected graph $G(V,E)$ with associated edge weights and a set of constraints specifying distance $D(V_i, V_j) &lt; M_{ij}$, where $\left\{V_{i..j}\right\} ⊂ V$, how can I go about finding the smallest subset graph $G'(V...
habedi/stack-exchange-dataset
64,833
Maximal Elements in a Lower Set
<p>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.</p>&#xA;&#xA;<p>I want to compute all feasible sets (equivalently - all ...
algorithms search algorithms order theory
1
Maximal Elements in a Lower Set -- (algorithms search algorithms order theory) <p>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 ...
habedi/stack-exchange-dataset
64,842
Suitability of high-level languages for embedded systems
<p>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 w...
programming languages software engineering
1
Suitability of high-level languages for embedded systems -- (programming languages software engineering) <p>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 soo...
habedi/stack-exchange-dataset
64,843
Under what conditions is K-means clustering transformation-invariant?
<p>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$.</p>&#xA;&#xA;<p>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 ge...
algorithms clustering
1
Under what conditions is K-means clustering transformation-invariant? -- (algorithms clustering) <p>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$.</p>&#xA;&#xA;<p>Now, if we create a new dataset $Y = \{y_1, y...
habedi/stack-exchange-dataset
64,846
Runtime of algorithm to transpose a graph
<p>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...
asymptotics runtime analysis
1
Runtime of algorithm to transpose a graph -- (asymptotics runtime analysis) <p>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 e...
habedi/stack-exchange-dataset
64,848
The transition function of the union of regular languages
<p>I follow Michael Sipser's book, "Introduction to the Theory of Computation".&#xA;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. &#xA;The book says that for each $(r_1, r_2) \in Q$ and each $a...
regular languages finite automata
1
The transition function of the union of regular languages -- (regular languages finite automata) <p>I follow Michael Sipser's book, "Introduction to the Theory of Computation".&#xA;To be specific, I am trying to understand the proof about the union of regular languages. However, I have a problem grasping how exactly th...
habedi/stack-exchange-dataset
64,866
Algorithm: Finding median in a sorted array with duplicates
<p>If array is sorted we can generally find median in O(1) by returning the element at the middle. &#xA;But what if there are duplicates?</p>&#xA;&#xA;<p>E.g [2, 2, 3, 3, 3, 3]</p>&#xA;
algorithms arrays searching
1
Algorithm: Finding median in a sorted array with duplicates -- (algorithms arrays searching) <p>If array is sorted we can generally find median in O(1) by returning the element at the middle. &#xA;But what if there are duplicates?</p>&#xA;&#xA;<p>E.g [2, 2, 3, 3, 3, 3]</p>&#xA;
habedi/stack-exchange-dataset
64,873
Does the running-time of this push-relabel algorithm become zero if there are many edges?
<p>According to <a href="https://en.wikipedia.org/wiki/Push%E2%80%93relabel_maximum_flow_algorithm" rel="nofollow">the Wikipedia page on the Push-relabel maximum flow algorithm</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Subcubic $O(|V||E| \log\frac{|V|^2}{|E|})$ time complexity can be achieved using dynamic trees, althoug...
graphs algorithm analysis runtime analysis landau notation
1
Does the running-time of this push-relabel algorithm become zero if there are many edges? -- (graphs algorithm analysis runtime analysis landau notation) <p>According to <a href="https://en.wikipedia.org/wiki/Push%E2%80%93relabel_maximum_flow_algorithm" rel="nofollow">the Wikipedia page on the Push-relabel maximum flow...
habedi/stack-exchange-dataset
64,880
Must a complete subgraph be induced?
<p>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$?</p>&#xA;
graphs terminology
1
Must a complete subgraph be induced? -- (graphs terminology) <p>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 s...
habedi/stack-exchange-dataset
64,883
Making mathematical expressions as balanced trees as possible
<p>I am having some trouble with turning the following mathematical expressions into as balanced binary trees as possible.</p>&#xA;&#xA;<p>This is what I have done so far, but is there a way to make them even more balanced?</p>&#xA;&#xA;<p>$( − 3)(^2 + − 1)$</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/k9w5k.png...
optimization trees arithmetic
1
Making mathematical expressions as balanced trees as possible -- (optimization trees arithmetic) <p>I am having some trouble with turning the following mathematical expressions into as balanced binary trees as possible.</p>&#xA;&#xA;<p>This is what I have done so far, but is there a way to make them even more balanced?...
habedi/stack-exchange-dataset
64,886
How to prove an identity of regular expressions
<p>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.</p>&#xA;<p>Question:</p>&#xA;<blockquote>&#xA;<p>Prove that R.H.S regular expression is same as L...
regular languages regular expressions
1
How to prove an identity of regular expressions -- (regular languages regular expressions) <p>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.</p>&#x...
habedi/stack-exchange-dataset
64,900
Question regarding coin change algorithm (DP and greedy)
<p>The question goes something like this:</p>&#xA;&#xA;<p>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?</p>&#xA;&#xA;<p>Intuitively I want to answer that DP will be faster because greedy ...
algorithm analysis dynamic programming greedy algorithms
1
Question regarding coin change algorithm (DP and greedy) -- (algorithm analysis dynamic programming greedy algorithms) <p>The question goes something like this:</p>&#xA;&#xA;<p>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 a...
habedi/stack-exchange-dataset
64,908
Does it matter if I reverse the arguments order of a lambda calculus function?
<p>what is the difference between the below functions?&#xA;$$\lambda x.\lambda y.f(x, y)$$&#xA;$$\lambda y.\lambda x.f(x, y)$$</p>&#xA;&#xA;<p>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?</p>&#xA;&#xA;<p>I...
lambda calculus
1
Does it matter if I reverse the arguments order of a lambda calculus function? -- (lambda calculus) <p>what is the difference between the below functions?&#xA;$$\lambda x.\lambda y.f(x, y)$$&#xA;$$\lambda y.\lambda x.f(x, y)$$</p>&#xA;&#xA;<p>And it appears that there is a $\texttt{reverse operation}$ in lambda calculu...
habedi/stack-exchange-dataset
64,910
Is there a language with non-isomorphic minimum-state UFAs?
<p>For all regular languages L, by the <a href="https://en.wikipedia.org/wiki/Myhill%E2%80%93Nerode_theorem">Myhill-Nerode</a> classes, all state-minimal <a href="https://en.wikipedia.org/wiki/DFA_minimization">DFAs</a> for L are isomorphic. ​ On the other hand, "<a href="http://www.sciencedirect.com/science/article/pi...
finite automata nondeterminism
1
Is there a language with non-isomorphic minimum-state UFAs? -- (finite automata nondeterminism) <p>For all regular languages L, by the <a href="https://en.wikipedia.org/wiki/Myhill%E2%80%93Nerode_theorem">Myhill-Nerode</a> classes, all state-minimal <a href="https://en.wikipedia.org/wiki/DFA_minimization">DFAs</a> for ...
habedi/stack-exchange-dataset
64,915
Correctness proof: 2-approximation of greedy matching-algorithm
<p><strong>Input:</strong> number of edges and vertices, and array of all edges in graph.</p>&#xA;&#xA;<p><strong>Output:</strong> array of edges that construct a matching, so that:&#xA;$$\frac{\text{the number of edges in this matching}}{\text{the number of edges in maximum matching}} \geq \frac{1}{2}$$</p>&#xA;&#xA;<...
algorithm analysis approximation correctness proof matching
1
Correctness proof: 2-approximation of greedy matching-algorithm -- (algorithm analysis approximation correctness proof matching) <p><strong>Input:</strong> number of edges and vertices, and array of all edges in graph.</p>&#xA;&#xA;<p><strong>Output:</strong> array of edges that construct a matching, so that:&#xA;$$\fr...
habedi/stack-exchange-dataset
64,922
Finding trading cycles
<p>Say we have N persons and M items (when a person has a certain item, she usually only has one piece). For example,</p>&#xA;<ul>&#xA;<li><p>person 1 has item A, C, D, and wants item F</p>&#xA;</li>&#xA;<li><p>person 2 has item B, C, and wants E</p>&#xA;</li>&#xA;<li><p>person 3 has item E, and wants G</p>&#xA;<p>...<...
algorithms graphs data structures shortest path matrices
1
Finding trading cycles -- (algorithms graphs data structures shortest path matrices) <p>Say we have N persons and M items (when a person has a certain item, she usually only has one piece). For example,</p>&#xA;<ul>&#xA;<li><p>person 1 has item A, C, D, and wants item F</p>&#xA;</li>&#xA;<li><p>person 2 has item B, C, ...
habedi/stack-exchange-dataset
64,929
what is edge-disjoint cycles in graph?
<p>I was reading something about Eulerian Tour and there is one property claiming that:</p>&#xA;&#xA;<blockquote>&#xA; <p>An undirected graph can be decomposed into edge-disjoint cycles if and only if all of its vertices have even degree.</p>&#xA;</blockquote>&#xA;&#xA;<p>Can someone explain what is edge-disjoint cycl...
graphs eulerian paths
1
what is edge-disjoint cycles in graph? -- (graphs eulerian paths) <p>I was reading something about Eulerian Tour and there is one property claiming that:</p>&#xA;&#xA;<blockquote>&#xA; <p>An undirected graph can be decomposed into edge-disjoint cycles if and only if all of its vertices have even degree.</p>&#xA;</bloc...
habedi/stack-exchange-dataset
64,933
Confusion regarding terminology surrounding perceptron learning
<p>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 under...
artificial intelligence neural networks perceptron
1
Confusion regarding terminology surrounding perceptron learning -- (artificial intelligence neural networks perceptron) <p>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 i...
habedi/stack-exchange-dataset
64,939
Shunting Yard Algorithm extension and AST generation
<p>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 l...
algorithms algorithm analysis compilers parsers
1
Shunting Yard Algorithm extension and AST generation -- (algorithms algorithm analysis compilers parsers) <p>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...
habedi/stack-exchange-dataset
64,951
Methods to prevent overfitting
<p>I am aware of three approaches to prevent over-fitting of data when trying to model it on a neural net.</p>&#xA;&#xA;<p>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...
machine learning neural networks
1
Methods to prevent overfitting -- (machine learning neural networks) <p>I am aware of three approaches to prevent over-fitting of data when trying to model it on a neural net.</p>&#xA;&#xA;<p>The first two approaches I know suggest to train on more data and employ bootstrap aggregating. The third approach is to use a m...
habedi/stack-exchange-dataset
64,955
Using AI / Machine learning to find the most time and space efficient solutions to an algorithm
<p>As programmers, we are always trying to find the most efficient space and time complexity solutions to algorithms. </p>&#xA;&#xA;<p>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?</p>&#xA;
algorithms algorithm analysis optimization machine learning artificial intelligence
1
Using AI / Machine learning to find the most time and space efficient solutions to an algorithm -- (algorithms algorithm analysis optimization machine learning artificial intelligence) <p>As programmers, we are always trying to find the most efficient space and time complexity solutions to algorithms. </p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
64,960
Does the process exiting from critical section will always call signal instruction?
<p>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 <strong>always</strong> call $V(S)$ (or release/signal/ up ) instruction ? Can any...
operating systems concurrency synchronization mutual exclusion
1
Does the process exiting from critical section will always call signal instruction? -- (operating systems concurrency synchronization mutual exclusion) <p>I have seen many solutions to critical section problems in process synchronization chapter . Many of them first acquire resources , execute critical section and leav...
habedi/stack-exchange-dataset
64,961
How to measure the complexity of the discrete logarithm problem?
<p>The answers to this <a href="https://crypto.stackexchange.com/questions/12865/why-is-the-discrete-logarithm-problem-assumed-to-be-hard">question on Crypto Stack Exchange</a> 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 ...
time complexity discrete mathematics cryptography
1
How to measure the complexity of the discrete logarithm problem? -- (time complexity discrete mathematics cryptography) <p>The answers to this <a href="https://crypto.stackexchange.com/questions/12865/why-is-the-discrete-logarithm-problem-assumed-to-be-hard">question on Crypto Stack Exchange</a> basically says that, to...
habedi/stack-exchange-dataset
64,965
Physical significance of Don't cares in Digital Logic design
<p>In many Digital functions we come across don't care conditions where we use don't cares to minimize functions.<br>&#xA;What is the significance of these don't cares in real world scenario where we actually implement the functions using logic gates?</p>&#xA;
digital circuits
1
Physical significance of Don't cares in Digital Logic design -- (digital circuits) <p>In many Digital functions we come across don't care conditions where we use don't cares to minimize functions.<br>&#xA;What is the significance of these don't cares in real world scenario where we actually implement the functions usin...
habedi/stack-exchange-dataset
64,966
Problem using the Arden's Lemma on one automata
<p>I am trying to find the regular expression of this automata using the Arden's Lemma:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/aFyHj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFyHj.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>Let $L_{i}$ be the language accepted from...
automata regular expressions
1
Problem using the Arden's Lemma on one automata -- (automata regular expressions) <p>I am trying to find the regular expression of this automata using the Arden's Lemma:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/aFyHj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/aFyHj.png" alt="enter imag...
habedi/stack-exchange-dataset
64,968
On complete problems for $P/poly$ and $BPP$
<p>Is there a complete problem for $P/poly$?</p>&#xA;&#xA;<p>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 <a href="https://en.wikipedia.org/wiki/PP_(complexity)#Complete_proble...
complexity theory
1
On complete problems for $P/poly$ and $BPP$ -- (complexity theory) <p>Is there a complete problem for $P/poly$?</p>&#xA;&#xA;<p>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 <a ...
habedi/stack-exchange-dataset
64,970
A specific version of a job scheduling problem
<p>I'm looking for a solutions or book references to a given variation of a job scheduling problem:</p>&#xA;&#xA;<p>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...
algorithms optimization reference request scheduling
1
A specific version of a job scheduling problem -- (algorithms optimization reference request scheduling) <p>I'm looking for a solutions or book references to a given variation of a job scheduling problem:</p>&#xA;&#xA;<p>Given $n$ machines (let's denote it by $m_1, m_2, \ldots, m_n$) and $r$ tasks ($t_1, t_2, \ldots, t...
habedi/stack-exchange-dataset
64,971
How do analogue computers perform logical operations?
<p>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.</p>&#xA;&#xA;<p>However looking at schematics, they seem to be built for directly computing differential equations.</p>&#...
computer architecture fuzzy logic
1
How do analogue computers perform logical operations? -- (computer architecture fuzzy logic) <p>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.</p>&#xA;&#xA;<p>However look...
habedi/stack-exchange-dataset
64,975
What makes is the difference between a tree and a graph?
<p>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.</p>&#xA;&#xA;<p>What makes a graph a graph and what makes a tree a tree?&#xA;I am getting the impression that a tree is a subset of a graph but what are these pro...
graphs data structures trees
1
What makes is the difference between a tree and a graph? -- (graphs data structures trees) <p>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.</p>&#xA;&#xA;<p>What makes a graph a graph and what makes a tree a tree...
habedi/stack-exchange-dataset
64,976
Are two states equivalent in a DFA if on the same input the states transition to each other?
<p>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:</p>&#xA;&#xA;<p>$\delta(q_{1},a)=q_{2}\\ \delta(q_{2},a)=q_{1}$</p>&#xA;&#xA;<p>and</p>&#xA;&#xA;<p>$\delta(q_{1},b)=q_{3}\\ \delta(q_{2},b)=q_{3}$</p>&#xA;&#xA;<p>Are the states $...
automata finite automata
1
Are two states equivalent in a DFA if on the same input the states transition to each other? -- (automata finite automata) <p>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:</p>&#xA;&#xA;<p>$\delta(q_{1},a)=q_{2}\\ \delta(q_{2},a)=...
habedi/stack-exchange-dataset
64,984
MSB and LSB in floating point number
<p>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?</p>&#xA;
arithmetic floating point
1
MSB and LSB in floating point number -- (arithmetic floating point) <p>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?</p>&#xA;
habedi/stack-exchange-dataset
64,990
Does a regular expression model the empty language if it contains symbols not in the alphabet?
<p>Suppose $\Sigma = \{ a,b \}$ and the regular expression $(a^*b+dc)^*(b^*d + ad)^*$. Is it equal to $\varnothing$?</p>&#xA;&#xA;<p>So I have a regular expression like this: $(a^*b+dc)^*$. As only $(a,b) \in \Sigma$, I see that:</p>&#xA;&#xA;<ul>&#xA;<li>$dc=\varnothing$</li>&#xA;</ul>&#xA;&#xA;<p>So $(a^*b+dc)^*=(a^*...
regular languages regular expressions
1
Does a regular expression model the empty language if it contains symbols not in the alphabet? -- (regular languages regular expressions) <p>Suppose $\Sigma = \{ a,b \}$ and the regular expression $(a^*b+dc)^*(b^*d + ad)^*$. Is it equal to $\varnothing$?</p>&#xA;&#xA;<p>So I have a regular expression like this: $(a^*b+...
habedi/stack-exchange-dataset
65,003
if (λ x . x x) has a type, then is the type system inconsistent?
<p>If a type system can assign a type to <code>λ x . x x</code>, or to the non-terminating <code>(λx . x x) (λ x . x x)</code>, then is that system inconsistent as a consequence? Is every type under that system inhabited? Can you prove false?</p>&#xA;
lambda calculus dependent types
1
if (λ x . x x) has a type, then is the type system inconsistent? -- (lambda calculus dependent types) <p>If a type system can assign a type to <code>λ x . x x</code>, or to the non-terminating <code>(λx . x x) (λ x . x x)</code>, then is that system inconsistent as a consequence? Is every type under that system inhabit...
habedi/stack-exchange-dataset
65,010
Proof: Sum of weights of paths in a network
<p>I was given problem 6.7 out of the book <a href="https://books.google.at/books?id=-DgTDAAAQBAJ" rel="nofollow noreferrer">&quot;Networks: An Introduction&quot;</a> as a question. The problem is defined as follows:</p>&#xA;<blockquote>&#xA;<p>Consider the set of all paths from node <span class="math-container">$s$</s...
graphs matrices
1
Proof: Sum of weights of paths in a network -- (graphs matrices) <p>I was given problem 6.7 out of the book <a href="https://books.google.at/books?id=-DgTDAAAQBAJ" rel="nofollow noreferrer">&quot;Networks: An Introduction&quot;</a> as a question. The problem is defined as follows:</p>&#xA;<blockquote>&#xA;<p>Consider t...
habedi/stack-exchange-dataset
65,014
Reduce $\sqrt{n}$-CLIQUE to CLIQUE
<p>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</p>&#xA;&#xA;<p>$$\{ \langle G, c \rangle \mid G \text{ has a clique of size } c\}$$</p>&#xA;&#xA;<p>Define the problem $\sqrt{n}$-CLIQUE as follows:</p>&#xA;&#xA;<p>$$\{\langle G...
complexity theory graphs reductions clique
1
Reduce $\sqrt{n}$-CLIQUE to CLIQUE -- (complexity theory graphs reductions clique) <p>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</p>&#xA;&#xA;<p>$$\{ \langle G, c \rangle \mid G \text{ has a clique of size } c\}$$</p>&#xA;&#x...
habedi/stack-exchange-dataset
65,015
Minimum number of rotations of a binary tree to convert it into another
<p>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,...
data structures binary trees search trees
1
Minimum number of rotations of a binary tree to convert it into another -- (data structures binary trees search trees) <p>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 rotation...
habedi/stack-exchange-dataset
65,021
Give three words that are in the language of the first and second regular expression
<p>This is our alphabet: $\{0,1,2\}$</p>&#xA;&#xA;<p>And lets say I have two regular expressions:</p>&#xA;&#xA;<p>Regular expression 1. $(1|22|0)^* (2|0)^*$</p>&#xA;&#xA;<p>Regular expression 2. $(0|1)^* (1|20|1)^*$</p>&#xA;&#xA;<p>How can I give three words each over the alphabet such that they are:</p>&#xA;&#xA;<ul>&...
formal languages regular languages regular expressions
1
Give three words that are in the language of the first and second regular expression -- (formal languages regular languages regular expressions) <p>This is our alphabet: $\{0,1,2\}$</p>&#xA;&#xA;<p>And lets say I have two regular expressions:</p>&#xA;&#xA;<p>Regular expression 1. $(1|22|0)^* (2|0)^*$</p>&#xA;&#xA;<p>Re...
habedi/stack-exchange-dataset
65,023
Is following observation on Ladner's theorem correct?
<blockquote>&#xA; <p>Suppose $NP\subseteq DTIME[n^{f(n)}]$ where $f(n)$ is any function satisfying $\omega(1)$ then is it true $P=NP$ holds? </p>&#xA;</blockquote>&#xA;&#xA;<p>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 ...
complexity theory time complexity randomized algorithms p vs np np intermediate
1
Is following observation on Ladner's theorem correct? -- (complexity theory time complexity randomized algorithms p vs np np intermediate) <blockquote>&#xA; <p>Suppose $NP\subseteq DTIME[n^{f(n)}]$ where $f(n)$ is any function satisfying $\omega(1)$ then is it true $P=NP$ holds? </p>&#xA;</blockquote>&#xA;&#xA;<p>Ladn...
habedi/stack-exchange-dataset
65,035
Is it NP-complete to decide if chromatic and clique numbers agree?
<p>It is known that finding chromatic number $\chi(G)$ and clique number $\omega(G)$ are both NP-complete problems.</p>&#xA;&#xA;<p>Is the problem </p>&#xA;&#xA;<blockquote>&#xA; <p>Given graph $G$, is $\omega(G)=\chi(G)$?</p>&#xA;</blockquote>&#xA;&#xA;<p>NP-complete as well?</p>&#xA;&#xA;<p>Side question: is there ...
complexity theory graphs np complete reductions
1
Is it NP-complete to decide if chromatic and clique numbers agree? -- (complexity theory graphs np complete reductions) <p>It is known that finding chromatic number $\chi(G)$ and clique number $\omega(G)$ are both NP-complete problems.</p>&#xA;&#xA;<p>Is the problem </p>&#xA;&#xA;<blockquote>&#xA; <p>Given graph $G$,...
habedi/stack-exchange-dataset
65,037
Should two DFAs be complete before making an intersection of them?
<p>In the slides given by my teacher, the third automaton is the product of the first two:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/Q9EGr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q9EGr.png" alt="Three DFAs"></a></p>&#xA;&#xA;<p>I tried to do the product myself by doing the transition...
automata finite automata closure properties
1
Should two DFAs be complete before making an intersection of them? -- (automata finite automata closure properties) <p>In the slides given by my teacher, the third automaton is the product of the first two:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/Q9EGr.png" rel="nofollow noreferrer"><img src="https://i.stack...
habedi/stack-exchange-dataset
65,045
Is the difference between between an union and a product of two DFA lies in their accepting states?
<p>It seems to me that in order to construct the union and the product of two DFA we use basically the same method. </p>&#xA;&#xA;<p>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...
finite automata
1
Is the difference between between an union and a product of two DFA lies in their accepting states? -- (finite automata) <p>It seems to me that in order to construct the union and the product of two DFA we use basically the same method. </p>&#xA;&#xA;<p>The difference is that when we make the accepting states for the r...
habedi/stack-exchange-dataset
65,056
Problem that is only solvable in a given space
<p>I was wondering if a computational problem exists with the following properties:</p>&#xA;&#xA;<ul>&#xA;<li>It should be solvable only having $K$ bytes of memory, or solvable with $K' &lt; K$ bytes of memory only in exponential time on $K - K'$ (or such an high degree polynomial in $K - K'$ that for any practical pur...
complexity theory space complexity
1
Problem that is only solvable in a given space -- (complexity theory space complexity) <p>I was wondering if a computational problem exists with the following properties:</p>&#xA;&#xA;<ul>&#xA;<li>It should be solvable only having $K$ bytes of memory, or solvable with $K' &lt; K$ bytes of memory only in exponential tim...
habedi/stack-exchange-dataset
65,062
Analysis of a randomized algorithm for independent set construction
<p>Suppose that <span class="math-container">$G = (V,E)$</span> is a 3-regular graph on <span class="math-container">$n$</span> vertices and <span class="math-container">$m$</span> edges. Below I propose a randomized algorithm for obtaining an independent set for <span class="math-container">$G$</span>.</p>&#xA;<blockq...
algorithm analysis approximation probabilistic algorithms
1
Analysis of a randomized algorithm for independent set construction -- (algorithm analysis approximation probabilistic algorithms) <p>Suppose that <span class="math-container">$G = (V,E)$</span> is a 3-regular graph on <span class="math-container">$n$</span> vertices and <span class="math-container">$m$</span> edges. B...
habedi/stack-exchange-dataset
65,069
Dynamic Programming vs Greedy - coin change problem
<p>This is a fairly common problem: </p>&#xA;&#xA;<p>Given coins of integer denominations $v_1 &lt; v_2&lt; ... &lt; v_n$, make change for an amount A using as few coins as possible.</p>&#xA;&#xA;<p>Given an input of powers of $p$,</p>&#xA;&#xA;<p>$V = [1, 3, 9, 27]$</p>&#xA;&#xA;<p>How would a dynamic programming vs...
algorithms optimization dynamic programming greedy algorithms
1
Dynamic Programming vs Greedy - coin change problem -- (algorithms optimization dynamic programming greedy algorithms) <p>This is a fairly common problem: </p>&#xA;&#xA;<p>Given coins of integer denominations $v_1 &lt; v_2&lt; ... &lt; v_n$, make change for an amount A using as few coins as possible.</p>&#xA;&#xA;<p>...
habedi/stack-exchange-dataset
65,077
Question Regarding ECLOSURE in ε-NFAs
<p>I have a small question regarding the <strong>ECLOSURE</strong> of a certain state in an <strong>ε-NFA</strong>.</p>&#xA;&#xA;<p>If we have a <strong>transition</strong> that has both <strong>a</strong> and <strong>ε</strong> transitions, is the <strong>ECLOSURE</strong> affected?</p>&#xA;&#xA;<p>Also is there any r...
automata finite automata
1
Question Regarding ECLOSURE in ε-NFAs -- (automata finite automata) <p>I have a small question regarding the <strong>ECLOSURE</strong> of a certain state in an <strong>ε-NFA</strong>.</p>&#xA;&#xA;<p>If we have a <strong>transition</strong> that has both <strong>a</strong> and <strong>ε</strong> transitions, is the <st...
habedi/stack-exchange-dataset
65,078
Perfect random number generation using normal numbers
<p><a href="http://www.sciencedirect.com/science/article/pii/S0304397501001700" rel="nofollow">This paper</a> describes a computable normal number. One property of normal numbers is that, written in binary, the $i^{th}$ bit is equally likely to be 0 or 1 (in the sense that as $n$ gets large, the number of 1-bits and 0-...
randomness pseudo random generators
1
Perfect random number generation using normal numbers -- (randomness pseudo random generators) <p><a href="http://www.sciencedirect.com/science/article/pii/S0304397501001700" rel="nofollow">This paper</a> describes a computable normal number. One property of normal numbers is that, written in binary, the $i^{th}$ bit i...
habedi/stack-exchange-dataset
65,088
Conditions for bipartite graph to be planar with no edges going around the vertices
<p>A bipartite graph is planar iff it has no $K_{3, 3}$ or $K_5$ minors.</p>&#xA;&#xA;<p>I am looking for a necessary or/and sufficient conditions to allow planar drawings with no edges "going around" sets of vertices. These are drawings satisfying:</p>&#xA;&#xA;<ol>&#xA;<li>All vertices of one part are drawn on a sing...
graphs terminology graph drawing
1
Conditions for bipartite graph to be planar with no edges going around the vertices -- (graphs terminology graph drawing) <p>A bipartite graph is planar iff it has no $K_{3, 3}$ or $K_5$ minors.</p>&#xA;&#xA;<p>I am looking for a necessary or/and sufficient conditions to allow planar drawings with no edges "going aroun...
habedi/stack-exchange-dataset
65,089
Arden's Lemma in case $X_{i}=AX_{i}$?
<p>Arden's lemma is applied in cases where we have an equation that looks like this: $$ X_{i}=AX_{i} + B, $$ with the condition that $\epsilon \notin A$.</p>&#xA;&#xA;<p>But if I have such situation: $$X_{i}=AX_{i},$$ so there's no B, or simply talking we have $B= \varnothing $, thus by the Lemma, we have $$X_{i}=A^{*}...
formal languages
1
Arden's Lemma in case $X_{i}=AX_{i}$? -- (formal languages) <p>Arden's lemma is applied in cases where we have an equation that looks like this: $$ X_{i}=AX_{i} + B, $$ with the condition that $\epsilon \notin A$.</p>&#xA;&#xA;<p>But if I have such situation: $$X_{i}=AX_{i},$$ so there's no B, or simply talking we have...
habedi/stack-exchange-dataset
65,096
Are there lossless data compression techniques that do not exploit repetitive patterns?
<p><em>Lossless Data compression</em> (source coding) algorithms heavily rely on repetitive pattern (redundancy).</p>&#xA;&#xA;<p>Is there a Lossless Data compression method/algorithm that is independent of repetitive pattern (redundancy)?</p>&#xA;&#xA;<p><strong>Note:</strong></p>&#xA;&#xA;<p>Most lossless compressi...
reference request information theory data compression
1
Are there lossless data compression techniques that do not exploit repetitive patterns? -- (reference request information theory data compression) <p><em>Lossless Data compression</em> (source coding) algorithms heavily rely on repetitive pattern (redundancy).</p>&#xA;&#xA;<p>Is there a Lossless Data compression metho...
habedi/stack-exchange-dataset
65,097
Theoretical CSPs where (in)equality constraints can be expressed as a single constraint?
<p>I'm designing puzzles by running a <a href="https://en.wikipedia.org/wiki/Constraint_satisfaction_problem#Flexible_CSPs" rel="nofollow">MAX-CSP</a> solver, and it works nicely in practice. For concreteness, my problems have the following form (in a pseudo-modeling language):</p>&#xA;&#xA;<pre><code># set up vars &am...
optimization reductions np hard constraint satisfaction
1
Theoretical CSPs where (in)equality constraints can be expressed as a single constraint? -- (optimization reductions np hard constraint satisfaction) <p>I'm designing puzzles by running a <a href="https://en.wikipedia.org/wiki/Constraint_satisfaction_problem#Flexible_CSPs" rel="nofollow">MAX-CSP</a> solver, and it work...
habedi/stack-exchange-dataset
65,099
The set of all words containing more 1's than 2s
<p>I'm currently working through some regular expression questions and I've got a solution for one of the problems that I'm not certain is correct. </p>&#xA;&#xA;<p>The question has this preface.</p>&#xA;&#xA;<p>We only consider languages over the alphabet $\{0, 1, 2\}$. </p>&#xA;&#xA;<p>We also view words over this al...
formal languages regular languages regular expressions
1
The set of all words containing more 1's than 2s -- (formal languages regular languages regular expressions) <p>I'm currently working through some regular expression questions and I've got a solution for one of the problems that I'm not certain is correct. </p>&#xA;&#xA;<p>The question has this preface.</p>&#xA;&#xA;<p...
habedi/stack-exchange-dataset
65,101
Inheritance problem (JAVA)
<p><a href="https://i.stack.imgur.com/PS8n0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PS8n0.jpg" alt="enter image description here"></a></p>&#xA;&#xA;<p>Here I have created 2 classes , $A$ is the super class of $B$ , i.e , $B$ inherits the features of class $A$.</p>&#xA;&#xA;<p>Now I don't know...
java
1
Inheritance problem (JAVA) -- (java) <p><a href="https://i.stack.imgur.com/PS8n0.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PS8n0.jpg" alt="enter image description here"></a></p>&#xA;&#xA;<p>Here I have created 2 classes , $A$ is the super class of $B$ , i.e , $B$ inherits the features of class ...
habedi/stack-exchange-dataset
65,102
Given a binary matrix, how to find the starting coordinates of a sub matrix?
<p>Say, I have an image of bit depth 1 (i.e. binary matrix) and I cropped the image to form a smaller matrix. From the cropped matrix (of a reasonable size). I need to know the starting coordinates from where the matrix was cropped from.</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/NCywK.png" rel="nofollow norefe...
computer vision matrices encoding scheme
1
Given a binary matrix, how to find the starting coordinates of a sub matrix? -- (computer vision matrices encoding scheme) <p>Say, I have an image of bit depth 1 (i.e. binary matrix) and I cropped the image to form a smaller matrix. From the cropped matrix (of a reasonable size). I need to know the starting coordinates...
habedi/stack-exchange-dataset
65,108
Time complexity of a precedence constrained selection problem
<p>I wonder if you have an idea over the time complexity of the following problem, or a problem similar to this one (generally a selection problem)</p>&#xA;&#xA;<p>[Assuming operations on integers take O(1) time]</p>&#xA;&#xA;<p>We are given a set $N$ of $n$ items, that are subject to general precedence constraints (a ...
complexity theory time complexity selection problem precedence graph
1
Time complexity of a precedence constrained selection problem -- (complexity theory time complexity selection problem precedence graph) <p>I wonder if you have an idea over the time complexity of the following problem, or a problem similar to this one (generally a selection problem)</p>&#xA;&#xA;<p>[Assuming operations...
habedi/stack-exchange-dataset
65,110
Lexicographically k-th small string
<p>The origin problem is <a href="https://math.stackexchange.com/questions/1984522/lexicographically-kth-small-string">here</a>. Now it is deleted.</p>&#xA;&#xA;<p>Suppose I have 3 'available' copies of <code>a</code>, 2 of <code>b</code>, 3 of <code>c</code>, and 4 of <code>d</code>.</p>&#xA;&#xA;<ol>&#xA;<li>I want t...
algorithms strings permutations
1
Lexicographically k-th small string -- (algorithms strings permutations) <p>The origin problem is <a href="https://math.stackexchange.com/questions/1984522/lexicographically-kth-small-string">here</a>. Now it is deleted.</p>&#xA;&#xA;<p>Suppose I have 3 'available' copies of <code>a</code>, 2 of <code>b</code>, 3 of <c...
habedi/stack-exchange-dataset
65,114
How to prove with induction
<p>So far I have learned how to write proofs by induction and it went fine until I got this recursive problem, which I'm not quite sure how to begin and how to prove that with induction.</p>&#xA;&#xA;<pre><code> P(2·a,⌊b/2⌋) : b&gt;1 and b is even number&#xA;P(a,b):= P(2·a,⌊b/2⌋)+a : b&gt;1 and b is odd n...
discrete mathematics induction mathematical analysis
1
How to prove with induction -- (discrete mathematics induction mathematical analysis) <p>So far I have learned how to write proofs by induction and it went fine until I got this recursive problem, which I'm not quite sure how to begin and how to prove that with induction.</p>&#xA;&#xA;<pre><code> P(2·a,⌊b/2⌋...
habedi/stack-exchange-dataset
65,122
Can a Turing machine compute the outcome of any machine that is less powerful than a Turing machine?
<p>It is known that a Turing machine cannot predict the outcome of another Turing machine. Given a machine $M$ less powerful than any Turing machine (i.e. able to decide less languages, i.e. a subset of langauges, than any Turing machine), does there exist a Turing machine $T$ which can always compute $M$ such that $T(...
computability turing machines computation models
1
Can a Turing machine compute the outcome of any machine that is less powerful than a Turing machine? -- (computability turing machines computation models) <p>It is known that a Turing machine cannot predict the outcome of another Turing machine. Given a machine $M$ less powerful than any Turing machine (i.e. able to de...
habedi/stack-exchange-dataset
65,123
Confused about how to exactly determine the complexity of an Algorithm
<p>Let's take this algorithm as an example.</p>&#xA;&#xA;<p>$PATH$ = {$G$, s, t | $G$ is a directed graph that has a directed path from s to t }.</p>&#xA;&#xA;<p>Prove that $PATH \in P $.</p>&#xA;&#xA;<p>Ok, I know the basic algorithm is to start from node s, place a mark on it, and then look over the rest of the edges...
algorithms turing machines
1
Confused about how to exactly determine the complexity of an Algorithm -- (algorithms turing machines) <p>Let's take this algorithm as an example.</p>&#xA;&#xA;<p>$PATH$ = {$G$, s, t | $G$ is a directed graph that has a directed path from s to t }.</p>&#xA;&#xA;<p>Prove that $PATH \in P $.</p>&#xA;&#xA;<p>Ok, I know th...
habedi/stack-exchange-dataset
65,126
CRC error detection
<p>I know that to find an error in signal we have to divide given signal with given polynomial and if 0 remains there is no error. But if I have received signal: 0000 0101 0101 0000 1010 0101 and polynomial 10001000000100001(CRC-CCITT) how do I Xor them: </p>&#xA;&#xA;<p>1010101000010100101 (signal without zeroes) </p>...
coding theory polynomials error correcting codes crc
1
CRC error detection -- (coding theory polynomials error correcting codes crc) <p>I know that to find an error in signal we have to divide given signal with given polynomial and if 0 remains there is no error. But if I have received signal: 0000 0101 0101 0000 1010 0101 and polynomial 10001000000100001(CRC-CCITT) how do...
habedi/stack-exchange-dataset
65,132
Given 2 sets of n points: minimize sum of traveled distances
<p>I am given two sets $S, T$ each of $n$ points in $\mathbb{R}^k$, I want to find a bijection $a : S \rightarrow T$, such that $$\sum_{s \in S} d(s, a(s))$$ gets minimized, with $d$ being the Euclidean distance. </p>&#xA;&#xA;<p>I am aware that this transportation problem is a special case of the earth mover distance ...
algorithms optimization computational geometry linear programming bipartite matching
1
Given 2 sets of n points: minimize sum of traveled distances -- (algorithms optimization computational geometry linear programming bipartite matching) <p>I am given two sets $S, T$ each of $n$ points in $\mathbb{R}^k$, I want to find a bijection $a : S \rightarrow T$, such that $$\sum_{s \in S} d(s, a(s))$$ gets minimi...
habedi/stack-exchange-dataset