instruction
stringlengths
0
29.8k
⌀
See this answer first: https://cs.stackexchange.com/questions/86422/proving-worst-case-running-time-is-in-omegan2 Understanding the linked answer for insertion sort leads to the following statement. Prove that the statement is either incorrect or correct. Statement: If you find $(y)$ for worst case running time ...
See this answer first: https://cs.stackexchange.com/questions/86422/proving-worst-case-running-time-is-in-omegan2 Understanding the linked answer for insertion sort leads to the following statement. Prove that the statement is either incorrect or correct. Statement: If you find $(y)$ for worst case running time ...
See this answer first: https://cs.stackexchange.com/questions/86422/proving-worst-case-running-time-is-in-omegan2 Understanding the linked answer for insertion sort leads to the following statement. Prove that the statement is either incorrect or correct. Statement: If you find $(y)$ for worst case running time ...
null
$L_1\in P$ , $L_2\in NP$, is it possible that $L_1\cup L_2 \in P$
There is a very simple $O(n \log k)$ algorithm described in *Weighted random sampling with a reservoir* by Pavlos S. Efraimidis and Paul G. Spirakis, which can be summarized as: > Associate value $r_i^{1/w_i}$ to $a_i$, where $r_i$ is an independent random uniform value on $[0, 1]$. Sort the elements by their associ...
Let $G_1, \dots, G_m$ be an enumeration of all strongly connected directed graphs on at most $n$ vertices in which every vertex has out-degree 2 (the corresponding edges labelled $a,b$). The algorithm proceeds in $n^2m$ rounds. In round $(i-1) n^2 + (j-1) n + k$ (where $1 \leq i \leq m$ and $1 \leq j,k \leq n$), the...
null
null
Is there support in the foundation of mathematics for dimensioned quantities? Those immersed in real-world software problems, continually confront the absence of dimensioned quantities in programming langauges. This absence appears in the foundation of mathematics! The absence of support afflicts even Wolfram's ...
about slicing I would suggest to check following link: [implementation of list slicing][1] and also following answer on [big O of list slicing ][2]. also try to find list_concat method here [source code of cpython][3]. I assume that list-slicing and list_concat that are internal staff of python would be fast because o...
null
So I recently learned about dual-port and multi-port RAM but I tried doing some research on modern RAM architectures and if they use it but I couldn't find anything on it.
Are modern ram architectures (DDR4 or SDRAM) Multi-port or Dual-port?
|computer-architecture|cpu|memory-hardware|
Given $N$ a whole number and a set $S$ of divisors of N, where no repetition is allowed. Decide if there is a combination of divisors with a product equal to $N$. - Remove non-divisors from $S$. - Remove duplicates from S by using set() in python. - Treat $S$ as list of non-duplicates and sort from smallest to ...
I recently read about the “computer” built out of matchboxes designed by Donald Michie that could teach itself how to play tic tax toe. Here is the Wikipedia article about it: https://en.m.wikipedia.org/wiki/Matchbox_Educable_Noughts_and_Crosses_Engine I thought it looked interesting, so I decided to make a digit...
How many games will a “MENACE” tic tax toe computer take to train
|machine-learning|
I recently read about the “computer” built out of matchboxes designed by Donald Michie that could teach itself how to play tic tac toe. Here is the Wikipedia article about it: https://en.m.wikipedia.org/wiki/Matchbox_Educable_Noughts_and_Crosses_Engine I thought it looked interesting, so I decided to make a digit...
null
In Ben-David & et al.'s *Understanding Machine Learning*, the authors wrote: > Let $\mathcal{H}_n$ be the class of axis aligned rectangles in $\mathbb{R}^n$ , namely, > $$ \mathcal{H}_n = \{h(a_1,\dots,a_n, b_1,\dots, b_n) :\forall i,a_i \le b_i\} $$ > where > $$ h(a_1,\dots,a_n, b_1,\dots, b_n)(x,y)= \begin{...
Why we need at most $2n$ examples to determine an axis aligned rectangle
|machine-learning|learning-theory|
null
null
In the C language, there's the 2 similar-in-form but distict-in-meaning constructs: `(type)value` which is a casting, and `(value)`, which is a grouping. How do a $LR(1)$ parser deal with this? I can think of a compiler that breaks syntax and semantic boundary able to disambiguate it by providing information abou...
How do C compilers distinguish casting from grouping?
|formal-grammars|ambiguity|
The primitive recursive functions can be defined in terms of the following five axioms: 1. _Constant function:_ $C_n^k$ is a $k$-ary function that always returns $n$ 2. _Successor function:_ $S$ is a 1-ary function $S(x) \mapsto x+1$ 3. _Projection function:_ $P^k_i$ is a $k$-ary function that returns its $i$th ar...
They can easily be distinguished by a compiler: In the first case, the thing in parentheses is a type, in the second case it isn’t. Now if you insist on parsing based on a grammar only, that may be a problem. But there is no reason why a compiler writer would limit themselves in this way. So how does a compiler do ...
null
I have read and understood various proofs, but have not been able to understand precisely why we require $S=\Omega(\log n)$.
In the proof that $DSPACE(S)\subseteq DTIME(2^O(S))$, why precisely do we require that $S=\Omega(\log n)$
|complexity-theory|time-complexity|space-complexity|
In the proof that $DSPACE(S)\subseteq DTIME(2^{O(S)})$, why precisely do we require that $S=\Omega(\log n)$
I recently read about the “computer” built out of matchboxes designed by Donald Michie that could teach itself how to play tic tac toe. Here is the Wikipedia article about it: https://en.m.wikipedia.org/wiki/Matchbox_Educable_Noughts_and_Crosses_Engine I thought it looked interesting, so I decided to make a digit...
Let $G=(V,E)$ be an unweighted directed acyclic graph with a set $V$ of vertices and a set $E$ of edges. The all-pairs shortest path problem can be solved efficiently using the Floyd-Warshall algorithm. The new objective is to find a subset of maximum cardinality $S \subseteq V$ such that for every pair of vertices $v$...
First of all, we believe that $DSPACE(X) \subseteq DTIME(X)$ is false. As a consequence, $X$ must be chosen so that $X \neq 2^{O(X)}$. Choosing $X = \Omega(\lg n)$ guarantees this. Moreover, it is also consistent with the definition of the complexity classes $L$ and $P$. The former is the class of the languages (or pro...
First of all, we believe that $DSPACE(X) \subseteq DTIME(X)$ is false. As a consequence, $X$ must be chosen so that $X \neq 2^{O(X)}$. Additionally, we want $ X < 2^{O(X)}$ to allow the Turing machine requiring $X$ space to halt on all of its inputs. Choosing $X = \Omega(\lg n)$ guarantees this. Moreover, it is also c...
We believe that $DSPACE(X) \subseteq DTIME(X)$ is false. As a consequence, $X$ must be chosen so that $X \neq 2^{O(X)}$. Additionally, we want $ X < 2^{O(X)}$ to allow the Turing machine requiring $X$ space to halt on all of its inputs. Choosing $X = \Omega(\lg n)$ guarantees this. Moreover, it is also consistent with...
null
From the internet: A finite-state machine is formally defined as a 5-tuple (Q, I, Z, ∂, W) such that: Q = finite set of states I = finite set of input symbols Z = finite set of output symbols ∂ = mapping of I x Q into Q called the state transition function, i.e. I x Q → Q W = mapp...
Are there infinite state machines, and how do their computational power relate to turing machines?
|computability|automata|
null
null
Turing machines aren't defined this way is simply because auomata with an infinite number of states aren't [effective](https://en.wikipedia.org/wiki/Effective_method). The definition of effective procedures tries to capture our intuitive understanding of algorithms, and Turing machines are meant to formalize effective...
null
Dimensions play an important role in all natural sciences (physics, chemistry, engineering, etc.), but not in mathematics. The reason is that the property of "having a dimension" is not really a property of a quantity. It is a property of a _physical law_ that involves that quantity. The property is formulated as a con...
We believe that $DSPACE(X) \subseteq DTIME(X)$ is false. As a consequence, $X$ must be chosen so that $X \neq 2^{O(X)}$. Additionally, considering $DSPACE(X) \subseteq DTIME(Y)$ we want $ Y = 2^{O(X)}$ to allow the Turing machine requiring $X$ space to halt on all of its inputs (if $Y < 2^{O(X)}$ then the Turing machin...
We believe that $DSPACE(X) \subseteq DTIME(X)$ is false. As a consequence, $X$ must be chosen so that $X \neq 2^{O(X)}$. Additionally, considering $DSPACE(X) \subseteq DTIME(Y)$ we want $ Y = 2^{O(X)}$ to allow the Turing machine requiring $X$ space to halt on all of its inputs: this is because the number of configurat...
We believe that $DSPACE(X) \subseteq DTIME(X)$ is false. As a consequence, $X$ must be chosen so that $X \neq 2^{O(X)}$. Additionally, considering $DSPACE(X) \subseteq DTIME(Y)$ we want $ Y = 2^{O(X)}$ to allow the Turing machine requiring $X$ space to halt on all of its inputs: this is because the number of configurat...
null
I am writing a program in TI Code Composer Studio assembly-only empty project using the MSP-EXP430FR6989. The assembly-only empty project uses MSP430 Assembler Code Template for use with TI Code Composer Studio. Here is the project requirements: Use the MSP430 seven-segment daughter board to display and multiply two...
Daughter-board multiplier
|computer-architecture|
Is there support in the foundation of mathematics for dimensioned quantities? Those immersed in real-world software problems, continually confront the absence of dimensioned quantities in programming languages. Occasionally this results in [a billion dollar disaster, such as the Mars Climate Orbiter][1]. This abse...
null
Of course there is mathematical support for dimensioned quantities. It's kind of trivial from mathematical point of view. Off the top of my head, here's a suggestion. Given some basic units of measurement, represented by a set of symbols $U$, say $\lbrace \mathtt{g}, \mathtt{m}, \mathtt{s}\rbrace$ consider the free...
Consider the scenario where we are given a collection of n integers. These integers are unordered and may include duplicates. Additionally, we have a set of m ranges, each defined by two integers representing the lower and upper boundaries of the interval. Similar to the integers, these intervals are unordered and dupl...
Optimizing Pairings Between Integers and Intervals for Maximal Matching
|algorithms|
Are there any well established algorithms for finding an object's location in 3D space when we know its approximate distance to at least 3 known locations? Trilateration seems to be a well understood and popular topic and yet the only algorithms I've found come from fringe academic papers. I'm looking for a widely a...
Well established Trilateration algorithms
|algorithms|
null
It seems that your primary issue is that the way the operators are rendered in the setting of higher order type theory and higher order logic seems a bit forced and conflationary. I tend to agree. An extension of Curry-Howard that stays entirely within first order logic will use [natural bijections](https://math.sta...
Turing machines aren't defined this way is simply because automata with an infinite number of states aren't [effective](https://en.wikipedia.org/wiki/Effective_method). The definition of effective procedures tries to capture our intuitive understanding of algorithms, and Turing machines are meant to formalize effectiv...
Turing machines aren't defined this way simply because automata with an infinite number of states aren't [effective](https://en.wikipedia.org/wiki/Effective_method). The definition of effective procedures tries to capture our intuitive understanding of algorithms, and Turing machines are meant to formalize effective c...
null
null
null
|algorithms|matching|bipartite-matching|intervals|
This is a case of bipartite matching between the two parties: the set of integers (let's call it $Z$) and the set of intervals (let's call it $I$). From [Kőnig's theorem](https://en.wikipedia.org/wiki/K%C5%91nig%27s_theorem_(graph_theory)), we know that the maximum possible matching size can be at most $\min(|Z|, |I|)$...
Consider the case of maximal bipartite matching between the two parties: the set of integers (let's call it $Z$) and the set of intervals (let's call it $I$). From [Kőnig's theorem](https://en.wikipedia.org/wiki/K%C5%91nig%27s_theorem_(graph_theory)), we know that the maximum possible matching size can be at most $\min...
I have this E-R diagram [![][1]][1] [1]: https://i.stack.imgur.com/tNHJi.png Now im asked to add a entity named as "kiosk".At a kiosk up to 2 items of expedition of different category can be expedited.How do I add this in the E-R diagram? The category is a attribute of a item of expedition (top left...
E-R diagram exercise referencing to attribute of another entity
|relational-algebra|
It's not possible for an LR(1) parser to solve this problem without using the [Lexer Hack](https://en.wikipedia.org/wiki/Lexer_hack): information from the symbol table, which is able to differentiate type names from variable names, is reported to the parser using two different token kinds for "identifier". The impossi...
null
null
Firstly, just convert the $\delta_x$ and $\delta_y$ operator into Toeplitz matrix $D_x$ and $D_x$, then the objective is a linear system. $$ ||S-I||_2 + \beta||D_x S - H||_2 + \beta||D_y S - V||_2 $$ You can see the solution $$ S-I+\beta D_x^T (D_x S-H) + \beta D_y^T (D_y S-V) $$ yields $$ (1 + \beta D_x^T D_...
Firstly, just convert the $\delta_x$ and $\delta_y$ operator into Toeplitz matrix $D_x$ and $D_x$, then the objective is a linear system. $$ ||S-I||_2 + \beta||D_x S - H||_2 + \beta||D_y S - V||_2 $$ You can see the solution $$ S-I+\beta D_x^T (D_x S-H) + \beta D_y^T (D_y S-V) = 0 $$ yields $$ (1 + \beta D_x^...
null
In "Computational Complexity: A Modern Approach", it states that to prove that $NSPACE(s(n))\subseteq DTIME(2^{O(s(n)})$, we can do the following: > By enumerating over all possible configurations, we can construct the graph $G_{M,x}$ in $2^{O(s(n)}$ time and check whether $C_{start}$ is connected to $C_{accept}$ in...
Why exactly does constructing a configuration graph of an $s(n)$ soace bounded NDTM require that $s$ is space-constructible?
|complexity-theory|time-complexity|space-complexity|
I need to understand the motivations behind distributed computing, namely the fact to perform a computation by making physically separated computer, connected by communication links, work together. I am in particular interested in a review explaining their interest in the context of being more resilient to errors (I...
A pedagogic review on the advantage/drewbacks of distributed computing
|reference-request|distributed-systems|
Why exactly does constructing a configuration graph of an $s(n)$ space bounded NDTM require that $s$ is space-constructible?
Let M be a non-deterministic Turing machine (NDTM) that accepts a language L if and only if: > * for each $ x\in L $ M doesn't accept x for at most m branch(path) calculations. > * for each $ x\notin L $ M doesn't reject x for at most m branch calculations. let M be a Turing machine non deterministic, with one o...
How to Prove or Disprove Language Acceptance with Limited Error by a Non-Deterministic Turing Machine?
|formal-languages|turing-machines|
DDR4 is single-port. DDR5 is also single-port, _but_ it's dual-channel. It can handle two commands at the same time, like dual-port memory. But those commands are expected to arrive over the same physical channel. This is part electrical engineering (signal integrity at high speeds), part CPU architecture (multi-cor...
You do indeed have a premise problem. We are not FSMs *or* TMs. Don't forget that all of these computational theory devices are simple mathematical abstractions composed of a series of axioms and limited input. The computational theory systems (Godel's, Turing's, and Church's) are merely designed to allow us to mak...
I'll build on Pål's answer to be a bit more explicit about how we can code PR functions using those operations. First of all, note that we can code any finite sequence of (positive) numbers into a single number such that the $i$'th element of the sequence can be extracted; for instance, this should be doable by mapping...
Laslie Lamport is very influential in the field of distributed computation, here is his quote: "A distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable'' is a famous Lamport quip. I would suggest check article about [him][1]. he's trying to for...
null