category
stringclasses
107 values
title
stringlengths
15
179
question_link
stringlengths
59
147
question_body
stringlengths
53
33.8k
answer_html
stringlengths
0
28.8k
__index_level_0__
int64
0
1.58k
language modeling
How does a given complexity class change under polynomial reduction?
https://cs.stackexchange.com/questions/69686/how-does-a-given-complexity-class-change-under-polynomial-reduction
<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 the model o...
500
language modeling
Common models for inferring semantics (truth/factuality of statements)?
https://cs.stackexchange.com/questions/50930/common-models-for-inferring-semantics-truth-factuality-of-statements
<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 the model "...
501
language modeling
Strongest criticisms of object-oriented languages?
https://cs.stackexchange.com/questions/171056/strongest-criticisms-of-object-oriented-languages
<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 &quot;inefficient abstracted programming models&quot;. What exactly are the strongest criti...
<p>I think Torvalds attacks C++ on two grounds.</p> <p>One is that the language is over-complicated and that the subset of C++ which is appropriate for Torvalds' use (as a programmer of computer operating systems), is roughly that part which is common with the C language.</p> <p>The other is that the C++ language attra...
502
language modeling
I&#39;ve proven my language undecidable what is left to prove it Turing equivalent?
https://cs.stackexchange.com/questions/112159/ive-proven-my-language-undecidable-what-is-left-to-prove-it-turing-equivalent
<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 machine. I...
503
sequence-to-sequence model
Hidden Markov Models for Hand Gestures
https://cs.stackexchange.com/questions/129522/hidden-markov-models-for-hand-gestures
<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> and some...
<p>You say that your goal is to create a model and compute the likelihood of a test sample using that model. For that purposes, you do not need to find a way to interpret the hidden states, and you do not need to engineer the model so the hidden states have a meaning that you can understand. Instead, let the standard...
504
sequence-to-sequence model
Continuous Observation Densities in HMM
https://cs.stackexchange.com/questions/60131/continuous-observation-densities-in-hmm
<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&ndash;286, 1989; <a href="http://www.ece.ucsb.edu/Faculty/Rabiner/ece259/Reprints/tutorial%20on%20hmm%20and...
505
sequence-to-sequence model
Question about bigram model
https://cs.stackexchange.com/questions/52526/question-about-bigram-model
<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 provide some kin...
<p>The padding is there since the distribution of letters at the beginning and end of words is very different from their distribution inside words. To capture that, separate words with spaces and add trailing spaces on both sides: <code>' hello i am johnny '</code>.</p>
506
sequence-to-sequence model
Probabilistic hardness of approximation or solution of NP-hard optimization problems under a probabilistic generative model for input data
https://cs.stackexchange.com/questions/29276/probabilistic-hardness-of-approximation-or-solution-of-np-hard-optimization-prob
<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 alignment. J...
<p>Here is a similar recent example due to Mossel et al. There are $n$ vertices which are partitioned randomly into two classes. Two vertices of the same type are connected with probability $p$, and two of opposite types with probability $q$. For what values of $p, q$ can we recover the partition with high probability ...
507
sequence-to-sequence model
How to generate a degree sequence of a degree distribution
https://cs.stackexchange.com/questions/55342/how-to-generate-a-degree-sequence-of-a-degree-distribution
<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 that I need...
<p>As you mention, the degree distribution follows a power law if the number of nodes of degree $k$ is roughly $N \times C^{-1} k^{-\gamma}$, where $C = \sum_{k = 1}^\infty k^{-\gamma} = \zeta(\gamma)$ (in your case, $C \approx 1.34$). Plugging in your numbers, we want roughly</p> <ol> <li>75 vertices of degree 1.</li...
508
sequence-to-sequence model
multiple sequence alignment using HMM and simulated annealing
https://cs.stackexchange.com/questions/73765/multiple-sequence-alignment-using-hmm-and-simulated-annealing
<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, Sea.R., et ...
<p>part of this question already has an answer in <a href="https://www.biostars.org/p/245355/" rel="nofollow noreferrer"> multiple sequence alignment using HMM and simulated annealing</a> and about the number of states in HMM it is a challenge yet.</p>
509
sequence-to-sequence model
Model checking and dependently typed languages for formal verification
https://cs.stackexchange.com/questions/170371/model-checking-and-dependently-typed-languages-for-formal-verification
<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 prove reach...
<p>Model checkers tend to be better for checking control-flow properties, i.e., about the sequence of events, particularly in the presence of concurrency, threads, etc.</p> <p>Dependent types tend to be better for checking data-flow properties, i.e., about the values and types that variables can hold, and typically are...
510
sequence-to-sequence model
Quantum Computing - Relationship between Hamiltonian and Unitary model
https://cs.stackexchange.com/questions/28234/quantum-computing-relationship-between-hamiltonian-and-unitary-model
<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 according to ...
<p>To show that Hamiltonian evolution can simulate the circuit model, one can use the paper <a href="http://arxiv.org/abs/1205.3782">Universal computation by multi-particle quantum walk</a>, which shows that a very specific kind of Hamiltonian evolution (multi-particle quantum walks) is BQP complete, and thus can simul...
511
sequence-to-sequence model
Can the pseudo-random-sequence generator be described as a finite state automaton?
https://cs.stackexchange.com/questions/102839/can-the-pseudo-random-sequence-generator-be-described-as-a-finite-state-automato
<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/Deterministic_finite...
<p>A finite-state automaton can output an unending sequence of outputs, so you don't need to do anything special. The regular language will contain all prefixes of possible output streams.</p> <p>If you really want to consider infinite strings, you could use <a href="https://en.wikipedia.org/wiki/B%C3%BCchi_automato...
512
sequence-to-sequence model
Shell algorithm knuth sequence time complexity analysis
https://cs.stackexchange.com/questions/160442/shell-algorithm-knuth-sequence-time-complexity-analysis
<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 &lt;= r−l; h = 3∗h + 1 ); for (; h &gt; 0; h / = 3) { for (i = l+h; i &lt;= r; ++ i) { for (j = i; j &gt;= l +h &amp;&amp; a[j] &lt; a[j−h]; j −= h) { swap (a+...
513
sequence-to-sequence model
How to Generate Control flow graph from a Petri net model?
https://cs.stackexchange.com/questions/49264/how-to-generate-control-flow-graph-from-a-petri-net-model
<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 a CFG may ...
<p>Since you are interested in generating test sequences automatically using colored Petri nets, note that it's not clear that you need reduction to control flow graphs (and dealing with all the related issues). Some techniques were presented, that use various different methods to generate test sequences from Petri net...
514
sequence-to-sequence model
Applying Baum-Welch to multiple observed sequences iteratively
https://cs.stackexchange.com/questions/157314/applying-baum-welch-to-multiple-observed-sequences-iteratively
<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 model and the...
515
sequence-to-sequence model
What is a de Bruijn sequence exactly?
https://cs.stackexchange.com/questions/150856/what-is-a-de-bruijn-sequence-exactly
<p>I just discovered the term &quot;<a href="https://en.wikipedia.org/wiki/De_Bruijn_sequence" rel="nofollow noreferrer">de Bruijn sequence</a>&quot;, but don't quite follow what it means exactly (or how de Bruijn is pronounced :), &quot;<a href="https://www.biostars.org/p/7186/" rel="nofollow noreferrer">brown</a>&quo...
<p>A deBruijn sequence <span class="math-container">$B(k,n)$</span> has length <span class="math-container">$N=k^n$</span> and is <em>cyclic</em> i.e. it can be extended by repeating the sequence.</p> <p>If it is <span class="math-container">$x_0,\ldots,x_{N-1}$</span> then the subsequences <span class="math-container"...
516
sequence-to-sequence model
Name of Generating One Value at a Time in Sequence Generation vs Encoder Decoder
https://cs.stackexchange.com/questions/88620/name-of-generating-one-value-at-a-time-in-sequence-generation-vs-encoder-decoder
<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 opposition to tha...
517
sequence-to-sequence model
Is integer sorting possible in O(n) in the transdichotomous model?
https://cs.stackexchange.com/questions/41255/is-integer-sorting-possible-in-on-in-the-transdichotomous-model
<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 proof that it...
<p><a href="http://arxiv.org/abs/0706.4107" rel="nofollow">Integers can be stably sorted in $O(n)$ time with $O(1)$ additional space.</a> More precisely, if you have $n$ integers in the range $[1, n^c]$, the can be sorted in O(n) time.</p> <p>This was only shown a couple of years ago by a team including the late Mihai...
518
sequence-to-sequence model
Find sequence, given partial information about all pairs
https://cs.stackexchange.com/questions/16498/find-sequence-given-partial-information-about-all-pairs
<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 such a seq...
519
sequence-to-sequence model
Signal translation with Seq2Seq model
https://cs.stackexchange.com/questions/130020/signal-translation-with-seq2seq-model
<p>I'm currently doing some research on signal processing and I got a dataset which includes the signal in itself and its &quot;translation&quot;.</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> <p>So I w...
<p>I am skeptical that machine learning is the right tool for this problem. I would look for a more direct solution, perhaps using peak detection or changepoint detection, or some other form of classical method for time-series analysis.</p> <p>If you do use machine learning, cross-entropy loss is not the right loss fo...
520
sequence-to-sequence model
Is the time complexity of the Fibonacci sequence O(fib(n))?
https://cs.stackexchange.com/questions/135815/is-the-time-complexity-of-the-fibonacci-sequence-ofibn
<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 about it,</...
<p><span class="math-container">$\DeclareMathOperator{\fib}{fib}$</span>If you choose to calculate <span class="math-container">$\fib(n)$</span> by using the naive recursion formula, then you need <span class="math-container">$\Theta (\fib(n))$</span> additions, and since the numbers involved grow to <span class="math-...
521
sequence-to-sequence model
Computational power of Actor Model
https://cs.stackexchange.com/questions/50695/computational-power-of-actor-model
<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 computation...
522
sequence-to-sequence model
Model paths by regular languages
https://cs.stackexchange.com/questions/44733/model-paths-by-regular-languages
<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 walk thro...
<p>If the number of locations (e.g. points or regions) are finite, naively, you can say that these locations are my states and you can directly use a DFA with an alphabet containing UP, DOWN. But you already said it's impracticable for your case.</p> <p>Then, let's look into where the number of locations is infinite o...
523
sequence-to-sequence model
Tolerance of object size variation for computer vision
https://cs.stackexchange.com/questions/152390/tolerance-of-object-size-variation-for-computer-vision
<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 frame with a...
<p>Your labels should be based on what you want the model to output when used in deployment. If you use this in deployment, is it important to produce a 3x1 bounding box? If it is, you'd better include those images and label those cars. If it is important to not produce a 3x1 bounding box, you'd better include those...
524
sequence-to-sequence model
Performance of smooting vs viterbi algorithm with HMMs
https://cs.stackexchange.com/questions/102697/performance-of-smooting-vs-viterbi-algorithm-with-hmms
<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 the viterb...
<p>Viterbi is not necessarily always better than smoothing. Viterbi returns the MAP estimate, but for some region in the input space, there might be too high of uncertainty that it is better to go with the &quot;reject option&quot;. This is mentioned in Kevin Murphy's &quot;Machine Learning: a probabilistic perspective...
525
sequence-to-sequence model
Problem with understanding two sided Matching Algorithm: maximium cardinality
https://cs.stackexchange.com/questions/120236/problem-with-understanding-two-sided-matching-algorithm-maximium-cardinality
<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 Preference Sequen...
<p>The standard definition of the <a href="https://en.wikipedia.org/wiki/Stable_marriage_problem" rel="nofollow noreferrer">stable marriage problem</a> is, given <span class="math-container">$n$</span> men and <span class="math-container">$n$</span> women, find a stable matching that marries all of the men and women. ...
526
sequence-to-sequence model
How to design this synchronous circuit?
https://cs.stackexchange.com/questions/12534/how-to-design-this-synchronous-circuit
<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, the circ...
<p>The question asks for a circuit which is given a sequence of bits, one in each round, and is supposed to output $1$ each time that the last $4$ bits form the subsequence $1101$; otherwise $0$ should be output. For example, if the input is $110110101$ then the output should be $000100100$. Naturally, the circuit will...
527
sequence-to-sequence model
Which transducer models replacement in regex?
https://cs.stackexchange.com/questions/98625/which-transducer-models-replacement-in-regex
<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 pushdown a...
528
sequence-to-sequence model
How does an automaton model a computer or something else?
https://cs.stackexchange.com/questions/27645/how-does-an-automaton-model-a-computer-or-something-else
<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 decision probl...
<p>The impetus behind all of this comes from trying to define a mathematically rigorous model of what "computation" means. Alan Turing did this in 1936 by defining a definition of a simple abstract machine that seemed to be sufficient to describe everything that we'd call computation, a device we now call a Turing Mach...
529
sequence-to-sequence model
Model marbel toy with finite automata
https://cs.stackexchange.com/questions/26406/model-marbel-toy-with-finite-automata
<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 marble passes,...
<p>Count $A$'s and $B$'s. The next $A$ will only exit at $D$ iff the first two levers are in right position. When does that happen? The first lever toggles at every $A$, but the second lever interacts with the $B$'s.</p> <p>At the same time, the situation for $B$ is symmetric. The next $B$ will <em>not</em> exit $D$ o...
530
sequence-to-sequence model
Name for pattern of addressing items by sequence-of-creation
https://cs.stackexchange.com/questions/77537/name-for-pattern-of-addressing-items-by-sequence-of-creation
<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 would have a c...
531
sequence-to-sequence model
How to connect the math of recurrence relations to daily programming concepts
https://cs.stackexchange.com/questions/59989/how-to-connect-the-math-of-recurrence-relations-to-daily-programming-concepts
<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 understand the...
<p>In computer science, recurrence relations are often useful for analyzing the running time of algorithms. For instance, we might define a function $T(\cdot)$, so that $T(n)$ is the running time when running the algorithm on an input of size $n$. Often, for many kinds of algorithms, we can write a recurrence relatio...
532
sequence-to-sequence model
How to interpret the execution of distributed computation from time-space diagram?
https://cs.stackexchange.com/questions/38429/how-to-interpret-the-execution-of-distributed-computation-from-time-space-diagra
<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 with the ...
<p>Yes, it is ambiguous, and it is ok. A single space-time diagram can be linearized (collapsed into a compatible sequence of configurations and events) in many ways, potentially an exponential number of ways. E.g. imagine that you have 1000 nodes, and each of them performs a local operation. Obviously there's 1000! di...
533
sequence-to-sequence model
ILP representation of the number of maximal 1 sequences in a row
https://cs.stackexchange.com/questions/107180/ilp-representation-of-the-number-of-maximal-1-sequences-in-a-row
<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 two events ...
<p>I think this can be done with <span class="math-container">$9n$</span> variables, instead of <span class="math-container">$n^2$</span>. Define the following integer variables for use in your linear program:</p> <ul> <li><span class="math-container">$a_i = 1$</span> if index <span class="math-container">$i$</span> ...
534
sequence-to-sequence model
Permute the subintervals of an interval partition to most closely align with a model partition
https://cs.stackexchange.com/questions/23391/permute-the-subintervals-of-an-interval-partition-to-most-closely-align-with-a-m
<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 also be repr...
<p>You can use integer linear programming (ILP) to solve this. In particular, here is how to use an ILP solver to test whether there exists a way to permute the second partition so that you find $k+1$ alignment points (including the two endpoints). Given an algorithm for this decision procedure, you can use binary se...
535
sequence-to-sequence model
Complexity-theoretic view of Algebraic Numbers
https://cs.stackexchange.com/questions/173006/complexity-theoretic-view-of-algebraic-numbers
<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 &quot;.&quot;s. <span class="math-container">$M$</span> can then be associated with the real number <span class="math-container">$x_M$</span> whose binary expansion is exac...
536
sequence-to-sequence model
Can most programs (except the IO part) be re-written as a sequence of matrix operations?
https://cs.stackexchange.com/questions/115153/can-most-programs-except-the-io-part-be-re-written-as-a-sequence-of-matrix-ope
<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 a sequence...
<p>If you regard the output of a program as a function of its input then matrices can be used to represent <em>some</em> programs, namely those where the output is a linear function of the input. So a program that takes two arguments <span class="math-container">$a$</span> and <span class="math-container">$b$</span> an...
537
sequence-to-sequence model
Recognizing interval graphs--&quot;equivalent intervals&quot;
https://cs.stackexchange.com/questions/23885/recognizing-interval-graphs-equivalent-intervals
<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 from unique...
<p>Imagine scanning the real line from left to right. Whenever an interval starts or ends, you make notice of it. For example, perhaps at some representation, at the point $3$ the intervals for $x_2,x_7$ start and the interval for $x_{15}$ ends, and at the point $4$ the interval for $x_2$ ends, and no points occur in b...
538
sequence-to-sequence model
How do POMDPs and Dynamic Influence Diagrams differ?
https://cs.stackexchange.com/questions/50053/how-do-pomdps-and-dynamic-influence-diagrams-differ
<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 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | ...
<p>I'll quote from the paper <a href="http://www.researchgate.net/profile/Piotr_Gmytrasiewicz/publication/221454855_Interactive_dynamic_influence_diagrams/links/00b7d5343215f5521e000000.pdf" rel="nofollow">"Interactive Dynamic influence diagrams"</a> (DIDs) by Polich and Gmytrasiewicz (AAMAS 2007):</p> <blockquote> ...
539
sequence-to-sequence model
Infer probabilities, for concatenation of words
https://cs.stackexchange.com/questions/47458/infer-probabilities-for-concatenation-of-words
<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 where the word...
540
sequence-to-sequence model
Given a sequence of sets, choose one element from each to get the lowest number of changes
https://cs.stackexchange.com/questions/153579/given-a-sequence-of-sets-choose-one-element-from-each-to-get-the-lowest-number
<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}$</span> by <spa...
<p>For every I = 1 to n, and for every x in xi, calculate the cheapest sequence for the first I sets ending in x.</p> <p>For I = 1 it is trivial, every sequence has cost 0.</p> <p>To find the cheapest sequence for I+1 sets ending in x, the cost is either the cheapest sequence for I sets ending in x or the cost of any s...
541
sequence-to-sequence model
Find maximal matching in tree in $O\left(\frac{n}{\log n}\right)$
https://cs.stackexchange.com/questions/104824/find-maximal-matching-in-tree-in-o-left-fracn-log-n-right
<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 tree of s...
542
sequence-to-sequence model
Viterbi training vs. Baum-Welch algorithm
https://cs.stackexchange.com/questions/6664/viterbi-training-vs-baum-welch-algorithm
<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 use: the Ba...
<p>From my comment:</p> <p><a href="https://stats.stackexchange.com/questions/581/differences-between-baum-welch-and-viterbi-training">This</a> answer on crossvalidate.SE may be of use. I wasn't aware of viterbi-training. I have only used BW or other EM-based methods in the past. Based on the answer in the link, I thi...
543
sequence-to-sequence model
How the Abstract DPLL Algorithm Works in SAT Solving
https://cs.stackexchange.com/questions/95505/how-the-abstract-dpll-algorithm-works-in-sat-solving
<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-04.pdf" r...
<p>Describing DPLL as a series of state-transition rules is the worst way I've ever seen to aid understanding the algorithm. The pseudocode provided in the WIkipedia article on DPLL is much easier to understand if you're approaching the algorithm for the first time.</p> <pre><code>;Algorithm DPLL ;Input: A set of cla...
544
sequence-to-sequence model
Does weak consistency allow reordering of events?
https://cs.stackexchange.com/questions/70236/does-weak-consistency-allow-reordering-of-events
<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> <ol> <li>...
<p>Weak consistency rather appears in distributed systems where changes to variables have to be transmitted via the network.<br> Before a synchronization there is no guarantee to the visibility of write operations.<br> On P2 the <code>W(x)1</code> could arrive before <code>W(x)2</code> and on P2 <code>W(x)2</code> coul...
545
sequence-to-sequence model
Minimum number of tree cuts so that each pair of trees alternates between strictly decreasing and strictly increasing
https://cs.stackexchange.com/questions/116854/minimum-number-of-tree-cuts-so-that-each-pair-of-trees-alternates-between-strict
<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 be invali...
<p>I'll describe two ways you could solve this problem. Either works. In some sense they are basically the same algorithm, just viewed from two different perspectives.</p> <h1>Dynamic programming algorithm</h1> <p>This can be solved in linear time with <a href="https://cs.stackexchange.com/tags/dynamic-programming/...
546
sequence-to-sequence model
Why use maximum likelihood for word prediction?
https://cs.stackexchange.com/questions/68134/why-use-maximum-likelihood-for-word-prediction
<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|h)=\frac{...
<p>That approach <em>is</em> using a score function (in a particular way). It is also using maximum likelihood. Both ways of describing the approach are valid.</p> <p>Why is it useful to think about this in terms of maximum likelihood? Because it gives a more systematic way to think about this problem and others li...
547
sequence-to-sequence model
Are there lossless data compression techniques that do not exploit repetitive patterns?
https://cs.stackexchange.com/questions/65096/are-there-lossless-data-compression-techniques-that-do-not-exploit-repetitive-pa
<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 two thing...
<p>Modeling data compression as a combination of statistical modeling and encoding seems a bit obsolete these days. In many compression algorithms, the most important step is combinatorial modeling, which finds structure in the data and uses the structure to transform the data into something that can be compressed with...
548
sequence-to-sequence model
Would Schmidhuber&#39;s theories of everything be capable of performing hypercomputation?
https://cs.stackexchange.com/questions/104469/would-schmidhubers-theories-of-everything-be-capable-of-performing-hypercomputa
<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 domain of...
<p>If the hypothesis is that we live in a universe whose physics are computed by a Turing machine, then hypercomputation is trivially impossible in our universe.</p> <p>The constants you're taking about are limits of computable numbers. If all you have is a computer you can't produce such a number in finite time.</p>...
549
sequence-to-sequence model
Markov Model to compute the probaility on the $n^{th}$ day
https://cs.stackexchange.com/questions/90495/markov-model-to-compute-the-probaility-on-the-nth-day
<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 follow a ...
<p>Yes, you just add up the probabilities of all the possibilities. However, there's a conceptually clearer way of doing it that's less error-prone.</p> <p>The transition matrix tells you the probability of moving from one state to another in one step. The probability that it rains the day after tomorrow given that i...
550
sequence-to-sequence model
What randomness really is
https://cs.stackexchange.com/questions/12136/what-randomness-really-is
<p>I'm a Computer Science student and am currently enrolled in System Simulation &amp; 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 been working...
<p>The short answer is that no one knows what real randomness is, or if such a thing exists. If you want to quantify or measure the randomness of a discrete object, you would typically turn to <a href="http://en.wikipedia.org/wiki/Kolmogorov_complexity">Kolmogorov complexity</a>. Before Kolmogorov complexity, we had no...
551
sequence-to-sequence model
Doubts on Definition of Indistinguishable Encryption in the Textbook
https://cs.stackexchange.com/questions/12457/doubts-on-definition-of-indistinguishable-encryption-in-the-textbook
<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 that</p> <p...
<p>Depends on how different your algorithms are. If you can compute $A_i$ from $i$ in polynomial time, then $A'$ with $A'(n) = A_n(n)$ is a polynomial time adversary too and violates the assumption (as it has non-negligible success probability). This would make your series of $A_i$ <em>uniform</em> and is one usual cla...
552
sequence-to-sequence model
General name for linked lists based on hashes
https://cs.stackexchange.com/questions/77502/general-name-for-linked-lists-based-on-hashes
<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 bytes of bot...
<p>This is known as <a href="https://en.wikipedia.org/wiki/Hash_chain" rel="nofollow noreferrer">hash chaining</a>. The blockchain uses this technique, as do some kinds of <a href="https://en.wikipedia.org/wiki/Linked_timestamping" rel="nofollow noreferrer">timestamping</a> schemes (see, e.g., Haber &amp; Stornetta) a...
553
sequence-to-sequence model
Job Shop Problem: How do you get an ordered sequence of operations from the disjunctive acyclic graph?
https://cs.stackexchange.com/questions/136804/job-shop-problem-how-do-you-get-an-ordered-sequence-of-operations-from-the-disj
<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) over the set ...
<p>The graph consisting of all vertices corresponding to a particular machine and the induced chosen edges form a directed path. This path tells you exactly which jobs to run on that machine and in what order.</p> <p>The length of the longest weighted path from u to a job tells you exactly when you can start processing...
554
sequence-to-sequence model
When can a deterministic finite-state-automaton (DFSA) along with its input sequence be said to be a part of another DFSA?
https://cs.stackexchange.com/questions/136014/when-can-a-deterministic-finite-state-automaton-dfsa-along-with-its-input-sequ
<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">$S$</spa...
<p>It's not clear to me how to interpret &quot;can be considered&quot;, so I'm going to identify one technical question that can be answered.</p> <p>Given a FSM <span class="math-container">$F$</span> and an input sequence <span class="math-container">$S$</span>, it is possible to build another FSM <span class="math-co...
555
sequence-to-sequence model
Shortest path given correct order of colours?
https://cs.stackexchange.com/questions/139815/shortest-path-given-correct-order-of-colours
<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="math-conta...
<p>Use a <a href="https://cs.stackexchange.com/q/118977/755">product construction</a>, to construct a new graph whose vertices are given <span class="math-container">$(x,y,z,k)$</span>, where <span class="math-container">$k$</span> counts the index into the sequence of colors (i.e., we are currently at <span class="mat...
556
sequence-to-sequence model
Solving the part-of-speech tagging problem with HMM
https://cs.stackexchange.com/questions/20185/solving-the-part-of-speech-tagging-problem-with-hmm
<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 that, given t...
<p>Isn't this exactly the same question you asked <a href="https://cs.stackexchange.com/questions/16777/hidden-markov-model-in-tagging-problem">previously</a>? I'll make some additional comments and add some links here. Hopefully that will help.</p> <blockquote> <p>is there are any particular reason why we prefere t...
557
sequence-to-sequence model
How to setup a model for a guillotine cutting stock problem?
https://cs.stackexchange.com/questions/81961/how-to-setup-a-model-for-a-guillotine-cutting-stock-problem
<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 guillotine constr...
558
sequence-to-sequence model
How can I take advantage of the capabilities of a cluster
https://cs.stackexchange.com/questions/44995/how-can-i-take-advantage-of-the-capabilities-of-a-cluster
<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 event tak...
<p>According to my experience, clusters usually work like this: you submit a job to it (a program), and it allocates a node to run your job. You don't worry about allocating the nodes yourself.</p> <p>So in your case, simply submit multiple jobs (usually they provide some method to submit batch jobs), and the cluster ...
559
sequence-to-sequence model
What is the meaning of the output weights of a Conditional Random Field (CRF) model?
https://cs.stackexchange.com/questions/42301/what-is-the-meaning-of-the-output-weights-of-a-conditional-random-field-crf-mo
<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/hcrf/" rel="n...
560
sequence-to-sequence model
Calculating with regexes
https://cs.stackexchange.com/questions/41564/calculating-with-regexes
<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 captured sube...
561
sequence-to-sequence model
Is there a model of ZF&#172;C where some program always terminates but has no loop variant?
https://cs.stackexchange.com/questions/117648/is-there-a-model-of-zf%c2%acc-where-some-program-always-terminates-but-has-no-loop-va
<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&mdash;a well-founded relation on the state space such that each iteration of the loop results in a state that is less th...
<p>I think you are really asking a question about the <em>definition of the notion of well-foundedness</em>.</p> <p>I think the notion of loop variants is a bit of a red herring here: I would argue that any reasonable definition of well-foundedness should enable proving that a loop is terminating iff there is a well-f...
562
sequence-to-sequence model
What kind of scheduling problem is this?
https://cs.stackexchange.com/questions/29501/what-kind-of-scheduling-problem-is-this
<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. There is als...
563
sequence-to-sequence model
(Generally) How to specify asynchronous action with side effects using logic equations
https://cs.stackexchange.com/questions/104981/generally-how-to-specify-asynchronous-action-with-side-effects-using-logic-equ
<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('data', fu...
<p>The way to incorporate it in a model depends on (a) what aspects of system behavior you want the model to capture, (b) what properties you want to verify of the system, and (c) what kind of expressivity the model checker framework provides.</p> <p>In other words, there's no one way to model systems. One can build ...
564
sequence-to-sequence model
Detecting palindromes in binary numbers using a finite state machine
https://cs.stackexchange.com/questions/32081/detecting-palindromes-in-binary-numbers-using-a-finite-state-machine
<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, knowing a li...
<p><strong>In a nutshell</strong>: <em>As presented, with a single row of tiles, the tiling system is equivalent to a finite state automaton. It cannot recognize the set of palindromes which is context-free, but not regular. However, if the tiling system is extended, allowing as many rows as needed (possibly with the a...
565
sequence-to-sequence model
Maxima of diagonals in a column wise and row wise sorted matrix
https://cs.stackexchange.com/questions/18211/maxima-of-diagonals-in-a-column-wise-and-row-wise-sorted-matrix
<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&lt; 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\}$ is also...
<p><s>Great question! <a href="http://cs.brown.edu/~pff/papers/dt-final.pdf" rel="noreferrer">"Distance Transforms of Sampled Functions", by Felzenszwalb and Huttenlocher</a> shows how to compute this in $O(n \lg n)$ time.</s></p> <p><a href="http://arxiv.org/abs/1212.4771" rel="noreferrer">"Necklaces, Convolutions, ...
566
sequence-to-sequence model
Saving on array initialization
https://cs.stackexchange.com/questions/492/saving-on-array-initialization
<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 initialize it. (So...
<p>This is a very general trick, which can be used for other purposes than hashing. Below I give an implementation (in pseudo-code).</p> <p>Let three uninitialized vectors $A$, $P$ and $V$ of size $n$ each. We will use these to do the operations requested by our data structure. We also maintain a variable $pos$. The o...
567
sequence-to-sequence model
Is relation extraction considered a subtask of information extraction?
https://cs.stackexchange.com/questions/133710/is-relation-extraction-considered-a-subtask-of-information-extraction
<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 typically mod...
568
sequence-to-sequence model
An algorithm to find differences between routing paths
https://cs.stackexchange.com/questions/141340/an-algorithm-to-find-differences-between-routing-paths
<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) until the fin...
569
sequence-to-sequence model
counteracting numerical instability in HMM training
https://cs.stackexchange.com/questions/72449/counteracting-numerical-instability-in-hmm-training
<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>struct log_pol...
<h2>Avoiding zero probabilities</h2> <p>You probably want to be using <a href="https://en.wikipedia.org/wiki/Additive_smoothing" rel="nofollow noreferrer">additive smoothing</a> when estimating probabilities from count data.</p> <p>With a dictionary of 80,000 words, most of those words will be very rare: many of them...
570
sequence-to-sequence model
Path that stays within a convex polyhedron
https://cs.stackexchange.com/questions/142152/path-that-stays-within-a-convex-polyhedron
<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>The probl...
571
sequence-to-sequence model
Can we enumerate finite sequences which have no halting continuation?
https://cs.stackexchange.com/questions/103981/can-we-enumerate-finite-sequences-which-have-no-halting-continuation
<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 and Godel's...
<p>The language of your question confuses me a bit (&quot;if a finite sequence does not have any continuation which encodes a halting program&quot; - what exactly does that mean?), but I think the following is likely to clarify the situation:</p> <p>Let's take as our &quot;base theory&quot; first-order Peano arithmetic...
572
sequence-to-sequence model
Discounted Optimal Stopping
https://cs.stackexchange.com/questions/145039/discounted-optimal-stopping
<p>The model is as followed:</p> <p>Consider an infinite horizon discounted problem <span class="math-container">$(0 &lt; γ &lt; 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 <span class=...
573
sequence-to-sequence model
Why doesn&#39;t infinite run time violate Turing completeness? Shouldn&#39;t &quot;completeness&quot; include halting?
https://cs.stackexchange.com/questions/103001/why-doesnt-infinite-run-time-violate-turing-completeness-shouldnt-completene
<p>Why doesn't infinite run time violate Turing completeness? Shouldn't &quot;completeness&quot; 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 computation</p> <p...
<p>You do not yet understand what Turing completeness means.</p> <p>Turing completeness is the ability to perform arbitrary <em>finite</em> computations.</p> <p>To simplify matters, we say an arbitrary finite computation is an effective procedure that, given some (finite) input, produces some (finite) output, after s...
574
sequence-to-sequence model
If a TM accepts a non-regular language, its space complexity is $\Omega(\log \log n)$
https://cs.stackexchange.com/questions/145466/if-a-tm-accepts-a-non-regular-language-its-space-complexity-is-omega-log-lo
<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="math-contai...
<blockquote> <p>If I understand this correctly, <span class="math-container">$N$</span> is equal to all possible configurations (a crossing sequence) for a single cell.</p> </blockquote> <p>That's not accurate: a crossing sequence is a <em>sequence</em> of configurations. We form the crossing sequence at position <span...
575
sequence-to-sequence model
Achieving Randomness
https://cs.stackexchange.com/questions/67766/achieving-randomness
<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 selected using th...
<p>There are two types of answers:</p> <ul> <li><p>Practical: You are looking for good <a href="https://en.wikipedia.org/wiki/Stream_cipher" rel="nofollow noreferrer">stream ciphers</a>. Several exist, though we don't know for sure that they are secure.</p></li> <li><p>Theoretical: You are looking for <a href="https:/...
576
sequence-to-sequence model
Commonly-used formal definition of graphs with &#39;connections&#39;?
https://cs.stackexchange.com/questions/76624/commonly-used-formal-definition-of-graphs-with-connections
<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 (never mind ...
577
sequence-to-sequence model
Definitions of and difference between adaptive online adversary and adaptive offline adversary?
https://cs.stackexchange.com/questions/121390/definitions-of-and-difference-between-adaptive-online-adversary-and-adaptive-off
<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 what an obl...
578
sequence-to-sequence model
Viterbi algorithm for object tracking
https://cs.stackexchange.com/questions/153527/viterbi-algorithm-for-object-tracking
<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 is that f...
579
sequence-to-sequence model
Design an algorithm to predict words based on a skeleton from a given dictionary
https://cs.stackexchange.com/questions/161242/design-an-algorithm-to-predict-words-based-on-a-skeleton-from-a-given-dictionary
<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 frequency...
<p>I suggest you use a brute-force greedy algorithm, where you brute-force explore all possible guesses and all possible candidates for the secret word and see which guess leads to the most ambiguity about the secret word. See <a href="https://en.wikipedia.org/wiki/Mastermind_(board_game)#Algorithms_and_strategies" re...
580
sequence-to-sequence model
Is there difference between workflow-aware and non-workflow-aware optimal selection of web-service composition?
https://cs.stackexchange.com/questions/11039/is-there-difference-between-workflow-aware-and-non-workflow-aware-optimal-select
<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>Canfora G. ...
581
sequence-to-sequence model
Is this knapsack variant named / studied? &quot;Online algorithm for farthest-from-previous index&quot;
https://cs.stackexchange.com/questions/167943/is-this-knapsack-variant-named-studied-online-algorithm-for-farthest-from-pr
<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 been returne...
<p>This is an instance of <a href="https://en.wikipedia.org/wiki/Farthest-first_traversal" rel="nofollow noreferrer">farthest-point traversal</a> in 1D.</p>
582
sequence-to-sequence model
Given a vertex, find a path between it and each other vertex that minimizes the maximum weight in the path
https://cs.stackexchange.com/questions/68022/given-a-vertex-find-a-path-between-it-and-each-other-vertex-that-minimizes-the
<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> represent ci...
<p>Let $T = \{s\}$, and let $Q$ be a new empty priority queue. Insert each edge incident on $s$ in $Q$. While there are still nodes with $d$ from $s$ yet to be computed, extract and remove the minimum from $Q$. </p> <p>If such edge connects a node $u$ in $T$ with a node $v$ not in $T$, add each edge incident on $v$ th...
583
sequence-to-sequence model
Theoretical origin of acquire semantics only for reads?
https://cs.stackexchange.com/questions/165463/theoretical-origin-of-acquire-semantics-only-for-reads
<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 algorithm...
584
sequence-to-sequence model
Is $a^n b^n$ an artificial language or does it occur in the real world?
https://cs.stackexchange.com/questions/19485/is-an-bn-an-artificial-language-or-does-it-occur-in-the-real-world
<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 number of occ...
<p>The classic consequence of $a^nb^n$ being context-free rather than regular is on opening and closing brackets. $a^nb^n$ represents the simplest possible case of this: no interleaving of opens and closes and no intervening characters. Regular expressions can't even deal with this most basic case.</p>
585
sequence-to-sequence model
Algebraic definition of &quot;normalization&quot;
https://cs.stackexchange.com/questions/170581/algebraic-definition-of-normalization
<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$</span>. Th...
586
sequence-to-sequence model
Scheduling N variable-time interdependent tasks across M workers
https://cs.stackexchange.com/questions/62962/scheduling-n-variable-time-interdependent-tasks-across-m-workers
<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 &lt;&lt; N) workers that may be used to complete the tasks. I need to find a se...
<p>This can been seen as a variation of the job shop problem where you want to find the policy that yields the minimum makespan (time taken for all machines to process all jobs); as well as a variation of the assignment problem (find the optimal pairing of workers to jobs that minimizes cost). The variation in both cas...
587
sequence-to-sequence model
Can a probabilistic Turing Machine compute an uncomputable number?
https://cs.stackexchange.com/questions/41154/can-a-probabilistic-turing-machine-compute-an-uncomputable-number
<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 wikipedia, but ...
<p>Consider the following reasonable definition for a Turing machine computing an irrational number in $[0,1]$.</p> <blockquote> <p>A Turing machine computes an irrational $r \in [0,1]$ if, on input $n$, it outputs the first $n$ digits (after the decimal) of the binary representation of $r$.</p> </blockquote> <p>On...
588
sequence-to-sequence model
How to Simulate Nested Parallelism on a Sequential Machine
https://cs.stackexchange.com/questions/93891/how-to-simulate-nested-parallelism-on-a-sequential-machine
<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 { In Par...
589
sequence-to-sequence model
Totally unimodular &lt;=&gt; polynomial time?
https://cs.stackexchange.com/questions/40334/totally-unimodular-polynomial-time
<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. This will...
590
sequence-to-sequence model
Assuming constant operation cost, are we guaranteed that computational complexity calculated from high level code is &quot;correct&quot;?
https://cs.stackexchange.com/questions/160969/assuming-constant-operation-cost-are-we-guaranteed-that-computational-complexit
<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 speed of code ...
<p>Yes, this is reasonable as a first cut approximation. As always, there are caveats.</p> <p>A theoretical model is a model. It is used for making predictions, but models typically are not perfect, and there are some factors that they don't take into account.</p> <p>I'm not sure what you mean by function calls, but ...
591
sequence-to-sequence model
Is “x&#39; = f(x)” a programming paradigm?
https://cs.stackexchange.com/questions/155306/is-x-fx-a-programming-paradigm
<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 that is b...
<p>I am no good at giving names to paradigms. Someone else will be. But the answer to what you actually want to do is quite straightforward, in C++ at least.</p> <p>Basically you accumulate <strong>actions</strong>, and having accumulated them you execute them all at the end. In the example you give, each action is of ...
592
sequence-to-sequence model
Is it viable to use an HMM to evaluate how well a catalogue is used?
https://cs.stackexchange.com/questions/1122/is-it-viable-to-use-an-hmm-to-evaluate-how-well-a-catalogue-is-used
<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_5),(t_2,C...
<p><strong>Ad Question 1:</strong> Assuming that your assumptions on how the catalogue is used -- that is the choice of the next cell only depends on the current (or constantly many preceeding) cell(s), <em>not</em> the (full) history -- then yes, you can use a Markov Chain to model it.</p> <p>However, you do not seem...
593
sequence-to-sequence model
Choosing a shortest representative number from interval in arithmetic coding
https://cs.stackexchange.com/questions/76233/choosing-a-shortest-representative-number-from-interval-in-arithmetic-coding
<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 the word. <...
<p>While you are encoding symbols between the ranges, you are not choosing which to use for the specific symbol. You are narrowing down the possible chooses there are. You can arbitrarily choose them per symbol, but how would you adjust the ranges to make that the actual choice. It is true that the LAST symbol you can...
594
sequence-to-sequence model
Is there a sub-NP algorithm to satisfy or prove unsatisfiable a set of a&lt;b&lt;c OR c&lt;b&lt;a constraints
https://cs.stackexchange.com/questions/155958/is-there-a-sub-np-algorithm-to-satisfy-or-prove-unsatisfiable-a-set-of-abc-or
<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&lt;b&lt;c$</span> or <span class="math-container">$...
<p>This is known as the <a href="https://en.wikipedia.org/wiki/Betweenness" rel="nofollow noreferrer">betweenness problem</a>. It is in NP (you can easily check the correctness of any proposed solution in polynomial time), and is NP-hard.</p>
595
sequence-to-sequence model
What is the purpose of interpreting elements in the proof of reduction of PCP to validity decidability problem of predicate logic?
https://cs.stackexchange.com/questions/66501/what-is-the-purpose-of-interpreting-elements-in-the-proof-of-reduction-of-pcp-to
<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> <blockquote> <p>T...
<p>Lets start with what exactly you are trying to prove.</p> <p>You're dealing with a signature $\sigma$ which consists of one constant $e$, two function symbols $f_0,f_1$, and one binary predicate $P(s,t)$. We denote by $\mathcal{C}$ the set of all "yes" instances to the post correspondence problem, i.e. all sequence...
596
sequence-to-sequence model
Terminology for multiply visiting walks of directed graphs
https://cs.stackexchange.com/questions/144008/terminology-for-multiply-visiting-walks-of-directed-graphs
<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 a directe...
597
sequence-to-sequence model
NP with a parallelism model?
https://cs.stackexchange.com/questions/64679/np-with-a-parallelism-model
<p>Can we think of NP using a parallelism model instead of using a "checking relation" without loss of generality?</p> <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> <p>The no...
<p>Your description of NP is still missing the accept criterion. For example you might decide to accept the input exactly in case all computation paths accept. This would give you the class coNP instead of NP. Or you might decide to accept the input exactly in case half of the computation paths accept. But for NP, the ...
598
sequence-to-sequence model
Is the runtime complexity of sorting $O(n\log n)$ or $O(n\log^2 n)$?
https://cs.stackexchange.com/questions/71291/is-the-runtime-complexity-of-sorting-on-log-n-or-on-log2-n
<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 runtime compl...
<p>Algorithms are usually analyzed using the <a href="https://en.wikipedia.org/wiki/Random-access_machine" rel="noreferrer">random access machine</a> model. In this model, arithmetic operations on machine words take time $O(1)$. A machine word contains $O(\log n)$ bits, where $n$ is some natural parameter, say the leng...
599