instruction
stringlengths
35
29.1k
I was attempting to write a computer algorithm to determine if a particular number breaks the Collatz conjecture. It is very easy to determine if a particular number falls into a loop, however I cannot think of any way to determine if a particular number is on an infinite divergent trajectory. Assuming the Collatz con...
Is the following language decidable? L = {(M) : M performs at least 100 steps on every accepted input.} I tried to use reduction from the halting problem, but still no dice.
How to design Hashing function when the distribution for the bits that will be set are known before hand? Given that the number of bits to be set is constant. The intention is to minimize the hash collisions and resizing of the hash table. Mentioned query is more of an open-ended question. What I am interested is in th...
I want to use Vertex Cover as a known $NP$-complete Problem for the reduction. The claim is that if a have a vertex cover in graph $G$ with size $\le k$, I will have a clique cover in $G^\prime$ with total number of cliques $\le k$ I want to reduce vertex cover problem to clique cover problem in the following way: ...
Given a undirected graph $G=(V,E)$. Imagine traversing the Graph was restricted; following an edge $a$ over a node $v$ to an edge $b$ is allowed if and only if a function $w: ( a, v, b ) \rightarrow \{0,1\}$ returns $1$. Is there a effective solution to find the shortest path between two nodes without trying every poss...
I've recently viewed the paper of AlphaGo, which has done gradient-based reinforcement learning to get stronger. The learning was successful enough to beat a human master, but in this case, supervised learning with a large database of master level human games was preceded the reinforcement learning. For a complex enoug...
I'm trying to find whether a property $\mathcal{P}$ is true for all points of the unit square (in 2D). At each step I can query for a point of my choice. An oracle then answers me by either: telling me $\mathcal{P}$ doesn't hold for this point and thus the problem is solved: the property doesn't hold for all points in...
For stack-oriented programming language, how many top-most items of the stack are needed to be accessible in order to be Turing complete? Is it enough to be able to access just the top-most item? Two items? Three? Any item? In the case of Forth, is it necessary to have rot, pick, roll? Why does rot operates with exactl...
I think they are because, SLR and LALR have same number of states and, since there are no conflicts in SLR table this means all the SLR information is needed and correctly used for parsing, so all that has to be in LALR.
Is it possible for a DFA to have less states than its equivalent NFA? Number of transitions does not matter. If possible also give an example.
I am implementing machine learning software and in my case, I am using K-nearest neighbour classifier to get the task done. So far, I am trying to understand how Dijkstra's algorithm that has been used to solve salesman travel problem is different from K-nearest neighbour algorithm?
1M = 2^20, while the max number of memory locations for 16 bits is 2^16. How could there be a memory size of 1M x 16? Or can there? Wondering about this for a question we were given..
I don't know if this question should have better been on math.Stackexchange Let be the operation $Double$ on the words on an $\Sigma$ alphabet which inserts after each character a copy of this character. Thus, $D(ab) = aabb$, $D(abaab) = aabbaaaabb$, etc... We had to prove that these regular expressions are closed by t...
Can't seem to answer these questions, I'm sure the answers are out there somewhere but I don't really know what keywords to use to find them. Any answers or good sites/ documentation would be much appreciated. And please don't say wikipedia, the language used is a bit out of my comprehension at this moment. Is it cor...
Let's say I have to do n jobs, and each job can be done at or after a time T(i) (1<=i<=n). And we have 1 machine and the machine takes a time M to do any job whatsoever. The machine once started can be used again only after it's job is done. What's the optimal way to schedule these jobs on the machines?
I was reading Minsky's and Papert's book on perceptrons and it had the definition of conjunctively local as follow (look at the last images if its still unclear): A predicate $\psi$ is conjunctively local of order k if it can be computed by independently computing a set of functions $\varphi_1(X)$...$\varphi_n(X)$ and ...
Let us take a hypothetical machine i which halts on the ith day of the month if it rains on the ith day of the month. Basically it describes the present. If we put this machine in a Halting Machine it should say whether the machine would halt. i.e. whether it would rain on the ith day of the month. Since the Halting Ma...
I have just started learning Analysis of Algorithms and I came across these set of questions: Find witnesses c and m such that rn+1 = O(rn) for r>1 Show that there are no witnesses for n2 = O(n) From 2, deduce no witnesses for 22n = O(2n) So, I have tackled some as: rn+1 ≤ rn+1 rn+1 ≤ r.rn rn+1 ≤ (r+1).rn Therefore...
Please tell me is their deterministic linear bound automaton same power as non-deterministic linear bound automaton to recognize any language?
You have a Black-Red Tree of height h that has two childs: Left child is a full binary tree of height h-1 Right child is a full binary tree of height h-3 Balance the tree so both childs of root are of the same height (you don't have to keep the other nodes balanced, just the root). From Wikipedia I understood that...
Without sound synthesis, what is a good way of making a program that plays guitar notes from an array of stored sounds? What I have in mind is to make note as a function of vibration speed such as N (V) which returns an int index of the sound to be played and the vibration speed itself as a multivariate function of 3 ...
I am currently studying turing computability and related problems such as the halting problem with a background in formal languages. I know that the class of recursive (decidable) languages is a closure under union, intersection and complement, and that recursively enumerable languages (semi-decidable) are a closure un...
My question is that if P = NP, then we can solve any NP-hard problems (the one which is NP-complete and the one which is not-NP-complete) by saying that since we have a polynomial time algorithm to solve the NP problems and since the reduction works in polynomial time. Therefore, polynomial to polynomial is polynomial,...
I am trying to prove problem 1.59 in Sipser's book: Introduction to the theory of computation , 2nd Edition. Let $M=(Q,\Sigma,\delta,q_0,A)$ be a DFA and let $q'$ be a state of $M$ called its "home". A Synchronizing sequence for $M$ and $q'$ is a string $s\in \Sigma^*$ where $\delta (q,s)=q'$ for every $q\in Q$. (We a...
It is well known that all computable functions can be expressed as terms of the lambda calculus and computed according to its rules. It is also more or less obvious that many classical formal languages (i.e. languages with formalized semantics) can be translated into the lambda calculus (e.g. using a Church encoding). ...
I'm new to linear programming and can't wrap my head around something. Let P be a LP in standard form $$\begin{array}{ll} \text{maximize} & t x\\ \text{subject to} & r x \leq s\\ & x \geq 0\end{array}$$ I figured that the dual program is $$\begin{array}{ll} \text{minimize} & s y\\ \text{subject to} & r y \geq t\\ & y \...
Baker, Gill and Solovay [1] gave an oracle $A$ relative to which $P^A=PSPACE^A$. The oracle is the very simple $PSPACE^A$-Complete language $$A = \{\langle M, x, 1^n \rangle | M^A \text{ accepts } x \text{ using }<n\text{ tape slots} \}.$$ (This inductive definition of $A$ is sound because no machine can query "beyond ...
Question: Is true that $L_1 = \{01^*0\}$ is $m$-complete in the class of decidable languages? $L_1$ is defined as: $$L_1 = \{01^*0\} := \{01^n0: n \in \mathbb{N}\}$$ Definition of a $m$-complete language: A language $L^*$ is $m$-complete in the class of decidable language, if for any decidable language $L$ we ...
The sheet of equivalences given to us in class provides the two equivalences \begin{array}{|c|c|c|} \hline \text{Universal Instantiation} & \forall x ~ P(x) \implies {S_t}^x P & \exists y ~ \forall x ~ P(x) \implies \exists y ~{S_t}^x P \\ \hline \text{Existential Instantiation} & \exists x ~ P \implies {S_t}^x P & \fo...
I am studying the bakery algorithm, and I am unsure of what the variable i represents in it. I understand that Entering represents a bool value to protect Nummber while it is updating, but I'm having a hard time finding clear explanations as to what variable is doing what. Is Number an array of threads? Is i a particul...
The sheet of equivalences given to us in class provides the the equivalences \begin{array}{|c|c|c|} \hline \text{Resolution} & A \vee B, \neg B \vee C \models A \vee C & \neg A \implies B, B \implies C \models \neg A \implies C \\ \hline \end{array} I noticed that the $A$ is negated. Is this necessary for proper Reso...
Suppose I randomly generate $n$ points from the unit square $[0,1]^2$, form a complete graph in which the weight of each edge is just the Euclidean distance between its endpoints, and compute the minimum spanning tree. I noticed empirically that the expected weight scales like $\sqrt{n}$. Using only back of the envelop...
How would a CPU know if a piece of data is in cache or RAM or on disk? This would imply there's some sort of meta addressing scheme on where everything is.
Hello I'm trying to solve this recurrence with the method that says the teacher that when you get to \begin{align*} T\bigg(\frac{n}{2^{k}} \bigg) \end{align*} you do \begin{align*} \frac{n}{2^{k}} &= 1 \qquad (\text{by definition})\\ k &= \log_{2}(n) \end{align*} \begin{align*} T(n) &= 7T(n/2) + n^2 \\ &= 7^2T(n/2^2...
I was reading Minsky's and Papert's book on perceptrons and I was reading theorem 0.6.1 and I was having a hard time understanding it. The theorem was about proving that the property "connected" was not a local property i.e. that you somehow had to see the whole picture to know if something was connected or not. In par...
AB + C is not the answer. The correct answer is AB + BC. HOW?
I'm currently studying formal languages. My lecture states that, while the words of a language are finite, the sentences build with the underlying grammar are not. But I don't get why this should be generally true. I can imagine grammar which leaves me with a finite amount of sentences. I agree that one could create a ...
Let's say I want to describe some new grammar formalism, which doesn't coincide with known grammar sets. Should I always previously describe corresponding equivalent automata and why?
A discrete memoryless source W has words $w_1,w_2,w_3,w_4,w_5,w_6$ that occur with probablilities $0.05,0.05,0.15,0.2,0.25,0.3$ respectivley. Does there exist a compact instantaneous binary encoding for this source with word lengths $2, 2, 4, 4, 5$ and $5$? Shannon's Noiseless coding theroem that says a compact encodin...
I was reading a paper here, and it mentioned "quotient structure" in the following sentence (third page, second paragraph of the paper) In order to obtain a representation of terms truly isomorphic to λ-terms, we need to build a quotient structure, quotient the set of raw terms with respect to alpha-equivalence. T...
This may be sound like a stupid question, because, of course, it can be negative and, as Wikipedia states: A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent non-negative numbers (zero or positive numbers). But is it really? Because it doesn't wo...
I want to understand how the backpropagation algorithm would work on a neural network with multiple outputs. More specifically, I have a network with 21 binary (0/1) outputs and I want to minimize the number of outputs that I get correctly; in other words, I want to minimize the hamming distance between the output vec...
Let $C$ be the binary linear code with the following generator matrix $G= \begin{bmatrix} 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 & 1 \end{bmatrix}$ The support of a codeword is the set of coordinate positions in which the code word has ...
Given a language $L = \left\{ a^{nk+1} | n > 0 \right\}$ and $k$ is an integer constant. How to show that a DFA for this language must have $k+2$ states or more states using minimum state lemma. By minimum state lemma I mean the number of minimum state a DFA has is the number of pairewise distinguishable states. I hav...
I'm trying to find whether $$L = \{\langle M, w \rangle: \exists q.\ \text{on input}\ w\ M\ \text{doesn't pass through a state}\ q\}$$ is decidable or not. I don't know how to proceed here. I mean, I have the feeling that I have to know which state $q$ the machine $M$ 'skipped' in order to go ahead. For instance if $q ...
Consider the following problem, which I have called '$\mathsf{\text{double max $k$-vertex-cover}}$': Given an undirected graph $G=(V,E)$ and integers $k$ and $t$, does there exist a set of vertices $V'\subseteq V$ of size at most $k$ such that the set $\{(u,v)\in E\mid u\in V' \wedge v \in V' \}$ has a size of at leas...
I am currently writing a program where a lot of adding 0 to numbers and multiplying by 1 and 0 occurs and it got me to wondering if the CPU 'shortcuts' (drops), these operations. I'm a CS student and this hasn't been brought up ever. Can a CPU do this? What are the trade-offs in designing a CPU that detects +1, *1 and ...
A and ( A or C ) = A And A or A and C = A How do these identities work? Using the rule A and ( B or C ) = A and B or A and C For the first identity, I get A and A or A and C = A or A and C How is the C eliminated? Mental substitution shows that it will equal A, but can it be algebraically shown. Equation 2, t...
This is third-hand, so please bear with me. A collaborator was at a review meeting where he heard another participant make the claim that given an assignment for a SAT problem that satisfies (some high percentage) of clauses, there are polynomial time algorithms that finish the problem. Is this true? Can someone poin...
For my application problem, I am looking for an easy to implement or source code for approximation algorithm for maximum k-Set Packing problem. Given a universe $U$ and a family $ \mathcal{S} $ of subsets of $ {\mathcal{U}}$. Assume that all subsets in $\mathcal{S}$ have size $k$. A $k$-set packing is a subfamily ${...
In this course lecture; section 5.1, single-source shortest path (SSSP) is formulated as the following linear program (LP): \begin{align} \max &\sum d_u \\ \text{subject to} & \\ d_v &\le d_u + l_{uv} \quad \forall (u,v) \in E \\ d_s &= 0 \end{align} The comment on the objective function is as follows (emphasis added):...
What is an example of a typed lambda term $\lambda x.\phi : A \to B$ and a term $a : A$ such that, when $\beta$-reducing the term $(\lambda x.\phi)(a)$, the argument $a$ must be repeated/recomputed several times?
If $2$ is the Church numeral $\lambda fx. f(f(x))$, then is there a closed term $t$ of System F of type $\forall \alpha ((\alpha \to \alpha) \to (\alpha \to \alpha))$ such that the type-erasure of $t$ is the untyped term $2(2)$?
Suppose that I am given as input the number $p^i$ for some prime $p$ and some positive integer $i$. I wish to find $p$ and $i$. Is there an algorithm to do this that works in time polynomial in the number of digits of $p^i$?
Im trying to work out that a Hadamard transform H (a unitary matrix) is its own inverse by applying it twice to an arbitrary state $|x⟩$: $$H|x⟩ = \frac{1}{\sqrt{2^n}}\sum_{y \in \{0,1\}^n}(-1)^{x \cdot y}|y⟩\,.$$ Then \begin{align*} H\left(\frac{1}{\sqrt{2^n}}\sum_{y \in \{0,1\}^n}(-1)^{x \cdot y}|y⟩\right) &= \frac{1...
We're given $n^2$ different points in $(0,1)$ : $x_1< x_2 < \dots < x_{n^2}$. We are required to choose $n$ points $x_{i_1}<\dots<x_{i_n}$ such that the value of $\max\,\{x_{i_1}, x_{i_2}-x_{i_1}, x_{i_3}-x_{i_2},\dots,x_{i_n} - x_{i_{n-1}}, 1-x_{i_n}\} $ is minimal. It feels a lot like a dynamic programming problem, ...
Let $C$ be the binary linear code with the following generator matrix $G= \begin{bmatrix} 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 & 1 \end{bmatrix}$ I need to decode the received word $r$, $\begin{pmatrix} 1 & 1 & 0 &0 & 0 &1 &1\end{pmat...
Definition: $\text{A fuction}\ f: \Sigma^* \to \Sigma^*\ \text{is a reduction from Language A to language B if}\ w\in A \iff f(w) \in B\ \text{for every}\ w \in \Sigma^*$. My question is which direction should I take in order to reduce a problem to another the other? From what I've been reading I concluded we can pro...
Question is $$\left\{ w | w \text{ contains an even number of } 0\text{s or exactly two }1\text{s} \right\}$$ I need to confirm my answer but i don't from where to ask someone. My answer is 1*(01*0)*+11 but i don't know if it's correct or not
Problem Statement: Want to find out what impact Insurance markets will have if ACA (Obamacare) is repealed. This can be done by creating an ABM (agent based model) and trying out simulations. What I want to do is solve this as a machine learning problem. The Approach I thought of is training a classifier(or an ensemble...
Let $F$ be a finite set of real numbers say $\{w_1,\dots,w_k\}$. Let $G=(V,E)$ be an undirected connected graph and let $w\colon E\to F$ be a weight function. Describe a linear time algorithm that will find a Minimum spanning tree in $G$. Assume that $|V|\gg k$, i.e. the number of vertices is much larger than k. I kno...
Consider a Turing machine $T$ with access to an oracle for a proper, nonempty subset of $A_{TM}$, say $L$. That is, $T$ can query this oracle to check whether some string belongs or doesn't belong to $L$. Is it possible to define such an $L$ so that $T$ does not decide $E_{TM}$ (the language of descriptions of Turing m...
Given a language $L$, I sometimes try to find a subset of $L' \subseteq L$ which I can prove is undecidable. I conclude that if a subset of $L$ is undecidable, then $L$ must be undecidable as well. Is this correct for arbitrary languages $L$ and $L' \subseteq L$? What if someone said: $L'$ could be empty (we don't know...
I am trying to implement an optimization procedure in Python using BFGS and L-BFGS in Python, and I am getting surprisingly different results in the two cases. L-BFGS converges to the proper minimum super fast, whereas BFGS converges very slowly, and that too to a nonsensical minimum. QUESTION: From my readings, it see...
I was trying to rigorously/mathematically analyze the runtime of the following algorithm: while i < n { b_D = randomly_generate_bit_array_length(D) # simply selects each bit randomly with 1/2 prob of choosing 0 or 1. if b_n NOT in HashTable[b_D]: HashTable[b_D] = b_D i++ } First I started by th...
Say a graph contains a directed edge e from vertex a to vertex b. Is there a standard name for vertex a relative to edge e? And similarly for vertex b? Something akin to vectors in high school physics, where the initial point of the vector is called the "tail" and the terminal point of the vector is called the "tip"?...
I am currently learning about Büchi automata and have a combinatorial question about the acceptance condition. Let $A=(Q,\Sigma,\delta,q_0,F)$ be a (nondeterministic finite) Büchi automaton and $w=w_1w_2w_3\ldots$ an infinite word over $\Sigma$. Suppose that for each natural number $n$ there exists a run $q_0 \xrightar...
Explain and compare selection, insertion and bubble sorts. Assume that your application (say a data base application) deals with large records where comparisons are performed by means of integer keys. Assume also that your application requires a stable sorting method, i.e. a method that does not change the relative o...
Assume I have some data in 2D. How to draw the first and second principal component in PCA method? By referring to the image: the plot on the right is confusing, how I can detect the position of first PCA?
First post here and i hope this is the correct forum to ask this. I'm currently on my 5th semester of Computer Engineering. I´m having some hard time deciding on what to specialize or what to do when i go out from university. Some areas or subjects i'm interested are Mathematics, programming, also gpgpu computing and...
For rules please refer to https://www.hackerrank.com/challenges/ultimate-ttt .I have implemented minimax search with alpha-beta pruning. There is a time limit of 15 seconds.Which algorithms would yield better results?
The complexity of $A^{k \cdot log_{x}(n)}$ is exponential? ($k$ and $x$ is constants, $A$ is defined constant base, $n$ is the size of the task). It is in a class of polynomial complexity?
As I understand it's best practice to always use a prime number during a shell sort for its interval. Why is this the case?
I am given two strings, $\overline{a},\overline{b}$ in a finite alphabet, $\Sigma$, and a positive integer $k$. I want to compute the $k$-th order contiguous string kernel, which is defined to be the sum $$\sum_{s\in\Sigma^k}n_s(\overline{a})n_s(\overline{b})$$ where $n_s(x)$ is equal to the number of occurrences of ...
Consider the language: $A'_{TM} = \{\langle M,w\rangle: M \mbox{ is a TM with access to an oracle for } A_{TM} \mbox{ and } M \mbox{ accepts } w\}$ Clearly, we expect that any language is decidable relative to itself, including $A'_{TM}$. So let $F$ be an oracle decider for $A'_{TM}$ that has access to an oracle for $A...
I have been thinking about this problem for a long time. If anyone can help me out here, I'd really appreciate it. A hypergraph $H = (V,E)$ consists of a set $V = \{v_1, v_2, \cdots, v_n\}$ of vertices and a set $E = \{e_1, e_2, \cdots , e_m\}$ of edges, each being a subset of $V$. A subset $M \subseteq E(H)$ is a ma...
I am working on a homework assignment to create a function and it says to use a "pure recursive approach". I am trying to piece together what is actually meant by this. I am aware a recursive function calls it self, usually by reducing until it hits a base case and a pure function is basically a function that does not ...
Will there ever be differential difference in emotions of humans and a robot? Or will they posses different emotions?
I am a computer science sophomore doing a data structures and algorithms course. My professor said that insertion sort requires random access, while merge sort does not. According to him, the insertion step in insertion sort requires random access. But can't it be implemented using sequential access in a linked list, g...
Primitive recursion seems to be related to bounded quantification. It is easier to make sense of bounded quantification with respect to natural numbers than to make sense of bounded quantification with respect to finite strings. A relatively clean way out of this dilemma could be a two sorted language with both natura...
A $k$-Hamiltonian Path is an Hamiltonian Path where each node (but the last $k$ nodes on the path) is connected to his $k$ successors, and the last $k$ nodes are connected to all of their successors. This is an Hamiltonian Path: This is a 3-Hamiltonian Path: How would you prove that searching for a k-Hamiltonian Path...
Let $\{m_1,...,m_t\}$ be a set of relatively coprime integers $M=\prod_{i=1}^tm_i$ the range of this system $X$ an integer such that $X \in [0,M-1]$ This forms a Residue Number System and every integer $X$ can be uniquely represented in RNS format as $(x_1,\dots,x_t)$, where $x_i = X\bmod m_i, \forall i\in[0,t]$. On...
In my thesis I am working on a problem connected with sequence alignment, in particular, I deal with the Dynamic Time Warping (DTW) algorithm (see this for more), which is used to evaluate the distance between two time series. It is very similar to the Needleman–Wunsch algorithm for aligning protein sequences, the diff...
Let the $\textbf{bold characters}$ represent the vectors/matrices.All the vectors/matrices/scalars only refer to real numbers. In a continuous LTI system. $\frac{d\mathbf{T}(t)}{dt}=\mathbf{A}\mathbf{T}(t)+\mathbf{B}$ in which $\mathbf{T}=[T_i]_{N\times 1}$, $\mathbf{B}=[B_i]_{N\times 1}$ and $\mathbf{A}=[A_{i,j}]_{N\...
A hypergraph $H = (V,E)$ consists of a set $V = \{v_1, v_2, \cdots, v_n\}$ of vertices and a set $E = \{e_1, e_2, \cdots , e_m\}$ of edges, each being a subset of $V$. If each $|V| = 2$, H is a general graph. The degree $d(v)$ of a vertex v is the number of edges that contain it. H is k-regular if every vertex has th...
In Uniqueness Typing Simplified, when applying functions, how many times the function could be used is simply ignored , however, in I Got Plenty o’ Nuttin’ , the application inherit the sparsity from the one of the function, why?
Overfitting happens for some methods in certain conditions, but there is generic rule for all linear classifiers to overfitting? I know that regularization is a remedy for overfitting, but I am asking the behavior of methods before regularization.
Let $C*$ be the length 8 binary code obtained by adding a parity check symbol to each word in $C$. (so a word $c_1, c_2, c_3, c_4, c_5, c_6, c_7$ is extended to the word $c_1, c_2, c_3, c_4, c_5, c_6, c_7, c_8$ for which $\sum_{i=0}^8 c_i =0$. Show that $C*$ is self dual (I.e show that $C*=C*^{\bot}$. Where $C*^{\bot...
For example, we have $T(N) = T(N/2) + T(N/5) + O(N)$. So: $2T(N/2) + O(N) \leq T(N) \leq 2T(N/5) + O(N)$ $O(N) \leq T(N) \leq O(N)$. Thus, $T(N) = O(N)$. Is it correct?
I've been given a question that states I will be given a set of itineraries, which are basically tuples in the form (cost, time) for airplane flights. An itinerary dominates another itinerary if its cost and time are less than the second itinerary's. If there exists an itinerary that dominates the current itinerary, th...
If i have a recursive sequence $a_1=4$ and $a_{n}=a_{n-1}^{2}-2$ in $\mathbb{Z}_{M_{n}}$ where $M_n=2^n-1$ how i can calculate the complexity time of this sequence ? if we put it in the loop for n-1 iteration . pseudocode : S=4; i=2; While($i<n$, $S=S^2-2 (\mod M_n)$ If( S==0 then Break[]); ); im not sure that overal...
I've recently come across the following problem. We're given up to $10^4$ distinct positive integers $a_1,\dots , a_n$, each of them below $10^6$. Let's call a subset $S \subset \{a_1,\dots,a_n\}$ a very divisible subset if any number in this subset divides the product of other numbers in this subset. The task is to fi...
Wikipedia says: The backward propagation of errors or backpropagation, is a common method of training artificial neural networks and used in conjunction with an optimization method such as gradient descent. Ultimately, backward propagation is used to get the partial derivates of the weights and biases of the network,...
If computation on a PDA reaches a final state with an empty stack, will it immediately accept, regardless of whether or not the input tape has ended. For example if I have a PDA to recognize the language of strings where $a^nb^n$, if it was fed the string "aaabbba", will it stop after seeing the last "b" if the stack w...
If you want to fit a polynomial to a set of data points, there are many options available including least squares fitting, gradient descent, and lagrange interpolation. However, thinking in more programmer / computer science terms, let's say that I had something more like a pseudo random number generator where it had s...
I know machine learning can make some predictions. With enough input data and example output data a machine can accept an image as input and determine that the image is likely a "flower" (output). Could the same method apply to an interpretive programming language? Let's say Python for example. The inputs on every "lin...
Consider $\mbox{Halt}_\mbox{TM} = \{\langle M, w \rangle: M \mbox{ is a TM and } M \mbox{ halts on input } w\}$ and $\mbox{A}_\mbox{TM} = \{\langle M, w \rangle: M \mbox{ is a TM and } M \mbox{ accepts on input } w\}$. I'd like to prove that any oracle TM $T$ that can query the $\mbox{A}_\mbox{TM}$-oracle cannot decide...
Hi im looking to calculate FCFS and wondering if anyone can help. I have the dataset of the process, serviceTIme and accessTime, could anyone explain how to calculate the start and end times. Sorry for a dumb question guys! just that i cannot find a clear example. Thanks.
Consider a language $L$ that is undecidable relative to $L_1$ and is also undecidable relative to $L_2$. Suppose, however, that there is a "multi"-oracle Turing machine $M$ that can query both the $L_1$ oracle as well as the $L_2$ oracle such that $M$ decides $L$. In other words, $L$ requires both the $L_1$ and $L_2$ o...
I know the space requirements for a van Emde Boas tree is $Θ(u)$, and that the recurrence relation for this looks like: $$S(u) = (\sqrt u + 1) S(\sqrt u) + Θ(\sqrt u)$$ I'm curious and can't seem to find it anywhere but, how would one go about proving this recurrence relation is true? I.e., how do you prove $S(u) = Θ(u...