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
7,764
Which complexity classes are $\mathsf{RE}$?
<p>Given some complexity class $\mathsf{C}$, I want to know if there exists a function (Turing machine) $F:\mathbb{N} \to \mathsf{C}$ such that, if $S$ is any set for which the problem $x \mapsto x \in S$ is in $\mathsf{C}$, then $F(n)$ is a Turing machine which (partially, if $\mathsf C = \mathsf{RE}$) decides $x \in ...
complexity theory computability
1
Which complexity classes are $\mathsf{RE}$? -- (complexity theory computability) <p>Given some complexity class $\mathsf{C}$, I want to know if there exists a function (Turing machine) $F:\mathbb{N} \to \mathsf{C}$ such that, if $S$ is any set for which the problem $x \mapsto x \in S$ is in $\mathsf{C}$, then $F(n)$ is...
habedi/stack-exchange-dataset
7,767
Pumping lemma problem
<p>I need some help with the following question:</p>&#xA;&#xA;<p>One of the languages</p>&#xA;&#xA;<p>$$L_1 = \{a^pb^{q+r}c^sd^{q+t}e^{p+r} \mid p, q, r, s \ge 0\ , s &gt; t\}$$&#xA;$$L_2 = \{a^{p+q}b^rc^sd^{q+r}e^s \mid p, q, r, s \ge 0\}$$</p>&#xA;&#xA;<p>is context-free and the other is not. Build a context-free gra...
formal languages automata context free pumping lemma
1
Pumping lemma problem -- (formal languages automata context free pumping lemma) <p>I need some help with the following question:</p>&#xA;&#xA;<p>One of the languages</p>&#xA;&#xA;<p>$$L_1 = \{a^pb^{q+r}c^sd^{q+t}e^{p+r} \mid p, q, r, s \ge 0\ , s &gt; t\}$$&#xA;$$L_2 = \{a^{p+q}b^rc^sd^{q+r}e^s \mid p, q, r, s \ge 0\}$...
habedi/stack-exchange-dataset
7,772
categories of registers and and storage in them
<p>The <a href="http://en.wikipedia.org/wiki/Processor_register" rel="nofollow">Wikipedia article on processor registers</a> mentions:</p>&#xA;&#xA;<blockquote>&#xA; <p>Address registers hold addresses and are used by instructions that indirectly access primary memory.</p>&#xA;</blockquote>&#xA;&#xA;<p>Which addresses...
computer architecture memory access
1
categories of registers and and storage in them -- (computer architecture memory access) <p>The <a href="http://en.wikipedia.org/wiki/Processor_register" rel="nofollow">Wikipedia article on processor registers</a> mentions:</p>&#xA;&#xA;<blockquote>&#xA; <p>Address registers hold addresses and are used by instructions...
habedi/stack-exchange-dataset
7,776
How Does Dynamic Heap Storage Have Something to Do with Heap?
<p>There are three typical ways to allocate memory for programs: static, stack and dynamic heap. However, when I look at the implementation of <a href="http://en.wikipedia.org/wiki/Memory_management" rel="nofollow">dynamic heap memory allocation from wikipedia </a>, what I found is fixed block allocation, etc. So why i...
programming languages compilers operating systems memory management memory allocation
1
How Does Dynamic Heap Storage Have Something to Do with Heap? -- (programming languages compilers operating systems memory management memory allocation) <p>There are three typical ways to allocate memory for programs: static, stack and dynamic heap. However, when I look at the implementation of <a href="http://en.wikip...
habedi/stack-exchange-dataset
7,785
Is the undecidable function $UC$ well-defined for proving the undecidability of Halting Problem?
<p>I am new to Computability Theory and find it is both amazing and confusing. Specifically, it is difficult for me to get through the undecidability of the well-known Halting Problem. </p>&#xA;&#xA;<blockquote>&#xA; <p><strong>Halting function:</strong> The Halt function takes an input a pair $&lt;\alpha, x&gt;$ and ...
computability proof techniques undecidability halting problem
1
Is the undecidable function $UC$ well-defined for proving the undecidability of Halting Problem? -- (computability proof techniques undecidability halting problem) <p>I am new to Computability Theory and find it is both amazing and confusing. Specifically, it is difficult for me to get through the undecidability of the...
habedi/stack-exchange-dataset
7,786
Decision problem and algorithm
<p>I was reading about decision problem. I understand that decision problem tell yes/no answer for an input. The decision is based on a decision procedure also called an algorithm. </p>&#xA;&#xA;<p>The wikipedia says that </p>&#xA;&#xA;<blockquote>&#xA; <p>It is traditional to define the decision problem equivalently ...
computability turing machines undecidability decision problem
1
Decision problem and algorithm -- (computability turing machines undecidability decision problem) <p>I was reading about decision problem. I understand that decision problem tell yes/no answer for an input. The decision is based on a decision procedure also called an algorithm. </p>&#xA;&#xA;<p>The wikipedia says that ...
habedi/stack-exchange-dataset
7,799
Good explanatory resource for algorithm techniques such as greedy, backtracking and recursive functions
<p>What would be a good book/resource that explains the basic idea behind those techniques, how to use (and maybe when to use them) and plenty of exercises with perhaps some worked examples (kind of like when for loops were introduced for the first time you were asked to use one to compute sums of odd numbers, even num...
algorithms
1
Good explanatory resource for algorithm techniques such as greedy, backtracking and recursive functions -- (algorithms) <p>What would be a good book/resource that explains the basic idea behind those techniques, how to use (and maybe when to use them) and plenty of exercises with perhaps some worked examples (kind of l...
habedi/stack-exchange-dataset
7,801
Is there a simple example of sets such that $A \leq_T B$ but not $A \leq_m B$?
<p>I wonder if there is a simple example of sets $A$ and $B$ such that $A$ is Turing-reductible to $B$ but not many-to-one reductible to $B$.</p>&#xA;
turing machines reductions
1
Is there a simple example of sets such that $A \leq_T B$ but not $A \leq_m B$? -- (turing machines reductions) <p>I wonder if there is a simple example of sets $A$ and $B$ such that $A$ is Turing-reductible to $B$ but not many-to-one reductible to $B$.</p>&#xA;
habedi/stack-exchange-dataset
7,816
Application of Expander Codes
<p>I need to give a talk about <a href="http://en.wikipedia.org/wiki/Expander_code">expander codes</a> at university (I'm a student of computer science). Since they have been introduced to show a family of codes looking good when thinking of the <a href="http://en.wikipedia.org/wiki/Noisy-channel_coding_theorem">Shanno...
graphs combinatorics coding theory expanders
1
Application of Expander Codes -- (graphs combinatorics coding theory expanders) <p>I need to give a talk about <a href="http://en.wikipedia.org/wiki/Expander_code">expander codes</a> at university (I'm a student of computer science). Since they have been introduced to show a family of codes looking good when thinking o...
habedi/stack-exchange-dataset
7,817
Neural Network weight selection using Genetic Algorithm
<p>Hi I want to ask about weight selection in neural network using genetic algorithm. </p>&#xA;&#xA;<p>Right now what I understand is </p>&#xA;&#xA;<ol>&#xA;<li>Initialize population</li>&#xA;<li>Encode the weight of the neural network to the chromosome</li>&#xA;<li>Calculating the error and fitness</li>&#xA;<li>crosso...
neural networks
1
Neural Network weight selection using Genetic Algorithm -- (neural networks) <p>Hi I want to ask about weight selection in neural network using genetic algorithm. </p>&#xA;&#xA;<p>Right now what I understand is </p>&#xA;&#xA;<ol>&#xA;<li>Initialize population</li>&#xA;<li>Encode the weight of the neural network to the ...
habedi/stack-exchange-dataset
7,820
Prove or refute: BPP(0.90,0.95) = BPP
<p>I'd really like your help with the proving or refuting the following claim: $BPP(0.90,0.95)=BPP$. In computational complexity theory, BPP, which stands for <a href="http://en.wikipedia.org/wiki/BPP_%28complexity%29">bounded-error probabilistic polynomial time</a> is the class of decision problems solvable by a proba...
complexity theory time complexity probabilistic algorithms
1
Prove or refute: BPP(0.90,0.95) = BPP -- (complexity theory time complexity probabilistic algorithms) <p>I'd really like your help with the proving or refuting the following claim: $BPP(0.90,0.95)=BPP$. In computational complexity theory, BPP, which stands for <a href="http://en.wikipedia.org/wiki/BPP_%28complexity%29"...
habedi/stack-exchange-dataset
7,821
Smoothing frequencies without count data
<p>I have frequency data for different events under two conditions, resulting in sets of frequencies F1 and F2. I would like to normalize the frequencies of events under condition 1 by their frequencies under condition 2. However, there are events that occur in condition 1 but not condition 2, resulting in divide-by-ze...
algorithms probability theory
1
Smoothing frequencies without count data -- (algorithms probability theory) <p>I have frequency data for different events under two conditions, resulting in sets of frequencies F1 and F2. I would like to normalize the frequencies of events under condition 1 by their frequencies under condition 2. However, there are eve...
habedi/stack-exchange-dataset
7,823
Graph Bipartiteness
<p>I have 2 questions regarding Bipartiteness with corresponding examples.</p>&#xA;&#xA;<p>1) Can a non-connected graph be bipartite if it has an isolated vertex? Let's take the following graph:&#xA;<img src="https://i.stack.imgur.com/AzAxV.png" alt="enter image description here">&#xA;<br/>&#xA;I would say YES with thi...
graphs bipartite matching
1
Graph Bipartiteness -- (graphs bipartite matching) <p>I have 2 questions regarding Bipartiteness with corresponding examples.</p>&#xA;&#xA;<p>1) Can a non-connected graph be bipartite if it has an isolated vertex? Let's take the following graph:&#xA;<img src="https://i.stack.imgur.com/AzAxV.png" alt="enter image descri...
habedi/stack-exchange-dataset
7,828
Normalizing the mantissa in floating point representation
<p>How to represent $0.148 * 2^{14}$ in normalized floating point arithmetic with the format</p>&#xA;&#xA;<pre><code>1 - Sign bit&#xA;7 - Exponent in Excess-64 form&#xA;8 - Mantissa&#xA;</code></pre>&#xA;&#xA;<p>$(0.148)_{10} = (0.00100101\;111...)_2$</p>&#xA;&#xA;<p>We shift it 3 bits to left to make it normalized $(1...
binary arithmetic floating point rounding
1
Normalizing the mantissa in floating point representation -- (binary arithmetic floating point rounding) <p>How to represent $0.148 * 2^{14}$ in normalized floating point arithmetic with the format</p>&#xA;&#xA;<pre><code>1 - Sign bit&#xA;7 - Exponent in Excess-64 form&#xA;8 - Mantissa&#xA;</code></pre>&#xA;&#xA;<p>$(0...
habedi/stack-exchange-dataset
7,831
Easy proof for context-free languages being closed under cyclic shift
<p>The <em>cyclic shift</em> (also called <em>rotation</em> or <em>conjugation</em>) of a language $L$ is defined as $\{ yx \mid xy \in L \}$. According to <a href="http://en.wikipedia.org/wiki/Context-free_language" rel="nofollow noreferrer">wikipedia</a> (and <a href="http://en.wikipedia.org/wiki/Cyclic_shift" rel="...
formal languages context free closure properties
1
Easy proof for context-free languages being closed under cyclic shift -- (formal languages context free closure properties) <p>The <em>cyclic shift</em> (also called <em>rotation</em> or <em>conjugation</em>) of a language $L$ is defined as $\{ yx \mid xy \in L \}$. According to <a href="http://en.wikipedia.org/wiki/C...
habedi/stack-exchange-dataset
7,832
Maximimal Independent Set on Ring and Path
<p>Let's consider distributed version of algorithm for finding MIS of any graph $A$.</p>&#xA;&#xA;<p>For details, MIS - <a href="http://en.wikipedia.org/wiki/Maximal_independent_set" rel="nofollow">Maximimal Independent Set</a>.</p>&#xA;&#xA;<p>Slow version of distributed algorithm for MIS, page 2 - <a href="http://di...
algorithms graphs distributed systems
1
Maximimal Independent Set on Ring and Path -- (algorithms graphs distributed systems) <p>Let's consider distributed version of algorithm for finding MIS of any graph $A$.</p>&#xA;&#xA;<p>For details, MIS - <a href="http://en.wikipedia.org/wiki/Maximal_independent_set" rel="nofollow">Maximimal Independent Set</a>.</p>&#...
habedi/stack-exchange-dataset
7,842
How to rank search results of short string lists
<p>I have a tree of foods, which I'd like to search to find relevant nodes. What's the best way to rank the results?</p>&#xA;&#xA;<p>Here's an example sub-set after a search for "apple":</p>&#xA;&#xA;<pre><code>|-- apple pie&#xA;|-+ apples&#xA;| |-- cooking&#xA;| |-+ eating&#xA;| |-- average&#xA;| |-- Granny Smith&...
search algorithms
1
How to rank search results of short string lists -- (search algorithms) <p>I have a tree of foods, which I'd like to search to find relevant nodes. What's the best way to rank the results?</p>&#xA;&#xA;<p>Here's an example sub-set after a search for "apple":</p>&#xA;&#xA;<pre><code>|-- apple pie&#xA;|-+ apples&#xA;| |-...
habedi/stack-exchange-dataset
7,848
Concrete understanding of difference between PP and BPP definitions
<p>I am confused about how <strong>PP</strong> and <strong>BPP</strong> are defined. Let us assume $\chi$ is the characteristic function for a language $\mathcal{L}$. <em>M</em> be the probabilistic Turing Machine. Are the following definitions correct:<br>&#xA;$BPP =\{\mathcal{L} :Pr[\chi(x) \ne M(x)] \geq \frac{1}{2...
complexity theory terminology randomized algorithms complexity classes
1
Concrete understanding of difference between PP and BPP definitions -- (complexity theory terminology randomized algorithms complexity classes) <p>I am confused about how <strong>PP</strong> and <strong>BPP</strong> are defined. Let us assume $\chi$ is the characteristic function for a language $\mathcal{L}$. <em>M</e...
habedi/stack-exchange-dataset
7,851
Finding the longest common subsequence algorithm using hash table Slow
<p>I've designed an algorithm to find the longest common subsequence. these are steps: </p>&#xA;&#xA;<p>Starts with <code>i = 0</code></p>&#xA;&#xA;<ol>&#xA;<li>Picks the first letter from the first string start from ith letter.</li>&#xA;<li>Go to the second string looking for that picked letter.</li>&#xA;<li>If not f...
algorithms subsequences
1
Finding the longest common subsequence algorithm using hash table Slow -- (algorithms subsequences) <p>I've designed an algorithm to find the longest common subsequence. these are steps: </p>&#xA;&#xA;<p>Starts with <code>i = 0</code></p>&#xA;&#xA;<ol>&#xA;<li>Picks the first letter from the first string start from it...
habedi/stack-exchange-dataset
7,855
How is this algorithm in these two complexities?
<p>How is an algorithm with complexity $O(n \log n)$ also in $O(n^2)$? I'm not sure exactly what its saying here, I feel it may be something to do with the fact that big-oh is saying less than or equal to, but I am not fully sure. Any have any ideas? Thanks.</p>&#xA;
algorithms asymptotics landau notation
1
How is this algorithm in these two complexities? -- (algorithms asymptotics landau notation) <p>How is an algorithm with complexity $O(n \log n)$ also in $O(n^2)$? I'm not sure exactly what its saying here, I feel it may be something to do with the fact that big-oh is saying less than or equal to, but I am not fully su...
habedi/stack-exchange-dataset
7,879
Algorithms computing if a number is a multiple of 3
<p>When doing mental calculus one can do:</p>&#xA;&#xA;<ul>&#xA;<li>Given an integer k, sum all the digits (in base 10),&#xA;and if the result is a multiple of 3, then k is a multiple of 3.</li>&#xA;</ul>&#xA;&#xA;<p>Do you know of any algorithm working similarily but operating on binary numbers digits (bits)? </p>&#xA...
algorithms
1
Algorithms computing if a number is a multiple of 3 -- (algorithms) <p>When doing mental calculus one can do:</p>&#xA;&#xA;<ul>&#xA;<li>Given an integer k, sum all the digits (in base 10),&#xA;and if the result is a multiple of 3, then k is a multiple of 3.</li>&#xA;</ul>&#xA;&#xA;<p>Do you know of any algorithm workin...
habedi/stack-exchange-dataset
7,881
Broken stick problem
<p>We have a broken stick. For every part, we know it's length. Our task is to connect all parts (glue them), that we will use as small amount of glue as possible. </p>&#xA;&#xA;<p>The amount of glue need to connect two parts equal the maximum from their sizes. We can only glue two parts at one time.Can we solve this p...
complexity theory algorithms dynamic programming
1
Broken stick problem -- (complexity theory algorithms dynamic programming) <p>We have a broken stick. For every part, we know it's length. Our task is to connect all parts (glue them), that we will use as small amount of glue as possible. </p>&#xA;&#xA;<p>The amount of glue need to connect two parts equal the maximum f...
habedi/stack-exchange-dataset
7,894
Potential function binary heap extract max O(1)
<p>I need help figuring the potential function for a max heap so that extract max is completed in $O(1)$ amortised time. I should add that I do not have a good understanding of the potential method. </p>&#xA;&#xA;<p>I know that the insert function should "pay" more in order to reduce the cost of the extraction, and thi...
data structures runtime analysis heaps amortized analysis
1
Potential function binary heap extract max O(1) -- (data structures runtime analysis heaps amortized analysis) <p>I need help figuring the potential function for a max heap so that extract max is completed in $O(1)$ amortised time. I should add that I do not have a good understanding of the potential method. </p>&#xA;&...
habedi/stack-exchange-dataset
7,900
Scheduling algorithm to minimize maximum deadline overshoot in pre-emptive scheduler
<p>Suppose there are $n$ tasks, which need to be scheduled by a <em>pre-emptive</em> scheduler. Each task $T_i$ has a deadline $d_i$ and a total processing time $t_i$ associated with it. Now, all $n$ tasks are given a priory to the scheduler. The scheduler can run a task for 1 unit of time in one go. After each unit of...
algorithms optimization scheduling
1
Scheduling algorithm to minimize maximum deadline overshoot in pre-emptive scheduler -- (algorithms optimization scheduling) <p>Suppose there are $n$ tasks, which need to be scheduled by a <em>pre-emptive</em> scheduler. Each task $T_i$ has a deadline $d_i$ and a total processing time $t_i$ associated with it. Now, all...
habedi/stack-exchange-dataset
7,907
Is the "subset product" problem NP-complete?
<p>The subset-sum problem is a classic NP-complete problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>Given a list of numbers $L$ and a target $k$, is there a subset of numbers from $L$ that sums to $k$?</p>&#xA;</blockquote>&#xA;&#xA;<p>A student asked me if this variant of the problem called the "subset product" problem is ...
complexity theory np complete reductions
1
Is the "subset product" problem NP-complete? -- (complexity theory np complete reductions) <p>The subset-sum problem is a classic NP-complete problem:</p>&#xA;&#xA;<blockquote>&#xA; <p>Given a list of numbers $L$ and a target $k$, is there a subset of numbers from $L$ that sums to $k$?</p>&#xA;</blockquote>&#xA;&#xA;<...
habedi/stack-exchange-dataset
7,912
The difference between a sequence and a set
<p>I am new to discrete mathematics and the theory of computation I am trying to learn and understand the terminology. </p>&#xA;&#xA;<p>I am having a difficult time understanding the difference between a set and a sequence. I understand that unlike a set, in a sequence order and repetition does matter and sequences con...
computability terminology logic
1
The difference between a sequence and a set -- (computability terminology logic) <p>I am new to discrete mathematics and the theory of computation I am trying to learn and understand the terminology. </p>&#xA;&#xA;<p>I am having a difficult time understanding the difference between a set and a sequence. I understand th...
habedi/stack-exchange-dataset
7,921
How hard is it to factorize sum of two numbers
<p>Say I have numbers with known factorizations $n = \prod \limits _i p_i ^{n_i}$ and $m = \prod \limits _i p_i ^{m_i}$ (where $p_i$ is the $i$th prime).</p>&#xA;&#xA;<p>How hard is it to factorize $m+n$? Is there a more intelligent algorithm than if factorizations of $m$ and $n$ were not known? Assume $n$ and $m$ cop...
complexity theory factoring
1
How hard is it to factorize sum of two numbers -- (complexity theory factoring) <p>Say I have numbers with known factorizations $n = \prod \limits _i p_i ^{n_i}$ and $m = \prod \limits _i p_i ^{m_i}$ (where $p_i$ is the $i$th prime).</p>&#xA;&#xA;<p>How hard is it to factorize $m+n$? Is there a more intelligent algori...
habedi/stack-exchange-dataset
7,931
Proof by restriction: when is it valid to restrict to a special case?
<p>I was reading a few notes on Proof by Restriction and I am confused:</p>&#xA;<p>A Valid Proof by Restriction is the following:</p>&#xA;<p>Directed Hamiltonian Cycle Problem is NP Complete because if we look only at <em>instances</em> of DHC where For <span class="math-container">$G=(V,E)\quad (u,v)\in E \leftrightar...
complexity theory np complete proof techniques
1
Proof by restriction: when is it valid to restrict to a special case? -- (complexity theory np complete proof techniques) <p>I was reading a few notes on Proof by Restriction and I am confused:</p>&#xA;<p>A Valid Proof by Restriction is the following:</p>&#xA;<p>Directed Hamiltonian Cycle Problem is NP Complete because...
habedi/stack-exchange-dataset
8,943
Jamming signal useless in CSMA / CD?
<p>I'm looking at collision detection in communication protocols, in particular <a href="http://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection" rel="nofollow">Carrier sense multiple access with collision detection (CSMA/CD)</a>. According to what I've read on Wikipedia, a collision seems t...
computer networks communication protocols encoding scheme
1
Jamming signal useless in CSMA / CD? -- (computer networks communication protocols encoding scheme) <p>I'm looking at collision detection in communication protocols, in particular <a href="http://en.wikipedia.org/wiki/Carrier_sense_multiple_access_with_collision_detection" rel="nofollow">Carrier sense multiple access w...
habedi/stack-exchange-dataset
8,944
Understanding a few intricacies related to two naive algorithms to compute the convex hull of a set of points
<p>I already understood how the well-known algorithms like Graham's scan, Quickhull, etc. work, but I have difficulties in understanding 2 naive algorithms to compute the convex hull:</p>&#xA;&#xA;<blockquote>&#xA; <p>Let $S= \{p_1, \dots , p_n \}$ a set of points and $CH(S)$ the convex hull of $S$.</p>&#xA;</blockquo...
algorithms computational geometry convex hull
1
Understanding a few intricacies related to two naive algorithms to compute the convex hull of a set of points -- (algorithms computational geometry convex hull) <p>I already understood how the well-known algorithms like Graham's scan, Quickhull, etc. work, but I have difficulties in understanding 2 naive algorithms to ...
habedi/stack-exchange-dataset
8,952
Is there a sometimes-efficient algorithm to solve #SAT?
<p>Let $B$ be a boolean formula consisting of the usual AND, OR, and NOT operators and some variables. I would like to count the number of satisfying assignments for $B$. That is, I want to find the number of different assignments of truth values to the variables of $B$ for which $B$ assumes a true value. For example,...
complexity theory reference request satisfiability
1
Is there a sometimes-efficient algorithm to solve #SAT? -- (complexity theory reference request satisfiability) <p>Let $B$ be a boolean formula consisting of the usual AND, OR, and NOT operators and some variables. I would like to count the number of satisfying assignments for $B$. That is, I want to find the number o...
habedi/stack-exchange-dataset
8,957
What are some good hints for proving non-regularity with the pumping lemma?
<p>My CS Theory Professor said that when proving that a language is not regular by the Pumping Lemma, that there are some 'tricks' for solving languages more complicated that something like $L = \{a^{n} b^{n}\mid n \in\mathbb{N}\}$. Although I know that these come with practice, I wondered if this community would have ...
formal languages proof techniques pumping lemma
1
What are some good hints for proving non-regularity with the pumping lemma? -- (formal languages proof techniques pumping lemma) <p>My CS Theory Professor said that when proving that a language is not regular by the Pumping Lemma, that there are some 'tricks' for solving languages more complicated that something like $...
habedi/stack-exchange-dataset
8,960
Complexity of testing if a number is a primorial
<p>For the $n$-th prime number $p_n$ the <em><a href="http://en.wikipedia.org/wiki/Primorial" rel="nofollow">primorial</a></em> $p_n\#$ is defined as the product of the first $n$ primes.</p>&#xA;&#xA;<blockquote>&#xA;What is the complexity of testing if a given number $n$ is a primorial?<br>&#xA;Is it related in some w...
complexity theory reference request
1
Complexity of testing if a number is a primorial -- (complexity theory reference request) <p>For the $n$-th prime number $p_n$ the <em><a href="http://en.wikipedia.org/wiki/Primorial" rel="nofollow">primorial</a></em> $p_n\#$ is defined as the product of the first $n$ primes.</p>&#xA;&#xA;<blockquote>&#xA;What is the c...
habedi/stack-exchange-dataset
8,963
Clarifications on primitive recursive function definition
<p>I am studying primitive recursive functions and there's something that I don't quite understand: let's take the function that computes $x+y$, then, in order to show that $f(x,y)=x+y$ is primitive recursive, my lecture notes give the following equations:</p>&#xA;&#xA;<p>\begin{cases}&#xA; f(x,0)=x \\&#xA; f(x,y+1...
computability terminology recursion
1
Clarifications on primitive recursive function definition -- (computability terminology recursion) <p>I am studying primitive recursive functions and there's something that I don't quite understand: let's take the function that computes $x+y$, then, in order to show that $f(x,y)=x+y$ is primitive recursive, my lecture ...
habedi/stack-exchange-dataset
8,967
Show $x^y$ is a primitive recursive function
<p>As this thread title gives away I need to prove $x^y$ to be a primitive recursive function. </p>&#xA;&#xA;<p>So mathematically speaking, I think the following are the recursion equations, well aware that I am assigning to $0^0$ the value $1$, which shouldn't be, since it is an "indeterminate" form.</p>&#xA;&#xA;<p>\...
computability recursion check my proof
1
Show $x^y$ is a primitive recursive function -- (computability recursion check my proof) <p>As this thread title gives away I need to prove $x^y$ to be a primitive recursive function. </p>&#xA;&#xA;<p>So mathematically speaking, I think the following are the recursion equations, well aware that I am assigning to $0^0$ ...
habedi/stack-exchange-dataset
8,972
Optimal algorithm for finding all ngrams from a pre-defined set in a text
<p>I'm thinking about the optimal algorithm for the following problem:</p>&#xA;&#xA;<p>Input data:</p>&#xA;&#xA;<ul>&#xA;<li>a <strong>text</strong>, say it's an article about 5-50 pages.</li>&#xA;<li>a set of <strong>ngrams</strong> (ngram strings, n>2), of arbitrary length, could be more than 20k n-grams.</li>&#xA;</...
algorithms time complexity strings natural language processing
1
Optimal algorithm for finding all ngrams from a pre-defined set in a text -- (algorithms time complexity strings natural language processing) <p>I'm thinking about the optimal algorithm for the following problem:</p>&#xA;&#xA;<p>Input data:</p>&#xA;&#xA;<ul>&#xA;<li>a <strong>text</strong>, say it's an article about 5-...
habedi/stack-exchange-dataset
8,982
Do self-loops in DFA cause infinite languages?
<p>A true/false question: If a DFA $M$ contains a self-loop on some state $q$, then $M$ must accept an infinite language.</p>&#xA;&#xA;<p>The answer is "false". I've read <a href="https://cs.stackexchange.com/questions/6609/infinite-language-vs-finite-language">this question</a>, but I'm still wondering why $M$ does no...
regular languages automata finite automata
1
Do self-loops in DFA cause infinite languages? -- (regular languages automata finite automata) <p>A true/false question: If a DFA $M$ contains a self-loop on some state $q$, then $M$ must accept an infinite language.</p>&#xA;&#xA;<p>The answer is "false". I've read <a href="https://cs.stackexchange.com/questions/6609/i...
habedi/stack-exchange-dataset
8,984
Simple routing table question
<p>I'm having difficulties understanding the solution to the following question:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider the following description of a LAN:</p>&#xA; &#xA; <p>The main Internet connection is connected to our gateway router. This&#xA; in turn is part of the backbone network on the 65.21.1.0/24 sub...
algorithms computer networks routing
1
Simple routing table question -- (algorithms computer networks routing) <p>I'm having difficulties understanding the solution to the following question:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider the following description of a LAN:</p>&#xA; &#xA; <p>The main Internet connection is connected to our gateway router. Th...
habedi/stack-exchange-dataset
8,985
Initial Algebra example
<p>If the definition of Initial Algebra is:</p>&#xA;&#xA;<p>"An object is initial if there exists a unique morphism from the object to every&#xA;object in the category"</p>&#xA;&#xA;<p>Why do we need such object, and could any one give an example ?</p>&#xA;
semantics formal methods
1
Initial Algebra example -- (semantics formal methods) <p>If the definition of Initial Algebra is:</p>&#xA;&#xA;<p>"An object is initial if there exists a unique morphism from the object to every&#xA;object in the category"</p>&#xA;&#xA;<p>Why do we need such object, and could any one give an example ?</p>&#xA;
habedi/stack-exchange-dataset
8,986
How to prove "The power set of a countable set must be uncountable"?
<p>I'm not sure if this statement is correct, but my friend said so.</p>&#xA;&#xA;<p>The problem arose from this T/F question:&#xA;Let $F=\{f: f$ be a primitive recursive function from $\mathbb{N}$ to $\mathbb{N}\}$, then $2^F$ (Power set of $F$) is uncountable.</p>&#xA;&#xA;<p>And its answer is True. The set of primit...
turing machines recursion uncountability
1
How to prove "The power set of a countable set must be uncountable"? -- (turing machines recursion uncountability) <p>I'm not sure if this statement is correct, but my friend said so.</p>&#xA;&#xA;<p>The problem arose from this T/F question:&#xA;Let $F=\{f: f$ be a primitive recursive function from $\mathbb{N}$ to $\ma...
habedi/stack-exchange-dataset
8,988
Complexity of a subset sum variant
<p>Is this variant of the subset sum problem easy/known?</p>&#xA;&#xA;<blockquote>&#xA;Given an integer $m$, and a set of positive integers $A = \{x_1, x_2, ..., x_n\}$ such that every $x_i$ has at most $k=2$ bits set to $1$ ($x_i = 2^{b_{i_1}}+2^{b_{i_2}},\;\; b_{i_1},b_{i_2}\geq 0$); is there a subset $A' \subseteq A...
complexity theory reference request decision problem
1
Complexity of a subset sum variant -- (complexity theory reference request decision problem) <p>Is this variant of the subset sum problem easy/known?</p>&#xA;&#xA;<blockquote>&#xA;Given an integer $m$, and a set of positive integers $A = \{x_1, x_2, ..., x_n\}$ such that every $x_i$ has at most $k=2$ bits set to $1$ ($...
habedi/stack-exchange-dataset
8,989
Push down automata for $\{a^n b^n c^n | n \ge 0\}$
<p>I am learning about context free languages. </p>&#xA;&#xA;<p>I understand how $\{a^n b^n c^n | n \ge 0\}$ can be shown to be not context free using the pumping lemma for CFL's.</p>&#xA;&#xA;<p>Intuitively however it seems that a pushdown automata to recognize $\{a^n b^n c^n | n \ge 0\}$ can be constructed. This PDA ...
context free pushdown automata pumping lemma
1
Push down automata for $\{a^n b^n c^n | n \ge 0\}$ -- (context free pushdown automata pumping lemma) <p>I am learning about context free languages. </p>&#xA;&#xA;<p>I understand how $\{a^n b^n c^n | n \ge 0\}$ can be shown to be not context free using the pumping lemma for CFL's.</p>&#xA;&#xA;<p>Intuitively however it ...
habedi/stack-exchange-dataset
8,995
Difference between := and ← in pseudocode
<p>This is a snippet from some pseudocode for a sorting algorithm. In it, the symbol ← is used to denote assignment, for example for the variable <code>done</code>. However, in the <code>while</code> loop the statement <code>done:= false</code> is written. I would assume it is also an assignment statement but I suspect...
algorithms algorithm analysis
1
Difference between := and ← in pseudocode -- (algorithms algorithm analysis) <p>This is a snippet from some pseudocode for a sorting algorithm. In it, the symbol ← is used to denote assignment, for example for the variable <code>done</code>. However, in the <code>while</code> loop the statement <code>done:= false</code...
habedi/stack-exchange-dataset
8,998
Is every algorithm's complexity $\Omega(1)$ and $O(\infty)$?
<p>From what I've read, Big O is the absolute worst ever amount of complexity an algorithm will be given an input. On the side, Big Omega is the best possible efficiency, i.e. lowest complexity.</p>&#xA;&#xA;<p>Can it be said then that every algorithm has a complexity of $O(\infty)$ since infinite complexity is the wo...
complexity theory algorithm analysis asymptotics
1
Is every algorithm's complexity $\Omega(1)$ and $O(\infty)$? -- (complexity theory algorithm analysis asymptotics) <p>From what I've read, Big O is the absolute worst ever amount of complexity an algorithm will be given an input. On the side, Big Omega is the best possible efficiency, i.e. lowest complexity.</p>&#xA;&#...
habedi/stack-exchange-dataset
9,002
Big-O complexity when c is a tiny fraction
<p>Finding Big-O is pretty straightforward for an algorithm where $f(n)$ is</p>&#xA;&#xA;<p>$$f(n) = 3n^4 + 6n^3 + 10n^2 + 5n + 4$$</p>&#xA;&#xA;<p>The lower powers of $n$ simply fall off because in the long run $3n^4$ outpaces all of them. And with $g(n) = 3n^4$ we say $f(n)$ is $O(n^4)$.</p>&#xA;&#xA;<p>But what woul...
complexity theory algorithm analysis
1
Big-O complexity when c is a tiny fraction -- (complexity theory algorithm analysis) <p>Finding Big-O is pretty straightforward for an algorithm where $f(n)$ is</p>&#xA;&#xA;<p>$$f(n) = 3n^4 + 6n^3 + 10n^2 + 5n + 4$$</p>&#xA;&#xA;<p>The lower powers of $n$ simply fall off because in the long run $3n^4$ outpaces all of ...
habedi/stack-exchange-dataset
9,005
Homomorphisms and isomorphisms in an equational calculus
<p>Suppose we have an algebraic specification in the form: $\{S,F,w\}$ where $S$ are the sorts, $F$ are the functions and $w$ are the set of equations.&#xA;For example, the specification for natural numbers:</p>&#xA;&#xA;<ul>&#xA;<li>$S = \{\mathrm{int}\}$</li>&#xA;<li>$F = \{&#xA; 0: \mathrm{int}, \;&#xA; ...
semantics denotational semantics
1
Homomorphisms and isomorphisms in an equational calculus -- (semantics denotational semantics) <p>Suppose we have an algebraic specification in the form: $\{S,F,w\}$ where $S$ are the sorts, $F$ are the functions and $w$ are the set of equations.&#xA;For example, the specification for natural numbers:</p>&#xA;&#xA;<ul>...
habedi/stack-exchange-dataset
9,021
Questions about amortised analysis
<p>As a preperation of an exam about algorithms and complexity, I am currently solving old exercises. One concept I have already been struggling with when I encountered it for the first time is the concept of amortised analysis. What is amortised analysis and how to do it? In our lecture notes, it is stated that "amort...
algorithm analysis proof techniques amortized analysis
1
Questions about amortised analysis -- (algorithm analysis proof techniques amortized analysis) <p>As a preperation of an exam about algorithms and complexity, I am currently solving old exercises. One concept I have already been struggling with when I encountered it for the first time is the concept of amortised analys...
habedi/stack-exchange-dataset
9,031
Faster growing busy beaver function
<p>Standard busy beaver function draws attention to final count of nonzero symbols on tape. We could instead look at largest amount of nonzero symbols appearing on tape at <em>any</em> point of computation. This function's lower bound would be $\Sigma(n)$ and upper bound would be $S(n)$ (max shifts function). Was there...
computability turing machines
1
Faster growing busy beaver function -- (computability turing machines) <p>Standard busy beaver function draws attention to final count of nonzero symbols on tape. We could instead look at largest amount of nonzero symbols appearing on tape at <em>any</em> point of computation. This function's lower bound would be $\Sig...
habedi/stack-exchange-dataset
9,034
Where is the mistake in this apparently-O(n lg n) multiplication algorithm?
<p>A recent <a href="http://pratikpoddarcse.blogspot.ca/2013/01/evenly-spaced-ones-in-binary-string.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:%20pratikpoddarcse%20%28CSE%20Blog%29" rel="nofollow noreferrer">puzzle blog post</a> about finding three evenly spaced ones lead me to a <a href="http...
algorithms time complexity
1
Where is the mistake in this apparently-O(n lg n) multiplication algorithm? -- (algorithms time complexity) <p>A recent <a href="http://pratikpoddarcse.blogspot.ca/2013/01/evenly-spaced-ones-in-binary-string.html?utm_source=feedburner&amp;utm_medium=feed&amp;utm_campaign=Feed:%20pratikpoddarcse%20%28CSE%20Blog%29" rel=...
habedi/stack-exchange-dataset
9,040
Clarification on halting predicate computability
<p>I am tackling the halting problem right now and its remarkable theorem. My book states $\text{HALT}(x,y)$ is true if $\psi^{(1)}_{\mathcal P}$ is defined and conversely $\text{HALT}(x,y)$ is false if $\psi^{(1)}_{\mathcal P}$ is undefined. </p>&#xA;&#xA;<p>The purpose of the theorem, of course, is showing that $\tex...
computability halting problem
1
Clarification on halting predicate computability -- (computability halting problem) <p>I am tackling the halting problem right now and its remarkable theorem. My book states $\text{HALT}(x,y)$ is true if $\psi^{(1)}_{\mathcal P}$ is defined and conversely $\text{HALT}(x,y)$ is false if $\psi^{(1)}_{\mathcal P}$ is unde...
habedi/stack-exchange-dataset
9,046
The use of multiset ordering in proving termination
<p>Based on the definition of a <a href="http://mathworld.wolfram.com/Multiset.html" rel="nofollow">multiset</a> and the information in this <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.145.8728" rel="nofollow">paper</a>, why do we use multisets in proving the termination of a program?&#xA;Is not th...
algorithm analysis proof techniques correctness proof sets
1
The use of multiset ordering in proving termination -- (algorithm analysis proof techniques correctness proof sets) <p>Based on the definition of a <a href="http://mathworld.wolfram.com/Multiset.html" rel="nofollow">multiset</a> and the information in this <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1....
habedi/stack-exchange-dataset
9,050
Regular Expression to Context-Free Grammar
<p>Anyone knows if there is an algorithm for directly write the context-free grammar that generates a given regular expression?</p>&#xA;
formal grammars regular expressions context free
1
Regular Expression to Context-Free Grammar -- (formal grammars regular expressions context free) <p>Anyone knows if there is an algorithm for directly write the context-free grammar that generates a given regular expression?</p>&#xA;
habedi/stack-exchange-dataset
9,056
Mutual exclusion for n processes
<p>I want to implement mutual exclusion for $n$ processes. Critical section code:</p>&#xA;&#xA;<pre><code>int turn = 0; /* shared control variable */&#xA;&#xA;Pi: /* i is 0 or 1 */&#xA;while (turn != i)&#xA; ; /* busy wait */&#xA;CSi;&#xA;turn = 1 - i;&#xA;</code></pre>&#xA;&#x...
concurrency mutual exclusion
1
Mutual exclusion for n processes -- (concurrency mutual exclusion) <p>I want to implement mutual exclusion for $n$ processes. Critical section code:</p>&#xA;&#xA;<pre><code>int turn = 0; /* shared control variable */&#xA;&#xA;Pi: /* i is 0 or 1 */&#xA;while (turn != i)&#xA; ; /...
habedi/stack-exchange-dataset
9,063
NP-Hard problems that are not in NP but decidable
<p>I'm wondering if there is a good example for an easy to understand <a href="http://en.wikipedia.org/wiki/NP-hard">NP-Hard</a> problem that is not <a href="http://en.wikipedia.org/wiki/NP-complete">NP-Complete</a> and not undecidable?</p>&#xA;&#xA;<p>For example, the <a href="http://en.wikipedia.org/wiki/Halting_prob...
complexity theory computability np hard
1
NP-Hard problems that are not in NP but decidable -- (complexity theory computability np hard) <p>I'm wondering if there is a good example for an easy to understand <a href="http://en.wikipedia.org/wiki/NP-hard">NP-Hard</a> problem that is not <a href="http://en.wikipedia.org/wiki/NP-complete">NP-Complete</a> and not u...
habedi/stack-exchange-dataset
9,072
Acquiring the necessary background for research
<p>I'm starting my mater's thesis in computer science. I'm interested in computational Origami (algorithms mainly); I've read a little about the subject and I'm worried because I lack some of the knowledge that I think is necessary to do research in that area. But still I'd like to start and want to ask: which is bette...
research
1
Acquiring the necessary background for research -- (research) <p>I'm starting my mater's thesis in computer science. I'm interested in computational Origami (algorithms mainly); I've read a little about the subject and I'm worried because I lack some of the knowledge that I think is necessary to do research in that are...
habedi/stack-exchange-dataset
9,081
I have trouble to understand pattern calculus, could someone explain it in simple terms?
<p>I am trying to understand the basic ideas of pattern calculus and do not have a lot of time to read through a rather long book. Can someone explain this in simple terms and give an example of how pattern calculus works?</p>&#xA;&#xA;<p><a href="http://bondi.it.uts.edu.au/" rel="nofollow">http://bondi.it.uts.edu.au/<...
functional programming
1
I have trouble to understand pattern calculus, could someone explain it in simple terms? -- (functional programming) <p>I am trying to understand the basic ideas of pattern calculus and do not have a lot of time to read through a rather long book. Can someone explain this in simple terms and give an example of how patt...
habedi/stack-exchange-dataset
9,084
Name of a sequence that is unknown to stop on a given input
<p>Several years ago I was self learning lisp by a book which I do not remember. As an example there was a recursively defined sequence which was said to be unknown to be finite or not for every input --- to generate a sequence you were required to provide two(?) initial values. At least that is how I remember.</p>&#xA...
reference request recurrence relation
1
Name of a sequence that is unknown to stop on a given input -- (reference request recurrence relation) <p>Several years ago I was self learning lisp by a book which I do not remember. As an example there was a recursively defined sequence which was said to be unknown to be finite or not for every input --- to generate ...
habedi/stack-exchange-dataset
9,091
Is there a name/interest for regular languages that have a non-ambiguous ending?
<p>The basic idea is to have one or more symbol that clearly indicate the end. For example:</p>&#xA;&#xA;<p>Non-ambiguous:</p>&#xA;&#xA;<blockquote>&#xA; <p>$ab^*c$<br>&#xA; $(a|b)c$<br>&#xA; $ab^+c$<br>&#xA; $ab?c$<br>&#xA; $a(b|c)$<br>&#xA; $c(ab)^*ccc$<br>&#xA; $acc^*d$<br>&#xA; $abc|bcd$ </p>&#xA;</b...
regular languages finite automata regular expressions ambiguity
1
Is there a name/interest for regular languages that have a non-ambiguous ending? -- (regular languages finite automata regular expressions ambiguity) <p>The basic idea is to have one or more symbol that clearly indicate the end. For example:</p>&#xA;&#xA;<p>Non-ambiguous:</p>&#xA;&#xA;<blockquote>&#xA; <p>$ab^*c$<br>&...
habedi/stack-exchange-dataset
9,095
Is resolution complete or only refutation-complete?
<p>Going through <a href="http://www.cs.toronto.edu/~sheila/384/w11/">some knowledge representation tutorials</a> on resolution at the moment, and I came across <a href="http://www.cs.toronto.edu/~sheila/384/w11/Lectures/csc384w11-Lecture-05-KR.pdf">slide 05.KR, no77</a>.</p>&#xA;&#xA;<p>There it is mentioned that "the...
logic first order logic
1
Is resolution complete or only refutation-complete? -- (logic first order logic) <p>Going through <a href="http://www.cs.toronto.edu/~sheila/384/w11/">some knowledge representation tutorials</a> on resolution at the moment, and I came across <a href="http://www.cs.toronto.edu/~sheila/384/w11/Lectures/csc384w11-Lecture-...
habedi/stack-exchange-dataset
9,104
Prove that the language of unary not-prime numbers satisfies the Pumping Lemma
<p>Here is a question from Daniel I. A. Cohen's book <em>Introduction to Computer Theory</em>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider the language: </p>&#xA; &#xA; <p>$\quad \mathrm{PRIME}' = \{ a^n \mid n \text{ is not a prime} \} = \{ \varepsilon, a, aaaa, aaaaaa, aaaaaaaa, \ldots \}$</p>&#xA; &#xA; <ol>&#x...
formal languages automata pumping lemma
1
Prove that the language of unary not-prime numbers satisfies the Pumping Lemma -- (formal languages automata pumping lemma) <p>Here is a question from Daniel I. A. Cohen's book <em>Introduction to Computer Theory</em>:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider the language: </p>&#xA; &#xA; <p>$\quad \mathrm{PRIME}...
habedi/stack-exchange-dataset
9,106
Solve Integer Factoring in randomized polynomial time with an oracle for square root modulo $n$
<p>I'm trying to solve exercise 6.5 on page 309 from Richard Crandall's "Prime numbers - A computational perspective". It basically asks for an algorithm to factor integers in randomized polynomial time given an oracle for taking square roots modulo $n$.</p>&#xA;&#xA;<p>I think, the basic idea is the following: Given a...
randomized algorithms integers factoring
1
Solve Integer Factoring in randomized polynomial time with an oracle for square root modulo $n$ -- (randomized algorithms integers factoring) <p>I'm trying to solve exercise 6.5 on page 309 from Richard Crandall's "Prime numbers - A computational perspective". It basically asks for an algorithm to factor integers in ra...
habedi/stack-exchange-dataset
9,109
Show how a sentence can be produced from a grammar (Dragon book 2.1)
<p>In the Dragon book (Aho, Sethi, Ullmann) there is one exercise I don't get.</p>&#xA;&#xA;<blockquote>&#xA; <p>Chapter 2, Exercies: 2.1<br>&#xA; Given the context-free grammar&#xA; $$S \to S S + \mid S S * \mid a$$&#xA; Task: Show how the signs aa+a* can be produced from this grammar.</p>&#xA;</blockquote>&#xA;&#...
formal grammars context free
1
Show how a sentence can be produced from a grammar (Dragon book 2.1) -- (formal grammars context free) <p>In the Dragon book (Aho, Sethi, Ullmann) there is one exercise I don't get.</p>&#xA;&#xA;<blockquote>&#xA; <p>Chapter 2, Exercies: 2.1<br>&#xA; Given the context-free grammar&#xA; $$S \to S S + \mid S S * \mid a...
habedi/stack-exchange-dataset
9,111
Where do these DRAM row/column calculations come from?
<p>Let r be the number of rows in a DRAM array, and c be the number of columns.</p>&#xA;&#xA;<p>Apparently, DRAM with organization 16x1 requires least pins when r = c = 4 because fewer address bits are required to represent them, and so does DRAM with organization 16x4. Why are these the same? Doesn't the latter have 4...
computer architecture memory hardware
1
Where do these DRAM row/column calculations come from? -- (computer architecture memory hardware) <p>Let r be the number of rows in a DRAM array, and c be the number of columns.</p>&#xA;&#xA;<p>Apparently, DRAM with organization 16x1 requires least pins when r = c = 4 because fewer address bits are required to represen...
habedi/stack-exchange-dataset
9,120
Why not relax only edges in Q in Dijkstra's algorithm?
<p>Can someone tell me why almost in every book/website/paper authors use the following:</p>&#xA;&#xA;<pre><code>foreach vertex v in Adjacent(u)&#xA; relax(u,v)&#xA;</code></pre>&#xA;&#xA;<p>when relaxing the edges, instead of:</p>&#xA;&#xA;<pre><code>foreach vertex v in Adjacent(u)&#xA; if (v is in Q)&#xA; ...
algorithms graphs shortest path
1
Why not relax only edges in Q in Dijkstra's algorithm? -- (algorithms graphs shortest path) <p>Can someone tell me why almost in every book/website/paper authors use the following:</p>&#xA;&#xA;<pre><code>foreach vertex v in Adjacent(u)&#xA; relax(u,v)&#xA;</code></pre>&#xA;&#xA;<p>when relaxing the edges, instead o...
habedi/stack-exchange-dataset
9,126
Is there a non-brute force algorithm for Eulerization of graphs?
<p>Given some undirected, unweighted, connected, and potentially parallel-edged graph $G$, an Euler circuit may be constructed iff every vertex in $G$ has an even degree.</p>&#xA;&#xA;<p>In graphs with two or more vertices of odd degree (there may only be multiples of two), one must "Eulerize" the graph, connecting the...
graphs
1
Is there a non-brute force algorithm for Eulerization of graphs? -- (graphs) <p>Given some undirected, unweighted, connected, and potentially parallel-edged graph $G$, an Euler circuit may be constructed iff every vertex in $G$ has an even degree.</p>&#xA;&#xA;<p>In graphs with two or more vertices of odd degree (there...
habedi/stack-exchange-dataset
9,130
Testing whether the language of one automaton is a subset of another
<p>Is there an algorithm to solve following problem?</p>&#xA;&#xA;<p>Given two finite automata $A$ and $B$. Determine whether the language recognized by automaton $A$ is a subset of language recognized by automaton $B$ or otherwise.</p>&#xA;
automata finite automata
1
Testing whether the language of one automaton is a subset of another -- (automata finite automata) <p>Is there an algorithm to solve following problem?</p>&#xA;&#xA;<p>Given two finite automata $A$ and $B$. Determine whether the language recognized by automaton $A$ is a subset of language recognized by automaton $B$ or...
habedi/stack-exchange-dataset
9,132
What is meant by "give pattern of a regular expression"
<p>I have an alphabet $A = \{b,B\}$ and I'm asked to write down the <strong>pattern</strong> of the regular expression $(\epsilon|bb|b)(B|bb)(b|\epsilon|b)$. What does the question actually want me to do? I'm not sure. Does it want me to give the possible patterns that can be formed with $b$ and $B$? But then surely th...
formal languages terminology regular languages regular expressions
1
What is meant by "give pattern of a regular expression" -- (formal languages terminology regular languages regular expressions) <p>I have an alphabet $A = \{b,B\}$ and I'm asked to write down the <strong>pattern</strong> of the regular expression $(\epsilon|bb|b)(B|bb)(b|\epsilon|b)$. What does the question actually wa...
habedi/stack-exchange-dataset
9,133
Finding a source of a directed acyclic graph in linear time
<p>Given a directed acyclic graph $D = (V,A)$, a vertex $v \in V$ is a <em>source</em> if its <em>indegree</em> is zero, meaning that it has only outgoing arcs.</p>&#xA;&#xA;<p>Does there exist a linear time algorithm to find a source in a given directed acyclic graph?</p>&#xA;&#xA;<p>Follow-up question: Can one in li...
algorithms graphs
1
Finding a source of a directed acyclic graph in linear time -- (algorithms graphs) <p>Given a directed acyclic graph $D = (V,A)$, a vertex $v \in V$ is a <em>source</em> if its <em>indegree</em> is zero, meaning that it has only outgoing arcs.</p>&#xA;&#xA;<p>Does there exist a linear time algorithm to find a source in...
habedi/stack-exchange-dataset
9,137
About the behaviour of multi-layer perceptrons
<p>I have a multilayer perceptron. It has an input layer with two neurons, a hidden layer with an arbitrary number of neurons, and an output layer with two neurons.</p>&#xA;&#xA;<p>Given that <code>randomboolean</code> and <code>targetboolean</code> are random boolean values, and the network operates as such:</p>&#xA;&...
machine learning artificial intelligence neural networks
1
About the behaviour of multi-layer perceptrons -- (machine learning artificial intelligence neural networks) <p>I have a multilayer perceptron. It has an input layer with two neurons, a hidden layer with an arbitrary number of neurons, and an output layer with two neurons.</p>&#xA;&#xA;<p>Given that <code>randomboolean...
habedi/stack-exchange-dataset
9,144
Calculating Floating point Operations Per Second(FLOPS) and Integer Operations Per Second(IOPS)
<p>I am trying to learn some basic benchmarking. I have a loop in my Java program like,</p>&#xA;&#xA;<pre><code>float a=6.5f;&#xA;int b=3; &#xA;for(long j=0; j&lt;999999999; j++){ &#xA; var = a*b+(a/b);&#xA; }//end of for&#xA;</code></pre>&#xA;&#xA;<p>My processor takes around 0.431635 second to ...
benchmarking
1
Calculating Floating point Operations Per Second(FLOPS) and Integer Operations Per Second(IOPS) -- (benchmarking) <p>I am trying to learn some basic benchmarking. I have a loop in my Java program like,</p>&#xA;&#xA;<pre><code>float a=6.5f;&#xA;int b=3; &#xA;for(long j=0; j&lt;999999999; j++){ &#xA; ...
habedi/stack-exchange-dataset
9,153
Push relabel algorithms in flow networks
<p>In the CLRS book (<a href="http://en.wikipedia.org/wiki/Introduction_to_Algorithms" rel="nofollow">http://en.wikipedia.org/wiki/Introduction_to_Algorithms</a>) Chapter 26 (Maximum Flow) page 744 (third edition), there is the following equation -</p>&#xA;&#xA;<p>$$&#xA;\sum_{u \in U}e(u) \;=\;&#xA;\sum_{u \in U}\;\su...
algorithms graphs network flow
1
Push relabel algorithms in flow networks -- (algorithms graphs network flow) <p>In the CLRS book (<a href="http://en.wikipedia.org/wiki/Introduction_to_Algorithms" rel="nofollow">http://en.wikipedia.org/wiki/Introduction_to_Algorithms</a>) Chapter 26 (Maximum Flow) page 744 (third edition), there is the following equat...
habedi/stack-exchange-dataset
9,162
Example for the analysis of a recursive function
<pre><code>l is a matrix of size [1...n, 1...n]&#xA;&#xA;function: rec(i,j)&#xA; if (i*j == 0)&#xA; return 1&#xA; else&#xA; if (l[i,j] == 0)&#xA; l[i,j] = 1 * rec(i-1,j) + 2 * rec(i,j-1) + 3 * rec(i-1,j-1)&#xA; return l[i,j]&#xA;end_function&#xA;&#xA;for i=1 to n&#xA; for j=1 to n&#xA; l[i,j] = 0&#x...
algorithms algorithm analysis runtime analysis recurrence relation
1
Example for the analysis of a recursive function -- (algorithms algorithm analysis runtime analysis recurrence relation) <pre><code>l is a matrix of size [1...n, 1...n]&#xA;&#xA;function: rec(i,j)&#xA; if (i*j == 0)&#xA; return 1&#xA; else&#xA; if (l[i,j] == 0)&#xA; l[i,j] = 1 * rec(i-1,j) + 2 * rec(i,j-1)...
habedi/stack-exchange-dataset
9,168
Is there a single valid definition for a Turing Machine, or is it mutable?
<p>I'm just learning about Turing Machines, and I'm a bit confused by the difference in formal description between Wikipedia and my textbook.</p>&#xA;&#xA;<p>My textbook says the following:</p>&#xA;&#xA;<p>$$M=\langle Q,\Sigma,\Gamma,\delta,q_{0},q_{accept}, q_{reject} \rangle$$</p>&#xA;&#xA;<p>where:</p>&#xA;&#xA;<ol>...
terminology turing machines
1
Is there a single valid definition for a Turing Machine, or is it mutable? -- (terminology turing machines) <p>I'm just learning about Turing Machines, and I'm a bit confused by the difference in formal description between Wikipedia and my textbook.</p>&#xA;&#xA;<p>My textbook says the following:</p>&#xA;&#xA;<p>$$M=\l...
habedi/stack-exchange-dataset
9,175
How come {ww} isn't regular when {uv | |u|=|v|} is?
<p>As we know, using the pumping lemma, we can easily prove the language $L = \{ w w \mid w \in \{a,b\}^* \}$ is not a regular language.</p>&#xA;&#xA;<p>However, the language $L_1 = \{ w_1 w_2 \mid |w_1| = |w_2| \}$ is a regular language. Because we can get the DFA like below, </p>&#xA;&#xA;<pre><code>DFA: &#xA;&#xA;-...
regular languages finite automata
1
How come {ww} isn't regular when {uv | |u|=|v|} is? -- (regular languages finite automata) <p>As we know, using the pumping lemma, we can easily prove the language $L = \{ w w \mid w \in \{a,b\}^* \}$ is not a regular language.</p>&#xA;&#xA;<p>However, the language $L_1 = \{ w_1 w_2 \mid |w_1| = |w_2| \}$ is a regular ...
habedi/stack-exchange-dataset
9,178
Where can I find a short and 'easy' peer reviewed paper on something from computability, decidability or complexity?
<p>It's a homework assignment, we were asked to read, understand, and present to our colleagues a short paper/article (suggested 4-6 pages) for our Computability, Decidability or Complexity class.</p>&#xA;&#xA;<p>The articles I was able to find in the past couple days using google scholar a way over what we were taught...
complexity theory computability turing machines research
1
Where can I find a short and 'easy' peer reviewed paper on something from computability, decidability or complexity? -- (complexity theory computability turing machines research) <p>It's a homework assignment, we were asked to read, understand, and present to our colleagues a short paper/article (suggested 4-6 pages) f...
habedi/stack-exchange-dataset
9,181
Languages that satisfy the pumping lemma but aren't regular?
<p>Given a regular language $L$, then it is easy to prove that there is a constant $N$ such that is $\sigma \in L$, with $\lvert \sigma \rvert \ge N$ there exist strings $\alpha$, $\beta$ and $\gamma$ such that $\lvert \alpha \beta \rvert \le N$ and $\lvert \beta \rvert \ne \epsilon$, and for all $k$ it is $\alpha \bet...
formal languages proof techniques
1
Languages that satisfy the pumping lemma but aren't regular? -- (formal languages proof techniques) <p>Given a regular language $L$, then it is easy to prove that there is a constant $N$ such that is $\sigma \in L$, with $\lvert \sigma \rvert \ge N$ there exist strings $\alpha$, $\beta$ and $\gamma$ such that $\lvert \...
habedi/stack-exchange-dataset
9,186
MGU and Variable Standardization - CNF
<p>I have been reading on converting first order logic sentences to conjunctive normal form, and then performing resolution.</p>&#xA;&#xA;<p>One of the steps of converting to CNF, is to Standardize variables: rename all variables so that each quantifier has its own unique variable name.</p>&#xA;&#xA;<p>Most general Uni...
logic artificial intelligence knowledge representation first order logic
1
MGU and Variable Standardization - CNF -- (logic artificial intelligence knowledge representation first order logic) <p>I have been reading on converting first order logic sentences to conjunctive normal form, and then performing resolution.</p>&#xA;&#xA;<p>One of the steps of converting to CNF, is to Standardize varia...
habedi/stack-exchange-dataset
9,187
Cache strategies, what reference article could I study?
<p>So as to optimize an application, I must implement data caching: not to recompute some data - those heavy on cpu but that don't change often.</p>&#xA;&#xA;<p>When playing with the idea, I imagined something like the way win32/MFC manages the windows screen i.e.:</p>&#xA;&#xA;<ul>&#xA;<li>While a part is valid, it is...
reference request efficiency cpu cache
1
Cache strategies, what reference article could I study? -- (reference request efficiency cpu cache) <p>So as to optimize an application, I must implement data caching: not to recompute some data - those heavy on cpu but that don't change often.</p>&#xA;&#xA;<p>When playing with the idea, I imagined something like the w...
habedi/stack-exchange-dataset
9,196
Proof of the Stable Matching Problem
<p>Looking at the document <em>Fundamentals of Computing Series</em>, <a href="http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15251-f10/Site/Materials/Lectures/Lecture21/lecture21.pdf" rel="nofollow">The Stable Marriage Problem</a>.</p>&#xA;&#xA;<p>Theorem 1.2.3 - page 12:</p>&#xA;&#xA;<blockquote>&#xA; <p>In a m...
algorithms proof techniques matching
1
Proof of the Stable Matching Problem -- (algorithms proof techniques matching) <p>Looking at the document <em>Fundamentals of Computing Series</em>, <a href="http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15251-f10/Site/Materials/Lectures/Lecture21/lecture21.pdf" rel="nofollow">The Stable Marriage Problem</a>.</p>...
habedi/stack-exchange-dataset
9,206
Computational complexity of coefficients
<p>I have some recurrence relationships I use to compute some coefficients of a series. I want to know what the time complexity of computing these is. Suppose I know the coefficients $a_0,...,a_n$, and I want to compute $c_0,...,c_n$ as follows</p>&#xA;&#xA;<p>$ c_{n}=\begin{cases}&#xA;e^{b_{0}}, &amp; n=0\\&#xA;\frac{...
time complexity recurrence relation
1
Computational complexity of coefficients -- (time complexity recurrence relation) <p>I have some recurrence relationships I use to compute some coefficients of a series. I want to know what the time complexity of computing these is. Suppose I know the coefficients $a_0,...,a_n$, and I want to compute $c_0,...,c_n$ as f...
habedi/stack-exchange-dataset
9,211
Building functionally complete boolean circuits out of trinary logic
<p>There are some not-very-commonly considered forms of <a href="http://en.wikipedia.org/wiki/Three-valued_logic" rel="nofollow">trinary logic</a> using 3 truth values. Even entire (unusual/rare) <a href="http://en.wikipedia.org/wiki/Ternary_computer" rel="nofollow">ternary computers</a> have been built from it.</p>&#x...
reference request logic reductions circuits
1
Building functionally complete boolean circuits out of trinary logic -- (reference request logic reductions circuits) <p>There are some not-very-commonly considered forms of <a href="http://en.wikipedia.org/wiki/Three-valued_logic" rel="nofollow">trinary logic</a> using 3 truth values. Even entire (unusual/rare) <a hre...
habedi/stack-exchange-dataset
9,212
Expressing semantics of an array as a function
<p>An assignment questions asks the following:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider an array 'var a : array[1..10] of real'. Express the&#xA; semantics of this array as a function, defining the domain and&#xA; codomain (you might also be able to write the rule). In this&#xA; programming language, the subran...
arrays semantics functional programming
1
Expressing semantics of an array as a function -- (arrays semantics functional programming) <p>An assignment questions asks the following:</p>&#xA;&#xA;<blockquote>&#xA; <p>Consider an array 'var a : array[1..10] of real'. Express the&#xA; semantics of this array as a function, defining the domain and&#xA; codomain...
habedi/stack-exchange-dataset
9,221
Does the write through cache copies the whole block or just the byte which is updated?
<p>Just a basic question to ask</p>&#xA;&#xA;<p><strong>Does the write through cache copies the whole block or just the byte which is updated?</strong></p>&#xA;&#xA;<p>I went through the following question</p>&#xA;&#xA;<p><em>Array A contains 256 elements of 4 bytes each. Its first element is stored at physical address...
computer architecture cpu cache
1
Does the write through cache copies the whole block or just the byte which is updated? -- (computer architecture cpu cache) <p>Just a basic question to ask</p>&#xA;&#xA;<p><strong>Does the write through cache copies the whole block or just the byte which is updated?</strong></p>&#xA;&#xA;<p>I went through the following...
habedi/stack-exchange-dataset
9,233
Description of resolution algorithm as it applies to SAT
<p>SAT [5] can be solved with resolution definitively, i.e. if the formula has a true assignment, resolution can find it, and if it cant be satisfied, resolution can show that no assignment exists (at least in exponential time/space.). [4] </p>&#xA;&#xA;<blockquote>&#xA; <p>Is there a good fully-self contained descrip...
algorithms complexity theory reference request logic np complete
1
Description of resolution algorithm as it applies to SAT -- (algorithms complexity theory reference request logic np complete) <p>SAT [5] can be solved with resolution definitively, i.e. if the formula has a true assignment, resolution can find it, and if it cant be satisfied, resolution can show that no assignment exi...
habedi/stack-exchange-dataset
9,234
What is the difference between a TM accepting and deciding a language?
<p>Frankly I'm very uncomfortable with the material right now. There are some things I can understand, but many I still do not.</p>&#xA;&#xA;<p>My first assignment is asking me in one question (which I do know how to do) to give a full description of a TM that accepts a language $L = \{ x \in \{0,1\}^* \mid x \text{ is...
terminology turing machines
1
What is the difference between a TM accepting and deciding a language? -- (terminology turing machines) <p>Frankly I'm very uncomfortable with the material right now. There are some things I can understand, but many I still do not.</p>&#xA;&#xA;<p>My first assignment is asking me in one question (which I do know how to...
habedi/stack-exchange-dataset
9,246
Construct a context-free grammar for a given set of words
<p>I have seen a few years back a nice and simple algorithm that, given a (finite) set of words in some alphabet, builds a context-free grammar for a language including these words and in some sense "natural" (e.g., the grammar doesn't produce all words in the alphabet). The algorithm is very simple, it has something ...
algorithms formal languages reference request formal grammars machine learning
1
Construct a context-free grammar for a given set of words -- (algorithms formal languages reference request formal grammars machine learning) <p>I have seen a few years back a nice and simple algorithm that, given a (finite) set of words in some alphabet, builds a context-free grammar for a language including these wor...
habedi/stack-exchange-dataset
9,249
RTT (Round Trip Time) calculation
<p>How do I calculate RTT, do I start to measure the time from the beginning of the segment transmition or from the moment all the segment had been transmitted? </p>&#xA;&#xA;<p>The end time is the moment the sender gets the "ACK". </p>&#xA;
computer networks
1
RTT (Round Trip Time) calculation -- (computer networks) <p>How do I calculate RTT, do I start to measure the time from the beginning of the segment transmition or from the moment all the segment had been transmitted? </p>&#xA;&#xA;<p>The end time is the moment the sender gets the "ACK". </p>&#xA;
habedi/stack-exchange-dataset
9,250
Is there a name for this relation on CFGs?
<p>I'm looking for the name (or <em>a</em> name if there isn't one already) of this relation between $G_1=\left&lt;\Sigma_1,\mathcal{N}_1,\mathcal{R}_1,S_1\right&gt;$ and $G_2=\left&lt;\Sigma_2,\mathcal{N}_2,\mathcal{R}_2,S_2\right&gt;$:&#xA;$$\exists f_\Sigma\in\Sigma_1\times\Sigma_2,f_\mathcal{N}\in\mathcal{N_1}\time...
terminology formal grammars context free
1
Is there a name for this relation on CFGs? -- (terminology formal grammars context free) <p>I'm looking for the name (or <em>a</em> name if there isn't one already) of this relation between $G_1=\left&lt;\Sigma_1,\mathcal{N}_1,\mathcal{R}_1,S_1\right&gt;$ and $G_2=\left&lt;\Sigma_2,\mathcal{N}_2,\mathcal{R}_2,S_2\right...
habedi/stack-exchange-dataset
9,253
How to show that L*=(L*)*?
<p>I am studying formal language theory and have been asked to prove the following:</p>&#xA;&#xA;<p>$\forall L, L^*=(L^*)^*$</p>&#xA;&#xA;<p>I've started with</p>&#xA;&#xA;<p>$def. L^* = \bigcup_{i \in \mathbb{N}} L_i, L_0=\{{\epsilon}\}, L_1=\{L\}, L_{i+1}=\{uv|u\in L_i, v\in L\}$</p>&#xA;&#xA;<p>$then (L^*)^* = \bigc...
formal languages
1
How to show that L*=(L*)*? -- (formal languages) <p>I am studying formal language theory and have been asked to prove the following:</p>&#xA;&#xA;<p>$\forall L, L^*=(L^*)^*$</p>&#xA;&#xA;<p>I've started with</p>&#xA;&#xA;<p>$def. L^* = \bigcup_{i \in \mathbb{N}} L_i, L_0=\{{\epsilon}\}, L_1=\{L\}, L_{i+1}=\{uv|u\in L_i...
habedi/stack-exchange-dataset
9,269
What's the reason for the second condition of the pumping lemma(s)?
<p>For a language $L$ with pumping length $p$, and a string $s\in L$, the pumping lemmas are as follows:</p>&#xA;&#xA;<p><strong>Regular version</strong>:&#xA;If $|s| \geq p$, then $s$ can be written as $xyz$, satisfying the following conditions:</p>&#xA;&#xA;<ol>&#xA;<li>$|y|\geq 1$</li>&#xA;<li>$|xy|\leq p$</li>&#xA;...
regular languages context free pumping lemma
1
What's the reason for the second condition of the pumping lemma(s)? -- (regular languages context free pumping lemma) <p>For a language $L$ with pumping length $p$, and a string $s\in L$, the pumping lemmas are as follows:</p>&#xA;&#xA;<p><strong>Regular version</strong>:&#xA;If $|s| \geq p$, then $s$ can be written as...
habedi/stack-exchange-dataset
9,282
Algorithms to prioritize equipment renewals
<p>I am looking for algorithms to prioritize equipment renewals.</p>&#xA;&#xA;<p>Input: (years since last renewal, cost of renewal, importance of renewal).</p>&#xA;&#xA;<p>Output: An ordering of the equipment according to which it will be renewed.</p>&#xA;&#xA;<p>I do not know if there are any algorithms for this parti...
algorithms optimization
1
Algorithms to prioritize equipment renewals -- (algorithms optimization) <p>I am looking for algorithms to prioritize equipment renewals.</p>&#xA;&#xA;<p>Input: (years since last renewal, cost of renewal, importance of renewal).</p>&#xA;&#xA;<p>Output: An ordering of the equipment according to which it will be renewed....
habedi/stack-exchange-dataset
9,289
On the generalization of two recreational problems: request for references, if there's any
<p>I wonder if two famous (and, IMHO, very nice) recreational problems are been studied in some general form.</p>&#xA;&#xA;<p>Here's the first.&#xA;We have 13 balls, all looking absolutely the same, with 12 of them having the same weight; we don't know whether the ball that has a different weight is heavier or lighter....
reference request combinatorics
1
On the generalization of two recreational problems: request for references, if there's any -- (reference request combinatorics) <p>I wonder if two famous (and, IMHO, very nice) recreational problems are been studied in some general form.</p>&#xA;&#xA;<p>Here's the first.&#xA;We have 13 balls, all looking absolutely the...
habedi/stack-exchange-dataset
9,295
What is meant by $\operatorname{poly}(|F|, n, e)$?
<p>When I am reading a paper I found a notation $\operatorname{poly}( |F|,n,$$\frac{1}{\epsilon}) $.&#xA;Its not clear to me that what this notation represents. Can you please help me out?</p>&#xA;
terminology algorithm analysis
1
What is meant by $\operatorname{poly}(|F|, n, e)$? -- (terminology algorithm analysis) <p>When I am reading a paper I found a notation $\operatorname{poly}( |F|,n,$$\frac{1}{\epsilon}) $.&#xA;Its not clear to me that what this notation represents. Can you please help me out?</p>&#xA;
habedi/stack-exchange-dataset
9,306
Clarification for a class of Turing machine problems
<p>So say I have a task like this:</p>&#xA;&#xA;<blockquote>&#xA; <p>Construct a Turing machine transforming the word u to the word v byt&#xA; removing all the sequences of form "ba" from the word u. Input&#xA; alphabet = {a,b,c}. </p>&#xA; &#xA; <p>Example: for IN cabbaacba, OUT cac.</p>&#xA;</blockquote>&#xA;&#x...
turing machines
1
Clarification for a class of Turing machine problems -- (turing machines) <p>So say I have a task like this:</p>&#xA;&#xA;<blockquote>&#xA; <p>Construct a Turing machine transforming the word u to the word v byt&#xA; removing all the sequences of form "ba" from the word u. Input&#xA; alphabet = {a,b,c}. </p>&#xA; &...
habedi/stack-exchange-dataset
9,308
Can GDB debug itself?
<p>Can GDB be run on itself? How or why not?&#xA;I see something about it <a href="http://www.math.utah.edu/docs/info/gdbint_3.html" rel="nofollow">http://www.math.utah.edu/docs/info/gdbint_3.html</a>&#xA;But GDB might not be written in a language that it can debug?</p>&#xA;
correctness proof program correctness
1
Can GDB debug itself? -- (correctness proof program correctness) <p>Can GDB be run on itself? How or why not?&#xA;I see something about it <a href="http://www.math.utah.edu/docs/info/gdbint_3.html" rel="nofollow">http://www.math.utah.edu/docs/info/gdbint_3.html</a>&#xA;But GDB might not be written in a language that it...
habedi/stack-exchange-dataset
9,309
How optimal is Lempel-Ziv at reaching the Shannon limit?
<p>I find this a bit difficult to describe, but I am interested in the following idea :</p>&#xA;&#xA;<p>The LZ algorithm factors (verb) an input stream into adjacent factors, these are by definition the maximal prefixes of the piece of text that occur in the previous text (or equivalently the previous concatenation of ...
complexity theory combinatorics data compression lempel ziv
1
How optimal is Lempel-Ziv at reaching the Shannon limit? -- (complexity theory combinatorics data compression lempel ziv) <p>I find this a bit difficult to describe, but I am interested in the following idea :</p>&#xA;&#xA;<p>The LZ algorithm factors (verb) an input stream into adjacent factors, these are by definition...
habedi/stack-exchange-dataset
9,314
What's the complexity of calculating the shortest path from $u$ to $v$ with Dijkstra's algorithm using binary heap?
<blockquote>&#xA;<p><strong>Problem:</strong> Consider a graph <span class="math-container">$G = (V, E)$</span> on <span class="math-container">$n$</span> vertices and <span class="math-container">$m &gt; n$</span> edges, <span class="math-container">$u$</span> and <span class="math-container">$v$</span> are two vertic...
algorithms graphs algorithm analysis runtime analysis shortest path
1
What's the complexity of calculating the shortest path from $u$ to $v$ with Dijkstra's algorithm using binary heap? -- (algorithms graphs algorithm analysis runtime analysis shortest path) <blockquote>&#xA;<p><strong>Problem:</strong> Consider a graph <span class="math-container">$G = (V, E)$</span> on <span class="mat...
habedi/stack-exchange-dataset
9,318
Are you allowed to have empty states on Turing machine?
<p>So I'm doing some exercises with Turing machine and quite often it happens that a given set of states can be achieved if and only if some character was met. Therefore, we may have some states q3-q7 which the machine may be pointed to if and only if we spotted a and (because of the task spec, for example), we know th...
turing machines
1
Are you allowed to have empty states on Turing machine? -- (turing machines) <p>So I'm doing some exercises with Turing machine and quite often it happens that a given set of states can be achieved if and only if some character was met. Therefore, we may have some states q3-q7 which the machine may be pointed to if and...
habedi/stack-exchange-dataset
9,320
Contrast vs. Brightness question
<p>As part of my homework I need to prove (or disprove) that changing the contrast and, then, changing the brightness is (or isn't) the same as changing the brightness and, then, changing the contrast.</p>&#xA;&#xA;<p>Let's assume that we are using gray-scale.</p>&#xA;&#xA;<ul>&#xA;<li><strong>Brightness</strong>: the ...
image processing
1
Contrast vs. Brightness question -- (image processing) <p>As part of my homework I need to prove (or disprove) that changing the contrast and, then, changing the brightness is (or isn't) the same as changing the brightness and, then, changing the contrast.</p>&#xA;&#xA;<p>Let's assume that we are using gray-scale.</p>&...
habedi/stack-exchange-dataset
9,327
A dense NP complete language implies P=NP
<p>We say that the language $J \subseteq \Sigma^{*}$ is <em>dense</em> if there exists a polynomial $p$ such that $$ |J^c \cap \Sigma^n| \leq p(n)$$ for all $n \in \mathbb{N}.$ In other words, for any given lenght $n$ there exist only polynomially many words of length $n$ that are not in $J.$</p>&#xA;&#xA;<p>The proble...
complexity theory time complexity np complete satisfiability
1
A dense NP complete language implies P=NP -- (complexity theory time complexity np complete satisfiability) <p>We say that the language $J \subseteq \Sigma^{*}$ is <em>dense</em> if there exists a polynomial $p$ such that $$ |J^c \cap \Sigma^n| \leq p(n)$$ for all $n \in \mathbb{N}.$ In other words, for any given lengh...
habedi/stack-exchange-dataset