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
53,252
An ID (auto increment integer) always as primary key for each db-table?
<p>Till now, I always gave each db-table an id-column (generally with the table name and an underscore as a prefix, e.g. employee_id), and I also <strong>never</strong> have seen another approach to unique a db-table-record <strong>in practice</strong>. But on the other hand during my studies, I often have seen other c...
databases
1
An ID (auto increment integer) always as primary key for each db-table? -- (databases) <p>Till now, I always gave each db-table an id-column (generally with the table name and an underscore as a prefix, e.g. employee_id), and I also <strong>never</strong> have seen another approach to unique a db-table-record <strong>i...
habedi/stack-exchange-dataset
53,254
Calculate maximum ammount of Bus Bandwidth
<p>Don't know if this is the right community for this and this should be pretty basic but here goes.&#xA;I'm studying System Engineering and one of the homework problems is the following question.</p>&#xA;&#xA;<blockquote>&#xA; <p>A 32-bit computer with a 200-MHZ Bus requires four cycles to read a&#xA; 32-bit word. H...
cpu
1
Calculate maximum ammount of Bus Bandwidth -- (cpu) <p>Don't know if this is the right community for this and this should be pretty basic but here goes.&#xA;I'm studying System Engineering and one of the homework problems is the following question.</p>&#xA;&#xA;<blockquote>&#xA; <p>A 32-bit computer with a 200-MHZ Bus...
habedi/stack-exchange-dataset
53,268
How do I prove Berman's theorem?
<p>Berman's theorem states </p>&#xA;&#xA;<blockquote>&#xA; <p>If a unary language ( a language with all the strings of the type $1^i$, $ i &gt; 0 $ ) is NP-Complete then P = NP.</p>&#xA;</blockquote>&#xA;&#xA;<p>I tried reducing SAT to a given unary language $L$ assuming it is NP-Complete. But I can't think of a way ...
complexity theory np complete np
1
How do I prove Berman's theorem? -- (complexity theory np complete np) <p>Berman's theorem states </p>&#xA;&#xA;<blockquote>&#xA; <p>If a unary language ( a language with all the strings of the type $1^i$, $ i &gt; 0 $ ) is NP-Complete then P = NP.</p>&#xA;</blockquote>&#xA;&#xA;<p>I tried reducing SAT to a given una...
habedi/stack-exchange-dataset
53,270
Pi in place of binary
<p>Some time ago, I asked this question but no one quite understood it or was able to answer. I deleted the original question and have since decided to try it again.</p>&#xA;&#xA;<p>As I understand it, all things digital are originally based on ones and zeros - binary code.</p>&#xA;&#xA;<p>However, I have wondered for ...
computational complexity
1
Pi in place of binary -- (computational complexity) <p>Some time ago, I asked this question but no one quite understood it or was able to answer. I deleted the original question and have since decided to try it again.</p>&#xA;&#xA;<p>As I understand it, all things digital are originally based on ones and zeros - binary...
habedi/stack-exchange-dataset
53,274
Is it possible to compute -12 (decimal) in 4 bits binary
<p>This is what I have so far</p>&#xA;&#xA;<p>1 1 0 0</p>&#xA;&#xA;<p>Switch values by 2s Complement</p>&#xA;&#xA;<p>0 0 1 1&#xA;+ 1</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>0 1 0 0</p>&#xA;
computer architecture arithmetic
1
Is it possible to compute -12 (decimal) in 4 bits binary -- (computer architecture arithmetic) <p>This is what I have so far</p>&#xA;&#xA;<p>1 1 0 0</p>&#xA;&#xA;<p>Switch values by 2s Complement</p>&#xA;&#xA;<p>0 0 1 1&#xA;+ 1</p>&#xA;&#xA;<hr>&#xA;&#xA;<p>0 1 0 0</p>&#xA;
habedi/stack-exchange-dataset
53,279
Is there a known method for constructing a grammar given a finite set of finite strings?
<p>From my reading it seems that most grammars are concerned with generating an infinite number of strings. What if you worked the other way around?</p>&#xA;&#xA;<p>If given n strings of m length, it should be possible to make a grammar that will generate those strings, and just those strings.</p>&#xA;&#xA;<p>Is there ...
formal languages regular languages formal grammars finite sets
1
Is there a known method for constructing a grammar given a finite set of finite strings? -- (formal languages regular languages formal grammars finite sets) <p>From my reading it seems that most grammars are concerned with generating an infinite number of strings. What if you worked the other way around?</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
53,291
Can I change the input of my reductionduring the proof?
<p>To prove that a problem $\Pi_2$ is NP-hard one has to: </p>&#xA;&#xA;<ol>&#xA;<li>select a known NP-hard problem $\Pi_1$; </li>&#xA;<li>from an arbitrary instance of $\Pi_1$, create an instance of $\Pi_2$ in polynomial-time; and </li>&#xA;<li>show that solve $\Pi_1$ with the given instance $\iff$ solve $\Pi_2$ with ...
complexity theory reductions proof techniques np hard
1
Can I change the input of my reductionduring the proof? -- (complexity theory reductions proof techniques np hard) <p>To prove that a problem $\Pi_2$ is NP-hard one has to: </p>&#xA;&#xA;<ol>&#xA;<li>select a known NP-hard problem $\Pi_1$; </li>&#xA;<li>from an arbitrary instance of $\Pi_1$, create an instance of $\Pi_...
habedi/stack-exchange-dataset
53,292
Why is the processes address space a continuous block in RAM?
<p>I need some clarification regarding how the process address space is organized in memory. I went through basic concepts of virtual memory and adress translation and according to the size of the page, it seems that a virtual adress can have its equivalent physical address located anywhere in RAM, it that right ?</p>&...
operating systems memory management virtual memory
1
Why is the processes address space a continuous block in RAM? -- (operating systems memory management virtual memory) <p>I need some clarification regarding how the process address space is organized in memory. I went through basic concepts of virtual memory and adress translation and according to the size of the page,...
habedi/stack-exchange-dataset
53,299
Find all pairs of strings in a set with Levenshtein distance < d
<p>I have a set of $n = $ 100 million strings of length $l = 20$, and for each string in the set, I would like to find all the other strings in the set with Levenshtein distance $\le d = 4$ from that string. The Levenshtein distance (also called the edit distance) between two strings is the number of insertions, delet...
algorithms strings string metrics edit distance
1
Find all pairs of strings in a set with Levenshtein distance < d -- (algorithms strings string metrics edit distance) <p>I have a set of $n = $ 100 million strings of length $l = 20$, and for each string in the set, I would like to find all the other strings in the set with Levenshtein distance $\le d = 4$ from that st...
habedi/stack-exchange-dataset
53,304
How do I select a subset such that the sum and the product are greater than some value?
<p>I have asked few days ago <a href="https://cs.stackexchange.com/questions/52150/how-to-select-a-subset-of-items-in-two-different-sets-such-that-their-product-is">this question</a>. Now I am simplifying the problem a little bit.</p>&#xA;&#xA;<p>Given two sets $A=\{a_1,\ldots,a_n\}$, and $B=\{b_1,\ldots,b_n\}$ of non-...
algorithms complexity theory np hard
1
How do I select a subset such that the sum and the product are greater than some value? -- (algorithms complexity theory np hard) <p>I have asked few days ago <a href="https://cs.stackexchange.com/questions/52150/how-to-select-a-subset-of-items-in-two-different-sets-such-that-their-product-is">this question</a>. Now I ...
habedi/stack-exchange-dataset
53,309
Can I use the set of "used arguments values" as a memoization key for a deterministic function?
<p>I have a deterministic function $f(x_1, x_2, ..., x_n)$ that takes $n$ arguments.</p>&#xA;&#xA;<p>Given a set of arguments $X = (x_i)$, I can compute $U_X = \{ i \in [1, n] : x_i \text{ was read during the evaluation of } f(X) \}$</p>&#xA;&#xA;<p>Would it be valid to use the set $K_X = \{(i, x_i): i \in U_X\}$ as a ...
algorithms correctness proof memoization
1
Can I use the set of "used arguments values" as a memoization key for a deterministic function? -- (algorithms correctness proof memoization) <p>I have a deterministic function $f(x_1, x_2, ..., x_n)$ that takes $n$ arguments.</p>&#xA;&#xA;<p>Given a set of arguments $X = (x_i)$, I can compute $U_X = \{ i \in [1, n] : ...
habedi/stack-exchange-dataset
53,319
Why is universal turing machine considered with only one head?
<p>While defining the following time hierarchy theorem (for deterministic case ) :</p>&#xA;&#xA;<blockquote>&#xA; <p>If $f(n)\log{f(n)}=o(g(n))$ then there are languages decidable in $O(g(n))$ which cannot be decided in $O(f(n))$</p>&#xA;</blockquote>&#xA;&#xA;<p>The $\log$ factor comes due to the overhead of simulati...
complexity theory turing machines computation models simulation
1
Why is universal turing machine considered with only one head? -- (complexity theory turing machines computation models simulation) <p>While defining the following time hierarchy theorem (for deterministic case ) :</p>&#xA;&#xA;<blockquote>&#xA; <p>If $f(n)\log{f(n)}=o(g(n))$ then there are languages decidable in $O(g...
habedi/stack-exchange-dataset
53,331
Minimal basis for set of binary vectors using XOR
<p>I would be surprised if this isn't a well-studied problem, but I'm not sure what else to search for at this point: you're given a set of binary $n$-vectors $S \subset \{0,1\}^n$. The problem is to find another set of binary $n$-vectors $B \subset \{0,1\}^n$, with minimal size $|B|$, such that every vector in $S$ can...
complexity theory arithmetic matrices linear algebra
1
Minimal basis for set of binary vectors using XOR -- (complexity theory arithmetic matrices linear algebra) <p>I would be surprised if this isn't a well-studied problem, but I'm not sure what else to search for at this point: you're given a set of binary $n$-vectors $S \subset \{0,1\}^n$. The problem is to find another...
habedi/stack-exchange-dataset
53,340
What is examples of languages to prove the inclusions between families of languages generated by matrix grammars?
<p>$\lambda M_{ac}$ = family of languages generated by matrix grammar with appearance checking and with erasing rules</p>&#xA;&#xA;<p>$\lambda M$ = family of languages generated by matrix grammar without appearance checking and with erasing rules</p>&#xA;&#xA;<p>$M_{ac}$ = family of languages generated by matrix gramma...
formal grammars
1
What is examples of languages to prove the inclusions between families of languages generated by matrix grammars? -- (formal grammars) <p>$\lambda M_{ac}$ = family of languages generated by matrix grammar with appearance checking and with erasing rules</p>&#xA;&#xA;<p>$\lambda M$ = family of languages generated by matr...
habedi/stack-exchange-dataset
53,349
XOR two numbers
<p>Is there an intuitive meaning of XOR of two numbers not involving binary and just decimal? Or is is always converted into binary and then XORed?</p>&#xA;
logic arithmetic xor
1
XOR two numbers -- (logic arithmetic xor) <p>Is there an intuitive meaning of XOR of two numbers not involving binary and just decimal? Or is is always converted into binary and then XORed?</p>&#xA;
habedi/stack-exchange-dataset
53,355
Finding the number of square prefixes of a string in linear time
<blockquote>&#xA; <p>Let <em>square</em> denote a concatenation of two identical, nonempty&#xA; strings. Given a string $w$, devise an $O(|w|)$&#xA; algorithm that counts the number of prefixes of $w$ that are squares.</p>&#xA;</blockquote>&#xA;&#xA;<p>My initial idea was to use the prefix function $P$ from the Morr...
algorithms strings counting
1
Finding the number of square prefixes of a string in linear time -- (algorithms strings counting) <blockquote>&#xA; <p>Let <em>square</em> denote a concatenation of two identical, nonempty&#xA; strings. Given a string $w$, devise an $O(|w|)$&#xA; algorithm that counts the number of prefixes of $w$ that are squares.<...
habedi/stack-exchange-dataset
53,357
Conflict Driven Clause Learning combined with brute force
<p>I am learning about the Conflict Driven Clause Learning method to solve SAT problems. In this method it is possible to learn clauses and add these in the set of the initial clauses. I understand a learned clause as the negation of a conjunction of clauses such that these make a formula false (conflict). </p>&#xA;&#x...
algorithms machine learning satisfiability
1
Conflict Driven Clause Learning combined with brute force -- (algorithms machine learning satisfiability) <p>I am learning about the Conflict Driven Clause Learning method to solve SAT problems. In this method it is possible to learn clauses and add these in the set of the initial clauses. I understand a learned clause...
habedi/stack-exchange-dataset
53,368
DP - Removing contiguous subsequences from a sequence optimally
<p>I was asked this question a while ago and I'm very stuck:</p>&#xA;&#xA;<blockquote>&#xA; <p>You have a sequence of <code>0</code>'s and <code>1</code>'s, and you can perform one operation it: removing at least $K$ consecutive <code>0</code>'s or $K$ consecutive <code>1</code>'s from the sequence. After performing o...
algorithms dynamic programming decision problem
1
DP - Removing contiguous subsequences from a sequence optimally -- (algorithms dynamic programming decision problem) <p>I was asked this question a while ago and I'm very stuck:</p>&#xA;&#xA;<blockquote>&#xA; <p>You have a sequence of <code>0</code>'s and <code>1</code>'s, and you can perform one operation it: removin...
habedi/stack-exchange-dataset
53,372
Why is simulation by non deterministic Turing machine faster than a deterministic one?
<p>A deterministic universal Turing machine $U_D$ can simulate a deterministic turing machine $M_D$ in $O(T(n)log(T(n)))$ where $M_D$ runs in $O(T(n))$. But I came across an exercise in Sanjeev Arora and Boaz Barak that a non-deterministic universal Turing machine $U_{ND}$ can simulate a non deterministic Turing machin...
complexity theory turing machines nondeterminism simulation
1
Why is simulation by non deterministic Turing machine faster than a deterministic one? -- (complexity theory turing machines nondeterminism simulation) <p>A deterministic universal Turing machine $U_D$ can simulate a deterministic turing machine $M_D$ in $O(T(n)log(T(n)))$ where $M_D$ runs in $O(T(n))$. But I came acro...
habedi/stack-exchange-dataset
53,383
Hyper parameter and complexity in $K$ nearest neighbors
<p>I'm wondering if choosing K in the Nearest Neighbors Classifier can be stated as model selection, since the computational complexity is getting higher, the higher K is.</p>&#xA;&#xA;<p>My understanding is: since the complexity increases it means, that K is a hyper parameter.</p>&#xA;&#xA;<p>Am I getting the concept ...
algorithms complexity theory machine learning
1
Hyper parameter and complexity in $K$ nearest neighbors -- (algorithms complexity theory machine learning) <p>I'm wondering if choosing K in the Nearest Neighbors Classifier can be stated as model selection, since the computational complexity is getting higher, the higher K is.</p>&#xA;&#xA;<p>My understanding is: sinc...
habedi/stack-exchange-dataset
53,389
Variation on Bellman-Ford Algorithms?
<p>We have a Directed Graph with 100 vertexes. v1 --> v2 --> ... v100 and all edges weights is equal to 1. we want to used bellman-ford for finding all shortest paths from v1 to other vertexes. this algorithm in each step check all edges in arbitrary order. if in each step the shortest distance v1 to all others vertexe...
algorithms graphs data structures trees shortest path
1
Variation on Bellman-Ford Algorithms? -- (algorithms graphs data structures trees shortest path) <p>We have a Directed Graph with 100 vertexes. v1 --> v2 --> ... v100 and all edges weights is equal to 1. we want to used bellman-ford for finding all shortest paths from v1 to other vertexes. this algorithm in each step c...
habedi/stack-exchange-dataset
53,395
Examples of specialized instructions of assembly language not available in compilers?
<p>In my CS computer organization textbook, there's this blurb on the advantage of assembly over a high-level language.</p>&#xA;&#xA;<blockquote>&#xA; <p>Another major advantage of assembly language is the ability to exploit specialized instructions - for example, string copy or pattern-matching instructions. Compiler...
programming languages compilers
1
Examples of specialized instructions of assembly language not available in compilers? -- (programming languages compilers) <p>In my CS computer organization textbook, there's this blurb on the advantage of assembly over a high-level language.</p>&#xA;&#xA;<blockquote>&#xA; <p>Another major advantage of assembly langua...
habedi/stack-exchange-dataset
53,397
Compare regex in programming languages with regular expression from automata/formal language?
<p>I'm trying to reconcile the differences/similarities between regular expression from formal language theory and automata, and the "regex" offered by programming languages.</p>&#xA;&#xA;<p>These two differ not just in "syntax" (the union <code>+</code> in regular expressions means <code>|</code> in regex, and there's...
reference request programming languages regular expressions
1
Compare regex in programming languages with regular expression from automata/formal language? -- (reference request programming languages regular expressions) <p>I'm trying to reconcile the differences/similarities between regular expression from formal language theory and automata, and the "regex" offered by programmi...
habedi/stack-exchange-dataset
53,409
Do Scheme operators have associativity?
<p>Do operators in the Scheme programming language have associativity. For example, the code <code>(- 5 2 1)</code> evaluates to 2, but it could evaluate to 4 if it was evaluated right-associative. However, it is unambiguous if you were to write the expression as <code>(- (- 5 2) 1)</code>. The first example, however, ...
programming languages
1
Do Scheme operators have associativity? -- (programming languages) <p>Do operators in the Scheme programming language have associativity. For example, the code <code>(- 5 2 1)</code> evaluates to 2, but it could evaluate to 4 if it was evaluated right-associative. However, it is unambiguous if you were to write the exp...
habedi/stack-exchange-dataset
53,410
What is the difference between a function and a procedure
<p>In general, what is the difference between a function and a procedure when talking about programming languages?</p>&#xA;
programming languages
1
What is the difference between a function and a procedure -- (programming languages) <p>In general, what is the difference between a function and a procedure when talking about programming languages?</p>&#xA;
habedi/stack-exchange-dataset
53,415
Are Random Forests Turing-Complete?
<p>Is the random forests algorithm Turing-complete? As in, can any algorithm be represented by a given "tree" in the forest?</p>&#xA;
algorithms randomized algorithms turing completeness
1
Are Random Forests Turing-Complete? -- (algorithms randomized algorithms turing completeness) <p>Is the random forests algorithm Turing-complete? As in, can any algorithm be represented by a given "tree" in the forest?</p>&#xA;
habedi/stack-exchange-dataset
53,417
What is meant by 'simultaneously computing' all partial derivatives of an arithmetic circuit?
<p>I was reading the proof that for every arithmetic circuit of size $s$ and depth $d$ we can find a circuit $D$ of size $\mathcal{O}(s)$ and depth $\mathcal{O}(d)$. I do not understand what is meant when we say that we can construct a circuit which 'simultaneously computes' all partial derivatives of a function. Does ...
complexity theory circuits
1
What is meant by 'simultaneously computing' all partial derivatives of an arithmetic circuit? -- (complexity theory circuits) <p>I was reading the proof that for every arithmetic circuit of size $s$ and depth $d$ we can find a circuit $D$ of size $\mathcal{O}(s)$ and depth $\mathcal{O}(d)$. I do not understand what is ...
habedi/stack-exchange-dataset
53,419
"Not in big theta but in big O"
<p>Can somebody please help me understand ways I can attempt to find two functions f(x) and g(x) in which f(x) is in big O of g(x) but not big theta of g(x). I get that this is asking me to prove that f(x) isn't in big omega of g(x) but I really don't know where to start with this one. I tried to look for scenerios whe...
asymptotics
1
"Not in big theta but in big O" -- (asymptotics) <p>Can somebody please help me understand ways I can attempt to find two functions f(x) and g(x) in which f(x) is in big O of g(x) but not big theta of g(x). I get that this is asking me to prove that f(x) isn't in big omega of g(x) but I really don't know where to start...
habedi/stack-exchange-dataset
53,428
How can I show that the Cook-Levin theorem does not relativize?
<p>The following is an exercise which I am stuck at ( source: Sanjeev Arora and Boaz Barak; its not homework ) :</p>&#xA;&#xA;<blockquote>&#xA; <p>Show that there is an oracle $A$ and a language $L \in NP^A$ such that $L$ is not polynomial-time reducible to 3SAT even when the machine computing the reduction is allowed...
complexity theory np nondeterminism oracle machines relativization
1
How can I show that the Cook-Levin theorem does not relativize? -- (complexity theory np nondeterminism oracle machines relativization) <p>The following is an exercise which I am stuck at ( source: Sanjeev Arora and Boaz Barak; its not homework ) :</p>&#xA;&#xA;<blockquote>&#xA; <p>Show that there is an oracle $A$ and...
habedi/stack-exchange-dataset
53,441
How to compute $\mathbf{X}^T \mathbf{X}$ efficiently for large $\mathbf{X}$?
<p>Let $\mathbf{X}$ be a $n \times n$ matrix. Given that we can only keep $k$ rows ($k &lt;&lt; n$) or columns of the matrix in memory, how can we compute $\mathbf{X}^T \mathbf{X}$ while minimizing the number of disk accesses? </p>&#xA;&#xA;<p>Are there known algorithms for this problem? I searched for external matrix ...
algorithms efficiency cpu cache linear algebra space analysis
1
How to compute $\mathbf{X}^T \mathbf{X}$ efficiently for large $\mathbf{X}$? -- (algorithms efficiency cpu cache linear algebra space analysis) <p>Let $\mathbf{X}$ be a $n \times n$ matrix. Given that we can only keep $k$ rows ($k &lt;&lt; n$) or columns of the matrix in memory, how can we compute $\mathbf{X}^T \mathbf...
habedi/stack-exchange-dataset
53,444
Properties of coset
<p>Let $C$ be a linear code with minimum distance $2k$. I want to show that there is a coset of $C$ that contains at least two vectors of weight $k$.</p>&#xA;&#xA;<p>Firstly, it holds that the minimum distance of the code is equal to the lowest non-zero weight of a codeword. So this means that the weights of the codewo...
linear algebra coding theory
1
Properties of coset -- (linear algebra coding theory) <p>Let $C$ be a linear code with minimum distance $2k$. I want to show that there is a coset of $C$ that contains at least two vectors of weight $k$.</p>&#xA;&#xA;<p>Firstly, it holds that the minimum distance of the code is equal to the lowest non-zero weight of a ...
habedi/stack-exchange-dataset
53,450
Determine if there are 2 integers in 2 separate arrays add up to a given number
<p>If I'm given 2 unsorted arrays A and B of n distinct integers and an integer z, how can I determine if there exists an integer in A and an integer in B that add up to z with an expected run time of O(n)? </p>&#xA;&#xA;<p>I'm pretty sure that I would have to use a hash table(s) of some sort since I'm dealing with exp...
algorithms hash tables
1
Determine if there are 2 integers in 2 separate arrays add up to a given number -- (algorithms hash tables) <p>If I'm given 2 unsorted arrays A and B of n distinct integers and an integer z, how can I determine if there exists an integer in A and an integer in B that add up to z with an expected run time of O(n)? </p>&...
habedi/stack-exchange-dataset
53,456
Running-time cost of Tweaked Nested Loop
<p>I understand that the following nested for-loop:</p>&#xA;&#xA;<pre><code>for(i=0; i&lt;n/2; i++)&#xA; for(j=0; j&lt;n/2; j++)&#xA; print(j)&#xA;</code></pre>&#xA;&#xA;<p>has the runtime complexity of </p>&#xA;&#xA;<p><img src="https://latex.codecogs.com/gif.latex?%5Csum_%7Bi=0%7D%5E%7Bn/2%7D&space;%5Csum_...
algorithm analysis runtime analysis loops
1
Running-time cost of Tweaked Nested Loop -- (algorithm analysis runtime analysis loops) <p>I understand that the following nested for-loop:</p>&#xA;&#xA;<pre><code>for(i=0; i&lt;n/2; i++)&#xA; for(j=0; j&lt;n/2; j++)&#xA; print(j)&#xA;</code></pre>&#xA;&#xA;<p>has the runtime complexity of </p>&#xA;&#xA;<p><...
habedi/stack-exchange-dataset
53,467
On submultisets of given cardinality and bound that sum to $0$
<p>Given multiset of integers $a_1,\dots,a_{m}$ where $|a_i|\leq\log^cm$ for some $c\in\Bbb R^+$. Is it $\mathsf{NP}$-complete to decide if there is a cardinality $\lceil m^\alpha\rceil$ submultiset for some $\alpha\in(0,1)$ whose sum is $0$?</p>&#xA;&#xA;<p>How many submultisets of such cardinality can we expect to h...
complexity theory np complete decision problem
1
On submultisets of given cardinality and bound that sum to $0$ -- (complexity theory np complete decision problem) <p>Given multiset of integers $a_1,\dots,a_{m}$ where $|a_i|\leq\log^cm$ for some $c\in\Bbb R^+$. Is it $\mathsf{NP}$-complete to decide if there is a cardinality $\lceil m^\alpha\rceil$ submultiset for s...
habedi/stack-exchange-dataset
53,478
Meaning of topological distance between 2 pixels
<p>I came across the notion of topology and topological distance in the context of image processing several times (especially when it came to mathematical morphology). I looked for a not too abstract explanation of "topological distance" but haven't found one yet. Can you please explain (in layaman's terms) the notion ...
image processing topology
1
Meaning of topological distance between 2 pixels -- (image processing topology) <p>I came across the notion of topology and topological distance in the context of image processing several times (especially when it came to mathematical morphology). I looked for a not too abstract explanation of "topological distance" bu...
habedi/stack-exchange-dataset
53,481
Finite State Machine that only accepts strings with equal number of 0's and 1's
<p>Question: Suppose you have a finite state machine that accepts only strings with an equal number of zeros and ones. Show that you can then construct a finite state machine that accepts only strings of the form 0^n 1^n, i.e., an arbitrary finite number of zeros followed by the same number of ones.</p>&#xA;&#xA;<p>My ...
algorithms turing machines finite automata
1
Finite State Machine that only accepts strings with equal number of 0's and 1's -- (algorithms turing machines finite automata) <p>Question: Suppose you have a finite state machine that accepts only strings with an equal number of zeros and ones. Show that you can then construct a finite state machine that accepts only...
habedi/stack-exchange-dataset
53,485
Implicit complexity and interpretation of total languages
<p>In implicit complexity theory we construct languages that characterize what can be computed in various complexity classes. One major result is <a href="http://www.cs.toronto.edu/~sacook/homepage/ptime.pdf" rel="nofollow noreferrer">Bellantoni and Cook</a> where they show that $FP$ can be characterized by such a lang...
complexity theory computability polynomial time interpreters
1
Implicit complexity and interpretation of total languages -- (complexity theory computability polynomial time interpreters) <p>In implicit complexity theory we construct languages that characterize what can be computed in various complexity classes. One major result is <a href="http://www.cs.toronto.edu/~sacook/homepag...
habedi/stack-exchange-dataset
53,490
How many different heaps are there of a given shape?
<p>Let's say we have a tree like this:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/xtYNa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xtYNa.png" alt="enter image description here"></a></p>&#xA;&#xA;<p>Suppose we are given $N$ distinct elements, $N$ being the number of vertices in the tree (...
data structures binary trees heaps
1
How many different heaps are there of a given shape? -- (data structures binary trees heaps) <p>Let's say we have a tree like this:</p>&#xA;&#xA;<p><a href="https://i.stack.imgur.com/xtYNa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xtYNa.png" alt="enter image description here"></a></p>&#xA;&#xA;...
habedi/stack-exchange-dataset
53,493
Decomposing a closed walk in a directed graph into cycles
<p>Let's say I have a closed walk $W$ in a directed graph $D$. Represent $W$ as a list of arcs $(a_1, a_2, \dots, a_k)$. Since it's a closed walk, there may be repeated edges, but the source vertex of $a_1$ must equal the target vertex of $a_k$. My claim is that the multiset of arcs $W'=\{a_1, a_2, \dots, a_k\}$ can be...
graphs reference request
1
Decomposing a closed walk in a directed graph into cycles -- (graphs reference request) <p>Let's say I have a closed walk $W$ in a directed graph $D$. Represent $W$ as a list of arcs $(a_1, a_2, \dots, a_k)$. Since it's a closed walk, there may be repeated edges, but the source vertex of $a_1$ must equal the target ver...
habedi/stack-exchange-dataset
53,495
Is the NP-hardness Proof with One Way Implication Correct and Why?
<p>A problem $\Pi$ is NP-hard if I can prove this:</p>&#xA;&#xA;<ul>&#xA;<li>a known NP-hard problem $\Pi'$ reduces to $\Pi$ in polynomial time; and</li>&#xA;<li>$f(x) \in \Pi\iff$ $x \in \Pi'$.</li>&#xA;</ul>&#xA;&#xA;<p>If I can show only one way implication, that is $f(x) \in \Pi\Rightarrow$ $x \in \Pi'$. Is this...
complexity theory reductions proof techniques
1
Is the NP-hardness Proof with One Way Implication Correct and Why? -- (complexity theory reductions proof techniques) <p>A problem $\Pi$ is NP-hard if I can prove this:</p>&#xA;&#xA;<ul>&#xA;<li>a known NP-hard problem $\Pi'$ reduces to $\Pi$ in polynomial time; and</li>&#xA;<li>$f(x) \in \Pi\iff$ $x \in \Pi'$.</li>&#...
habedi/stack-exchange-dataset
53,500
Turing machine that can tell if it ends in standard position?
<p>Suppose we have a TM $M$ with alphabet $\{0, 1 \}$ with n states. Say $M$ halts in standard position if it is scanning the left-most $1$ of a non-broken string of $1$s (and everything else on the tape is $0$.</p>&#xA;&#xA;<p>Suppose the tape is initially consists of a bunch of $1$s, a $0$, a bunch of $1$s, a $0$, an...
computability turing machines computation models
1
Turing machine that can tell if it ends in standard position? -- (computability turing machines computation models) <p>Suppose we have a TM $M$ with alphabet $\{0, 1 \}$ with n states. Say $M$ halts in standard position if it is scanning the left-most $1$ of a non-broken string of $1$s (and everything else on the tape ...
habedi/stack-exchange-dataset
53,501
Proof by Reduction: From Empty Language to Halting Problem on Empty Input
<p>Question:&#xA;Let language $E$ = {$\langle M \rangle$ | $M$ accepts no inputs whatsoever}&#xA;Let language $H$ = { $\langle M \rangle$ | $M$ halts on an empty string input}.</p>&#xA;&#xA;<p>Is it possible to show that $H$ is undecidable by reducing $E$ to it? (You can take it as a given that we know $E$ to be undeci...
turing machines halting problem correctness proof
1
Proof by Reduction: From Empty Language to Halting Problem on Empty Input -- (turing machines halting problem correctness proof) <p>Question:&#xA;Let language $E$ = {$\langle M \rangle$ | $M$ accepts no inputs whatsoever}&#xA;Let language $H$ = { $\langle M \rangle$ | $M$ halts on an empty string input}.</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
53,507
Turing machine enumerator
<p>As the number of Turing Machines is countably, we can create some list of them and number them 1, 2, 3,... Suppose turing machine k&#xA; computes some function $f_k$. &#xA;Is there a turing machine S&#xA; that can computer $f_k(k)$?</p>&#xA;&#xA;<p>It seems like there should be, as I am fairly confident that you can...
computability turing machines enumeration
1
Turing machine enumerator -- (computability turing machines enumeration) <p>As the number of Turing Machines is countably, we can create some list of them and number them 1, 2, 3,... Suppose turing machine k&#xA; computes some function $f_k$. &#xA;Is there a turing machine S&#xA; that can computer $f_k(k)$?</p>&#xA;&#x...
habedi/stack-exchange-dataset
53,521
what is difference between multilayer perceptron and multilayer neural network?
<p>When do we say that a artificial neural network is a <em>multilayer Perceptron</em>?</p>&#xA;&#xA;<p>And when do we say that a artificial neural network is a <em>multilayer</em>?</p>&#xA;&#xA;<p>Is the term <em>perceptron</em> related to learning rule to update the weights?</p>&#xA;&#xA;<p>Or It is related to neuron...
neural networks perceptron
1
what is difference between multilayer perceptron and multilayer neural network? -- (neural networks perceptron) <p>When do we say that a artificial neural network is a <em>multilayer Perceptron</em>?</p>&#xA;&#xA;<p>And when do we say that a artificial neural network is a <em>multilayer</em>?</p>&#xA;&#xA;<p>Is the ter...
habedi/stack-exchange-dataset
53,524
premiss of reduction rule (abst) of pure type systems
<p>$$(abst) \:\frac{\Gamma, x: t_1 \vdash t_2: t_3 \quad \Gamma \vdash (x: t_1) \to t_3: s}{\Gamma \vdash (x: t_1. t_2): (x: t_1) \to t_3}$$</p>&#xA;&#xA;<p>In this rule, why is $(x: t_1) \to t_3$ required to be an inhabitant of some sort? Isn't assuming $t_1: s$ enough?</p>&#xA;
lambda calculus type theory semantics
1
premiss of reduction rule (abst) of pure type systems -- (lambda calculus type theory semantics) <p>$$(abst) \:\frac{\Gamma, x: t_1 \vdash t_2: t_3 \quad \Gamma \vdash (x: t_1) \to t_3: s}{\Gamma \vdash (x: t_1. t_2): (x: t_1) \to t_3}$$</p>&#xA;&#xA;<p>In this rule, why is $(x: t_1) \to t_3$ required to be an inhabita...
habedi/stack-exchange-dataset
53,527
Number of processes needed to maximize CPU utilization under I/O wait conditions
<p>A computer has 2 GB of RAM of which the operating system occupies 256 MB. The processes &#xA;are all 128 MB (for simplicity) and have the same characteristics. If the goal is 99% CPU &#xA;utilization, what is the maximum I/O wait that can be tolerated?</p>&#xA;&#xA;<p>My professor said that there are 14 processes in...
computer architecture cpu
1
Number of processes needed to maximize CPU utilization under I/O wait conditions -- (computer architecture cpu) <p>A computer has 2 GB of RAM of which the operating system occupies 256 MB. The processes &#xA;are all 128 MB (for simplicity) and have the same characteristics. If the goal is 99% CPU &#xA;utilization, what...
habedi/stack-exchange-dataset
53,530
Grammar for square numbers in unary
<p>I have to write a grammar for the following language:&#xA;$$\{1^{n^2} \mid n\geq 1 \}$$&#xA;I am having trouble figuring out the production rules. I was thinking of using the fact that $n^2$ can be written as the sum of first $n$ odd numbers but couldn't proceed any further. </p>&#xA;
formal grammars context sensitive
1
Grammar for square numbers in unary -- (formal grammars context sensitive) <p>I have to write a grammar for the following language:&#xA;$$\{1^{n^2} \mid n\geq 1 \}$$&#xA;I am having trouble figuring out the production rules. I was thinking of using the fact that $n^2$ can be written as the sum of first $n$ odd numbers ...
habedi/stack-exchange-dataset
53,537
Help me understand the logic behind x - y in binary by boolean?
<p>x and y are 4 bit signed numbers (2s complement..) </p>&#xA;&#xA;<p>x - y can be obtained by:</p>&#xA;&#xA;<pre><code>!(!x + y)&#xA;</code></pre>&#xA;&#xA;<p>I know that in 2s complement </p>&#xA;&#xA;<pre><code>-y = (!y + 1)&#xA;</code></pre>&#xA;&#xA;<p>So I can pretty much understand how this works:</p>&#xA;&#xA;...
arithmetic boolean algebra
1
Help me understand the logic behind x - y in binary by boolean? -- (arithmetic boolean algebra) <p>x and y are 4 bit signed numbers (2s complement..) </p>&#xA;&#xA;<p>x - y can be obtained by:</p>&#xA;&#xA;<pre><code>!(!x + y)&#xA;</code></pre>&#xA;&#xA;<p>I know that in 2s complement </p>&#xA;&#xA;<pre><code>-y = (!y ...
habedi/stack-exchange-dataset
53,540
Rank of random binary matrix subset
<p>I have a problem that smells like it is NP-complete, but at the same time it feels like maybe you can solve it by just keeping track of column-wise Hamming distance or something, or that it's equivalent to some spanning tree-like problem. The problem is as follows.</p>&#xA;&#xA;<p>We have some binary matrix $M \in \...
linear algebra
1
Rank of random binary matrix subset -- (linear algebra) <p>I have a problem that smells like it is NP-complete, but at the same time it feels like maybe you can solve it by just keeping track of column-wise Hamming distance or something, or that it's equivalent to some spanning tree-like problem. The problem is as foll...
habedi/stack-exchange-dataset
53,541
General question on approach to showing sample size required is $\Omega(\cdot)$
<p>I was not able to find a similar question in the archives, so pardon this relatively elementary question if it has been asked before.</p>&#xA;&#xA;<p>Let $E_n$ be some event that depends on the sample size $n$ and suppose we are looking for an upper bound on $n$ that guarantees $Pr(E_n)\geq 1-\varepsilon$ for some $...
complexity theory algorithm analysis runtime analysis
1
General question on approach to showing sample size required is $\Omega(\cdot)$ -- (complexity theory algorithm analysis runtime analysis) <p>I was not able to find a similar question in the archives, so pardon this relatively elementary question if it has been asked before.</p>&#xA;&#xA;<p>Let $E_n$ be some event that...
habedi/stack-exchange-dataset
53,552
What are the limitations of RNNs?
<p>For a school project, I'm planning to compare Spiking Neural Networks (SNNs) and Deep Learning recurrent neural networks, such as Long Short Term Memory (LSTMs) networks in learning a time-series. I would like to show some case where SNNs surpass LSTMs. Consequently, what are the limitations of LSTMs? Are they robus...
machine learning neural networks
1
What are the limitations of RNNs? -- (machine learning neural networks) <p>For a school project, I'm planning to compare Spiking Neural Networks (SNNs) and Deep Learning recurrent neural networks, such as Long Short Term Memory (LSTMs) networks in learning a time-series. I would like to show some case where SNNs surpas...
habedi/stack-exchange-dataset
53,555
Generating constraints to solve dependently-typed metavariables?
<p>In dependent-types, <em>Miller pattern unification</em> is used to solve a decidable fragment of higher-order unification. This allows dependently-typed languages to contain metavariables or implicit arguments.</p>&#xA;&#xA;<p>There are many papers which describe, given a unification problem in the pattern fragment,...
reference request lambda calculus type theory dependent types unification
1
Generating constraints to solve dependently-typed metavariables? -- (reference request lambda calculus type theory dependent types unification) <p>In dependent-types, <em>Miller pattern unification</em> is used to solve a decidable fragment of higher-order unification. This allows dependently-typed languages to contain...
habedi/stack-exchange-dataset
53,557
Robot lawyer algorithm
<p>I have a background in physics and have taken some few classes online in Machine learning. But I really do not understand how this Robot lawyer can work:</p>&#xA;&#xA;<p><a href="http://www.techinsider.io/joshua-browder-bot-for-parking-tickets-2016-2" rel="nofollow">A 19-year-old made a free robot lawyer that has a...
reference request artificial intelligence
1
Robot lawyer algorithm -- (reference request artificial intelligence) <p>I have a background in physics and have taken some few classes online in Machine learning. But I really do not understand how this Robot lawyer can work:</p>&#xA;&#xA;<p><a href="http://www.techinsider.io/joshua-browder-bot-for-parking-tickets-20...
habedi/stack-exchange-dataset
53,575
Big Oh vs Big Theta
<p>I mathematically understand $f(n) \in O(g(n))$ : $f(n)$ does not grow faster than $g(n)$. More formally, $\exists c, n_0$ s.t. $f(n) \leq cg(n) \forall n \geq n_0$. </p>&#xA;&#xA;<p>Similarly, $f(n) \in \Theta(g(n))$ means that $f(n)$ grows approximately as fast as $g(n)$. i.e. $f(n) \in O(g(n)), \Omega(g(n))$.</p>&...
algorithm analysis asymptotics ambiguity
1
Big Oh vs Big Theta -- (algorithm analysis asymptotics ambiguity) <p>I mathematically understand $f(n) \in O(g(n))$ : $f(n)$ does not grow faster than $g(n)$. More formally, $\exists c, n_0$ s.t. $f(n) \leq cg(n) \forall n \geq n_0$. </p>&#xA;&#xA;<p>Similarly, $f(n) \in \Theta(g(n))$ means that $f(n)$ grows approximat...
habedi/stack-exchange-dataset
53,581
What edge-set is required to make a non-cyclic directed disconnected graph initial?
<p>Is there an algorithm to find the minimum set of edges required from a new node in order to make a disconnected directed graph initial?</p>&#xA;&#xA;<p>Example -</p>&#xA;&#xA;<p>input:</p>&#xA;&#xA;<pre><code>a -&gt; b;&#xA;b -&gt; c;&#xA;b -&gt; d;&#xA;e -&gt; f;&#xA;f -&gt; g;&#xA;</code></pre>&#xA;&#xA;<p><img sr...
graphs
1
What edge-set is required to make a non-cyclic directed disconnected graph initial? -- (graphs) <p>Is there an algorithm to find the minimum set of edges required from a new node in order to make a disconnected directed graph initial?</p>&#xA;&#xA;<p>Example -</p>&#xA;&#xA;<p>input:</p>&#xA;&#xA;<pre><code>a -&gt; b;&#...
habedi/stack-exchange-dataset
53,591
How do cycles of non-consuming transitions in NFAs influence their halting properties?
<p>I am in a class that is going over NFAs. The way they are described is a set of states, one of which is the start state, zero or more are accept states, and one or more transitions between them, which consume a symbol of the language or a <em>lambda</em> transition which does not consume a symbol from the string.</p...
automata finite automata nondeterminism
1
How do cycles of non-consuming transitions in NFAs influence their halting properties? -- (automata finite automata nondeterminism) <p>I am in a class that is going over NFAs. The way they are described is a set of states, one of which is the start state, zero or more are accept states, and one or more transitions betw...
habedi/stack-exchange-dataset
53,596
Big-O Justification Question
<p>I am trying to justify the big-O order of a runtime complexity by finding a $c$ and $n_0$ that hold for it. Does the left side of the justification need to be one or higher, or can it be any value so long as it is a real number and less than the right side? For instance, is the following valid:&#xA;$$n^2/4 + 1/2 \le...
asymptotics proof techniques landau notation
1
Big-O Justification Question -- (asymptotics proof techniques landau notation) <p>I am trying to justify the big-O order of a runtime complexity by finding a $c$ and $n_0$ that hold for it. Does the left side of the justification need to be one or higher, or can it be any value so long as it is a real number and less t...
habedi/stack-exchange-dataset
53,602
Use max operation in a constraint in Linear Programming
<p>I have liner programme with set of $x_{3n}$ variables where $x_{ij}$ are {0,1}. I am solving this linear programme using LP-Solve.</p>&#xA;&#xA;<p>Using these variables, I want to form following constraint :</p>&#xA;&#xA;<p>$max(x_1 , x_2.., x_n) + max(x_{n+1} , x_{n+2}.. , x_{2n}) + max(x_{2n+1} , x_{2n+2}..., x_{3...
linear programming integer programming
1
Use max operation in a constraint in Linear Programming -- (linear programming integer programming) <p>I have liner programme with set of $x_{3n}$ variables where $x_{ij}$ are {0,1}. I am solving this linear programme using LP-Solve.</p>&#xA;&#xA;<p>Using these variables, I want to form following constraint :</p>&#xA;&...
habedi/stack-exchange-dataset
53,604
Matrix of Matrices in Python
<p>I want to create a matrix where each entry itself is a random matrix. &#xA;What would be a good way to represent this?</p>&#xA;&#xA;<p>It is not necessary but some hints on how to implement your proposed solution in Python would be useful.</p>&#xA;
programming languages matrices
1
Matrix of Matrices in Python -- (programming languages matrices) <p>I want to create a matrix where each entry itself is a random matrix. &#xA;What would be a good way to represent this?</p>&#xA;&#xA;<p>It is not necessary but some hints on how to implement your proposed solution in Python would be useful.</p>&#xA;
habedi/stack-exchange-dataset
53,609
A condition ensuring that a bipartite graph have a perfect matching
<p>There is a bipartite graph $G=(A,B,E)$ such that for every edge $(a,b)$ (where $a$ comes from $A$ and $b$ from $B$), $\deg(a) \geq \deg(b)$, and additionally $\deg(a) \geq 1$ for all $a \in A$. From this, how can I prove there is matching which covers all of $A$?</p>&#xA;
matching bipartite matching
1
A condition ensuring that a bipartite graph have a perfect matching -- (matching bipartite matching) <p>There is a bipartite graph $G=(A,B,E)$ such that for every edge $(a,b)$ (where $a$ comes from $A$ and $b$ from $B$), $\deg(a) \geq \deg(b)$, and additionally $\deg(a) \geq 1$ for all $a \in A$. From this, how can I p...
habedi/stack-exchange-dataset
53,610
What are predicates of a sentence?
<p>I am reading <em>Handbook of Satisfiability</em> in which they say:</p>&#xA;&#xA;<blockquote>&#xA; <p>An algebraic structure, or simply structure, consists of a non-empty set of&#xA; objects existing in the world $w$, called the domain and denoted below by $D$, and&#xA; a function, called an interpretation and de...
terminology logic
1
What are predicates of a sentence? -- (terminology logic) <p>I am reading <em>Handbook of Satisfiability</em> in which they say:</p>&#xA;&#xA;<blockquote>&#xA; <p>An algebraic structure, or simply structure, consists of a non-empty set of&#xA; objects existing in the world $w$, called the domain and denoted below by ...
habedi/stack-exchange-dataset
53,611
Validate that a threaded binary tree works as intended
<p>I am attempting to validate that my threaded binary tree’s insertion and deletion works as intended.</p>&#xA;&#xA;<p>Would it be safe to assume that the following procedure would have tested all corner cases at least once?</p>&#xA;&#xA;<p>I have an array of integer S = {1, 2, …, n-1, n} for n = 1’000’000.&#xA;I then...
data structures binary trees search trees correctness proof software testing
1
Validate that a threaded binary tree works as intended -- (data structures binary trees search trees correctness proof software testing) <p>I am attempting to validate that my threaded binary tree’s insertion and deletion works as intended.</p>&#xA;&#xA;<p>Would it be safe to assume that the following procedure would h...
habedi/stack-exchange-dataset
53,612
Information about ε-greedy algorithms
<p>I'm working on a <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5672586&amp;newsearch=true&amp;queryText=reinforcement%20learning%20first%20person%20shooter" rel="nofollow">paper</a> that uses ε-greedy algorithms for choosing episodes of a sarsa q-learning algorithms. I searched for algorithm bu...
algorithms reference request artificial intelligence greedy algorithms
1
Information about ε-greedy algorithms -- (algorithms reference request artificial intelligence greedy algorithms) <p>I'm working on a <a href="http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=5672586&amp;newsearch=true&amp;queryText=reinforcement%20learning%20first%20person%20shooter" rel="nofollow">paper</a>...
habedi/stack-exchange-dataset
53,614
Design patterns for simple text based scripting language?
<p>In my current application I am trying to determine the best way to implement a simple scripting language. This language would allow a user to create a script that controls a machine with various inputs and outputs. I have defined most of the commands and created a nice editor for the language though I am stuck now t...
reference request programming languages software engineering design patterns
1
Design patterns for simple text based scripting language? -- (reference request programming languages software engineering design patterns) <p>In my current application I am trying to determine the best way to implement a simple scripting language. This language would allow a user to create a script that controls a mac...
habedi/stack-exchange-dataset
53,617
What the length of instructions on these processors will be?
<p>Let's say we have two computers with identical ISA, but different size of word in main memory. One is 32 bit and the other 64 bits. So will it be identical length of instruction, different, depends on memory or depends on cache memory and why ? </p>&#xA;
computer architecture
1
What the length of instructions on these processors will be? -- (computer architecture) <p>Let's say we have two computers with identical ISA, but different size of word in main memory. One is 32 bit and the other 64 bits. So will it be identical length of instruction, different, depends on memory or depends on cache m...
habedi/stack-exchange-dataset
53,619
Master Theorem Case 3 Regularity Condition
<p>In case 3 of the master theorem, we have to show that</p>&#xA;&#xA;<p>$$ af(n/b) \leq cf(n). $$</p>&#xA;&#xA;<p>I don't understand how I can setup this formula. As an example, we have </p>&#xA;&#xA;<p>$$ T(n)=3T(n/4) + n \lg n.$$</p>&#xA;&#xA;<p>In this case $a=3$ and $b=4$.&#xA;This gives us $O(n^{0.793})$ which...
algorithms master theorem
1
Master Theorem Case 3 Regularity Condition -- (algorithms master theorem) <p>In case 3 of the master theorem, we have to show that</p>&#xA;&#xA;<p>$$ af(n/b) \leq cf(n). $$</p>&#xA;&#xA;<p>I don't understand how I can setup this formula. As an example, we have </p>&#xA;&#xA;<p>$$ T(n)=3T(n/4) + n \lg n.$$</p>&#xA;&#...
habedi/stack-exchange-dataset
53,623
what are read/write operations involved in main memory, cache and processor?
<p>please bear with me, I always get confused with the terminologies used in my computer architecture class.</p>&#xA;&#xA;<p>What are <strong>read</strong> and <strong>write</strong> operations exactly? What are their relationship with processor, main memory, and cache?</p>&#xA;&#xA;<p>I always thought that <strong>loa...
computer architecture
1
what are read/write operations involved in main memory, cache and processor? -- (computer architecture) <p>please bear with me, I always get confused with the terminologies used in my computer architecture class.</p>&#xA;&#xA;<p>What are <strong>read</strong> and <strong>write</strong> operations exactly? What are thei...
habedi/stack-exchange-dataset
53,626
What's the difference between clock replacement & LRU replacement?
<p>As title. When we want to request following page numbers 2,4,4,2,5,2,1,1,3,1, is clock replacement better? What are the advantages and disadvantages of them?</p>&#xA;&#xA;<p>Thanks~ </p>&#xA;
operating systems memory management cpu cache virtual memory
1
What's the difference between clock replacement & LRU replacement? -- (operating systems memory management cpu cache virtual memory) <p>As title. When we want to request following page numbers 2,4,4,2,5,2,1,1,3,1, is clock replacement better? What are the advantages and disadvantages of them?</p>&#xA;&#xA;<p>Thanks~ </...
habedi/stack-exchange-dataset
53,633
Compactly representing integers when allowed a multiplicative error
<p>Consider the problem of representing in memory numbers in the range $\{1,\ldots,n\}$.</p>&#xA;&#xA;<p>Obviously, exact representation of such number requires $\lceil\log_2(n)\rceil$ bits.</p>&#xA;&#xA;<p>In contrast, assume we are allowed to have compressed representations such that when reading the number we get a ...
integers coding theory encoding scheme
1
Compactly representing integers when allowed a multiplicative error -- (integers coding theory encoding scheme) <p>Consider the problem of representing in memory numbers in the range $\{1,\ldots,n\}$.</p>&#xA;&#xA;<p>Obviously, exact representation of such number requires $\lceil\log_2(n)\rceil$ bits.</p>&#xA;&#xA;<p>I...
habedi/stack-exchange-dataset
53,637
swapping between sorting algorithms for small input size left over
<p>Is it suggested to swap between sorting algorithms? Merge sort certainly performs better on large input size however Insertion sort performs better on small input size </p>&#xA;&#xA;<blockquote>&#xA; <p>Analysis based on there graph comparison of running time of Insertion sort and merge sort</p>&#xA;</blockquote>&#...
algorithms algorithm analysis sorting
1
swapping between sorting algorithms for small input size left over -- (algorithms algorithm analysis sorting) <p>Is it suggested to swap between sorting algorithms? Merge sort certainly performs better on large input size however Insertion sort performs better on small input size </p>&#xA;&#xA;<blockquote>&#xA; <p>Ana...
habedi/stack-exchange-dataset
53,639
Calculating attributes' values in the semantic analysis stage
<p>I'm reading through the book : "Compiler Construction: Principles and Practice". In chapter 6 : semantic analysis, an example about attribute grammars is given. The example is of a simple integer arithmetic expressions (I posted a picture because different fonts means different things as you may know):</p>&#xA;&#xA;...
compilers static analysis attribute grammars
1
Calculating attributes' values in the semantic analysis stage -- (compilers static analysis attribute grammars) <p>I'm reading through the book : "Compiler Construction: Principles and Practice". In chapter 6 : semantic analysis, an example about attribute grammars is given. The example is of a simple integer arithmeti...
habedi/stack-exchange-dataset
53,642
Number of addresses in a memory region
<p>So I am looking at some Operating Systems exercises and we have </p>&#xA;&#xA;<blockquote>&#xA; <p>A swapping system eliminates holes by compaction. Assuming a&#xA; random distribution of many holes and many data segments and a &#xA; time to read or write a 32-bit memory word of 10 nsec, abo...
memory management virtual memory
1
Number of addresses in a memory region -- (memory management virtual memory) <p>So I am looking at some Operating Systems exercises and we have </p>&#xA;&#xA;<blockquote>&#xA; <p>A swapping system eliminates holes by compaction. Assuming a&#xA; random distribution of many holes and many data segments and a...
habedi/stack-exchange-dataset
53,665
Minimax algorithm when all the options are the same
<p><strong>tl;dr</strong> What does the Minimax algorithm do when all its options are the same?</p>&#xA;&#xA;<p>Consider this Minimax tree:&#xA;(Green means the ends, orange minimize, blue maximize)&#xA;<a href="https://i.stack.imgur.com/qjiDt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qjiDt.png...
algorithms search algorithms trees
1
Minimax algorithm when all the options are the same -- (algorithms search algorithms trees) <p><strong>tl;dr</strong> What does the Minimax algorithm do when all its options are the same?</p>&#xA;&#xA;<p>Consider this Minimax tree:&#xA;(Green means the ends, orange minimize, blue maximize)&#xA;<a href="https://i.stack....
habedi/stack-exchange-dataset
53,673
The language of Logical Theory as Metalanguage
<p>I am reading the Handbook of Satisfiability, and in Chapter 1 (History of Satisfiability), I found the following statement:</p>&#xA;&#xA;<blockquote>&#xA; <p>Moreover, <em>necessary</em> and <em>possible</em> are predicates of the metalanguage&#xA; (the language of logical theory) because they are used to describe...
terminology logic
1
The language of Logical Theory as Metalanguage -- (terminology logic) <p>I am reading the Handbook of Satisfiability, and in Chapter 1 (History of Satisfiability), I found the following statement:</p>&#xA;&#xA;<blockquote>&#xA; <p>Moreover, <em>necessary</em> and <em>possible</em> are predicates of the metalanguage&#x...
habedi/stack-exchange-dataset
53,674
Difference between "sort" and "universe"
<p>A very basic question.&#xA;As title, what is the difference between "sort" and "universe" in type theory?&#xA;Are they interchangable?&#xA;Or are there only finite number of sorts, but infinite universes?</p>&#xA;
terminology type theory dependent types
1
Difference between "sort" and "universe" -- (terminology type theory dependent types) <p>A very basic question.&#xA;As title, what is the difference between "sort" and "universe" in type theory?&#xA;Are they interchangable?&#xA;Or are there only finite number of sorts, but infinite universes?</p>&#xA;
habedi/stack-exchange-dataset
53,676
Proving that a (tree) language is not Buchi recognizable
<p>I'm reviewing some notes about tree automata and I'm trying to conclude a proof that the professor left incomplete. The statement is:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $A = \{a,b\}$ and $T = \{t \in T_A^{\omega} \mid \text{every path in $t$ contains a finite number of $a$}\}$.&#xA; Prove that $T$ isn't Buchi r...
automata trees buchi automata
1
Proving that a (tree) language is not Buchi recognizable -- (automata trees buchi automata) <p>I'm reviewing some notes about tree automata and I'm trying to conclude a proof that the professor left incomplete. The statement is:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $A = \{a,b\}$ and $T = \{t \in T_A^{\omega} \mid \te...
habedi/stack-exchange-dataset
53,682
What does it mean when each individual array is sorted in different array but bear no relationship to each other
<p>There's a textbook problem that talks about making a binary search dynamic, then analyzing for its amortize cost. However I'm not exactly sure what is the organization scheme of this data structure.</p>&#xA;<blockquote>&#xA;<p>Binary search of a sorted array takes logarithmic search time, but the time to insert a ne...
amortized analysis
1
What does it mean when each individual array is sorted in different array but bear no relationship to each other -- (amortized analysis) <p>There's a textbook problem that talks about making a binary search dynamic, then analyzing for its amortize cost. However I'm not exactly sure what is the organization scheme of th...
habedi/stack-exchange-dataset
53,691
Does a problem stay NP-hard when an additional constraint is added to it?
<p>I have the following problem $(P)'$:</p>&#xA;&#xA;<p>\begin{align*}&#xA; {\rm max}_{x_1,...,x_K}\quad &amp; \sum_{k=1}^Kf(a_k,x_k) \cr &amp; &amp; (P)'\cr {\rm subject\ to}\quad &amp; 0 \le x_k \le A, k=1,\ldots,K.&#xA;\end{align*}</p>&#xA;&#xA;<p>This problem is proven NP-hard. An instance of $(P)'$ is given by $(K...
optimization np hard
1
Does a problem stay NP-hard when an additional constraint is added to it? -- (optimization np hard) <p>I have the following problem $(P)'$:</p>&#xA;&#xA;<p>\begin{align*}&#xA; {\rm max}_{x_1,...,x_K}\quad &amp; \sum_{k=1}^Kf(a_k,x_k) \cr &amp; &amp; (P)'\cr {\rm subject\ to}\quad &amp; 0 \le x_k \le A, k=1,\ldots,K.&#x...
habedi/stack-exchange-dataset
53,693
Why should we study all the three forms of representation of finite automata?
<p>DFA, NFA and epsilon NFA all the three allow us to represent a particular regular language. With any of those representations we can arrive to the same regular expression, then why do we need to study all the three form of representation of finite automata? There can some explanation on what NFA can do which DFA can...
automata finite automata education
1
Why should we study all the three forms of representation of finite automata? -- (automata finite automata education) <p>DFA, NFA and epsilon NFA all the three allow us to represent a particular regular language. With any of those representations we can arrive to the same regular expression, then why do we need to stud...
habedi/stack-exchange-dataset
53,701
What does "post-image analysis" mean in the context of formal program analysis?
<p>I am reviewing an anonymous paper about a sort of static analysis of programs that uses the phrase "post-image analysis", or "post-image operation" without defining what that is. I am guessing it is a well-known concept in formal methods, even though a Google search has not revealed anything.</p>&#xA;&#xA;<p>I am gu...
formal methods static analysis
1
What does "post-image analysis" mean in the context of formal program analysis? -- (formal methods static analysis) <p>I am reviewing an anonymous paper about a sort of static analysis of programs that uses the phrase "post-image analysis", or "post-image operation" without defining what that is. I am guessing it is a ...
habedi/stack-exchange-dataset
53,706
Shortest Path Passing All Routes
<p>Is there a shortest path algorithim that calculates the shortest route passing all available roads, ending where you started? This differs from the Travelling salesman problem as you need to pass through all <strong>roads between the cities</strong>, not just the cities. The traditional shortest path algorithims do ...
algorithms shortest path
1
Shortest Path Passing All Routes -- (algorithms shortest path) <p>Is there a shortest path algorithim that calculates the shortest route passing all available roads, ending where you started? This differs from the Travelling salesman problem as you need to pass through all <strong>roads between the cities</strong>, not...
habedi/stack-exchange-dataset
53,707
On graph isomorphism for weighted graphs
<p>Is there a $O(n^2)$ algorithm to resolve isomorphism between two weighted $n$-vertex graphs? This is a much easier problem than graph isomorphism.</p>&#xA;&#xA;<p>Basically take an real edge weight set $\{w_1,\dots,w_s\}$</p>&#xA;&#xA;<p>All weights on the graph edges are from this set.</p>&#xA;
algorithms complexity theory graph isomorphism
1
On graph isomorphism for weighted graphs -- (algorithms complexity theory graph isomorphism) <p>Is there a $O(n^2)$ algorithm to resolve isomorphism between two weighted $n$-vertex graphs? This is a much easier problem than graph isomorphism.</p>&#xA;&#xA;<p>Basically take an real edge weight set $\{w_1,\dots,w_s\}$</p...
habedi/stack-exchange-dataset
53,710
How do multiple branches from one node occur with the Monte Carlo Tree Search?
<p>I think I understand the Monte Carlo Tree search. It goes through the tree until it reaches a leaf node, where it branches (creates a child node). However, the branching only occurs at the leaf nodes (right?). So, a branch never comes out from a non-leaf node. So how could one node have multiple branches (multiple c...
algorithms search algorithms trees randomized algorithms monte carlo
1
How do multiple branches from one node occur with the Monte Carlo Tree Search? -- (algorithms search algorithms trees randomized algorithms monte carlo) <p>I think I understand the Monte Carlo Tree search. It goes through the tree until it reaches a leaf node, where it branches (creates a child node). However, the bran...
habedi/stack-exchange-dataset
53,719
Difference between CRC and Hamming Code
<p>I am a bit confused on the difference between Cyclic Redundancy Check and Hamming Code. Both add a check value attached based on the some arithmetic operation of the bits in the message being transmitted. For Hamming, it can be either odd or even parity bits added at the end of a message and for CRC, it's the remain...
communication protocols error correcting codes crc
1
Difference between CRC and Hamming Code -- (communication protocols error correcting codes crc) <p>I am a bit confused on the difference between Cyclic Redundancy Check and Hamming Code. Both add a check value attached based on the some arithmetic operation of the bits in the message being transmitted. For Hamming, it ...
habedi/stack-exchange-dataset
53,726
Nth number in a infinite sequence of numbers
<p>This was interview question.</p>&#xA;&#xA;<p>When the input is a infinite sequence of numbers starting from 1, what is the nth digit?</p>&#xA;&#xA;<p>e.g.) 123456789101112131415161718192021.....</p>&#xA;&#xA;<p>here 28th digit is 1.</p>&#xA;
algorithms
1
Nth number in a infinite sequence of numbers -- (algorithms) <p>This was interview question.</p>&#xA;&#xA;<p>When the input is a infinite sequence of numbers starting from 1, what is the nth digit?</p>&#xA;&#xA;<p>e.g.) 123456789101112131415161718192021.....</p>&#xA;&#xA;<p>here 28th digit is 1.</p>&#xA;
habedi/stack-exchange-dataset
53,735
Examples of languages not decidable by a TM using certain upper bounds on space/time
<p>I'm learning about time and space complexity involving Turing Machines at the moment, and would really like some concrete examples of specific languages that belong (or don't belong) to certain classes of time / space hierarchies. For example, what are some examples of a decidable language that can't be decided by a...
turing machines time complexity space complexity
1
Examples of languages not decidable by a TM using certain upper bounds on space/time -- (turing machines time complexity space complexity) <p>I'm learning about time and space complexity involving Turing Machines at the moment, and would really like some concrete examples of specific languages that belong (or don't bel...
habedi/stack-exchange-dataset
53,739
Convolutional and Linear block codes
<p>Both convolution and linear block codes can be used for error correction. The main benefits I gathered from using convolutional codes is that, it's easy to implement and does better (than linear codes) in cases where you have higher error probability rates and noisy channels. Information bits are spread along the se...
communication protocols error correcting codes
1
Convolutional and Linear block codes -- (communication protocols error correcting codes) <p>Both convolution and linear block codes can be used for error correction. The main benefits I gathered from using convolutional codes is that, it's easy to implement and does better (than linear codes) in cases where you have hi...
habedi/stack-exchange-dataset
53,741
Not convincing claim for Master Theorem Case 3
<p>In a practice exam given in class, we were asked to solve the following recurrence</p>&#xA;&#xA;<p>$$T(n) = 2T(n/4) + \frac{n}{\log n}$$</p>&#xA;&#xA;<p>The given solution claims that this falls in the third case of the Master Theorem and starts with the following claim:</p>&#xA;&#xA;<p>$$f(n) = n / \log n = \Omega ...
master theorem
1
Not convincing claim for Master Theorem Case 3 -- (master theorem) <p>In a practice exam given in class, we were asked to solve the following recurrence</p>&#xA;&#xA;<p>$$T(n) = 2T(n/4) + \frac{n}{\log n}$$</p>&#xA;&#xA;<p>The given solution claims that this falls in the third case of the Master Theorem and starts with...
habedi/stack-exchange-dataset
53,751
Are all partial functions partial computable?
<p>If we have some function $f\colon \mathbb{N} \rightarrow \mathbb{N}$ that is not total, i.e. for some values $x \in \mathbb{N}$, $f(x) = {\perp}$, is $f$ always partial computable? By partial computable I mean there exists a program that $f(a)$ is defined for $a \in \mathrm{dom}(f)$ and $f(a)$ is not defined for $a ...
computability turing machines
1
Are all partial functions partial computable? -- (computability turing machines) <p>If we have some function $f\colon \mathbb{N} \rightarrow \mathbb{N}$ that is not total, i.e. for some values $x \in \mathbb{N}$, $f(x) = {\perp}$, is $f$ always partial computable? By partial computable I mean there exists a program tha...
habedi/stack-exchange-dataset
53,756
Convolutional Neural Network Feature Engineering?
<p>I'm working through the tensorflow tutorial, and I see how you go from 28 x 28 to zero-padding and applying a 5x5x32 convolution to get 28x28x32 and max-pooling etc. What I'm confused about is the 32 outputs seem to be described as filters acting upon the 5x5 layers. The description is typically something like the...
neural networks features
1
Convolutional Neural Network Feature Engineering? -- (neural networks features) <p>I'm working through the tensorflow tutorial, and I see how you go from 28 x 28 to zero-padding and applying a 5x5x32 convolution to get 28x28x32 and max-pooling etc. What I'm confused about is the 32 outputs seem to be described as filt...
habedi/stack-exchange-dataset
53,757
Reference Request: Overlaps between complexity theory and dynamical systems?
<p>Per Wikipedia:</p>&#xA;&#xA;<blockquote>&#xA; <p>In mathematics, a dynamical system is a system in which a function&#xA; describes the time dependence of a point in a geometrical space.&#xA; Examples include the mathematical models that describe the swinging of&#xA; a clock pendulum, the flow of water in a pipe,...
complexity theory reference request discrete mathematics mathematical foundations physics
1
Reference Request: Overlaps between complexity theory and dynamical systems? -- (complexity theory reference request discrete mathematics mathematical foundations physics) <p>Per Wikipedia:</p>&#xA;&#xA;<blockquote>&#xA; <p>In mathematics, a dynamical system is a system in which a function&#xA; describes the time dep...
habedi/stack-exchange-dataset
53,759
Universal Multi Head Turing Machine
<p>It is common knowledge that a universal Turing machine can simulate any Turing machine with logarithmic overhead. Is it possible to make this overhead constant by constructing an analogous "Universal" multi head Turing machine?</p>&#xA;
turing machines
1
Universal Multi Head Turing Machine -- (turing machines) <p>It is common knowledge that a universal Turing machine can simulate any Turing machine with logarithmic overhead. Is it possible to make this overhead constant by constructing an analogous "Universal" multi head Turing machine?</p>&#xA;
habedi/stack-exchange-dataset
53,766
NSPACE for checking if two graphs are isomorphic
<p>I was studying nondeterministic Turing Machines and came across the following question:</p>&#xA;&#xA;<p>Describe a nondeterministic Turing Machine (NTM) that only accepts two graphs (G1 and G2) if they are isomorphic, and provide the NSPACE. The NTM should use as little space as possible.</p>&#xA;&#xA;<p>My attempt ...
turing machines space complexity nondeterminism graph isomorphism
1
NSPACE for checking if two graphs are isomorphic -- (turing machines space complexity nondeterminism graph isomorphism) <p>I was studying nondeterministic Turing Machines and came across the following question:</p>&#xA;&#xA;<p>Describe a nondeterministic Turing Machine (NTM) that only accepts two graphs (G1 and G2) if ...
habedi/stack-exchange-dataset
53,772
Why is my trivial reasoning for $PSPACE = PH$ wrong?
<p>If $\sum_i^p$ denotes $ith$ polynomial hierarchy. And $\sum_i TIME( T(n) )$ denotes set of languages accepted by $T(n)$ time alternating Turing machine $M$ whose initial state is labeled $\exists$ and sequence of choices leads $M$ to change at most $i-1$ times from states with one label to another. <br></p>&#xA;&#xA...
complexity theory nondeterminism
1
Why is my trivial reasoning for $PSPACE = PH$ wrong? -- (complexity theory nondeterminism) <p>If $\sum_i^p$ denotes $ith$ polynomial hierarchy. And $\sum_i TIME( T(n) )$ denotes set of languages accepted by $T(n)$ time alternating Turing machine $M$ whose initial state is labeled $\exists$ and sequence of choices leads...
habedi/stack-exchange-dataset
53,785
What is the difference between the friend class and inheritance consept in C++?
<p>In C++ ,friend class allows us to inherit the proprieties of one class to another class(es) which is also possible using inheritance. And also in inheritance we can set different levels of privileges to the child class(es) depending on our requirements, which suggests inheritance is more useful than friend class. Th...
programming languages object oriented c
1
What is the difference between the friend class and inheritance consept in C++? -- (programming languages object oriented c) <p>In C++ ,friend class allows us to inherit the proprieties of one class to another class(es) which is also possible using inheritance. And also in inheritance we can set different levels of pri...
habedi/stack-exchange-dataset
53,801
Calculating time complexity of a code which may be incorrect
<p>I am a sophomore taking a course in algorithm analysis. We were asked by our professor to calculate time-complexity of several C functions, but some of them were incorrect and would result in a compile error. As far as I know time complexities of correct algorithms are calculated and then we choose which one to impl...
algorithm analysis runtime analysis
1
Calculating time complexity of a code which may be incorrect -- (algorithm analysis runtime analysis) <p>I am a sophomore taking a course in algorithm analysis. We were asked by our professor to calculate time-complexity of several C functions, but some of them were incorrect and would result in a compile error. As far...
habedi/stack-exchange-dataset
53,811
Count all pairs of x,y such as x + y = c && x XOR y = d
<blockquote>&#xA; <p>Given two decimals $c$ and $d$; $1 \le c,d \le 10^{12}$. Count all pairs of $x$ and $y$ that satisfy the following statements:&#xA; $$&#xA;x+y = c\\&#xA;x \text{ XOR } y = d&#xA;$$</p>&#xA;</blockquote>&#xA;&#xA;<p>Killed already a day still can't solve that task in 2s. Even with optimizations b...
combinatorics counting
1
Count all pairs of x,y such as x + y = c && x XOR y = d -- (combinatorics counting) <blockquote>&#xA; <p>Given two decimals $c$ and $d$; $1 \le c,d \le 10^{12}$. Count all pairs of $x$ and $y$ that satisfy the following statements:&#xA; $$&#xA;x+y = c\\&#xA;x \text{ XOR } y = d&#xA;$$</p>&#xA;</blockquote>&#xA;&#xA;...
habedi/stack-exchange-dataset
53,813
How many independent yes/no questions can be asked about a point in binary space (linear vs nonlinear codes)?
<p>This question springs from thinking about the potential benefits of using nonlinear codes instead of linear codes. Say we have a point $x \in \{0,1\}^k$ and we want to guess what it is. A naive scheme would be to ask $2^k$ questions of the form "is $x=[0100001\dots 01]$?" etc, while a refinement would be "is the $i$...
coding theory encoding scheme
1
How many independent yes/no questions can be asked about a point in binary space (linear vs nonlinear codes)? -- (coding theory encoding scheme) <p>This question springs from thinking about the potential benefits of using nonlinear codes instead of linear codes. Say we have a point $x \in \{0,1\}^k$ and we want to gues...
habedi/stack-exchange-dataset
53,815
Big-O and little-o notation
<p>I think I have a passable understanding of what Big-O and little-o mean. I'm just wondering whether it makes sense notation-wise to state something like the following:</p>&#xA;&#xA;<p>$$O(n^c) = o(n^k) \text{ for } k &gt; c$$</p>&#xA;&#xA;<p>For example, $O(n^2) = o(n^3)$ since $3 &gt; 2$. Basically, any constant ti...
time complexity asymptotics
1
Big-O and little-o notation -- (time complexity asymptotics) <p>I think I have a passable understanding of what Big-O and little-o mean. I'm just wondering whether it makes sense notation-wise to state something like the following:</p>&#xA;&#xA;<p>$$O(n^c) = o(n^k) \text{ for } k &gt; c$$</p>&#xA;&#xA;<p>For example, $...
habedi/stack-exchange-dataset
53,819
Does preparing min DFA by combining equivalent states always result in min DFA
<p>I know the following fact:</p>&#xA;&#xA;<blockquote>&#xA; <p>If $Ma_N=\{w:n_a (w)=Nk,k≥0\}$, then&#xA; Number of states in&#xA; $$Ma_{N1}×Ma_{N2}&#xA;=Ma_{N1}∪Ma_{N2}&#xA;=Ma_{N1}∩Ma_{N2}&#xA;=Ma_{N1}-Ma_{N2}&#xA;=LCM(N1,N2)$$&#xA; where $n_a (w)$ is the number of occurrences of $a$ in $w$</p>&#xA;</blockquote>&...
formal languages automata finite automata compilers
1
Does preparing min DFA by combining equivalent states always result in min DFA -- (formal languages automata finite automata compilers) <p>I know the following fact:</p>&#xA;&#xA;<blockquote>&#xA; <p>If $Ma_N=\{w:n_a (w)=Nk,k≥0\}$, then&#xA; Number of states in&#xA; $$Ma_{N1}×Ma_{N2}&#xA;=Ma_{N1}∪Ma_{N2}&#xA;=Ma_{N1...
habedi/stack-exchange-dataset