instruction stringlengths 35 29.1k |
|---|
I have been researching Ståmarck's method 1. In the paper cited here, some rules are given. Rules are made of triplets (x, y, z) such that:
y $\to$ z $\equiv$ x
where x, y and z are booleans which values are either 0 (false) or 1 (true). And rules then infer a consequence (bottom part of the rule).
For example:
$$ \fra... |
I am looking for a way of efficiently partitionning a set of consecutive integers in to a set where the number $K$ of parts is given.
For instance, for the set {1, 2, 3, 4}, I would like the best way of generating the list of $K=2$ parts.
The result should be the list of partitions, for instance :
{{1},{2, 3, 4}}
{{1, ... |
We have been given task to write a 8-bit binary to bcd converter Verilog code, using structural code NOT behavioural, is it possible to guide us how can we create 8-bit binary to bcd converter using two 4-bit converter instances ?
|
This is a query regarding the definition of Circuit Family and Language (in the same Context). The textbook definitions of each are:
Language: A function whose inputs and outputs are a finite bit of boolean strings (i.e. members of $\{0,1\}^*$) is a Boolean Function. A Boolean Function f whose output is a single bit is... |
This is possibly a very trivial question for this site.
If I have a 64-bit laptop that means 2^64 combinations in total are possible.
But I can even get $2^{(x>>>64)}$ on my laptop.
Now, it is got to do something with the integer representation but I do not have enough background to understand it.
If let's say I had a ... |
I read:
NVRAM is the updated Mac terminology for PRAM and is short for
Non-Volatile RAM.
Plus, I know that there are 2 types of main memory RAM and ROM while the first is Volatile the second isn't.
So, my question is, why it was called NVRAM/PRAM and not NVROM/PROM?
|
My understanding of Recursively Enumerable Functions is that they're recursive functions, but for some values of the arguments you put into the function they will stop and give an answer, and for others, they will go on forever and they will never ever stop.
What are some easy-to-understand examples of Recursively Enum... |
The easy way is by looking at the $\{0,1\}$-table and construct the corresponding DNF formula from that, but this will take $2^n$ time. I want to do it much more efficiently.
My idea is based upon the following idea: lets take $2$ clausers $C_1 = ( l_{1,1} \vee l_{1,2} \vee ... \vee l_{1,k})$ and $C_2 = ( l_{2,1} \vee... |
====TLDR=============================================================
Curious about the behaviour of logical and bitwise logical operations on integers, i.e with
and := logical and
& := bitwise and
not := logical not
~ := bitwise not
Can anyone explain why (2 and not 5) = False, (2 and 5) = 5,
(2 & 5) = 0, (2 & ~5) = 2... |
I have the following function:
$f : N \to N $ and $f(n)= \max_{i \leq w(n)} g_{i}(n)$
with $g_1, g_2,...g_{w(n)}$ being an enumeration of all computable functions $g_i$, and $w : N \to N$ being any non-decreasing function.
Please correct me if I am wrong:
I don't think this is computable as the enumeration of all tota... |
The 3SUM problem is defined as follows. Given an array A[1...n] of numbers, determine whether there exist $i,j,k\in \{1,\cdots, n\}$ so that $A[i] + A[j]+A[k] = 0$.
The 3ARR-ARITH problem is defined as follows. Given three arrays $A[1..n], B[1..n], C[1...n]$ of numbers, determine whether there exist $i,j,k \in \{1,\... |
Given a set that is infinite but still countable, does a TM exist that goes over every element in the set and finds the maximum?
Is this a computable function?
|
I would like to create a tool to split a group of persons into multiple teams "randomly".
Here is a mockup that shows the UI: https://ibb.co/jDHFkdH
Inputs
To generate the teams, the tool takes as input:
dataset of persons (firstname, lastname, any other fields as gender, level, year,...)
number of team to generate
co... |
I'm wondering if a mathematical set definition has a computational complexity.
For example, assume I have some kind of problem where the solution is given by the positive integers smaller than a given integer $n$:
$M = \{ x | x < n, x \in \mathbb{N} \}$
Could I say this problem can be solved in $\mathcal{O}(n)$ because... |
When reading about ADT's and data structures it is common that the ADT Stack is implemented in at least two ways. Either based on an Array or Linked List. From these examples I tend to think that the way in which the data is organised determines the efficiency of the behaviors that work on that data. So if someone was ... |
As I was going through my online lectures, it is stated that python is interpreted with Cpython, a software written in C. Similarly, they have Jython (written in Java) and PyPy (written in Python). My question is is these interpreters break down the language into low level code like Assembly and machine code, then who ... |
So, I've just begun dabbling in complexity theory and I'm somewhat confused as to the relationship between NP-hardness and function computation. As far as I've understood, NP-hardness is defined for decision and search problem but I've also seen mention of functions whose values are considered NP-hard to compute.
My qu... |
I've faced this question and I hope that someone can help with it.
Question: We're given an undirected graph $G=(V,E,w)$ where $w\colon E\rightarrow \mathbb{Q}$ and vertex $v$. We want to find if there's an MST of $G$ such that $\deg(v)=2$, in other words there's 2 edges connected to $v$ in the MST.
Complexity requirem... |
The double bridge move is a specific type of swap between 4 edges of a graph, also called 4-opt. It consists of removing 2 pairs of edges. Let`s call them (I, I+1), (J, J+1) and (P, P+1), (Q, Q+1). The edges are removed and reconnected in this way (I, J+1), (J, I+1), (P, Q+1) and (Q, P+1), like in the first image belo... |
I've been reading through Garey & Johnson's "Computers and intractability", and a problem SP4 caught my attention. It is stated as following:
Given a collection $C$ of subsets of a finite set $S$, state if there's a partition into two subsets $S_1$ and $S_2$ such that no subset in $C$ is entirely contained in either $S... |
Let $k>1$ be an integer, let $n = 2^k$. Let $s: \{0, \ldots, n-1\} \to \{0,1\}$ be any binary sequence of length $n = 2^k$. There are $n - k$ coherent subsequences of $s$ having length $k$, and the total number of binary sequence of length $k$ is $n=2^k$, so there are some binary sequences of length $k$ that are not a ... |
Okay so , I know how bellman -ford can detect a negative circle.
My question is : how to actually find the edges participating in this circle. I searched and found some stuff that seem to work in the direction I was thinking of but non - fully adressed my concerns.
(https://stackoverflow.com/questions/36482398/how-to-... |
Let's suppose we have a weighted and connected graph. We can easily find the minimum spanning tree for this graph. But let's say we want to "force" a certain edge $e$ to be in the MST. For doing so, we are allowed to remove some edges from the graph. But I don't want to remove too many edges. Is there an efficient algo... |
Problem:
We have $p$ different families with $1 \leq i \leq p$ members for the $i$-th family. We also have $q$ tables where table $t_j$ has a capacity of $1 \leq j \leq q$. We want no two members of a family sitting on the same table.
I need to reduce this to a maximum flow problem and came up with the following idea: ... |
In the classic bin-packing problem, we have to pack some positive integers into bins, such that the sum in each bin is at most some constant $B$, and subjet to this, the number of bins is minimum.
Suppose now that we relax the capacity constraint: we only require that the sum in each pair of bins is at most $2 B$.
For ... |
I am trying to understand Earley parsing algorithm using an example. The grammar I use produces all the palindromes over $\Sigma=\{a,b,c\}$:
\begin{align*}
Z & \to S\\
S & \to a\,|\,b\,|\,c\,|\,aa\,|\,bb\,|\,cc\,|\,aSa\,|\,bSb\,|\,cSc
\end{align*}
For instance, the string abcba is derived as:
$$ Z\to S\to aSa\to abSba\... |
Suppose that $f$ and $g$ are functions and $f \circ g$ is polynomial computable.
a) is it true that $f$ is also polynomial computable
b) is it true that $g$ is also polynomial computable
c) if we replace "polynomial" by "logarithmic" would the previous questions be true?
|
These would be problems solvable in Polynomial time with and only with pseudo-polynomial or Exponential Space. Do such problems exist? if so which complexity class are they? If not can you prove that every problem solvable in polynomial time is also solvable in polynomial space?
|
I was asked the following question:
Given a number num - write a function (in python) that counts the number of ones in its binary representation.
This is the answer i provided
def count_bits(num):
res = 0
while num > 0:
res += num & 1
num = num >> 1
return res
When asked about the complexi... |
This would be a computational model that would have unbounded space. But with a jump command that can access and do operations on any finite number of cells at once. Actual calculations would take time, but space could be accessed instantly. If it is not can it at-least solve some problems faster then a Turing machin... |
I read somewhere that you can compute range queries in O(1) with O(N log N) preprocessing for any associative operation (but not necessarily invertible or idempotent). How do you do this?
I know this is possible for range min and range sum. But both of these are special because min is idempotent and sum is invertible.
|
I would define a software program as at least one line of code stored in at least one computer system's memory cell.
Can a software program be stored in just one memory cell or rather (due to binary computation) must it always be stored in two or more memory cells?
|
Consider the following setting: There are tasks $T = \{T_i\}_{i=1}^n$ with priorities $p_i$, and locations $x_i \in \mathbb{R}^2$. Given a location $y \in \mathbb{R}^2$, I would like to find and pop the task with the highest $p_i$ in an $L_\infty$ ball of radius $r$ centered at $y$. What are some data structures that m... |
The question was to convert this recursive code with intermediate variables to a functional program code without any intermediate variables.
product(p,q){
r=0
if(q==1)
return r
else{
if(q%2!=0){
r=r+p
q--
product(p,q)
}
else{
r=r+2p
... |
Given the following simple grammar for a language that contains all strings with matched parentheses:
\begin{align}
&s \to ss \\
&s \to (s) \\
&s \to ()
\end{align}
Examples: $(), ()(), (()), \ldots$
Is it possible and how to disambiguate this grammar?
|
A recursive algorithm has the following computation tree. The label on the node indicates the number of outgoing edges. This algorithm takes an input of length $n$ and at each processing, it results in $n - 1$ recursive calls. For each these calls/nodes, the size of the input decreases by $1$ from left to right. This p... |
I am currently studying the paper "Abstract Interpretation Frameworks" by Cousot and Cousot from 1992 (https://doi.org/10.1093/logcom/2.4.511) to gain an understanding of the theory behind abstract interpretation.
One concept in abstract interpretation is the "soundness relation" (local page 6 in above paper). As I und... |
Consider an NP-hard graph problem, like the maximum independent set problem.
Let us say I restrict my inputs to only be graphs that have $n$ vertices and at least $n^{c}$ edges, for some $c > 1$. In other words, the graphs are very connected.
Is the maximum independent set problem still hard for these graphs?
|
I've faced a problem and I don't know what approach I must follow, dynamic programming or greedy method, so here is the question.
Question: Given a directed tree $T=(V,\ E)$. We're required to find a set of vertices $A\subseteq V$ as big as we can such that for every two vertices $v,u\in A$ there isn't a path of length... |
Suppose we want to construct a queue with the following properties:
The priority of each member of the queue must be known. For example, for the head node, their priority is 1, for the next node, their priority is 2, etc. Then given a node, we must be able to determine its priority efficiently.
It must support deletio... |
Good Evening, I am trying to solve an exercise related to my algorithm designing course. I have understood the question and what it asks. I am required to formulate an ILP and then relax it to according LP.
So I have n goods which I have to ship using three cargo companies. the Paths P i,j is composed of segments of ro... |
Having two equivalence relations, both as a union find data structure with the same number of elements, what is the most efficient way to find the equivalence relation that is the intersection of both relations?
For example, lets have $R_1=\{\{1,2,3\},\{4\}\}$ and $R_2=\{\{1\},\{2,3,4\}\}$. Then the intersection would ... |
Here is a greedy algorithm for maximum bipartite matching:
Iteratively select an edge that is not incident to previously selected edges.
This algorithm returns a 2-approximation, and runs in linear time.
My question is, how can I find a graph for which the greedy algorithm returns a matching which is half as big as t... |
I am doing some exercises on proving NP Complete problems and the first problem was directed bipartite graphs with a Hamiltonian cycle and the second one was undirected bipartite graphs with a Hamiltonian cycle.
For the first problem I managed to find a reduction from $DHC$ where for a given graph $G$, we duplicate eac... |
The Bowyer-Watson Algorithm for creating Delaunay Triangulations works iteratively. Let's say that we have a Delaunay triangulation of $n-1$ points. Now we add the $n$-th point. In order to update the edges, we first need to find the nearest neighbour to that new point.
They propose to start at the vertex nearest to th... |
In this question post, one of the answers is:
You can even store a software program in 0 memory cells!
All you need to do is to define a programming language in which the
empty program has a defined meaning. For example, you can define a
programming language that is just like Python, except the empty
program prints t... |
I have an algorithm that takes a 3d triangle PMN(which is constructed from running a function that converts per-vertex UV coordinates to a PMN triangle) and P' which is a randomly chosen 3D point that is outside the plane of PMN and constructs two new 3D points (M', N') where the new points correspond to the same(with ... |
Let the Grammar be G = ({S}, Σ, P, S), where Σ = {⟨,⟩,[,]} and
P: S → ⟨S⟩, [S], SS, ε
[⟨ → ⟨[
Can I still use the CYK-Algorithm and if yes then how would I do it for a word like ⟨[]⟩ ?
|
If string concatenation $ab$ is like left- and right-multiplication, is there any infix (latex) operator notation I can use for checking for contiguous substrings, like $bc \subseteq abcd$? $\subseteq$ doesn't seem right because it's usually about unordered sets.
|
Conflict Clusters – Another P=NP Proof
Exactly 1 in 3 SAT ($X3SAT$) is a variation of the Boolean Satisfiability problem. Given an instance of clauses where each clause has three literals, is there a set of literals such that each clause contains exactly one literal from the set. $X3SAT$ is NP-Complete even when the in... |
I know this is a general question, so you can address this by giving some examples that are specific to your field.
I want to start learning algorithm design and consequently prove its convergence. Most of the algorithms I am interested in will be for use in machine learning and its applications. Where do I begin? I am... |
I was wondering how small we could make the instruction set of a typical machine that supports a single datatype: arbitrary integers. If you need a heap, you declare an integer variable $h$ where you can individually (hopefully) address bits.
So was wondering, in addition to $+, -, \cdot$ (no $\%$) what else is needed... |
I have a language that would require an infinite pumping length, I know the language is not context-free, but is this sufficient prove ?
|
The given proof for proving that no DPDA can be constructed to accept palindromes is unclear. There exists another similar question but it only explains the proof partially.
I understood how it aims to find two strings r and s (r!=s) for which rz,and sz with a common suffix z will be processed in the exact same way by ... |
Problem:- I have moving points in a 2d space with a fixed obstacle(A polygon) and a fixed destination. I want to find at what time Source(which is moving) can get a path to destination and what is that path?
totalV = all points including source, moving points ,fixed destination point, obstacle points.
ObsE= {Edges of ... |
I know that the height of a $d$-ary heap on $n$ nodes is $\lceil (\log_d (n(d-1) + 1) - 1)\rceil$, but I was wondering how to justify that that's $\Theta(\log_d n)$?
I know the definition of $\Theta, O, \Omega$ if only one variable is involved. In particular, what is the formal definition of a function $h(n,d)$ being i... |
In the following video, he mentions that x <- <SELF> (x obtaining a description of itself) is a "legal" operation for a Turing Machine to make. https://youtu.be/5yO_l2w0wIA?t=93
My question is, what is the description length of x with and without that 'line' of code? Does obtaining the description of x double the lengt... |
Given a vector of points (on the 2D plane), what is the fastest algorithm to find all pairs of points at a distance of 1?
Of course, I could use the $O(N^2)$ algorithm to check all pairs of points. However, I recently found out that there are at most $O(N^{4/3})$ points which satisfy the property, so I am wondering if ... |
What is the correct asymptotic lower bound for $f(n) = 3n^2 + 2n$?
I was thinking that the lower bound would simply be $\omega(n) = cn^2 + n$, for the constant $c = 3$ and integer $n \ge 1$. Indeed, $3n^2 + 2n \ge 3n^2 + n$ is the tightest lower bound I can come up with.
However, would this be the correct answer instea... |
Given a hypergraph $H = (V, E)$, call $H' = (V, E')$ a refinement of $H$ iff there exists a partition $p : E' \to I$ (where $I$ is an arbitrary index set) such that $E = \{\bigcup_{x \in p^{-1}(i)} x \mid i \in I\}$. Essentially this means that there's some way to partition the hyperedges in $E'$ such that merging toge... |
I am trying to create an optimisation process for a variant of the travelling salesman problem which is combined with a knapsack problem in the following way:
Let there be a set of points $P$ on a two-dimensional grid, each point $p$ has a specified weight $w(p)$ and value $v(p)$. A traveller leaves his home village ca... |
I am interested in designing number theory experiments and interested in knowing current capabilities of supercomputers to handle extremely large numbers. I'm interested in learning the size of the numbers (i.e. the largest possible) that their variables can hold. (Not things like what is the largest prime number so fa... |
Background
The task I have at hand is to write an event scheduler. From what I understood, it is basically a priority queue which needs to support concurrent insertions and single threaded delete operation of a key with highest value (in my case it is scheduled time). The worker thread will wait on a condition variable... |
I have seen an lot of proves why SET PACKING is NP complete. However, in every prove it states that SET PACKING is clearly in NP. It might be a stupid question, but is not so clear to me. I see that the procedure contains of 2 parts:
Choosing a subset of size k from a collection of sets
Check whether the chosen subset... |
I have atleast a terabyte of text data which I need to compress as efficiently as possible.
It is file of english words and numbers (Not randomly arranged but forming meaningful syntax just as regular grammatical sentences). I got to know about CMIX compressor and its benchmarks (not too much understandable to me) and ... |
I've just been doing some pondering, and given the fact that computers already operate on fundamentally continuous physical quantities, and then we have to use transistors to turn those real quantities into effectively discrete numbers, why don't any computer architectures just skip the intermediary and do away with fl... |
Ideally, these would be the points that form the smallest (nondegenerate or degenerate) triangle. However, I can admit a large amount of approximation to get it to a lower order of complexity.
I can do some preprocessing on the given set of $N$ points. Up to around $O(N\log N)$ would be acceptable.
I want to repeat the... |
In our Computability & Complexity course, we wanted to show that $ALL_{TM}\notin RE$. To do that, we have seen the following claim (I'm summarizing it):
Denote the languages:
$ALL_{TM}=\{(M)|L(M)=\Sigma^*\}$ and $A_{TM}=\{(M,\,w)|w\in L(M)\}$.
The problem is that we want to simulate $M$ on $w$, but we can actually wan... |
I found most union find problem try to traverse through the parent for the find method
But traversing seems unnecessary at times when using a set can achieve the same purpose
For example take this question that ask to find the minimum spanning tree
def __init__(self, n):
self.parent = [i for i in range(n)]
... |
Suppose I have a set of $2^{n}$ number of binary sequences. And I have to select only those sequences which contain a minimum ${P}$ number of $0$ in it. For example, please consider the below one
Eg.
suppose $n=4$, so the total number of the binary sequence is $2^{4}=16$. And the binary sequences are as follows
$0000, ... |
Given a multiset $S$ of numbers, partition it into two subsets $S_1 $ and $S_2$.
How to maximize the sum of their medians? For example, the median of {1,2} is 1.5.
I've found a greedy algorithm that $S_1$ contains the maximum of $S$ (if multiple, select one), $S_2$ contains the rest of $S$. It's intuitively correct but... |
Let $F$ be a set, for instance $\{a,b,c,d,e \}$. Suppose I have a set of subsets of cardinality two obtained from $F$:
$ ${ a,b },$\{b,c\},${a,d}
I want to create every possible set of cardinality three starting from one of these subsets of cardinality two that do not have $e$ as a member, and collect them in a set tha... |
Suppose we have three rods A, B and C, and rod A contains n disks (Exactly like the original Tower of Hanoi problem). The disks are numbered 1 to n, when the bottom disk is number 1 and the top disk is number n.
I want to build two towers: One on rod B which contains only the odd numbered disks and one on rod C which c... |
The original paper by Goldwasser and Sipser proved IP[Q(n)]=AM[Q(n)+2].
Is there some modern source that proofs the theorem? (The full theorem and not specific cases such as limiting the number of rounds to 2.)
|
I ran into a very surprising local contest problem.
after finishing bellman ford algorithm, if we continue to updating
distance and distance of one vertex v being updated, then v is
on negative cycle.
there is very easily counterexample that the above sentence is false, but two times asking from my instructor, he tol... |
A complete binary tree with $n$ leaves has $n-1$ internal nodes. For every internal node $i$, I care about the difference between the maximum depth of the left sub-tree and the maximum depth of the right sub-tree $d_i$.
I'm wondering what's the upper bound for $D = \sum_{i=1}^{n-1} d_i$, given $n$ ? The lower bound is ... |
I have recently started reading the book Computer Networking: A Top-down Approach in hopes to get introduced to computer networks. When attempting one of the questions
from the book for practice, I got stuck and spent the whole day today trying to make some progress.
The questions is:
Consider sending a large file of ... |
We're going over threading models in my freshman CS class. Are there any examples of operating systems that use exclusively user threads (N:1)? It looks like 1:1 is far and away the most common model but I wanted to see live examples of this other model. Google had been inconsistent and it seems a lot disagree on which... |
I don't know how to solve this.
Show that if P=NP, and if language A is not NP-hard, A = ∅ or A = Σ*
|
I'm trying to classify a certain family of Boolean functions, and need to represent the function as a graph. Is there any well-known graph representation for a Boolean function that captures the information that it is Boolean?
I'm presently using the variables as vertices with an edge between two if they are present in... |
I'd like to formally prove the correctness of Hoshen–Kopelman algorithm (link here https://en.wikipedia.org/wiki/Hoshen%E2%80%93Kopelman_algorithm). Anyway I don't know what is the right approach. At first I wanted to prove it by induction (as it obviously works for a 1x1 grid), but I got stuck.
|
Given some undirected weighted graph $\ G(V,E, w) $ and its minimum spanning tree $\ T$, I need to find another spanning tree $\ T' $ with minimal amount of common edges of both trees. If there are no other spanning trees then $\ T' = T $
I was thinking maybe if I can "subtract" the edges of the minimum spanning tree I... |
Recently I asked a question Here about following topics:
after finishing bellman ford algorithm, if BF continue to update
distances and distance value related to one vertex v being
updated,then v is on negative cycle. [***]
from my counterexample I think this is a wrong sentence.
I see in the implementation of the fo... |
I'm interested in computing of the product $M^n v$, where $M$ is an $m\times m$ matrix (over a semiring) and $v$ is column-vector, with the smallest number of multiplications in the underlying semiring and in the regime of $n=\Theta(m)$.
If we first compute $M^n$ using fast exponentiation, this would take $\Theta(\log ... |
Obviously it is an open question if $3$-SAT can be decided in a polynomial amount of time. But what results do we know about its recognizabilty? Can $3$-SAT be recognized in a polynomial amount of time?
|
This question is based off of the usual Skyline problem, which is discussed in GeeksForGeeks and also several other websites.
The following are two variations from the usual Skyline problem:
Report all points in the skyline, and not just the upper left points.
Use arbitrary triangles and report all points in the shape... |
This 2014 paper by Barak and Goldreich defines the notion of a universal set $S_{\mathcal{U}}$ as the set of all tuples $(M,x,t)$ such that the non-deterministic machine $M$ accepts the input $x$ in $t$ steps or less (page 2). They further go on to describe a relation $R_{\mathcal{U}}$ for $S_{\mathcal{U}}$ which they... |
I am trying to understand how $\Theta(n)$, $O(n)$, and $\Omega(n)$ relate to each other as sets and want to make sure I'm on the right track.
I get that $Θ(n) \subseteq O(n)$ since $Θ(n)$ is stronger and all of its elements are also in $O(n)$.
Then $Θ(n) ⊆ Ω(n)$ is true too, yes?
But $O(n) \subseteq Ω(n)$ isn't true?
... |
I'm trying to modify the original D* Lite algorithm adding a margin constraint wrt to any nearby obstacle to be satisfied for each selected cell in the path. This causes the edge cost function between nodes to be asymmetric: let x and y be 2 adjacent nodes, with x being distant to an obstacle less than the given margin... |
I am going through this lecture series by Martin Kleppman. In this video at around 1:25, he says you can manually configure the distributed nodes to chose a leader.
If that's the case can't we just automate the process by having a different process running that just checks for the health of the leader and chooses a new... |
I'm currently working on implementing all the major data structures from C++ to better understand them and I arrived at the unordered_map, which should be a hash table implementation (it's actually not) and wondered that even if I implement the hash table, how could I make it iterable?
Let's say I'm implementing the ha... |
Does multiplying word size numbers (using standard grade school algorithm) take constant time? Can you use this to speed up computation and do the fast multiplication algorithms use this?
By constant time I mean under the word ram model or whatever model of computation is standard.
I mean in the purely theoretical mode... |
We know from the linear-speedup-theorem that
NTIME($\mathcal{O}(f)$) = NTIME($f$) and DTIME($\mathcal{O}(f)$) = DTIME($f$),
given that $f(n) > (1+\varepsilon) n$ for some $\varepsilon\in\mathbb{R}$.
What happens in the case that $f(n)=n$?
I was told that equality still holds in the nondeterministic case, but not in the... |
I am wondering why modern consumer cpu usually has 128GB memory limit when server cpu supports terabytes. 128GB is really not that much.
Do they really can't handle more RAM? How wide is their address bus?
Is it possible to put more RAM if motherboard handles it?
-- Edit --
I think that my question is simple, but let m... |
We were given the following problem in our university:
We will call $x \in (0; 1)$ computable iff there exists an algorithm (e.g. a programme in Python) which would compute the $n^{th}$ digit of $x$ (given arbitrary $n$.)
Prove the set of computable numbers is countable
Let's enumerate all the computable numbers and ... |
Let's consider a function $f \in \Theta(h)$ and a function $g \in \omega(h)$, what could I conclude about the sum $f + g$?
Since $f \in \Theta(h)$ I think about $f$ as if it grows just like the function $h$, and the function $g \in \omega(h)$ as if it grows more than $h$. Given that, to me it seems to make sense that ... |
Given a $n \times n$ grid with some walls and two cells $a$ and $b$, I want to compute the non-homotopics paths from $a$ to $b$ on this grid. A path is a sequence of adjacent cells (diagonal does not count) such that from one cell to another, we never go through a wall. We also ask our path to be non-looping, that is t... |
It seems to be a popular opinion that "the right way" to implement undo/redo is "using a stack." (particularly in the context of an algorithms and data structures interview.)
Here's a GeeksForGeeks article as one reference on this view.
A common variation on this problem is "suppose we want to be able to do many undo o... |
I am looking for a publication-friendly term to describe the total quantity of data communicated between nodes of a distributed system, as invoked by some discrete operation. This term would describe the integral of the bandwidth over time.
For example, if node 0 sends 1 byte to node 1, and node 2 sends 3 bytes to node... |
Question:
Prove that there exists an algorithm that can decide using at most n-1 comparisons whether a n-element array contains only equal numbers.
We use an algorithm that loops through all the elements in the array, comparing Ai with Ai+1 to check if both are equal, where 0 <= i < n. If there exists some i, such that... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.