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
13,129
Deciding between two algorithms with similar runtime in two parameters
<p>Let's say I have a problem which depends on two variables, $m$ and $n$. I also have two algorithms for solving the problem. How do I decide which algorithm to use?</p>&#xA;&#xA;<p>For example, say I have an array of unique numbers $A$, not necessarily sorted, and a second sorted array $B$. I want to create a thir...
algorithms time complexity asymptotics
1
Deciding between two algorithms with similar runtime in two parameters -- (algorithms time complexity asymptotics) <p>Let's say I have a problem which depends on two variables, $m$ and $n$. I also have two algorithms for solving the problem. How do I decide which algorithm to use?</p>&#xA;&#xA;<p>For example, say I h...
habedi/stack-exchange-dataset
13,133
Coordinated Attack Problem Different Requirements
<p>There is a famous <a href="http://en.wikipedia.org/wiki/Two_Generals%27_Problem" rel="nofollow">Coordinated Attack Problem</a>. Let define a simple message-passing system $S$ with requirements </p>&#xA;&#xA;<ul>&#xA;<li>Uniform Agreement: No two processes decide dierently.</li>&#xA;<li>Validity:</li>&#xA;</ul>&#xA;&...
proof techniques distributed systems
1
Coordinated Attack Problem Different Requirements -- (proof techniques distributed systems) <p>There is a famous <a href="http://en.wikipedia.org/wiki/Two_Generals%27_Problem" rel="nofollow">Coordinated Attack Problem</a>. Let define a simple message-passing system $S$ with requirements </p>&#xA;&#xA;<ul>&#xA;<li>Unifo...
habedi/stack-exchange-dataset
13,135
Is this NP-hard: min-weight n-clique in a complete n-partite graph
<p>I have a complete $n$-partite graph, where each partite set has $n$ vertices (yes it's also $n$), so the graph has $n^2$ vertices in total. My problem is to find a minimum weight $n$-clique in the graph. I would like to know whether the problem can be solved in polynomial time. </p>&#xA;&#xA;<p>More details of the...
complexity theory optimization np hard
1
Is this NP-hard: min-weight n-clique in a complete n-partite graph -- (complexity theory optimization np hard) <p>I have a complete $n$-partite graph, where each partite set has $n$ vertices (yes it's also $n$), so the graph has $n^2$ vertices in total. My problem is to find a minimum weight $n$-clique in the graph. ...
habedi/stack-exchange-dataset
13,137
Electrical resistance of expander graphs
<p>Let $G$ be a $d$-regular expander graph. What is the electrical resistance of $G$? Is it a constant independent of the number of nodes $n$ once $d$ is large enough? If not, can we give matching upper and lower bounds in terms of $n,d$?</p>&#xA;
graphs random walks expanders
1
Electrical resistance of expander graphs -- (graphs random walks expanders) <p>Let $G$ be a $d$-regular expander graph. What is the electrical resistance of $G$? Is it a constant independent of the number of nodes $n$ once $d$ is large enough? If not, can we give matching upper and lower bounds in terms of $n,d$?</p>&#...
habedi/stack-exchange-dataset
13,139
Iterative and/or tail-recursive implementations of merge sort?
<p>I recently learned how to implement merge-sort, using a standard recursive algorithm. Can the algorithm be implemented in a way that allows for a tail-recursive implementation? Can it be implemented in an iterative style?</p>&#xA;&#xA;<p>In general how can a recursive algorithm converted into an iterative and tail-r...
algorithms sorting recursion
1
Iterative and/or tail-recursive implementations of merge sort? -- (algorithms sorting recursion) <p>I recently learned how to implement merge-sort, using a standard recursive algorithm. Can the algorithm be implemented in a way that allows for a tail-recursive implementation? Can it be implemented in an iterative style...
habedi/stack-exchange-dataset
13,140
Number of distinct substrings in a string
<p>From what I have come to understand, the best way to implement it is to use the suffix array $S$ of the string $w$ and its LCP-array (Longest Common Prefix) $L$.</p>&#xA;&#xA;<p>The answer can be obtained by </p>&#xA;&#xA;<p>$$ \sum_{i=1}^{|w|} \left( |S[i]| -L[i-1] \right).$$</p>&#xA;&#xA;<p>What I don't get is ho...
algorithms data structures strings substrings suffix array
1
Number of distinct substrings in a string -- (algorithms data structures strings substrings suffix array) <p>From what I have come to understand, the best way to implement it is to use the suffix array $S$ of the string $w$ and its LCP-array (Longest Common Prefix) $L$.</p>&#xA;&#xA;<p>The answer can be obtained by </...
habedi/stack-exchange-dataset
13,168
Recurrence for recursive insertion sort
<p>I tried this problem from CLRS (Page 39, 2.3-4)</p>&#xA;&#xA;<blockquote>&#xA; <p>We can express insertion sort as a recursive procedure as follows. In order to sort <code>A[1... n]</code>, we recursively sort <code>A[1... n-1]</code> and then insert <code>A[n]</code> into the sorted array <code>A[1... n-1]</code>....
algorithm analysis runtime analysis recurrence relation sorting
1
Recurrence for recursive insertion sort -- (algorithm analysis runtime analysis recurrence relation sorting) <p>I tried this problem from CLRS (Page 39, 2.3-4)</p>&#xA;&#xA;<blockquote>&#xA; <p>We can express insertion sort as a recursive procedure as follows. In order to sort <code>A[1... n]</code>, we recursively so...
habedi/stack-exchange-dataset
13,173
Why every finite set is computable?
<p>According to <a href="http://en.wikipedia.org/wiki/Recursive_set#Examples" rel="nofollow">wikipedia</a>, every finite set is computable. &#xA;Definition: set $S \subset N$ is <em>computable</em> if there exists an algorithm which defines in finite time if a given number $n$ is in Set.</p>&#xA;&#xA;<p>Question: what ...
computability turing machines
1
Why every finite set is computable? -- (computability turing machines) <p>According to <a href="http://en.wikipedia.org/wiki/Recursive_set#Examples" rel="nofollow">wikipedia</a>, every finite set is computable. &#xA;Definition: set $S \subset N$ is <em>computable</em> if there exists an algorithm which defines in finit...
habedi/stack-exchange-dataset
13,179
Reference request: proof that if $L \in DCFL$, then $L \Sigma^* \in DCFL$
<p>So, it's fairly easy to prove that if $L \in DCFL$, then $L \Sigma^* \in DCFL$. Basically, you take the DPDA accepting $L$. You remove all transitions on final states, and then for each $a \in \Sigma$ and each final state $q$, you add a transition looping from $q$ to $q$ on $a$.</p>&#xA;&#xA;<p>I'm using this in a p...
formal languages reference request automata closure properties pushdown automata
1
Reference request: proof that if $L \in DCFL$, then $L \Sigma^* \in DCFL$ -- (formal languages reference request automata closure properties pushdown automata) <p>So, it's fairly easy to prove that if $L \in DCFL$, then $L \Sigma^* \in DCFL$. Basically, you take the DPDA accepting $L$. You remove all transitions on fin...
habedi/stack-exchange-dataset
13,183
Subgraph isomorphisms: does large out-expansion imply large in-expansion?
<p>Let $G$ be a directed graph, and $H$ a subgraph of $G$ that contains all the vertices of $G$. (In other words, $H$ is obtained by deleting some of the edges of $G$, but not any of the vertices of $G$.)</p>&#xA;&#xA;<p>A subgraph isomorphism $\varphi$ from $G$ to $H$ is a graph isomorphism from some subgraph of $G$ t...
graphs discrete mathematics graph isomorphism
1
Subgraph isomorphisms: does large out-expansion imply large in-expansion? -- (graphs discrete mathematics graph isomorphism) <p>Let $G$ be a directed graph, and $H$ a subgraph of $G$ that contains all the vertices of $G$. (In other words, $H$ is obtained by deleting some of the edges of $G$, but not any of the vertices...
habedi/stack-exchange-dataset
13,190
Counting subarrays that satisfy either of two conditions
<p>We have an array of integers $a[]$, with each $|a[i]| \leq 10^{6}$, $size(a)\leq10^{5}$, and $a[i]-a[i-1]\leq100$.</p>&#xA;&#xA;<p>Then we define the term range as a subarray $[x,y]$ of the array $a[]$, $x \lt y$.</p>&#xA;&#xA;<p>We need to find total number of ranges that satisfy the property that for two given ra...
algorithms arrays
1
Counting subarrays that satisfy either of two conditions -- (algorithms arrays) <p>We have an array of integers $a[]$, with each $|a[i]| \leq 10^{6}$, $size(a)\leq10^{5}$, and $a[i]-a[i-1]\leq100$.</p>&#xA;&#xA;<p>Then we define the term range as a subarray $[x,y]$ of the array $a[]$, $x \lt y$.</p>&#xA;&#xA;<p>We nee...
habedi/stack-exchange-dataset
13,196
Is there an algorithm which can compute every algorithm's time complexity?
<p>I think of an algorithm which computes the time complexity. It would be great if a code editor could compute the time complexity of the selected lines and even compare two pieces of codes in order to help developer to select one of them. I heard something related with halting problem but couldn't figure out. </p>&#x...
computability time complexity
1
Is there an algorithm which can compute every algorithm's time complexity? -- (computability time complexity) <p>I think of an algorithm which computes the time complexity. It would be great if a code editor could compute the time complexity of the selected lines and even compare two pieces of codes in order to help de...
habedi/stack-exchange-dataset
13,199
Computer science problems related to music?
<p>Are there any CS problems, preferably open, that are related to music or musical theory somehow? I would think of problem with musical notation but also probabilities when randomizing according to a scale or a tonality or general what is considered harmony in frequencies and physics, electromagnetism and waveforms. ...
probability theory decision problem probabilistic algorithms
1
Computer science problems related to music? -- (probability theory decision problem probabilistic algorithms) <p>Are there any CS problems, preferably open, that are related to music or musical theory somehow? I would think of problem with musical notation but also probabilities when randomizing according to a scale or...
habedi/stack-exchange-dataset
13,202
Decision problems in $\mathsf{P}$ without fast algorithms
<p>What are some examples of difficult decision problems that can be solved in polynomial time? I'm looking for problems for which the optimal algorithm is "slow", or problems for which the fastest known algorithm is "slow".</p>&#xA;&#xA;<p>Here are two examples:</p>&#xA;&#xA;<ul>&#xA;<li><p><strong>Recognition of perf...
algorithms complexity theory reference request
1
Decision problems in $\mathsf{P}$ without fast algorithms -- (algorithms complexity theory reference request) <p>What are some examples of difficult decision problems that can be solved in polynomial time? I'm looking for problems for which the optimal algorithm is "slow", or problems for which the fastest known algori...
habedi/stack-exchange-dataset
13,213
How can I produce a summation function from this set of production rules for a grammar?
<p>I am not entirely sure if the title is the correct way to phrase what is occurring. There is a recurring process which I decided to attempt to model using production rules similar to those used in a context-free grammar.</p>&#xA;&#xA;<p>The real world process is a production line. It takes 1 unit, after 2 weeks, pro...
context free formal grammars combinatorics
1
How can I produce a summation function from this set of production rules for a grammar? -- (context free formal grammars combinatorics) <p>I am not entirely sure if the title is the correct way to phrase what is occurring. There is a recurring process which I decided to attempt to model using production rules similar t...
habedi/stack-exchange-dataset
13,218
Recurrence formula for a known sequence?
<p>Problem: How do we can generate some mathematical close form of the following sequence, which has following 256 entries:</p>&#xA;&#xA;<p>1 7 7 7 7 9 9 9 7 9 9 9 7 9 9 9 7 11 11 11 11 13 13 13 11 13 13 13 11 13 13 13 7 11 11 11 11 13 13 13 11 13 13 13 11 ...
combinatorics recurrence relation
1
Recurrence formula for a known sequence? -- (combinatorics recurrence relation) <p>Problem: How do we can generate some mathematical close form of the following sequence, which has following 256 entries:</p>&#xA;&#xA;<p>1 7 7 7 7 9 9 9 7 9 9 9 7 9 9 9 7 11 11 11 11 13 13 13 11 ...
habedi/stack-exchange-dataset
13,219
Classification of job shop scheduling problems
<p>I'm writing a program (using genetic algorithms) that finds sort-of-optimal scheduling plan for a factory.</p>&#xA;&#xA;<ul>&#xA;<li>The factory has several types of machines (say, <code>locksmith, miller, welding</code>)</li>&#xA;<li>There are few machines of each type. (say, <code>3 locksmiths, 2 millers, 3 welder...
optimization scheduling heuristics genetic algorithms
1
Classification of job shop scheduling problems -- (optimization scheduling heuristics genetic algorithms) <p>I'm writing a program (using genetic algorithms) that finds sort-of-optimal scheduling plan for a factory.</p>&#xA;&#xA;<ul>&#xA;<li>The factory has several types of machines (say, <code>locksmith, miller, weldi...
habedi/stack-exchange-dataset
13,229
Number of Combinations of Connected Bipartite Graphs
<p>Given two sets of vertices $U$ (size $n$) and $V$ (size $m$), how many possibilities of set of edges $E$ exist that make the bipartite graph $G = (U, V, E)$ connected?</p>&#xA;&#xA;<p>Obviously there are $2^{n m}$ different set of edges but many will be disconnected.</p>&#xA;
graphs combinatorics
1
Number of Combinations of Connected Bipartite Graphs -- (graphs combinatorics) <p>Given two sets of vertices $U$ (size $n$) and $V$ (size $m$), how many possibilities of set of edges $E$ exist that make the bipartite graph $G = (U, V, E)$ connected?</p>&#xA;&#xA;<p>Obviously there are $2^{n m}$ different set of edges b...
habedi/stack-exchange-dataset
13,234
Relation between the size of sub-problems and number of sub-problems in a recurrence
<p>Below is a well-known equation for generalized recurrence relation in a divide and conquer paradigm (as described in CLRS) --</p>&#xA;&#xA;<p>$$T(n) = aT(n/b) + f(n), \quad \text{where} \quad a \gt 1 \text{ , } b \geq 1$$</p>&#xA;&#xA;<p>If we consider a case for merge-sort, the relation will look like this -- </p>&...
algorithms algorithm analysis recurrence relation
1
Relation between the size of sub-problems and number of sub-problems in a recurrence -- (algorithms algorithm analysis recurrence relation) <p>Below is a well-known equation for generalized recurrence relation in a divide and conquer paradigm (as described in CLRS) --</p>&#xA;&#xA;<p>$$T(n) = aT(n/b) + f(n), \quad \tex...
habedi/stack-exchange-dataset
13,246
Example for a non-trivial PCP verifier for an NP-complete problem
<p>During my involvement in a course on dealing with NP-hard problems I have encountered the PCP theorem, stating</p>&#xA;&#xA;<p>$\qquad\displaystyle \mathsf{NP} = \mathsf{PCP}(\log n, 1)$. </p>&#xA;&#xA;<p>I understand the technical definition of a PCP verifier, so I know in principle what kind of algorithm has to ex...
algorithms complexity theory np complete approximation randomized algorithms
1
Example for a non-trivial PCP verifier for an NP-complete problem -- (algorithms complexity theory np complete approximation randomized algorithms) <p>During my involvement in a course on dealing with NP-hard problems I have encountered the PCP theorem, stating</p>&#xA;&#xA;<p>$\qquad\displaystyle \mathsf{NP} = \mathsf...
habedi/stack-exchange-dataset
13,249
Algorithm to shrink a DFA by introducing nondeterminism?
<p>This is somewhat related to <a href="https://cs.stackexchange.com/questions/13206/are-there-algorithms-to-exactly-minimize-nfas-which-are-sometimes-efficient?noredirect=1#comment27879_13206">another question I asked</a>, but I feel it's different enough to warrant its own question.</p>&#xA;&#xA;<p>I'm doing research...
formal languages automata finite automata discrete mathematics nondeterminism
1
Algorithm to shrink a DFA by introducing nondeterminism? -- (formal languages automata finite automata discrete mathematics nondeterminism) <p>This is somewhat related to <a href="https://cs.stackexchange.com/questions/13206/are-there-algorithms-to-exactly-minimize-nfas-which-are-sometimes-efficient?noredirect=1#commen...
habedi/stack-exchange-dataset
13,254
What constitutes one unit of time in runtime analysis?
<p>When calculating runtime dependence on the input, what calculations are considered? For instance, I think I learned that array indexing as well as assignment statements don't get counted, why is that?</p>&#xA;
terminology algorithm analysis runtime analysis
1
What constitutes one unit of time in runtime analysis? -- (terminology algorithm analysis runtime analysis) <p>When calculating runtime dependence on the input, what calculations are considered? For instance, I think I learned that array indexing as well as assignment statements don't get counted, why is that?</p>&#xA;
habedi/stack-exchange-dataset
13,257
How to solve this Planning Domain Definition Language (PDDL) question?
<p>These are 5 action descriptions with conditional effects:</p>&#xA;<blockquote>&#xA;<p>Action(A, Precond:{X}, Effect:{when P : ~X), Z})</p>&#xA;<p>Action(B, Precond:{Y}, Effect:{when Z : ~P), ~Y,~Z,X})</p>&#xA;<p>Action(C, Precond:{~Z}, Effect:{when P : ~X), Y})</p>&#xA;<p>Action(D, Precond:{~X}, Effect:{when Q : X)}...
artificial intelligence
1
How to solve this Planning Domain Definition Language (PDDL) question? -- (artificial intelligence) <p>These are 5 action descriptions with conditional effects:</p>&#xA;<blockquote>&#xA;<p>Action(A, Precond:{X}, Effect:{when P : ~X), Z})</p>&#xA;<p>Action(B, Precond:{Y}, Effect:{when Z : ~P), ~Y,~Z,X})</p>&#xA;<p>Actio...
habedi/stack-exchange-dataset
13,267
Minimum cost closed walk in a graph
<p>Is there an efficient algorithm which gives the minimum cost closed walk in an undirected graph, which visits all vertices?</p>&#xA;&#xA;<p>Does this problem have a name? I tried to reduce this to similar problems (in particular the traveling salesman problem) to see if it was NP-hard, but was unsuccessful.</p>&#xA;...
algorithms graphs np hard graph traversal traveling salesman
1
Minimum cost closed walk in a graph -- (algorithms graphs np hard graph traversal traveling salesman) <p>Is there an efficient algorithm which gives the minimum cost closed walk in an undirected graph, which visits all vertices?</p>&#xA;&#xA;<p>Does this problem have a name? I tried to reduce this to similar problems (...
habedi/stack-exchange-dataset
13,271
Generate random numbers from an interval with holes
<p>Given a set $S$ of $k$ numbers in $[0, N)$.&#xA;The task is to randomly generate numbers in the range $[0, N)$ such that none belongs to $S$.</p>&#xA;&#xA;<p><strong>Edit</strong> - Also given an API to generate random numbers between $[0, N)$. We have to use it to randomly generate numbers in the range $[0, N)$ su...
algorithms probability theory sampling random number generator
1
Generate random numbers from an interval with holes -- (algorithms probability theory sampling random number generator) <p>Given a set $S$ of $k$ numbers in $[0, N)$.&#xA;The task is to randomly generate numbers in the range $[0, N)$ such that none belongs to $S$.</p>&#xA;&#xA;<p><strong>Edit</strong> - Also given an A...
habedi/stack-exchange-dataset
13,274
How a program is copied to RAM from harddisk
<p>I know that for executing a program, it should be copied to RAM. But the problem is whole of it may not be copied always. </p>&#xA;&#xA;<p>Since the size of the RAM is limited, there is mechanism called virtual memory. If the addressed thing is not in memory, a page fault occurs and the data is copied to the RAM. My...
operating systems memory management virtual memory memory access
1
How a program is copied to RAM from harddisk -- (operating systems memory management virtual memory memory access) <p>I know that for executing a program, it should be copied to RAM. But the problem is whole of it may not be copied always. </p>&#xA;&#xA;<p>Since the size of the RAM is limited, there is mechanism called...
habedi/stack-exchange-dataset
13,285
Universes in dependent type theory
<p>I am reading about dependent types theory in the <a href="http://homotopytypetheory.org/book/" rel="nofollow noreferrer">Homotopy Type Theory</a> online book. </p>&#xA;&#xA;<p>In section 1.3 of the <em>Type Theory</em> chapter, it introduces the notion of hierarchy of <em>Universes</em>: $\mathcal{U}_0 : \mathcal{U}...
type theory homotopy type theory dependent types
1
Universes in dependent type theory -- (type theory homotopy type theory dependent types) <p>I am reading about dependent types theory in the <a href="http://homotopytypetheory.org/book/" rel="nofollow noreferrer">Homotopy Type Theory</a> online book. </p>&#xA;&#xA;<p>In section 1.3 of the <em>Type Theory</em> chapter, ...
habedi/stack-exchange-dataset
13,287
Why do we need assembly language?
<p>We mostly write programme in high level language. So while studying I came across assembly language. So an assembler converts assembly language to machine language and a compiler does the same with high level language. I found assembly language has instructions like move r1 r3 , move a 5 etc. And it is rather hard t...
programming languages education history
1
Why do we need assembly language? -- (programming languages education history) <p>We mostly write programme in high level language. So while studying I came across assembly language. So an assembler converts assembly language to machine language and a compiler does the same with high level language. I found assembly la...
habedi/stack-exchange-dataset
13,290
Store and sort a large number of 64-bit integers
<p>I have about $500000000$, $64$-bit integers, so these numbers are very large.&#xA;I want to sort them as quickly as possible. I have couple of questions:</p>&#xA;&#xA;<ol>&#xA;<li><p>What data structure do you suggest for storing this data?</p></li>&#xA;<li><p>What algorithm do you suggest for sorting these numbers...
algorithms algorithm analysis data structures time complexity sorting
1
Store and sort a large number of 64-bit integers -- (algorithms algorithm analysis data structures time complexity sorting) <p>I have about $500000000$, $64$-bit integers, so these numbers are very large.&#xA;I want to sort them as quickly as possible. I have couple of questions:</p>&#xA;&#xA;<ol>&#xA;<li><p>What data...
habedi/stack-exchange-dataset
13,300
BPP upper bound
<p>does $BPP\subseteq P^{NP}$ ? it seems reasonable but I don't know if there is a proof of this!could any one post a proof or any material that discusses the statement or something that look like this . </p>&#xA;
complexity theory complexity classes randomized algorithms oracle machines
1
BPP upper bound -- (complexity theory complexity classes randomized algorithms oracle machines) <p>does $BPP\subseteq P^{NP}$ ? it seems reasonable but I don't know if there is a proof of this!could any one post a proof or any material that discusses the statement or something that look like this . </p>&#xA;
habedi/stack-exchange-dataset
13,302
Average Time Complexity of Two Nested Loops
<p>Recently I have had this question in one of my interviews.</p>&#xA;&#xA;<p>You have 1 Million sorted integer, you have a value of $x$, compare each pair in this array and if the addition of two pair is less or equal to $x$ then increment the paircounter.</p>&#xA;&#xA;<p>I have implemented this solution in C++ howeve...
algorithms algorithm analysis runtime analysis
1
Average Time Complexity of Two Nested Loops -- (algorithms algorithm analysis runtime analysis) <p>Recently I have had this question in one of my interviews.</p>&#xA;&#xA;<p>You have 1 Million sorted integer, you have a value of $x$, compare each pair in this array and if the addition of two pair is less or equal to $x...
habedi/stack-exchange-dataset
13,313
Do fully optimizing compilers for terminating programs exist?
<p>In Andrew W. Appel's book, <em>Modern Compiler Implementation in ML</em>, he says under chapter 17 that <em>Computability theory shows that it will always be possible to invent new optimizing transformations</em> and proceeds to prove that a <em>fully optimizing compiler</em> will solve the halting problem: A progra...
computability compilers program optimization
1
Do fully optimizing compilers for terminating programs exist? -- (computability compilers program optimization) <p>In Andrew W. Appel's book, <em>Modern Compiler Implementation in ML</em>, he says under chapter 17 that <em>Computability theory shows that it will always be possible to invent new optimizing transformatio...
habedi/stack-exchange-dataset
13,316
Reachability queries on a tree in $O(1)$ time with $O(n+m)$ time preprocessing
<p>I am given an undirected tree $T$ in the usual graph theoretic sense. Given a vertex $v$ and an edge $(v,u)$ incident to $v$, I need to answer queries of the form <em>return any leaf of $T$ that is reachable from $v$ with a path including $(u,v)$, and no other edges incident to $v$?</em> More informally, the restric...
algorithms data structures trees
1
Reachability queries on a tree in $O(1)$ time with $O(n+m)$ time preprocessing -- (algorithms data structures trees) <p>I am given an undirected tree $T$ in the usual graph theoretic sense. Given a vertex $v$ and an edge $(v,u)$ incident to $v$, I need to answer queries of the form <em>return any leaf of $T$ that is re...
habedi/stack-exchange-dataset
13,326
IP addresses and Subdomains?
<p>If a school has an IP that's like 10.0.x.x, and a department in that school has it's own site that's an extension of the school's site, does that department's IP just change the last two numbers in the IP?&#xA;Does the school have to purchase extra domain space? &#xA;Could I have additional addresses established at ...
computer networks
1
IP addresses and Subdomains? -- (computer networks) <p>If a school has an IP that's like 10.0.x.x, and a department in that school has it's own site that's an extension of the school's site, does that department's IP just change the last two numbers in the IP?&#xA;Does the school have to purchase extra domain space? &#...
habedi/stack-exchange-dataset
13,331
Algorithm for estimating function maximizing parameters
<p>I'm trying to find parameters $\omega, \alpha,$ and $\beta$ which maximize </p>&#xA;&#xA;<p>$$&#xA;\sum_{i=1}^m{\left\{ -\ln(v_i) - \frac{r_i^2}{v_i} \right\}}&#xA;$$</p>&#xA;&#xA;<p>where</p>&#xA;&#xA;<p>$$&#xA;v_i = \omega + \alpha r_{i-1}^2 + \beta v_{i-1}^2&#xA;$$</p>&#xA;&#xA;<p>Since numerical values for $r_i$...
algorithms
1
Algorithm for estimating function maximizing parameters -- (algorithms) <p>I'm trying to find parameters $\omega, \alpha,$ and $\beta$ which maximize </p>&#xA;&#xA;<p>$$&#xA;\sum_{i=1}^m{\left\{ -\ln(v_i) - \frac{r_i^2}{v_i} \right\}}&#xA;$$</p>&#xA;&#xA;<p>where</p>&#xA;&#xA;<p>$$&#xA;v_i = \omega + \alpha r_{i-1}^2 +...
habedi/stack-exchange-dataset
13,334
Find similar vector by Locality Sensitive Hashing
<p>I have many vectors in my database. They are in high dimensions such as:</p>&#xA;&#xA;<ul>&#xA;<li>$v_1$ : $\langle 23, 23, 1, 33, 103, 219, \dots \rangle$</li>&#xA;<li>$v_2$ : $\langle 92, 83, 1, 33, 239, 192, \dots \rangle$</li>&#xA;<li>...</li>&#xA;</ul>&#xA;&#xA;<p>I will use Hamming distance to calculate their ...
hash databases hash tables string metrics
1
Find similar vector by Locality Sensitive Hashing -- (hash databases hash tables string metrics) <p>I have many vectors in my database. They are in high dimensions such as:</p>&#xA;&#xA;<ul>&#xA;<li>$v_1$ : $\langle 23, 23, 1, 33, 103, 219, \dots \rangle$</li>&#xA;<li>$v_2$ : $\langle 92, 83, 1, 33, 239, 192, \dots \ra...
habedi/stack-exchange-dataset
13,336
Number of multisets such that each number from 1 to $n$ can be uniquely expressed as a sum of some of the elements of the multiset
<p><strong>My problem.</strong> Given $n$, I want to count the number of valid multisets $S$. A multiset $S$ is valid if</p>&#xA;&#xA;<ul>&#xA;<li>The sum of the elements of $S$ is $n$, and</li>&#xA;<li>Every number from $1$ to $n$ can be expressed uniquely as a sum of some of the elements of $S$.</li>&#xA;</ul>&#xA;&...
algorithms integers
1
Number of multisets such that each number from 1 to $n$ can be uniquely expressed as a sum of some of the elements of the multiset -- (algorithms integers) <p><strong>My problem.</strong> Given $n$, I want to count the number of valid multisets $S$. A multiset $S$ is valid if</p>&#xA;&#xA;<ul>&#xA;<li>The sum of the e...
habedi/stack-exchange-dataset
13,354
A framework to capture common variation of sequence alignments
<p>The <a href="http://rosalind.info/glossary/alignment/" rel="nofollow">global alignment</a> problem can be generalized by setting the cost of some boundary gaps to 0.</p>&#xA;&#xA;<ul>&#xA;<li>Gaps at both end in both strings have 0 cost, then we get the <a href="http://rosalind.info/glossary/semiglobal-alignment/" r...
algorithms strings bioinformatics
1
A framework to capture common variation of sequence alignments -- (algorithms strings bioinformatics) <p>The <a href="http://rosalind.info/glossary/alignment/" rel="nofollow">global alignment</a> problem can be generalized by setting the cost of some boundary gaps to 0.</p>&#xA;&#xA;<ul>&#xA;<li>Gaps at both end in bot...
habedi/stack-exchange-dataset
13,356
How to calculate the number of tag, index and offset bits of different caches?
<p>Specifically:</p>&#xA;&#xA;<p>1) A <strong>direct-mapped cache</strong> with 4096 blocks/lines in which each block has 8 32-bit words. How many bits are needed for the tag and index fields, assuming a 32-bit address?</p>&#xA;&#xA;<p>2) Same question as 1) but for <strong>fully associative cache</strong>?</p>&#xA;&#x...
computer architecture cpu cache
1
How to calculate the number of tag, index and offset bits of different caches? -- (computer architecture cpu cache) <p>Specifically:</p>&#xA;&#xA;<p>1) A <strong>direct-mapped cache</strong> with 4096 blocks/lines in which each block has 8 32-bit words. How many bits are needed for the tag and index fields, assuming a ...
habedi/stack-exchange-dataset
13,364
Data structure for storing edges of a graph
<p>I'm currently working on my masters thesis, and it's about clustering on graphs. I'm working with an idea using ants to solve the problem. I'm currently working on the implementation and am wondering exactly how well to represent the edges of the graph. </p>&#xA;&#xA;<p>Each edge is augmented with certain informatio...
graphs data structures evolutionary computing
1
Data structure for storing edges of a graph -- (graphs data structures evolutionary computing) <p>I'm currently working on my masters thesis, and it's about clustering on graphs. I'm working with an idea using ants to solve the problem. I'm currently working on the implementation and am wondering exactly how well to re...
habedi/stack-exchange-dataset
13,370
Checking Feasibility of Linear Program in Polynomial Time
<p>Given a linear system of the form:</p>&#xA;&#xA;<p>$$\begin{array}{c}&#xA;x_r = a \quad x_j = b \\&#xA;c_1x_1 + c_2x_2 + \ldots + c_nx_n = N \\&#xA;x_1+x_2 + x_3 + \ldots + x_n = k\\&#xA;0 \le a,b,x_1,x_2,x_3...x_n \le 1\\&#xA;k \ge 0&#xA;\end{array}$$</p>&#xA;&#xA;<p>How quickly can the feasibility of the system be...
complexity theory time complexity computational geometry linear programming linear algebra
1
Checking Feasibility of Linear Program in Polynomial Time -- (complexity theory time complexity computational geometry linear programming linear algebra) <p>Given a linear system of the form:</p>&#xA;&#xA;<p>$$\begin{array}{c}&#xA;x_r = a \quad x_j = b \\&#xA;c_1x_1 + c_2x_2 + \ldots + c_nx_n = N \\&#xA;x_1+x_2 + x_3 +...
habedi/stack-exchange-dataset
13,376
Closed-form Expression of the Expected value of the Cost of D&C Algorithm?
<p>Let there is a binary-string, $B$, of length $N$. The probability of occurrence of 0 and 1 in this binary-word is $p$ and $q$ , respectively. Each bit in the string is independent of any other bit.</p>&#xA;&#xA;<p>There is an algorithm (divide and conquer) which finds the location of 1’s in a given binary-string, i...
algorithm analysis runtime analysis average case
1
Closed-form Expression of the Expected value of the Cost of D&C Algorithm? -- (algorithm analysis runtime analysis average case) <p>Let there is a binary-string, $B$, of length $N$. The probability of occurrence of 0 and 1 in this binary-word is $p$ and $q$ , respectively. Each bit in the string is independent of any ...
habedi/stack-exchange-dataset
13,380
Complexity of the V-opt heuristic Traveling Salesman algorithm
<p>The paragraph on V-opt heuristic TSP algorithms at <a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem#Heuristic_and_approximation_algorithms" rel="nofollow">this site</a> mentions a very effective algorithm due to Lin-Kernigham-Johnson. That page says: </p>&#xA;&#xA;<blockquote>&#xA; <p>For many year...
algorithms algorithm analysis runtime analysis traveling salesman
1
Complexity of the V-opt heuristic Traveling Salesman algorithm -- (algorithms algorithm analysis runtime analysis traveling salesman) <p>The paragraph on V-opt heuristic TSP algorithms at <a href="http://en.wikipedia.org/wiki/Travelling_salesman_problem#Heuristic_and_approximation_algorithms" rel="nofollow">this site</...
habedi/stack-exchange-dataset
13,381
Selection in expected linear time: Why am I getting $O(n)$ bound instead of $\Omega(n \lg n)$?
<p>The problem is from CLRS 9.3-1:</p>&#xA;&#xA;<blockquote>&#xA; <p>In the algorithm <code>SELECT</code>, the input elements are divided into groups of&#xA; $5$. Argue that <code>SELECT</code> does not run in linear time if groups of $3$ are used.</p>&#xA;</blockquote>&#xA;&#xA;<p>If we do the "divide by $3$" techni...
algorithm analysis recurrence relation search algorithms
1
Selection in expected linear time: Why am I getting $O(n)$ bound instead of $\Omega(n \lg n)$? -- (algorithm analysis recurrence relation search algorithms) <p>The problem is from CLRS 9.3-1:</p>&#xA;&#xA;<blockquote>&#xA; <p>In the algorithm <code>SELECT</code>, the input elements are divided into groups of&#xA; $5$...
habedi/stack-exchange-dataset
13,387
$\mathbf{NC}$ is closed under logspace reductions
<p>I am trying to solve the question 6.12 in Arora-Barak (Computational Complexity: A modern approach). The question asks you to show that the&#xA;$\mathsf{PATH}$ problem (decide whether a graph $G$ has a path from a given node $s$ to another given node $t$) which is complete for $\mathbf{NL}$ is also contained in $\ma...
complexity theory reductions closure properties complexity classes parallel computing
1
$\mathbf{NC}$ is closed under logspace reductions -- (complexity theory reductions closure properties complexity classes parallel computing) <p>I am trying to solve the question 6.12 in Arora-Barak (Computational Complexity: A modern approach). The question asks you to show that the&#xA;$\mathsf{PATH}$ problem (decide ...
habedi/stack-exchange-dataset
13,388
Are regular and context free languages closed against making them prefix-free?
<p>For a language L we define: </p>&#xA;&#xA;<p>$\qquad A(L) = \{ x \in L \mid \text{ no proper prefix of x is in L} \} $</p>&#xA;&#xA;<p>Are regular / context free languages closed under this operation ?</p>&#xA;&#xA;<p>For regular languages I thought about taking the DFA that accepts the language L and create a new ...
formal languages regular languages context free closure properties
1
Are regular and context free languages closed against making them prefix-free? -- (formal languages regular languages context free closure properties) <p>For a language L we define: </p>&#xA;&#xA;<p>$\qquad A(L) = \{ x \in L \mid \text{ no proper prefix of x is in L} \} $</p>&#xA;&#xA;<p>Are regular / context free lan...
habedi/stack-exchange-dataset
13,393
If a parser can parse a non-deterministic grammar, is the parser non-deterministic?
<p>I've written a recursive-descent parser generator, and I'm trying to classify it (call me a cowboy coder if you must). According to wikipedia, <code>S → 0S0 | 1S1 | ε</code>, which checks for an even-length palindrome, is a non-deterministic grammar. My parser generator can handle this grammar. Does that mean my par...
formal grammars pushdown automata parsers
1
If a parser can parse a non-deterministic grammar, is the parser non-deterministic? -- (formal grammars pushdown automata parsers) <p>I've written a recursive-descent parser generator, and I'm trying to classify it (call me a cowboy coder if you must). According to wikipedia, <code>S → 0S0 | 1S1 | ε</code>, which check...
habedi/stack-exchange-dataset
13,398
Reference request: Monads, continuations, and other functional CS concepts
<p>I've been using Clojure for about 18 months. Recently, I've come across terms such as Monads, Continuations, et al which I'd like to learn about.</p>&#xA;&#xA;<p>I could visit Wikipedia and read about these two topics, but I'm looking for a reference which also help me learn about related matters that I don't even k...
reference request programming languages functional programming continuations
1
Reference request: Monads, continuations, and other functional CS concepts -- (reference request programming languages functional programming continuations) <p>I've been using Clojure for about 18 months. Recently, I've come across terms such as Monads, Continuations, et al which I'd like to learn about.</p>&#xA;&#xA;<...
habedi/stack-exchange-dataset
13,400
Push Down Automatons "guess" - what does that mean?
<p>I realize non-deterministic pushdown automata can be an improvement over deterministic ones as they can "choose" among several states and there are some context-free languages which cannot be accepted by a deterministic pushdown.</p>&#xA;&#xA;<p>Still, I do not understand <em>how</em> exactly they "choose". For pali...
automata pushdown automata nondeterminism
1
Push Down Automatons "guess" - what does that mean? -- (automata pushdown automata nondeterminism) <p>I realize non-deterministic pushdown automata can be an improvement over deterministic ones as they can "choose" among several states and there are some context-free languages which cannot be accepted by a deterministi...
habedi/stack-exchange-dataset
13,415
Bitarithmetrics to Base X
<p>I've got the following theoretical problem which puzzles me a bit:</p>&#xA;&#xA;<p>I can obtain a string of <em>n</em> bytes (as octets, one byte = one octet = eight bits) of random data. I need to preserve the randomness <em>while</em> reducing the base from 256 to <em>x</em> where <em>x</em> is below 256 (and not ...
binary arithmetic
1
Bitarithmetrics to Base X -- (binary arithmetic) <p>I've got the following theoretical problem which puzzles me a bit:</p>&#xA;&#xA;<p>I can obtain a string of <em>n</em> bytes (as octets, one byte = one octet = eight bits) of random data. I need to preserve the randomness <em>while</em> reducing the base from 256 to <...
habedi/stack-exchange-dataset
13,418
Tokenizer and complex operators
<p>I'm trying to create simple tokenizer to transform following (only part shown) search expression to tokens</p>&#xA;&#xA;<pre><code>word1 near(1) word2&#xA;</code></pre>&#xA;&#xA;<p>where word1, word2 are some words and near(1) is distance operator.&#xA;The question is how this expression should be tokenized. &#xA;I ...
parsers
1
Tokenizer and complex operators -- (parsers) <p>I'm trying to create simple tokenizer to transform following (only part shown) search expression to tokens</p>&#xA;&#xA;<pre><code>word1 near(1) word2&#xA;</code></pre>&#xA;&#xA;<p>where word1, word2 are some words and near(1) is distance operator.&#xA;The question is how...
habedi/stack-exchange-dataset
13,426
about scheduling in operation system
<ol>&#xA;<li><p>In FIFO: when process get cpu time and then go to IO.&#xA;What happend in the time it is in IO? another process can run?&#xA;After finishing IO it continue or "loss its turn"?&#xA;Why FIFO give priority to cpu bound process?</p></li>&#xA;<li><p>In RR: assume slice time is s and after (s-2) for eample it...
operating systems
1
about scheduling in operation system -- (operating systems) <ol>&#xA;<li><p>In FIFO: when process get cpu time and then go to IO.&#xA;What happend in the time it is in IO? another process can run?&#xA;After finishing IO it continue or "loss its turn"?&#xA;Why FIFO give priority to cpu bound process?</p></li>&#xA;<li><p...
habedi/stack-exchange-dataset
13,441
Who needs linearizability?
<p>I've been reading about the differences between <strong>serializability</strong> and <strong>linearizability</strong>, which are both consistency criteria for replicated systems such as replicated databases. However, I don't know in which cases linearizability would be needed, even though it's stronger than serializ...
concurrency databases
1
Who needs linearizability? -- (concurrency databases) <p>I've been reading about the differences between <strong>serializability</strong> and <strong>linearizability</strong>, which are both consistency criteria for replicated systems such as replicated databases. However, I don't know in which cases linearizability wo...
habedi/stack-exchange-dataset
13,445
Double hashing - probe count probabilities
<p>From TAoCP, Vol. 3 by Knuth we know that <em>expected (mean)</em> probe counts for hash tables with open adressing and double hashing collision-resolution are:</p>&#xA;&#xA;<ul>&#xA;<li><p>$1 \over 1 - \alpha$ - for unsuccessful search</p></li>&#xA;<li><p>${1 \over \alpha} ln({1 \over 1 - \alpha})$ - for succesful s...
hash hash tables
1
Double hashing - probe count probabilities -- (hash hash tables) <p>From TAoCP, Vol. 3 by Knuth we know that <em>expected (mean)</em> probe counts for hash tables with open adressing and double hashing collision-resolution are:</p>&#xA;&#xA;<ul>&#xA;<li><p>$1 \over 1 - \alpha$ - for unsuccessful search</p></li>&#xA;<li...
habedi/stack-exchange-dataset
13,452
Number of rounds in interactive proofs - Arora & Barak
<p>In the web draft of Arora and Barak, "Computational Complexity: A Modern Approach", the way I understand their definition of a round of interaction is that it consists of either the verifier or the prover sending a message. In other sources on the matter, it seems to me that a round consists of both the verifier and...
complexity theory interactive proof systems
1
Number of rounds in interactive proofs - Arora & Barak -- (complexity theory interactive proof systems) <p>In the web draft of Arora and Barak, "Computational Complexity: A Modern Approach", the way I understand their definition of a round of interaction is that it consists of either the verifier or the prover sending ...
habedi/stack-exchange-dataset
13,456
What is the complexity of the emptiness problem for 2-way DFAs?
<p>I'm wondering, what is the time-complexity of determining emptiness for 2-way DFAs? That is, finite automata which can move backwards on their read-only input tape.</p>&#xA;&#xA;<p>According to Wikipedia, they are equivalent to DFAs, though the equivalent DFA might be exponentially larger. I've found state complexit...
complexity theory formal languages reference request automata finite automata
1
What is the complexity of the emptiness problem for 2-way DFAs? -- (complexity theory formal languages reference request automata finite automata) <p>I'm wondering, what is the time-complexity of determining emptiness for 2-way DFAs? That is, finite automata which can move backwards on their read-only input tape.</p>&#...
habedi/stack-exchange-dataset
13,459
Distributed problems in Financial Services?
<p>When we talk about distributed computing - it often refers to problems in biology or web search where there is a large quantity of data to process, or email where there is a large number of concurrent users. </p>&#xA;&#xA;<p>Often in financial services, the problem space is OLTP for online banking, or overnight batc...
distributed systems
1
Distributed problems in Financial Services? -- (distributed systems) <p>When we talk about distributed computing - it often refers to problems in biology or web search where there is a large quantity of data to process, or email where there is a large number of concurrent users. </p>&#xA;&#xA;<p>Often in financial serv...
habedi/stack-exchange-dataset
13,464
Exponential separation between NFAs and DFAs in the presence of unions
<p>For a regular language <span class="math-container">$L$</span>, its <em>DFA complexity</em> is the size of the minimal DFA accepting it, and its <em>NFA complexity</em> is the size of the minimal NFA accepting it. It is well-known that there is an exponential separation between the two complexities, at least when th...
regular languages finite automata
1
Exponential separation between NFAs and DFAs in the presence of unions -- (regular languages finite automata) <p>For a regular language <span class="math-container">$L$</span>, its <em>DFA complexity</em> is the size of the minimal DFA accepting it, and its <em>NFA complexity</em> is the size of the minimal NFA accepti...
habedi/stack-exchange-dataset
13,468
Search for minimum in an array of $k$ monotonic subarrays
<p>Let $A$ be an array of totally ordered elements. A subarray $A[i..j]$ is decreasing if $A[k]\geq A[k+1]$ for all $i \leq k &lt; j$. It is increasing if $A[k]\leq A[k+1]$ for all $i \leq k &lt; j$. It is monotonic if it's either decreasing or increasing. </p>&#xA;&#xA;<p>We call an array is $k$ monotonic if the array...
algorithms arrays
1
Search for minimum in an array of $k$ monotonic subarrays -- (algorithms arrays) <p>Let $A$ be an array of totally ordered elements. A subarray $A[i..j]$ is decreasing if $A[k]\geq A[k+1]$ for all $i \leq k &lt; j$. It is increasing if $A[k]\leq A[k+1]$ for all $i \leq k &lt; j$. It is monotonic if it's either decreasi...
habedi/stack-exchange-dataset
13,470
Can the plus operator in regex be replaced by the star operator?
<p>Full disclosure, I'm interested in what this means about transformations on NFAs, but regex expressions seem like a easy way to ask the question.</p>&#xA;&#xA;<p>If you have a regex that uses the plus operator (match one or more) can it, in the general case, be transformed into a regex that uses only the star operat...
automata regular expressions
1
Can the plus operator in regex be replaced by the star operator? -- (automata regular expressions) <p>Full disclosure, I'm interested in what this means about transformations on NFAs, but regex expressions seem like a easy way to ask the question.</p>&#xA;&#xA;<p>If you have a regex that uses the plus operator (match o...
habedi/stack-exchange-dataset
13,492
Difference between symbolic execution and reachability analysis
<p>Now I am confused about symbolic execution (SE) and reachability analysis (RA). As I know, SE uses symbols to execute some code to reach each branch with branch conditions. And RA can be used to find the reachability of each branch, right? When RA is used, we can extract the branch condition for each branch. If so, ...
algorithm analysis compilers program optimization
1
Difference between symbolic execution and reachability analysis -- (algorithm analysis compilers program optimization) <p>Now I am confused about symbolic execution (SE) and reachability analysis (RA). As I know, SE uses symbols to execute some code to reach each branch with branch conditions. And RA can be used to fin...
habedi/stack-exchange-dataset
13,498
Average number of slots needed in slotted-Aloha
<p>Consider 2 stations that share the same bus. Both stations are perfect synchronized each other and when they have packets to transmit, they are starting the transmission in the beginning of a same slot. Transmission is as follows: when base $i$ has a packet to transmit attempts with probability $p_i, i=1,2$. Differe...
probability theory computer networks
1
Average number of slots needed in slotted-Aloha -- (probability theory computer networks) <p>Consider 2 stations that share the same bus. Both stations are perfect synchronized each other and when they have packets to transmit, they are starting the transmission in the beginning of a same slot. Transmission is as follo...
habedi/stack-exchange-dataset
13,501
Transmission (Store and Forward) Delay
<p>The <a href="http://rads.stackoverflow.com/amzn/click/0136079679" rel="nofollow">Kurose &amp; Ross book</a> uses "store-and-forward delay" as a synonym for the transmission delay of a packet over a network link. </p>&#xA;&#xA;<p>As a newcomer to computer networks, it isn't immediately obvious to me how these two ter...
computer networks
1
Transmission (Store and Forward) Delay -- (computer networks) <p>The <a href="http://rads.stackoverflow.com/amzn/click/0136079679" rel="nofollow">Kurose &amp; Ross book</a> uses "store-and-forward delay" as a synonym for the transmission delay of a packet over a network link. </p>&#xA;&#xA;<p>As a newcomer to computer ...
habedi/stack-exchange-dataset
13,503
"OOD allows ADTs to be created and used."
<p>I just had a CS mid-term and one of the questions was:</p>&#xA;&#xA;<blockquote>&#xA; <p>OOD allows ADTs to be created and used.</p>&#xA; &#xA; <ul>&#xA; <li>True</li>&#xA; <li>False</li>&#xA; </ul>&#xA;</blockquote>&#xA;&#xA;<p>I answered false, but my answer was marked as incorrect. I suspect what the questi...
programming languages object oriented abstract data types
1
"OOD allows ADTs to be created and used." -- (programming languages object oriented abstract data types) <p>I just had a CS mid-term and one of the questions was:</p>&#xA;&#xA;<blockquote>&#xA; <p>OOD allows ADTs to be created and used.</p>&#xA; &#xA; <ul>&#xA; <li>True</li>&#xA; <li>False</li>&#xA; </ul>&#xA;</b...
habedi/stack-exchange-dataset
13,512
Is developing an OCR considered a research project?
<p>Is developing an optical character recognition system for an alphabet which has no previous ocr considered a reputable conference or journal worthy research project, given the fact that there are so many commercial ocr system? Though, lots of conference proceeding and journal entries shows up when googled, but most ...
computer vision pattern recognition
1
Is developing an OCR considered a research project? -- (computer vision pattern recognition) <p>Is developing an optical character recognition system for an alphabet which has no previous ocr considered a reputable conference or journal worthy research project, given the fact that there are so many commercial ocr syste...
habedi/stack-exchange-dataset
13,513
Finding all marked elements using Grover's algorithm
<p>Grover's algorithm uses an oracle function $f(x) \to \{0,1\}$ to find the location of a single marked element from an unordered database of $2^n$ elements with high probability. As part of an assignment I am supposed to design a variant of the algorithm that finds <em>all</em> of the $t$ marked elements ($t$ is know...
algorithms quantum computing
1
Finding all marked elements using Grover's algorithm -- (algorithms quantum computing) <p>Grover's algorithm uses an oracle function $f(x) \to \{0,1\}$ to find the location of a single marked element from an unordered database of $2^n$ elements with high probability. As part of an assignment I am supposed to design a v...
habedi/stack-exchange-dataset
13,522
Constrainted Optimization Problem in Matrix Entropy
<p>I have a constrainted optimization problem in the (Shannon) matrix entropy $\mathtt{(sum(entr(eig(A))))}$. The matrix $A$ can be written as the sum of rank 1 matrices of the form $[v_i\,v_i^T]$ where $v_i$ is a given normalized vector. The coefficients of the rank one matrices are the unknowns in which we optimize a...
optimization entropy
1
Constrainted Optimization Problem in Matrix Entropy -- (optimization entropy) <p>I have a constrainted optimization problem in the (Shannon) matrix entropy $\mathtt{(sum(entr(eig(A))))}$. The matrix $A$ can be written as the sum of rank 1 matrices of the form $[v_i\,v_i^T]$ where $v_i$ is a given normalized vector. The...
habedi/stack-exchange-dataset
13,541
What does a polynomial time reduction mean?
<p>I am having a little trouble understanding what is meant by a poly-time reduction.&#xA;Suppose I have two algorithms $A$ and $B$ and then I say that $A$ is reducible to $B$. Does polytime reduction mean that the algorithm that solves $A$ using $B$ as a helper runs in $O(n^k)$ for some $k$?</p>&#xA;&#xA;<p>So for exa...
time complexity reductions
1
What does a polynomial time reduction mean? -- (time complexity reductions) <p>I am having a little trouble understanding what is meant by a poly-time reduction.&#xA;Suppose I have two algorithms $A$ and $B$ and then I say that $A$ is reducible to $B$. Does polytime reduction mean that the algorithm that solves $A$ usi...
habedi/stack-exchange-dataset
13,548
What is the most power/energy efficient sorting algorithm?
<p>I am writing a Android phone application that needs to be very power efficient, and I would like to use the most power efficient sorting algorithm. I will implement it in C for extra power efficiency. What algorithm is the most power efficient algorithm for sorting arbitrary text strings?</p>&#xA;
algorithms sorting efficiency power consumption
1
What is the most power/energy efficient sorting algorithm? -- (algorithms sorting efficiency power consumption) <p>I am writing a Android phone application that needs to be very power efficient, and I would like to use the most power efficient sorting algorithm. I will implement it in C for extra power efficiency. What...
habedi/stack-exchange-dataset
13,555
Optimal coverage of a $D$-dimensional grid with small blocks
<p>I have a $D$-dimensional grid with the size $(N_1, \ldots, N_D)$, where $N_i$ are natural numbers, and a "flat block size" $M$, also a natural number. I want to find a decomposition $(m_1, \ldots, m_D)$ such that:</p>&#xA;&#xA;<ol>&#xA;<li><p>$\prod_{i=1}^D m_i = M$,</p></li>&#xA;<li><p>$R = \prod_{i=1}^D f(N_i, m_i...
algorithms optimization dynamic programming
1
Optimal coverage of a $D$-dimensional grid with small blocks -- (algorithms optimization dynamic programming) <p>I have a $D$-dimensional grid with the size $(N_1, \ldots, N_D)$, where $N_i$ are natural numbers, and a "flat block size" $M$, also a natural number. I want to find a decomposition $(m_1, \ldots, m_D)$ such...
habedi/stack-exchange-dataset
13,559
Reductions among Undecidable Problems
<p>Im sorry if this question has some trivial answer which I am missing. Whenever I study some problem which has been proven undecidable, I observe that the proof relies on a reduction to another problem which has been proven to be undecidable. I understand that it creates some kind of an order on the degree of difficu...
computability reductions undecidability
1
Reductions among Undecidable Problems -- (computability reductions undecidability) <p>Im sorry if this question has some trivial answer which I am missing. Whenever I study some problem which has been proven undecidable, I observe that the proof relies on a reduction to another problem which has been proven to be undec...
habedi/stack-exchange-dataset
13,562
Filling Rows of a Matrix Subject to Conditions
<p>I'm seeking to write an algorithm which, given a value of N, will fill a matrix consisting of (N+1)<em>(N+2)</em>(N+3)/6 rows and 4 columns with the integers from 0, ... , N, subject to the conditions that:</p>&#xA;&#xA;<ul>&#xA;<li>The sum of values in any row is N</li>&#xA;<li>No rows are repeated (this should ens...
algorithms integers linear programming
1
Filling Rows of a Matrix Subject to Conditions -- (algorithms integers linear programming) <p>I'm seeking to write an algorithm which, given a value of N, will fill a matrix consisting of (N+1)<em>(N+2)</em>(N+3)/6 rows and 4 columns with the integers from 0, ... , N, subject to the conditions that:</p>&#xA;&#xA;<ul>&#...
habedi/stack-exchange-dataset
13,581
How does insertion work in an AVL tree?
<p><img src="https://i.stack.imgur.com/oB6Zq.jpg" alt="enter image description here"></p>&#xA;&#xA;<p>From the above image, while trying to maintain an <a href="http://en.wikipedia.org/wiki/AVL_tree" rel="nofollow noreferrer">AVL tree data structure</a>, how would the tree look after inserting the value 10? Also, if an...
data structures trees search trees
1
How does insertion work in an AVL tree? -- (data structures trees search trees) <p><img src="https://i.stack.imgur.com/oB6Zq.jpg" alt="enter image description here"></p>&#xA;&#xA;<p>From the above image, while trying to maintain an <a href="http://en.wikipedia.org/wiki/AVL_tree" rel="nofollow noreferrer">AVL tree data ...
habedi/stack-exchange-dataset
13,585
How to develop an $O(N)$ algorithm solve the 2-sum problem?
<p>Given an sorted array of integers, I want to find the number of pairs that sum to $0$. For example, given $\{-3,-2,0,2,3,4\}$, the number of pairs sum to zero is $2$.</p>&#xA;&#xA;<p>Let $N$ be the number of elements in the input array. If I use binary search to find the additive inverse for an element in the array,...
algorithms
1
How to develop an $O(N)$ algorithm solve the 2-sum problem? -- (algorithms) <p>Given an sorted array of integers, I want to find the number of pairs that sum to $0$. For example, given $\{-3,-2,0,2,3,4\}$, the number of pairs sum to zero is $2$.</p>&#xA;&#xA;<p>Let $N$ be the number of elements in the input array. If I...
habedi/stack-exchange-dataset
13,591
Free description of the Kameda-Weiner algorithm?
<p>I found the paper "On the State Minimization of Nondeterministic Finite Automata" which, I assume, contains the Kameda-Weiner algorithm that I've been searching for. It's behind a paywall though. I'm just a hobbyist. Can someone explain it, or point me to another source?</p>&#xA;
algorithms automata finite automata
1
Free description of the Kameda-Weiner algorithm? -- (algorithms automata finite automata) <p>I found the paper "On the State Minimization of Nondeterministic Finite Automata" which, I assume, contains the Kameda-Weiner algorithm that I've been searching for. It's behind a paywall though. I'm just a hobbyist. Can someon...
habedi/stack-exchange-dataset
13,592
How do the non-∪ variants of NFAs work?
<p>I've only recently learned anything substantial about finite automata, and I've just come across some things I hadn't seen before. Specifically, that classic NFAs are ∪-NFA, and there are also these things ⊕-NFA , ∩-NFA and ⋆-NFA (I love unicode). These can all be seen in <a href="http://fastar.org/publications/Pres...
automata finite automata
1
How do the non-∪ variants of NFAs work? -- (automata finite automata) <p>I've only recently learned anything substantial about finite automata, and I've just come across some things I hadn't seen before. Specifically, that classic NFAs are ∪-NFA, and there are also these things ⊕-NFA , ∩-NFA and ⋆-NFA (I love unicode)....
habedi/stack-exchange-dataset
13,594
Something I don't understand about Genetic Algorithms
<p>I've had a bit of experience programming Neural networks but I am fairly new with genetic algorithms (I'm only 17). I have a major issue that I can't understand. If a child get's one chromatid from one parent and another from another parent, then the genes are crossed over, how do you determine which alleles are act...
artificial intelligence neural networks genetic algorithms
1
Something I don't understand about Genetic Algorithms -- (artificial intelligence neural networks genetic algorithms) <p>I've had a bit of experience programming Neural networks but I am fairly new with genetic algorithms (I'm only 17). I have a major issue that I can't understand. If a child get's one chromatid from o...
habedi/stack-exchange-dataset
13,598
What are efficient data structures for inserting and accessing elements?
<p>Is there a data structure to keep a list of elements (not necessarily sorted) that performs the Access (by index) and Insert operations in a reasonable asymptotic time?</p>&#xA;&#xA;<p>When I say "reasonable time", I mean that it should be equal to or better than $O(\log N)$.</p>&#xA;&#xA;<p>I'm looking for a struct...
data structures efficiency
1
What are efficient data structures for inserting and accessing elements? -- (data structures efficiency) <p>Is there a data structure to keep a list of elements (not necessarily sorted) that performs the Access (by index) and Insert operations in a reasonable asymptotic time?</p>&#xA;&#xA;<p>When I say "reasonable time...
habedi/stack-exchange-dataset
13,608
MST: Prim's algorithm complexity, why not $O(EV \lg V)$?
<p>According to CLRS, the Prim's algorithms is implemented as below -- </p>&#xA;&#xA;<blockquote>&#xA; <p>$\mathtt{\text{MST-PRIM}}(G,w,r)$ </p>&#xA; &#xA; <ul>&#xA; <li>for each $u \in V[G]$ do<br>&#xA; <ul>&#xA; <li>$\mathtt{\text{key}}[u] \leftarrow \infty$ </li>&#xA; <li>$\pi[u] \leftarrow \mathtt{\text{NI...
algorithms algorithm analysis spanning trees
1
MST: Prim's algorithm complexity, why not $O(EV \lg V)$? -- (algorithms algorithm analysis spanning trees) <p>According to CLRS, the Prim's algorithms is implemented as below -- </p>&#xA;&#xA;<blockquote>&#xA; <p>$\mathtt{\text{MST-PRIM}}(G,w,r)$ </p>&#xA; &#xA; <ul>&#xA; <li>for each $u \in V[G]$ do<br>&#xA; <ul...
habedi/stack-exchange-dataset
13,617
Finding maximal factorization of regular languages
<p>Let language $\mathcal{L} \subseteq \Sigma^*$ be regular.</p>&#xA;&#xA;<p>A factorization of $\mathcal{L}$ is a maximal pair $(X,Y)$ of sets of words with</p>&#xA;&#xA;<ul>&#xA;<li>$X \cdot Y \subseteq \mathcal{L}$</li>&#xA;<li>$X \neq \emptyset \neq Y$,</li>&#xA;</ul>&#xA;&#xA;<p>where $X \cdot Y = \{xy$ | $x \in ...
algorithms regular languages optimization
1
Finding maximal factorization of regular languages -- (algorithms regular languages optimization) <p>Let language $\mathcal{L} \subseteq \Sigma^*$ be regular.</p>&#xA;&#xA;<p>A factorization of $\mathcal{L}$ is a maximal pair $(X,Y)$ of sets of words with</p>&#xA;&#xA;<ul>&#xA;<li>$X \cdot Y \subseteq \mathcal{L}$</li>...
habedi/stack-exchange-dataset
13,620
What linked list data structure adjustments would give me fast random lookup?
<p>I am presently using an doubly linked list (C++ <code>std::list</code>) to hold a bunch of records that each have a unique integer identifier. The linked list is created in sorted order such that in the list, the next item always has a larger unique identifier than its predecessor.</p>&#xA;&#xA;<p>The issue I'm fac...
data structures time complexity binary trees linked lists
1
What linked list data structure adjustments would give me fast random lookup? -- (data structures time complexity binary trees linked lists) <p>I am presently using an doubly linked list (C++ <code>std::list</code>) to hold a bunch of records that each have a unique integer identifier. The linked list is created in so...
habedi/stack-exchange-dataset
13,625
What exactly is polynomial time?
<p>I'm trying to understand algorithm complexity, and a lot of algorithms are classified as polynomial. I couldn't find an exact definition anywhere. I assume it is the complexity that is not exponential. </p>&#xA;&#xA;<p>Do linear/constant/quadratic complexities count as polynomial? An answer in simple English will be...
algorithms terminology time complexity runtime analysis polynomial time
1
What exactly is polynomial time? -- (algorithms terminology time complexity runtime analysis polynomial time) <p>I'm trying to understand algorithm complexity, and a lot of algorithms are classified as polynomial. I couldn't find an exact definition anywhere. I assume it is the complexity that is not exponential. </p>&...
habedi/stack-exchange-dataset
13,631
Measures and probability in formal language theory
<p>I am looking for references for the following problem: &#xA;I have a very special class of regular languages and my aim is to express (and to justify my conjecture) that this class itself is very small in some way (as a subset of the regular languages) and that the languages contained in this class are rather "bloat...
formal languages reference request regular languages probability theory
1
Measures and probability in formal language theory -- (formal languages reference request regular languages probability theory) <p>I am looking for references for the following problem: &#xA;I have a very special class of regular languages and my aim is to express (and to justify my conjecture) that this class itself i...
habedi/stack-exchange-dataset
13,655
Polynomial-time algorithm with exponential space is eligible?
<p>I'm curious about two things.</p>&#xA;&#xA;<ol>&#xA;<li><p>When we define the class called "probabilistic polynomial-time algorithm" in computer science, does it include polynomial-time algorithm with exponential space? &#xA;For example, when algorithm is considered to be given a input from domain $\{0,1\}^n$, &#xA;...
complexity theory terminology polynomial time one way functions
1
Polynomial-time algorithm with exponential space is eligible? -- (complexity theory terminology polynomial time one way functions) <p>I'm curious about two things.</p>&#xA;&#xA;<ol>&#xA;<li><p>When we define the class called "probabilistic polynomial-time algorithm" in computer science, does it include polynomial-time ...
habedi/stack-exchange-dataset
13,659
Recursive definition of sum of two numbers in terms of the successor function
<p>This is a question from the book <code>Data structures using C and C++ by Tenenbaum</code>. Not a homework problem but self-study.</p>&#xA;&#xA;<blockquote>&#xA; <p>Recursive definition of a+b, where a and b are non-negative integers, in terms of successor function <code>succ</code> defined as</p>&#xA; &#xA; <p>s...
algorithms recursion number theory
1
Recursive definition of sum of two numbers in terms of the successor function -- (algorithms recursion number theory) <p>This is a question from the book <code>Data structures using C and C++ by Tenenbaum</code>. Not a homework problem but self-study.</p>&#xA;&#xA;<blockquote>&#xA; <p>Recursive definition of a+b, wher...
habedi/stack-exchange-dataset
13,661
Is the memory-runtime tradeoff an equivalent of Heisenberg's uncertainty principle?
<p>When I work on an algorithm to solve a computing problem, I often experience that speed can be increased by using more memory, and memory usage can be decreased at the price of increased running time, but I can never force the product of running time and consumed memory below a clearly palpable limit. This is formal...
algorithms time complexity space complexity performance
1
Is the memory-runtime tradeoff an equivalent of Heisenberg's uncertainty principle? -- (algorithms time complexity space complexity performance) <p>When I work on an algorithm to solve a computing problem, I often experience that speed can be increased by using more memory, and memory usage can be decreased at the pric...
habedi/stack-exchange-dataset
13,669
What is the difference between an algorithm, a language and a problem?
<p>It seems that on this site, people will often correct others for confusing "algorithms" and "problems." What are the difference between these? How do I know when I should be considering algorithms and considering problems? And how do these relate to the concept of a language in formal language theory?</p>&#xA;
algorithms complexity theory formal languages terminology reference question
1
What is the difference between an algorithm, a language and a problem? -- (algorithms complexity theory formal languages terminology reference question) <p>It seems that on this site, people will often correct others for confusing "algorithms" and "problems." What are the difference between these? How do I know when I ...
habedi/stack-exchange-dataset
13,674
Completeness of formal definition of 'hardness on the average'
<p>While reading a cryptography textbook, i find the definition of a function that is hard on the average.(More precisely, it is 'hard on the average but easy with auxiliary input', but i omit latter for simplicity.)</p>&#xA;<blockquote>&#xA;<p><strong>Definition : Hard on the average</strong> :</p>&#xA;<p><span class=...
complexity theory terminology cryptography randomized algorithms average case
1
Completeness of formal definition of 'hardness on the average' -- (complexity theory terminology cryptography randomized algorithms average case) <p>While reading a cryptography textbook, i find the definition of a function that is hard on the average.(More precisely, it is 'hard on the average but easy with auxiliary ...
habedi/stack-exchange-dataset
13,675
What is the meaning of this pseudo-code function?
<p>While reading the paper <a href="http://dl.acm.org/citation.cfm?id=564727" rel="nofollow">Holistic twig joins: optimal XML pattern matching</a> I came across the pseudo code for liststack algorithm. (available through google scholar)</p>&#xA;&#xA;<p>A function in the algorithm confused me, since I can understand wha...
algorithms terminology
1
What is the meaning of this pseudo-code function? -- (algorithms terminology) <p>While reading the paper <a href="http://dl.acm.org/citation.cfm?id=564727" rel="nofollow">Holistic twig joins: optimal XML pattern matching</a> I came across the pseudo code for liststack algorithm. (available through google scholar)</p>&#...
habedi/stack-exchange-dataset
13,677
Getting started with Data Mining
<p>This is the first time that I'm looking in depth into the topic, although I've always been curious.&#xA;Could someone let me know about online resources (courses, tutorials, etc) and books that cover the basics of the topic?&#xA;I'd like to explore both the theoretical part and the more practical part of Data Mining...
reference request data mining
1
Getting started with Data Mining -- (reference request data mining) <p>This is the first time that I'm looking in depth into the topic, although I've always been curious.&#xA;Could someone let me know about online resources (courses, tutorials, etc) and books that cover the basics of the topic?&#xA;I'd like to explore ...
habedi/stack-exchange-dataset
13,679
Why are all problems in FPTAS also in FPT?
<p>According to <a href="https://en.wikipedia.org/wiki/Polynomial-time_approximation_scheme" rel="noreferrer">the Wikipedia article on polynomial-time approximation schemes</a>:</p>&#xA;&#xA;<blockquote>&#xA; <p>All problems in FPTAS are fixed-parameter tractable.</p>&#xA;</blockquote>&#xA;&#xA;<p>This result surprise...
complexity theory reference request approximation parameterized complexity
1
Why are all problems in FPTAS also in FPT? -- (complexity theory reference request approximation parameterized complexity) <p>According to <a href="https://en.wikipedia.org/wiki/Polynomial-time_approximation_scheme" rel="noreferrer">the Wikipedia article on polynomial-time approximation schemes</a>:</p>&#xA;&#xA;<block...
habedi/stack-exchange-dataset
13,685
Constructing Tree (forest) from Ancestor function
<p><strong>Question:</strong></p>&#xA;&#xA;<p>Suppose I have a </p>&#xA;&#xA;<ul>&#xA;<li>set of male people, and </li>&#xA;<li>a function isAncestor(person1,person2) that checks whether person1 is an ancestor of person2 in O(1) time. Eg, isAncestor(grandfather, grandson) would return true.</li>&#xA;</ul>&#xA;&#xA;<p>W...
algorithms trees
1
Constructing Tree (forest) from Ancestor function -- (algorithms trees) <p><strong>Question:</strong></p>&#xA;&#xA;<p>Suppose I have a </p>&#xA;&#xA;<ul>&#xA;<li>set of male people, and </li>&#xA;<li>a function isAncestor(person1,person2) that checks whether person1 is an ancestor of person2 in O(1) time. Eg, isAncesto...
habedi/stack-exchange-dataset
13,686
Prove that the syntax is equivalent
<p>I don't "see" why the following syntax is equivalent to the second</p>&#xA;&#xA;<p>syntax1:</p>&#xA;&#xA;<pre><code>E -&gt; E + T&#xA;E -&gt; T&#xA;</code></pre>&#xA;&#xA;<p>syntax2: </p>&#xA;&#xA;<pre><code>E -&gt; T E'&#xA;E' -&gt; + T E'&#xA;E' -&gt;&#xA;</code></pre>&#xA;&#xA;<p>(it is to avoid left recursion an...
programming languages proof techniques parsers
1
Prove that the syntax is equivalent -- (programming languages proof techniques parsers) <p>I don't "see" why the following syntax is equivalent to the second</p>&#xA;&#xA;<p>syntax1:</p>&#xA;&#xA;<pre><code>E -&gt; E + T&#xA;E -&gt; T&#xA;</code></pre>&#xA;&#xA;<p>syntax2: </p>&#xA;&#xA;<pre><code>E -&gt; T E'&#xA;E' -...
habedi/stack-exchange-dataset
13,687
Recommended readings for Probability theory applied to algorithms
<p>Currently, I'm delving into Analysis of Algorithms and I've discovered that I would need to improve my knowledge of Probability Theory. Any recommendation? Where do I start?&#xA;Thanks in advance!</p>&#xA;
algorithms algorithm analysis probability theory
1
Recommended readings for Probability theory applied to algorithms -- (algorithms algorithm analysis probability theory) <p>Currently, I'm delving into Analysis of Algorithms and I've discovered that I would need to improve my knowledge of Probability Theory. Any recommendation? Where do I start?&#xA;Thanks in advance!<...
habedi/stack-exchange-dataset
13,693
Detecting cycles in undirected graph
<p>I want to detect cycles in an undirected graph such that I get a list of all edges/vertices which form each cycle. For a graph G({a,b,c,d}, {a-b, b-c, c-d, d-a, b-d}) this would be {a, b, c, d}, {a, b, d}, {b, c, d}.</p>&#xA;&#xA;<p>I have read <a href="https://stackoverflow.com/questions/526331/cycles-in-an-undirec...
graphs
1
Detecting cycles in undirected graph -- (graphs) <p>I want to detect cycles in an undirected graph such that I get a list of all edges/vertices which form each cycle. For a graph G({a,b,c,d}, {a-b, b-c, c-d, d-a, b-d}) this would be {a, b, c, d}, {a, b, d}, {b, c, d}.</p>&#xA;&#xA;<p>I have read <a href="https://stacko...
habedi/stack-exchange-dataset
13,704
Understand the time complexity for this LCS (longest common subsequence) solution
<p>I would appreciate an intuitive way to find the time complexity of dynamic programming problems. Can anyone explain me “#subproblems * time/subproblem”? I am not able to grok it.</p>&#xA;&#xA;<p>Code for LCS - </p>&#xA;&#xA;<pre><code>public static String findLCS(String str1, String str2 ) {&#xA; // If either str...
algorithm analysis runtime analysis dynamic programming
1
Understand the time complexity for this LCS (longest common subsequence) solution -- (algorithm analysis runtime analysis dynamic programming) <p>I would appreciate an intuitive way to find the time complexity of dynamic programming problems. Can anyone explain me “#subproblems * time/subproblem”? I am not able to grok...
habedi/stack-exchange-dataset
13,705
Little's law and average time on a system with a switch
<p>We have a switch with $2$ lines of input and $2$ output. Each line is $10 Mbps$. The size of packets is fixed and is $1KB$. The $1^{st}$ line of input is active (transferring packets) $40\%$ of the time, while the $2{nd}$ line is active $70\%$ of the time. $\frac{1}{4}$ of <strong>packets of input $1$</strong> (with...
probability theory computer networks
1
Little's law and average time on a system with a switch -- (probability theory computer networks) <p>We have a switch with $2$ lines of input and $2$ output. Each line is $10 Mbps$. The size of packets is fixed and is $1KB$. The $1^{st}$ line of input is active (transferring packets) $40\%$ of the time, while the $2{nd...
habedi/stack-exchange-dataset
13,711
Determine if two grammars for the same language are ambiguous
<p>I'm reading the book: <em>Formal Syntax and Semantics of Programming Languages</em>. I don't understand this exercise:</p>&#xA;<blockquote>&#xA;<p>Consider the following two grammars, each of which generates strings of correctly balanced parentheses and brackets. Determine if either or both is ambiguous. The Greek l...
context free formal grammars ambiguity
1
Determine if two grammars for the same language are ambiguous -- (context free formal grammars ambiguity) <p>I'm reading the book: <em>Formal Syntax and Semantics of Programming Languages</em>. I don't understand this exercise:</p>&#xA;<blockquote>&#xA;<p>Consider the following two grammars, each of which generates str...
habedi/stack-exchange-dataset
13,712
lambda calculus as a type theory
<p>From the Introduction section of Homotopy Type Theory book:</p>&#xA;&#xA;<blockquote>&#xA; <p>Type theory was originally invented by Bertrand Russell ... It was later developed as a rigorous formal system in its own right(under tha name "$\lambda$-calculus").</p>&#xA;</blockquote>&#xA;&#xA;<p>Can anyone explain me ...
lambda calculus type theory
1
lambda calculus as a type theory -- (lambda calculus type theory) <p>From the Introduction section of Homotopy Type Theory book:</p>&#xA;&#xA;<blockquote>&#xA; <p>Type theory was originally invented by Bertrand Russell ... It was later developed as a rigorous formal system in its own right(under tha name "$\lambda$-ca...
habedi/stack-exchange-dataset
13,732
Data structure for maintaining large space-efficient filtered array
<p>How does one implement a space efficient data structure that satisfies the requirements below?</p>&#xA;&#xA;<ol>&#xA;<li>You have a large array</li>&#xA;<li>You have a filter which tells you which elements in that large array are to be deleted</li>&#xA;<li>Lookup of i'th element in the array should be constant time<...
algorithms data structures dictionaries
1
Data structure for maintaining large space-efficient filtered array -- (algorithms data structures dictionaries) <p>How does one implement a space efficient data structure that satisfies the requirements below?</p>&#xA;&#xA;<ol>&#xA;<li>You have a large array</li>&#xA;<li>You have a filter which tells you which element...
habedi/stack-exchange-dataset