text stringlengths 81 47k | source stringlengths 59 147 |
|---|---|
Question: <p>Suppose we have a complexity class $C$ (say for example $C = DTIME(2^{cn})$).
Take a language that belongs to $C$: $L \in C$.
Define an arbitrary polynomial reduction from language $L$ to $L'$.
To what complexity class does the result language $L'$ belong? </p>
<p>Thoughts: I think it might depend on t... | https://cs.stackexchange.com/questions/69686/how-does-a-given-complexity-class-change-under-polynomial-reduction |
Question: <p>What are common <strong>models</strong> for creating rules for inferring meanings (e.g. truth values) of natural language statements such as if one wanted to infer the truth value of the input statement</p>
<blockquote>
<p>John Lennon is in Beatles.</p>
</blockquote>
<p>which would depend on, whether t... | https://cs.stackexchange.com/questions/50930/common-models-for-inferring-semantics-truth-factuality-of-statements |
Question: <p><a href="https://harmful.cat-v.org/software/c++/linus" rel="nofollow noreferrer">Linus Torvalds has famously attacked the object-oriented language C++</a>, but he didn't offer many specifics about why, besides saying C++ uses "inefficient abstracted programming models". What exactly are the stron... | https://cs.stackexchange.com/questions/171056/strongest-criticisms-of-object-oriented-languages |
Question: <p>Let us say that I have a computation model <span class="math-container">$A$</span>. Let us also say that I have shown that <span class="math-container">$A$</span> can be simulated by a Turing machine.</p>
<p>I have not been able to prove that <span class="math-container">$A$</span> can simulate a Turing ... | https://cs.stackexchange.com/questions/112159/ive-proven-my-language-undecidable-what-is-left-to-prove-it-turing-equivalent |
Question: <p>I am completing a final year project for hand gesture recognition using Hidden Markov Models</p>
<p>I have a fair understanding of Hidden Markov Models and how they work using simple examples such as the <a href="https://web.stanford.edu/class/stats366/hmmR2.html" rel="nofollow noreferrer">Unfair Casino</a... | https://cs.stackexchange.com/questions/129522/hidden-markov-models-for-hand-gestures |
Question: <p>I've been reading about hidden Markov models and stumbled upon <em>A Tutorial on Hidden Markov Models and Selected Applications in Speech Recognition</em> by Lawrence R. Rabiner (<em>Proc. IEEE</em>, 77(2):257–286, 1989; <a href="http://www.ece.ucsb.edu/Faculty/Rabiner/ece259/Reprints/tutorial%20on%2... | https://cs.stackexchange.com/questions/60131/continuous-observation-densities-in-hmm |
Question: <p>I am trying to build a bigram letter model.</p>
<p>I obtain a sequence of words in a form of ['hello','I','am','Johnny'].</p>
<p>Firstly, I lower all the words to obtain : ['hello','i','am','johnny'].</p>
<p>I am capable of building a bigram letter model, but I have read somewhere that you should provid... | https://cs.stackexchange.com/questions/52526/question-about-bigram-model |
Question: <p>So in biology (DNA sequences), sequence alignment is a generalization of longest common subsequence where an alignment of two sequences is scored typically with a linear function of how many spaces are inserted into each sequence and how many times each possible pair of aligned characters appears in the al... | https://cs.stackexchange.com/questions/29276/probabilistic-hardness-of-approximation-or-solution-of-np-hard-optimization-prob |
Question: <p>How to generate a degree sequence of a degree distribution that follows the power-law in which I know $N=10^2$ and $\gamma=2.5$?</p>
<p>The degree distribution of power-law is $p_k \sim k^{-\gamma}$.</p>
<p>I want to generate a power-law network using the <strong>configuration model</strong>, but to do t... | https://cs.stackexchange.com/questions/55342/how-to-generate-a-degree-sequence-of-a-degree-distribution |
Question: <p>Can anyone help me with Multiple Sequence Alignment (MSA) using Hidden Markov Model (HMM) by giving an example or a reference except these 2 references:</p>
<p>1-<a href="https://www.fing.edu.uy/~alopeza/biohpc/papers/hmm/Eddy95b-Multiple_Alignment_using-HMM-preprint.pdf" rel="nofollow noreferrer">Eddy, S... | https://cs.stackexchange.com/questions/73765/multiple-sequence-alignment-using-hmm-and-simulated-annealing |
Question: <p>What are the differences and limitations between model checking and type-checking dependent types for verifying correctness?</p>
<p>If I were to model a state machine in a language like Idris, what can't I verify that a model checker can and vice-versa? I can enforce valid transitions in Idris, but can I p... | https://cs.stackexchange.com/questions/170371/model-checking-and-dependently-typed-languages-for-formal-verification |
Question: <p>When developing algorithms in quantum computing, I've noticed that there are two primary models in which this is done. Some algorithms - such as for the Hamiltonian NAND tree problem (Farhi, Goldstone, Guttman) - work by designing a Hamiltonian and some initial state, and then letting the system evolve acc... | https://cs.stackexchange.com/questions/28234/quantum-computing-relationship-between-hamiltonian-and-unitary-model |
Question: <p>I am thinking some real examples of <a href="https://en.wikipedia.org/wiki/Finite-state_machine" rel="nofollow noreferrer">FSAs</a> in order to help me know how to use the model of the FSA. As I know, the pseudo-random-sequence generator should be a kind of <a href="https://en.wikipedia.org/wiki/Determinis... | https://cs.stackexchange.com/questions/102839/can-the-pseudo-random-sequence-generator-be-described-as-a-finite-state-automato |
Question: <p>Given this shell sort algorithm implementation:</p>
<pre><code>void shell(float ∗a ,int l ,int r) {
int i, j, h;
for ( h = 1 ; 3∗h +1 <= r−l; h = 3∗h + 1 );
for (; h > 0; h / = 3) {
for (i = l+h; i <= r; ++ i) {
for (j = i; j >= l +h && a[j] < a[j−h]; j −= h) {
... | https://cs.stackexchange.com/questions/160442/shell-algorithm-knuth-sequence-time-complexity-analysis |
Question: <p>My research is mainly focused on generating test sequences automatically using Colored Petri net.CFG provides techniques for generating test sequences. But some papers says that, test sequence generation methods based on a control flow graph sometimes suffers from a feasibility problem (i.e. some paths in ... | https://cs.stackexchange.com/questions/49264/how-to-generate-control-flow-graph-from-a-petri-net-model |
Question: <p>When using the Baum-Welch algorithm to train a hidden markov model you normally repeat it on some observed sequence iteratively until your values converge.</p>
<p>If you have multiple observed sequences, Wikipedia tells you to run the update on all sequences in parallel and then combine them into a new mod... | https://cs.stackexchange.com/questions/157314/applying-baum-welch-to-multiple-observed-sequences-iteratively |
Question: <p>I just discovered the term "<a href="https://en.wikipedia.org/wiki/De_Bruijn_sequence" rel="nofollow noreferrer">de Bruijn sequence</a>", but don't quite follow what it means exactly (or how de Bruijn is pronounced :), "<a href="https://www.biostars.org/p/7186/" rel="nofollow noreferrer">bro... | https://cs.stackexchange.com/questions/150856/what-is-a-de-bruijn-sequence-exactly |
Question: <p>a question about machine learning, specifically recurrent models:
For machine translation recurrent neural networks show great promise, common here is an encoder-decoder architecture which takes a source sentence, reads it, and then based on a compressed representation outputs a target sentence.
In opposit... | https://cs.stackexchange.com/questions/88620/name-of-generating-one-value-at-a-time-in-sequence-generation-vs-encoder-decoder |
Question: <p>To my knowledge there doesn't exist a $O(n)$ worst-case algorithm that solves the following problem:</p>
<blockquote>
<p>Given a sequence of length $n$ consisting of finite integers, find the permutation where every element is less than or equal to its successor.</p>
</blockquote>
<p>But is there a pro... | https://cs.stackexchange.com/questions/41255/is-integer-sorting-possible-in-on-in-the-transdichotomous-model |
Question: <p>Let $\Sigma$ be a small, finite alphabet. Suppose we are given ${n\choose 2}$ sets $S_{i,j}$, where $S_{i,j} \subseteq \Sigma \times\Sigma$. I'd like to determine whether there exists a sequence $x_1,x_2,\dots,x_n \in \Sigma$ such that $(x_i,x_j) \in S_{i,j}$ for all $i,j$, and if so, find an example of ... | https://cs.stackexchange.com/questions/16498/find-sequence-given-partial-information-about-all-pairs |
Question: <p>I'm currently doing some research on signal processing and I got a dataset which includes the signal in itself and its "translation".</p>
<p><a href="https://i.sstatic.net/Bnp2P.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Bnp2P.png" alt="A signal and its translation" /></a></p>... | https://cs.stackexchange.com/questions/130020/signal-translation-with-seq2seq-model |
Question: <p>I started watching SICP lectures and am totally new to computer science.
<a href="https://youtu.be/V_7mmwpgJHU?t=2581" rel="nofollow noreferrer">SICP. LEC 1B: Procedures and Processes; Substitution Model</a></p>
<p>I don't know why the time complexity of the Fibonacci sequence is O(Fib(n)).
So, I googled a... | https://cs.stackexchange.com/questions/135815/is-the-time-complexity-of-the-fibonacci-sequence-ofibn |
Question: <p>In the question below, let TM be Turing machine, NTM be nondeterministic Turing machine and PTM be probabilistic Turing machine.</p>
<p>In his paper "Actor Model of Computation: Scalable Robust Information Systems" Carl Hewitt proposes following hypothesis:</p>
<blockquote>
<p>All physically possible c... | https://cs.stackexchange.com/questions/50695/computational-power-of-actor-model |
Question: <p>I want use DFA to describe a sequence of movements in a 2D-space (language will be the path accepted by automaton in a particular case).</p>
<p>That is a typical modeling problem: how can I encode a sequence of 2D movements in a DFA?</p>
<p>Infact, walking through DFA or NFA seems a process analogous to... | https://cs.stackexchange.com/questions/44733/model-paths-by-regular-languages |
Question: <p>relatively new to Computer Vision.</p>
<p>Lets say for example, I have a sequence of images of a car driving away from a static camera into the horizon, and I want to use this image set for some bog standard computer vision experimentation (e.g to train a CNN to recognize a car). I label the car in each fr... | https://cs.stackexchange.com/questions/152390/tolerance-of-object-size-variation-for-computer-vision |
Question: <p>To experiment, I implemented a discrete HMM; the transition matrix and emission model are randomly, uniformly generated. Then, a sequence of random states and emissions are produced by the HMM. Then I run smoothing (forward-backward algorithm) to identify the most likely states at each time. Finally I run ... | https://cs.stackexchange.com/questions/102697/performance-of-smooting-vs-viterbi-algorithm-with-hmms |
Question: <p>I am trying to understand the maximum cardinality problem in the context of stable matching algorithm. I am reading the following article at the link:</p>
<p><a href="https://www.hindawi.com/journals/mpe/2015/241379/" rel="nofollow noreferrer">A Two-Sided Matching Decision Model Based on Uncertain Prefere... | https://cs.stackexchange.com/questions/120236/problem-with-understanding-two-sided-matching-algorithm-maximium-cardinality |
Question: <p>I have seen this model question on synchronous circuit , but i could not understand the logic, can anyone please help me?</p>
<p>"Develop the state diagram for a synchronous sequential circuit which will recognize the bit sequence 1101 (ie, every time the sequence 1101 is detected in the input bit stream... | https://cs.stackexchange.com/questions/12534/how-to-design-this-synchronous-circuit |
Question: <p>I am looking for the right transducer which allows to translate a sequence of literals into a sequence of same literals (or a subset of them) in arbitrary order.
For example: ABC => CAB, which, with simple production rules:
A->a, B->b, C->c, results into output: <em>cab</em>.</p>
<p>I am not sure if the ... | https://cs.stackexchange.com/questions/98625/which-transducer-models-replacement-in-regex |
Question: <ol>
<li><p>An automaton, as I have seen so far, is used to tell <strong>if a string belongs to the language that the automaton recognizes</strong>. This is determined by the final state of the automaton running on the string as an input. I wonder what role the output of the automaton plays here for this deci... | https://cs.stackexchange.com/questions/27645/how-does-an-automaton-model-a-computer-or-something-else |
Question: <p>I'm resolving this question of Hopcroft and <em>et al</em> Book. Figure 1 below is a marble rolling-toy. A marble is dropped at A or B. Levers $x_1,x_2$ and $x_3$ cause the marble to fall either to the left or to the right. Whenever a marble encounters a lever, it causes the lever to reverse after the marb... | https://cs.stackexchange.com/questions/26406/model-marbel-toy-with-finite-automata |
Question: <p>I'm looking for the name of a particular pattern, and/or resources (articles) on its usage.</p>
<p>The context of the pattern is a journalling system to operate on some collection, as in the example given here:</p>
<p>We could model an webstore using patterns from event-sourcing. In such a model, we woul... | https://cs.stackexchange.com/questions/77537/name-for-pattern-of-addressing-items-by-sequence-of-creation |
Question: <p>What exactly are we doing from a CS perspective when we solve a recurrence relation and find a resulting formula for a sequence given a set of initial conditions? I just went through the "linear homogeneous recurrence relations of degree k with constant coefficients" bit in discrete math and basically unde... | https://cs.stackexchange.com/questions/59989/how-to-connect-the-math-of-recurrence-relations-to-daily-programming-concepts |
Question: <p>I'm following a course on Distributed Systems </p>
<p><a href="http://www.ict.kth.se/courses/ID2203/index.html" rel="nofollow">http://www.ict.kth.se/courses/ID2203/index.html</a> </p>
<p>and currently learning about asynchronous models. I can't seem to reconcile a given time-space diagram of an execution... | https://cs.stackexchange.com/questions/38429/how-to-interpret-the-execution-of-distributed-computation-from-time-space-diagra |
Question: <p>I am currently using an ILP to model events which occur on some input sequence from <span class="math-container">$1...n$</span>. These events modify the input sequence in order to obtain a desired sequence. Each event can happen on some consecutive range <span class="math-container">$(i,j)$</span> and no t... | https://cs.stackexchange.com/questions/107180/ilp-representation-of-the-number-of-maximal-1-sequences-in-a-row |
Question: <p>You are given two things: A fixed initial 'model' partition of an interval, e.g.</p>
<pre><code>I------I---I-----I-------I----...
</code></pre>
<p>where each <code>-</code> or <code>I</code> represents an element in a discrete time series and the <code>I</code>s are the partition boundaries. This can al... | https://cs.stackexchange.com/questions/23391/permute-the-subintervals-of-an-interval-partition-to-most-closely-align-with-a-m |
Question: <p>Imagine an input-less Turing machine <span class="math-container">$M$</span> that runs potentially forever, outputting a string of 0's, 1's, and "."s. <span class="math-container">$M$</span> can then be associated with the real number <span class="math-container">$x_M$</span> whose binary expansi... | https://cs.stackexchange.com/questions/173006/complexity-theoretic-view-of-algebraic-numbers |
Question: <p>I got this idea recently. If we do not consider the data IO part of software, imagine the data is in the memory and we need to come out with some decision (which product to recommend to a user, how to render the 3D world in a game) by processing the data in memory. All of these tasks could be done through ... | https://cs.stackexchange.com/questions/115153/can-most-programs-except-the-io-part-be-re-written-as-a-sequence-of-matrix-ope |
Question: <p>I was reading a paper for recognizing interval graphs. Here is an excerpt from the paper:</p>
<blockquote>
<p>Each interval graph has a corresponding interval model in which two intervals overlap if
and only if their corresponding vertices are adjacent. Such a representation is usually far
f... | https://cs.stackexchange.com/questions/23885/recognizing-interval-graphs-equivalent-intervals |
Question: <p>To give some perspective, first consider the following diagram comparing Markov Chains, HMMs, MDPs, and POMDPs (I'm not sure who to credit for it).</p>
<pre>
Fully observable Partially observable
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
... | https://cs.stackexchange.com/questions/50053/how-do-pomdps-and-dynamic-influence-diagrams-differ |
Question: <p>Fix an alphabet $\Sigma$, and a set of words, $W = \{w_1,\dots,w_n\} \subseteq \Sigma^*$.</p>
<p>I have a randomized model that works like this: Alice generates a random sequence of words, using some probability distribution over the words, and then I get to see their concatenation -- but I don't see wher... | https://cs.stackexchange.com/questions/47458/infer-probabilities-for-concatenation-of-words |
Question: <p>Let <span class="math-container">$k,n \in \mathbb{N} $</span> and non empty sets <span class="math-container">$X_1, X_2, \dots, X_n \subseteq \{1,2,\dots,k\}$</span>.</p>
<p>Define the change counting cost function <span class="math-container">$f: X_1 \times X_2 \times \dots \times X_n \to \mathbb{N}$</spa... | https://cs.stackexchange.com/questions/153579/given-a-sequence-of-sets-choose-one-element-from-each-to-get-the-lowest-number |
Question: <p>As any tree can be described as a binary sequence (<span class="math-container">$i$</span>-th bit is 0 if the edge goes down and 1 otherwise, every edge is travelled twice <span class="math-container">$-$</span> up and down, so such sequence's length is <span class="math-container">$2 |V| - 2$</span>), any... | https://cs.stackexchange.com/questions/104824/find-maximal-matching-in-tree-in-o-left-fracn-log-n-right |
Question: <p>I'm trying to find the most probable path (i.e., sequence of states) on an hidden Markov model (HMM) using the Viterbi algorithm. However, I don't know the transition and emission matrices, which I need to estimate from the observations (data).</p>
<p>To estimate these matrices, which algorithm should I u... | https://cs.stackexchange.com/questions/6664/viterbi-training-vs-baum-welch-algorithm |
Question: <p>I have come across many definitions of the DPLL algorithm but haven't been able to follow them. The ones that are closest to making sense to me are the ones based on state-transition systems with transition rules such as defined here:</p>
<p><a href="http://homepage.cs.uiowa.edu/~tinelli/papers/NieOT-LPAR... | https://cs.stackexchange.com/questions/95505/how-the-abstract-dpll-algorithm-works-in-sat-solving |
Question: <p>I am on studying a consistency model: weak consistency. <a href="http://www.e-reading.club/chapter.php/143358/221/Tanenbaum_-_Distributed_operating_systems.html" rel="nofollow noreferrer">weak consistency</a>
This model was first defined by Dubois et al. (1986), by saying that it has three properties:</p>
... | https://cs.stackexchange.com/questions/70236/does-weak-consistency-allow-reordering-of-events |
Question: <p>A gardener considers aesthetically appealing gardens in which the tops of sequential physical trees (eg palm trees) are always sequentially going up and down, that is:</p>
<pre><code>| |
| | |
| | | | |
</code></pre>
<p>On the other hand, the following configurations would... | https://cs.stackexchange.com/questions/116854/minimum-number-of-tree-cuts-so-that-each-pair-of-trees-alternates-between-strict |
Question: <p>According to <a href="https://www.tensorflow.org/tutorials/word2vec/" rel="nofollow noreferrer">https://www.tensorflow.org/tutorials/word2vec/</a>, the standard approach for predicting the next word in a word sequence is maximum likelihood. The predicted next word is the word that maximizes</p>
<p>$$P(w_t... | https://cs.stackexchange.com/questions/68134/why-use-maximum-likelihood-for-word-prediction |
Question: <p><em>Lossless Data compression</em> (source coding) algorithms heavily rely on repetitive pattern (redundancy).</p>
<p>Is there a Lossless Data compression method/algorithm that is independent of repetitive pattern (redundancy)?</p>
<p><strong>Note:</strong></p>
<p>Most lossless compression programs do... | https://cs.stackexchange.com/questions/65096/are-there-lossless-data-compression-techniques-that-do-not-exploit-repetitive-pa |
Question: <p>Jürgen Schmidhuber pointed out that a simple explanation of the universe would be a Turing machine analogy programmed to execute all possible programs computing all possible histories for all types of computable physical laws. His work was based on Zuse's thesis.</p>
<p>This hypothesis would be inside the... | https://cs.stackexchange.com/questions/104469/would-schmidhubers-theories-of-everything-be-capable-of-performing-hypercomputa |
Question: <p>This is a question about Markov Models. Let's say we have the following situation <a href="https://i.sstatic.net/Eu8cG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Eu8cG.png" alt="enter image description here"></a></p>
<p>Let's say that we want to find the probability that $2$ rainy days... | https://cs.stackexchange.com/questions/90495/markov-model-to-compute-the-probaility-on-the-nth-day |
Question: <p>I'm a Computer Science student and am currently enrolled in System Simulation & Modelling course. It involves dealing with everyday systems around us and simulating them in different scenarios by generating random numbers in different distributional curves, like IID, Gaussian etc. for instance. I've be... | https://cs.stackexchange.com/questions/12136/what-randomness-really-is |
Question: <p>In the classic crypto textbook "Introduction to Modern Cryptography" by Jonathan Katz and Yehuda Lindell, there is a definition for indistinguishable encryption in the presence of an eavesdropper as such that for every probabilistic polynomial time adversary A there is a negligible function negl(n) such th... | https://cs.stackexchange.com/questions/12457/doubts-on-definition-of-indistinguishable-encryption-in-the-textbook |
Question: <p>I am thinking of a particular datastructure, but don't know the name of it.</p>
<p>A sequence of elements may be modeled by a collection of some X, where each X consists of:</p>
<ol>
<li>The element, serialized as a bunch of bytes.</li>
<li>[a] The hash of the previous X in the sequence, based on the by... | https://cs.stackexchange.com/questions/77502/general-name-for-linked-lists-based-on-hashes |
Question: <h3>Intro</h3>
<p>The job shop problem is a classic scheduling theory problem. Given <span class="math-container">$N$</span> jobs and <span class="math-container">$M$</span> machines, a typical goal of the JSP is to minimise the <em>makespan</em> (starting time of the last operation + its processing time) ove... | https://cs.stackexchange.com/questions/136804/job-shop-problem-how-do-you-get-an-ordered-sequence-of-operations-from-the-disj |
Question: <p>For a Finite State Automaton / Finite State Machine (FSM) <span class="math-container">$F$</span>, that has an input alphabet, a set of possible states, an initial state, a set of possible final states and a state transition function, let a <strong>finite</strong> input sequence <span class="math-container... | https://cs.stackexchange.com/questions/136014/when-can-a-deterministic-finite-state-automaton-dfsa-along-with-its-input-sequ |
Question: <p>I have a directed graph <span class="math-container">$G=(V,E)$</span> where each vertex is a 4-D coordinate <span class="math-container">$v: (x, y, z, c)$</span> representing spatial coordinates <span class="math-container">$x, y, z \in \mathbb{R}$</span> and the non-physical parameter colour <span class="... | https://cs.stackexchange.com/questions/139815/shortest-path-given-correct-order-of-colours |
Question: <p>There is a famous <a href="http://en.wikipedia.org/wiki/Part-of-speech_tagging" rel="nofollow">part-of-speech tagging problem</a> in Natural Language Processing. The popular solution is to use <a href="http://en.wikipedia.org/wiki/Hidden_Markov_model" rel="nofollow">Hidden Markov Models</a>.</p>
<p>So tha... | https://cs.stackexchange.com/questions/20185/solving-the-part-of-speech-tagging-problem-with-hmm |
Question: <p><strong>Backgroud.</strong>
I'm reading papers about cutting stock problem (CSP).</p>
<ol>
<li>Said Ben Messaoud, Chengbin Chu, Marie-Laure Espinouse (2008)<br>
<a href="http://www.sciencedirect.com/science/article/pii/S0377221707009083" rel="nofollow noreferrer">Characterization and modelling of guillot... | https://cs.stackexchange.com/questions/81961/how-to-setup-a-model-for-a-guillotine-cutting-stock-problem |
Question: <p>I'm developing a model in C, and I need to run a couple of simulations (lengthy, and heavy ones). I seem to have a cluster at my disposal, but I'm not very familiar with the concept. I understand that there are different "nodes" ? My program is not designed to take advantage of this individually - it can't... | https://cs.stackexchange.com/questions/44995/how-can-i-take-advantage-of-the-capabilities-of-a-cluster |
Question: <h1>Problem</h1>
<p>When train my <strong>linear chain CRF</strong> with annotated observations, I feed it with a number of sequences containing observation values and a "ground-truth" label for each observation. I'm currently using the hCRF Matlab interface. (see <a href="http://sourceforge.net/projects/hcr... | https://cs.stackexchange.com/questions/42301/what-is-the-meaning-of-the-output-weights-of-a-conditional-random-field-crf-mo |
Question: <p>We use a regex engine (say, <a href="http://en.wikipedia.org/wiki/Perl_Compatible_Regular_Expressions" rel="nofollow">PCRE</a>) that allows grouping subexpressions with parentheses and recalling the value they match in the search / replace expressions (backreferences, denoted by \i for matching the ith cap... | https://cs.stackexchange.com/questions/41564/calculating-with-regexes |
Question: <p><a href="https://en.wikipedia.org/wiki/Loop_variant#Every_loop_that_terminates_has_a_variant" rel="nofollow noreferrer">Wikipedia has a proof</a> that every loop that terminates has a loop variant—a well-founded relation on the state space such that each iteration of the loop results in a state that ... | https://cs.stackexchange.com/questions/117648/is-there-a-model-of-zf%c2%acc-where-some-program-always-terminates-but-has-no-loop-va |
Question: <p>I'm working on a problem and would like to do some research on similar problems to help refine my approach. Can anyone help me identify what kind of problem this is or, at least, what kind of problems it relates to?</p>
<p>The basic model is a set of different job types, handled by a set of machines. Th... | https://cs.stackexchange.com/questions/29501/what-kind-of-scheduling-problem-is-this |
Question: <p>Say you have this function call sequence:</p>
<pre><code>function all() {
fn1()
fn2()
fn3()
}
</code></pre>
<p>And say that <code>fn2</code> was asynchronous and caused all kinds of side effects:</p>
<pre><code>var globalPacketCounter = 0
function fn2() {
var httpRequest = ...
httpRequest.on(... | https://cs.stackexchange.com/questions/104981/generally-how-to-specify-asynchronous-action-with-side-effects-using-logic-equ |
Question: <p>In my first algorithms class we're creating these patterns that are supposed to model a finite state machine. We were given a task to think if we can figure out a way to detect palindromes in binary sequences (no points if we do, it's just a food for thought).</p>
<p>I specifically asked the professor, kn... | https://cs.stackexchange.com/questions/32081/detecting-palindromes-in-binary-numbers-using-a-finite-state-machine |
Question: <p>Let $\{a_i\}$ and $\{b_i\}$ be non-decreasing sequences of non-negative integers.</p>
<p>How fast can one find
$$c_j=\max_{0 \leq i< j}\{a_i+b_{j-i-1}\}$$
for all $0\leq j\leq n-1$?</p>
<p>Naively, it takes $O(n^2)$ time, but I'm hoping monotonicity can help here.</p>
<p>It's easy to observe $\{c_i\... | https://cs.stackexchange.com/questions/18211/maxima-of-diagonals-in-a-column-wise-and-row-wise-sorted-matrix |
Question: <p>I recently read that it is possible to have arrays which need not be initialized, i.e. it is possible to use them without having to spend any time trying to set each member to the default value. i.e. you can start using the array as if it has been initialized by the default value without having to initiali... | https://cs.stackexchange.com/questions/492/saving-on-array-initialization |
Question: <p>I'm currently trying to investigate the relationship between relation extraction (RE) and event extraction (EE). Doing more reading on the two tasks has caused me to question my initial belief that RE is within the task of information extraction (IE).</p>
<p>The reason why I believe so is because RE is typ... | https://cs.stackexchange.com/questions/133710/is-relation-extraction-considered-a-subtask-of-information-extraction |
Question: <p>I need to come up with an algorithm that finds differences in the sequence of each product's routing (or sequence of processes).
There are several processes aligned together and each process's been operated under specified equipment.</p>
<p>For example,</p>
<p>if there are four processes(A - B - C - D) unt... | https://cs.stackexchange.com/questions/141340/an-algorithm-to-find-differences-between-routing-paths |
Question: <p>I am training a HMM with Baum Welch for part of speech tagging. I am training the model with 79 hidden variables (part of speech tags) and 80,000 observed variables (words). I am working with log probabilities. To give you an idea, I defined the necessary arithmetic operations like so:</p>
<pre><code>stru... | https://cs.stackexchange.com/questions/72449/counteracting-numerical-instability-in-hmm-training |
Question: <p>Let <span class="math-container">$\mathcal{P},\mathcal{Q}$</span> denote two convex polyhedra in <span class="math-container">$\mathbb{R}^d$</span>, which can be represented by a set of linear inequalities. Let <span class="math-container">$A \subset \mathbb{R}^d$</span> be a finite set of vectors.</p>
<p... | https://cs.stackexchange.com/questions/142152/path-that-stays-within-a-convex-polyhedron |
Question: <p>Note: this question has been cross-posted to <a href="https://math.stackexchange.com/questions/3110862/can-we-enumerate-finite-sequences-which-have-no-halting-continuation">Math.SE</a>, after about a week here.</p>
<p>I am trying to deepen my understanding of the relationship between the Halting Problem a... | https://cs.stackexchange.com/questions/103981/can-we-enumerate-finite-sequences-which-have-no-halting-continuation |
Question: <p>The model is as followed:</p>
<p>Consider an infinite horizon discounted problem <span class="math-container">$(0 < γ < 1)$</span> in which the state space is finite, with <span class="math-container">$n$</span> states, and there are only two possible decisions: stop or continue.</p>
<p>If at time <s... | https://cs.stackexchange.com/questions/145039/discounted-optimal-stopping |
Question: <p>Why doesn't infinite run time violate Turing completeness? Shouldn't "completeness" include halting?</p>
<hr />
<p>The halting problem:</p>
<blockquote>
<p>The halting problem is a decision problem about properties of computer
programs on a fixed <strong>Turing-complete</strong> model of computat... | https://cs.stackexchange.com/questions/103001/why-doesnt-infinite-run-time-violate-turing-completeness-shouldnt-completene |
Question: <p>I have been given an assignment that I'm having a very hard time understanding.</p>
<p>The assignment is to prove that if an algorithm accepts a non-regular language, the complexity is <span class="math-container">$\Omega(\log \log n)$</span> (so if the language is regular, the complexity is <span class="m... | https://cs.stackexchange.com/questions/145466/if-a-tm-accepts-a-non-regular-language-its-space-complexity-is-omega-log-lo |
Question: <p>Can <strong>True</strong> <em>Randomness</em> be achieved by composing prngs in different states and with different algorithmsv(e.g. have $n$ different composition algorithms, use a prng to select any permutation of them. A lot $(\sum_{i=1}^{n}{^nP_i})$ of permutations exist. Compose the algorithms selecte... | https://cs.stackexchange.com/questions/67766/achieving-randomness |
Question: <p>Sometime you want to model some data from the real world using a graph, but such that edges don't just connect to a vertex; rather, they connect to some aspect of that vertex - some connection if you will. </p>
<p>For example, a node in a family tree would be a person, and they have a mother and father (n... | https://cs.stackexchange.com/questions/76624/commonly-used-formal-definition-of-graphs-with-connections |
Question: <p>I recently started learning about randomized online algorithms, and the <a href="https://en.wikipedia.org/wiki/Adversary_model" rel="nofollow noreferrer">Wikipedia</a> definitions for the three adversary models are very unhelpful to put it mildly. From poking around I think I have a good understanding of w... | https://cs.stackexchange.com/questions/121390/definitions-of-and-difference-between-adaptive-online-adversary-and-adaptive-off |
Question: <p>I want to solve a problem of object tracking along time. The problem is - I have a sequence of images, and I need to find and track the creation of the objects, than their movement, and than their disappearance. There can be up to 3 objects overall, and sometimes there are less, or none. Another limitation... | https://cs.stackexchange.com/questions/153527/viterbi-algorithm-for-object-tracking |
Question: <p>I'm working on an algorithm which is permitted to use a training set of approximately 250,000 dictionary words.</p>
<p>I have built and providing here with a basic, working algorithm. This algorithm will match the provided masked string (e.g. a _ _ l e) to all possible words in the dictionary, tabulate the... | https://cs.stackexchange.com/questions/161242/design-an-algorithm-to-predict-words-based-on-a-skeleton-from-a-given-dictionary |
Question: <p>Small introduction. We have a task that consists of sub-tasks. Each sub-task can be implemented by some set of web-services. We want to find the best implementation of this task. "Best" means it has best values of QoS (availability, latency, cost etc.).</p>
<p>So there are plenty of works:</p>
<ol>
<li>C... | https://cs.stackexchange.com/questions/11039/is-there-difference-between-workflow-aware-and-non-workflow-aware-optimal-select |
Question: <h3>Problem Statement:</h3>
<p>Given: an ordered list of <code>N</code> items, which we can refer to by index: <code>[0, N)</code>.</p>
<p>Goal: Write an algorithm to incrementally generate indexes that are as far away from all previously returned indexes as possible. In the base case where no indexes have be... | https://cs.stackexchange.com/questions/167943/is-this-knapsack-variant-named-studied-online-algorithm-for-farthest-from-pr |
Question: <p>I'm revising for an upcoming exam and was wondering if someone could help me with a practice problem:</p>
<blockquote>
<p>We model a set of cities and highways as an undirected weighted graph <span class="math-container">$G = (V,E,l)$</span>, where the vertices <span class="math-container">$V$</span> re... | https://cs.stackexchange.com/questions/68022/given-a-vertex-find-a-path-between-it-and-each-other-vertex-that-minimizes-the |
Question: <p>What theoretical concept lies behind the strong restriction of acquire semantics - to reads, and release semantics - to writes? (With papers titles and authors, if possible.)</p>
<p>Is it related to provision of correctness of more complex approaches than lock-based synchronization (as lock-free, wait-free... | https://cs.stackexchange.com/questions/165463/theoretical-origin-of-acquire-semantics-only-for-reads |
Question: <p>The classic example of a context-free grammar is $a^nb^n$. That is, $n$ occurrences of $a$ followed by an equal number of occurrences of $b$.</p>
<p>Do such forms occur in the real world? Can you provide an example of a real-world case where there must be $n$ occurrences of something followed an equal num... | https://cs.stackexchange.com/questions/19485/is-an-bn-an-artificial-language-or-does-it-occur-in-the-real-world |
Question: <p>I believe the notion of a normal form has a proper definition in model theory or algebra.</p>
<ol>
<li><p>If you have a set of elements <span class="math-container">$E$</span>, a premise of there being a normal form is that there are multiple ways to write an element <span class="math-container">$e \in E$<... | https://cs.stackexchange.com/questions/170581/algebraic-definition-of-normalization |
Question: <p>I have N tasks, each of them requires some time to complete. Time to complete is not the same for all tasks. Each task may depend on a number of other tasks (assume, that no dependency cycles are present). I have M (M is fixed, small and << N) workers that may be used to complete the tasks. I need to... | https://cs.stackexchange.com/questions/62962/scheduling-n-variable-time-interdependent-tasks-across-m-workers |
Question: <p>Can a probabilistic Turing Machine compute an uncomputable number?</p>
<p>My question probably does not make sense, but, that being the case, is
there a reasonably simple formal explanation for it. I should add that
I am pretty much ignorant of probabilistic TM and randomized algorithms.
I looked at wikip... | https://cs.stackexchange.com/questions/41154/can-a-probabilistic-turing-machine-compute-an-uncomputable-number |
Question: <p>So I have sets of functions $A$, $B$, $C$, $D$, $E$, and $F$. I want to run them in a <em>nested</em> way. I also want to run some of them in parallel, and some of them in sequence. Here is how that might look:</p>
<pre><code>In Parallel A {
In Sequence B {
In Parallel C {
In Sequence D {
... | https://cs.stackexchange.com/questions/93891/how-to-simulate-nested-parallelism-on-a-sequential-machine |
Question: <p>Crossposting due to recommendation.</p>
<p>I formulated a MIP problem which I didn't expect to be unimodular. The problem is to find a minimum complete sequence in a strongly connected digraph. That is, minimize the number of edges such that connectivity is preserved, using only previously existant edges.... | https://cs.stackexchange.com/questions/40334/totally-unimodular-polynomial-time |
Question: <p>Edit: Since this post is gaining traction, I feel the need to clarify that the purpose of this is to see if asymptotic and constant factor estimations calculated from high level code implementations of algorithms are reasonable approximations of the true version. <strong>I am not trying to predict the spee... | https://cs.stackexchange.com/questions/160969/assuming-constant-operation-cost-are-we-guaranteed-that-computational-complexit |
Question: <p>I'm the author of GateBoy (a gate-level simulation of the original Game Boy hardware) and Metron (a C++ to Verilog translation tool). One big issue I had to work around for both projects is the inability of C++ (or really, any current procedural programming language) to express atomic state change in a way... | https://cs.stackexchange.com/questions/155306/is-x-fx-a-programming-paradigm |
Question: <p>I was interested on evaluating a catalogue that students would be using to observe how is it being used probabilistically. </p>
<p>The catalogue works by choosing cells in a temporal sequence, so for example:</p>
<ul>
<li>Student A has: ($t_1$,$Cell_3$),($t_2$,$Cell_4$)</li>
<li>Student B has: $(t_1,Cell... | https://cs.stackexchange.com/questions/1122/is-it-viable-to-use-an-hmm-to-evaluate-how-well-a-catalogue-is-used |
Question: <p>In <a href="https://en.wikipedia.org/wiki/Arithmetic_coding" rel="nofollow noreferrer">arithmetic coding</a> a word is coded as the binary encoding of a number in a certain interval. The interval is determined from a sequence of nested intervals according to the probability distribution on the letters of t... | https://cs.stackexchange.com/questions/76233/choosing-a-shortest-representative-number-from-interval-in-arithmetic-coding |
Question: <p>This problem's been stumping me for the better part of a week:</p>
<p>You're given a set of triplets of variables. The variables are all distinct and ordered. Each triplet <span class="math-container">$a,b,c$</span> means that either <span class="math-container">$a<b<c$</span> or <span class="math-co... | https://cs.stackexchange.com/questions/155958/is-there-a-sub-np-algorithm-to-satisfy-or-prove-unsatisfiable-a-set-of-abc-or |
Question: <p>Since my question relates directly to a part of the text from a 2004 book, <em>Logic in Computer Science: Modelling and Reasoning about Systems (2nd Edition) by Michael Huth and Mark Ryan</em>, in order to provide context for the following discussion, I'm partially quoting the book verbatim:</p>
<blockquo... | https://cs.stackexchange.com/questions/66501/what-is-the-purpose-of-interpreting-elements-in-the-proof-of-reduction-of-pcp-to |
Question: <p>In phrasing an information model for consumption-optimized RDF-like data (full context at <a href="https://github.com/core-wg/coral/pull/1#issuecomment-921861748" rel="nofollow noreferrer">1</a> for the curious), I'm looking for any established term for <em>X</em> as used here:</p>
<blockquote>
<p>Given is... | https://cs.stackexchange.com/questions/144008/terminology-for-multiply-visiting-walks-of-directed-graphs |
Question: <p>Can we think of NP using a parallelism model instead of using a "checking relation" without loss of generality?</p>
<p>From what I understand from <a href="http://www.claymath.org/sites/default/files/pvsnp.pdf" rel="nofollow noreferrer">the problem statement given by Stephen Cook</a>, </p>
<blockquote>
... | https://cs.stackexchange.com/questions/64679/np-with-a-parallelism-model |
Question: <p>Suppose we want to sort an array that contains $n$ different integers in the range $[1,2n]$. It is known that this requires $\Theta(n\log n)$ comparisons. But comparing integers which might be as large as $n$ might requires time $\Theta(\log n)$ since we have to compare them bitwise. So, apparently the run... | https://cs.stackexchange.com/questions/71291/is-the-runtime-complexity-of-sorting-on-log-n-or-on-log2-n |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.