instruction stringlengths 35 29.1k |
|---|
Question:
Given:
Class B IP address 169.202.0.0.
Network when divided into 4 sub networks, each one requires 16,000 IP addresses. They need to be assigned sequentially without gaps.
Find the sub networks.
Here is my solution:
Total IP addresses in 1 subnet are 16000 = 2^14 – 384 Bits required for subnet: 4 = 2^2 = 2... |
i'm trying to figure out whether this Union $\left [ L_1=\{a^lb^mc^m|l,m\ge 0\} \cup L(b^*c^*)\right]=K$ is regular or not, now since regular languages are closed under intersection, so i assume $K$ is regular then its intersection with $L(a^*b^*)$ should be regular which is $K\cap L(a^*b^*)=L(a^*)\cup L(b^*)$ right ?... |
A group of computer scientists associated with numerical analyst Yaroslav Sergeyev have published numerous publications recently on a scheme proposed by Sergeyev that uses terms like Infinity Computer, numerical infinitesimal and numerical infinity, claiming that the approach facilitates the solution of many problems. ... |
$L_1 \in \mathrm{CFL} \cap L_2\in \mathrm{CSL}$ is $\mathrm{CSL}$ because every $\mathrm{CFL}$ is $\mathrm{CSL}$ and by applying closure property of $\mathrm{CSL}$ under intersection, it's $\mathrm{CSL}$.
$L_1 \in \mathrm{ RL} \cap L_2 \in \mathrm{CFL}$ is same as $\mathrm{CFL} \cap \mathrm{CFL}$ . As $\mathrm{CFL}$ i... |
Currently there are two things that may change between invocations of a function: the return value, and the external states. I understand that if the external states changes, the function is not idempotent. However, it seems controversial whether the return value is required to stay the same. For example, is the below ... |
function (n)
i = 1
s = 1
while (s <= n)
i = i+1
s = s*i
print "*"
end
|
I am thinking of a modified version of pacman. In this version, it will be a two-player game. Each player will have one pacman and one ghost. So there are 2 pacmans and 2 ghosts in the board at a time. No additional ghost is there. A player will control both his pacman and ghost separately- there is no predefined or ra... |
Are there efforts to automatically discover new logics? Logics are simple structures - they have formal language, deduction rules, semantics and certain properties that are proved or discarded for every new logic. In fact, each logic can be put into framework of institutions (by Diaconescu et al).
So - is it possible t... |
What is the difference between Boolean Algebra and Boolean Lattice? I have already searched on Google but could not find a reasonable answer?
|
Let's say there is an algorithm that runs on a processor at x MIPS, operating at a clock frequency of y MHz. If I double the operating frequency to 2y, what happens to the MIPS? It seems to me that doubling the operating frequency should double the instructions executed per second, i.e, MIPS = 2x, is this correct?
|
I am reading Lamport's paper titled Time, clocks, and the ordering of events in a distributed system
I understand what's in there more or less, but I am confused whether Lamport timestamps on their own are useful in practice since just by looking at the logical timestamps, we can't say anything about which happened bef... |
I am having trouble in writing the specific role of Turing machine? can it solve all the algorithm a digital computer can solve(i.e. today's PC's)?
|
This is a question that is in a sense a follow-up of a question I asked earlier, and which was answered.
In that question, the answer to "in which recursion scheme does data only flow bottom up, and in no other way?" was "a catamorphism".
Here, I am looking for the name for (and hence: theory about) the reverse recursi... |
Given an unweighted graph $G = (V,E)$. I am interested in enumerating all pairs of disconnected cliques, i.e. there should not exist any edge between two cliques. (For example, there would not exist any such pair in a complete graph). A clique could be of any size $\geq 1$.
Are there any standard approaches to solve th... |
I'm a beginner in programming with little knowledge about the technicalities. I'm assigned to do a "reading project" on the average case analysis of quicksort. I mean I have to present it in class. Now, I need a good source from which I can read it and find the materials which I can include in my presentation. As for m... |
I am trying to solve the exercise 3.3 in Approximation Algorithms by Vazirani, pg 34. It states
3.3 Give an approximation factor preserving reduction from the set cover
problem to the following problem, thereby showing that it is unlikely to have a better approximation guarantee than $O(\log{n})$.
Problem 3.14 (Dir... |
While studying recursion, I came to know that for every function call it has to store intermediate data on stack for later use. If so, then for large amount of data, recursion can be inefficient. Storing large intermediate data can cause memory overflow. Can you please explain, then why recursion is used at all? If p... |
As it says in the title:
Are there problem instances which we know to be unsolvable?
Or equivalently
Are there any promise problems with a finite number of possible inputs
which are undecidable?
Please note:
I realize that many computational problems are known to be unsolvable, but to the best of my knowledge (li... |
I am going through the book Compiler Construction by Niklaus Wirth. The following is what I feel to be stated summarily by his lesson on procedure calls:
The compilation of a procedure call is the allocation of a block of stack memory. It starts with the base address which is stored in the frame pointer and the local... |
I read that the 4 conditions for deadlock prevention are necessary conditions and not sufficient.
The four necessary conditions are :-
Mutual exclusion.
Hold and wait.
No preemption.
Circular wait.
Here it is clearly mentioned that these conditions are only necessary but not sufficient.
https://cs.nyu.edu/courses/s... |
I see a lot of articles and topics about OpenCV and machine learning in regards to identifying general things (like cats, or alphanumeric characters) but I am wondering if something more specific is easier/detailed somewhere.
Basically, if I have a folder of 20 images, how would I identify those images contained with a... |
I am trying to solve following problem but unable to solve this. Can anyone tell me how to approach this kind of problems where it is not easy to make DFA.
The minimum number of states required to construct a DFA that recognizes the language of strings over the alphabet ${a,b}$ whose tenth symbol from the right end is... |
We need an optimal algorithm in pseudo-code for sorting a sequence of $n$ which has only $k$ distinct numbers ($k$ is not known a Priori).
Can we use Counting Sort to solve this problem in $O(n+k)$ time? I don't think so. Though the time complexity of Counting Sort is $O(n+k)$ but $k$ is the largest element in the inp... |
I have been studying Andrew Ng's Coursera course about Deep Learning. In that he mentions that we calculate the activation functions during the forward pass, and the derivatives $\dfrac{dL}{dz} \ $, $\dfrac{dL}{dw} \ $, and $\dfrac{dL}{db} \ $ during the backward pass.
Consider a single neural node
Here,
$x_{1} \ ,\ x... |
If it is beneficial, then how Big-O (time complexity) is affected?
Embedded link provided by members does not answer original question.
|
I'm reading the following article that presents a $log(k)$ algorithm for your secretary problem.
I'm in the analysis section at the left part of page 5 there is the following claim:
$B^*$ is a set with elements $x_1,...,x_k$ with respective values
$v_1,...,v_k$ where $v_1\geq...\geq v_k$. Denote $n_i(B^*)$ as the ... |
In a question i found the recurrence relation $a_n=a_{n-2}+3^{(n-2)/2}$ then i should solve this relation with using generating factor but $3^{(n-2)/2}$ makes difficult to solve . Is there a solution for such a relations ? Or is my answer wrong ?
|
The class $C_{1,\epsilon }$ of decision problems solvable by an NP machine such that
If the answer is 'yes,' at least 1/2 and at most $1-\epsilon$ of computation paths reject.
If the answer is 'no,' all computation paths reject.
Is there a name for this class that looks like $RP$?
Is this in $RP$ or $coRP$?
The class... |
Is the complement of $L = \{a^nb^mc^p \ , n= m= p\}$ a context free language.
I believe that we can write $L^{'} \ as \ L1 \cup L2$ where
$L1=(a^*b^*c^*){'} \ $
$L2={{a^nb^mc^p \ m\ne n \ or \ n\ne p }}$
Now L1 is context free. I do believe that L2 as context free. Since context free languages are closed under union ... |
I'm following this explanation on the P3P problem and have a few questions.
In the heading labeled Section 1 they project the image plane points onto a unit sphere. I'm not sure why they do this, is this to simulate a camera lens? I know in OpenCV, we first compute the intrinsics of the camera and factor it into solve... |
L = { < M > | M is a TM and L(M) <= { $0^n 1^{2n}$} }
Here <= means polynomially reducible to
Is L CFL?
If L(M) can be polynomially reduced to a CFL then L(M) should also be CFL as if "A" is reducible to "B" then we can solve "A" if we know how to solve "B" ? Where am I going wrong?
|
Let's say we have given simple undirected graph $G$ having $N$ nodes and $M$ bidirectional edges. For given $x$ and $y$ we want to check if in the graph there is only one simple path between them.
What I was thinking for, is that we should find all the cycles in the graph and run bfs from $x$ to $y$, if the path doesn'... |
I am a computer science student and at the moment I am starting a new subject called models of computing.
I am trying to understand what is the difference between a Turing Machine and an Universal Turing Machine.
For what I understand a Turing Machine can be compared to a program that runs on our computer and an univer... |
I have an n-element set, and I want to consider families of its k-element subsets of fixed size s. For example, if n = 3, k = 1, s = 2, we have these families:
{{1}, {2}}, {{1}, {3}}, {{2}, {3}}
In my problem n, k, s are not so small, e.g. s = n = 50, k = 20.
Let us say all such families are ordered lexicographically ... |
Question
What is the state of the art for relation/equality satisfiability problems and where can I find papers clearly describing algorithms used (Or even better: implementations of them. Or even better: javascript implementations - I know that's a long shot)?
I.e. How do I solve satisfiability of: x > 10 && y < 5 && ... |
Problem: We say that an item $x$ is of rank $m$ if there are $m$ items in the set less than $x$. Design a randomized algorithm to find all of the items in a set of size $n$ with rank greater than $\frac{n}{16}$ with probability of failure $\frac{1}{1024}$.
I had this problem on my final yesterday and it completely stum... |
Given a contiguous sequence of numbers in which each number repeats thrice, there is exactly one missing number. Find the missing number.
eg: 11122333 : Missing number 2
11122233344455666 Missing number 5
I think we can't do better than just going from beginning to the end and checking the count if a specific number c... |
I ask this question with regards to a grammar in Chosmky Normal Form. The definition states that the rules must be of the following forms:
A $\rightarrow$ BC
A $\rightarrow$ a
S $\rightarrow$ $\epsilon$
And A,B and C are non-terminal symbols, B and C are different from S and a is a terminal symbol. The definition als... |
Let us define the language (the complement of the Halting Problem):
$$
LOOPING = \left\{ \langle M,x \rangle | M \ doesn't \ halt \ on \ x\right\}
$$
The question is if $LOOPING$ is NP-Hard.
I'm pretty clueless about the answer. I know the the Halting problem is NP-Hard, but I can't seem to find a reduction from an NP-... |
Let's say we have given array $A$ consisting of $n$ integers, and integer $K$. Now we want to count number of indexes $i$ such that $A_i<K$. What is the easiest way to pre-process the array and answer queries for different $K$ fast. Note that the elements of the array will be small up to $10^5$, so it will be possible ... |
I have recently watched this introductory video on quantum computing where the speaker talks about $n$ Q-bits and the representation of $2^n$ states.
What I didn't get is the word state.How is it different from a classical computer working with $1$'s and $0$s in which each bit can represent 2 states ($0$ or $1$) so tha... |
I was aware of the fact that, if DFA needs to accept binary string with its decimal equivalent divisible by $n$, then it can have minimum $n$ states.
However recently came across following text:
If $n$ is power of $2$
Let $n=2^m$, so number of minimum states $=m+1$.
For $n=8=2^3$, we need $3+1=4$ states.
Else I... |
Consider the following operation along with Enqueue and Dequeue operations on queues, where k is a global parameter.
MultiDequeue(Q){
m = k
while ((Q is not empty) and (m > 0))
{ Dequeue(Q)
m = m – 1
}
}
What is the worst case time complexity of a sequence of n queue operations on ... |
There happened to be a following question -
In any Chomsky Normal Form grammar $G$, how many nodes will all parse trees for terminal strings of length $n>0$ generated by G have?
I tried for some examples & arrived at the answer $2^{n}+1$ but it is incorrect & obviously trying examples is not a sophisticated way. The ... |
I understand that designing automatons is mostly a creative process but, a month ago I was having a discussion with a classmate about designing a NPDA or a DPDA that accepts a non-trivial language (trivial meaning, it is straightforward to design a PDA that accepts it) and he gave me a solution while mentioning an algo... |
I want create algorithm, which find a straight line which will separate the most objects from the class. The line must be parallel to the X or Y axis. Example:
Above example present two class: circles filled and unfilled. Red line is a solution to the problem. Has anyone the idea how to find such a simple?
|
There is a lot of work on decomposing these polynomials to irreducible factors without the modulo $x^{2^k}$ part. That doesn't really work for this problem (apart from giving some upper bound on the sparseness) because the modulo $x^{2^k}$ effectively allows dividing anything by any polynomial that has $1$ in it, so di... |
I came across following problem:
Which of the following problems is/are P-problems?
(I) Equivalence of DFA's
(II) Equivalence of NFA
(III) Equivalence of regular expressions
Now I know I there exist neat algorithm to find whether given two DFAs are equivalent or not. So (I) must be P-problem. I am doubtful abo... |
I came across following problem:
Given single state non deterministic pushdown automata $M$, whether $L(M)=\Sigma^*$ is decidable?
Now I know
for DPDA/DCFG/DCFL, universality problem is decidable.
for NPDA/NDCFG/NDCFL, universality problem is undecidable.
However I am not sure whether the same problem is decidable... |
I wanted to ask a simple question.
Lets say we have A, language of all the words with more then 3 letters. so it belongs to R.
and its complement , is the language of all words with less then 3 letters.
is it possible to say that I can define a turing reduction between them?
i thought about something like this:
$$
f(x)... |
There is this Prim's algorithm I am studying, the time complexity of which is $O(n^2)$ (in the adjacency matrix).
As far as I have understood,that is because we have to ckeck all the nodes per every node, that is, when checking the first node's best edge, we have to check edges from the current node to all other nodes.... |
Is a Turing machine without the ability to write on blank cells less powerful than standard Turing?
I think the answer is yes but i'm unable to find a computation that standard Turing machine can do but this machine can't.
Any ideas?
|
So as part of a theorem-prover/checker, I'm using Prolog to try to determine the equivalence of statements that have been parsed into tree form, e.g. $x=2$ is represented as eq(x,2), or $x=2 \land y\leq z$ if and(eq(x,2),leq(y,z)), and I want to determine if these statements are equal.
The way I'm currently (attempting... |
I'm attempting to teach myself something about genetic algorithms. I found a simple tutorial on it here, and it made enough sense that I was able implement the suggested example of generating a string of single digit numbers and simple arithmetic operators to total 42.
I then attempted the second suggested exercise des... |
I'm cross-posting from math stack exchange after receiving no answers there.
I came across the following very simple recurrence-style expression but am having trouble solving it:
$$T(2n) \in \theta(T(n) \log(T(n)))$$
for sufficiently large $n \in \mathbb{N}$.
My first thought was to take the logarithm of both sides and... |
TL;DR
There are exactly 255 possible 3-sat expressions with exactly 3 variables (more meticulously defined below). Of those, exactly 254 are satisfiable. There are exactly 4,294,967,295 possible 3-sat expressions with exactly 4 variables. Of those, how many are satisfiable? How did you get that number?
Problem Statemen... |
Give an algorithm that takes as input an array A sorted in non-decreasing order, and a value x, and that returns two indices (F and L) into A, where A[F] is the first value equal to x and A[L] is the last value equal to x. Your algorithm should run as fast as possible in the worst case. State the worst case running
tim... |
Given a weighted undirected complete graph G = (V,E). I am interested in finding all maximal cliques that have mean edge weight (mean of weights of all edges in the clique) at least k.
Most of the approaches that I have found so far solve clique problem in an unweighted graph. I am wondering if there are any algorithm... |
How to prove that diagonal language is NP hard ?
Any pointers in the direction would help.
I am aware of this question but all the answer gives is a definition of reduction.
Edit : Diagonal-language contains all strings X s.t. Mx(x) = 0 where Mx is the turing machine whose string encoding is given by x.
|
Disclaimer: I don't know much computational complexity theory. I am nevertheless curious.
If function $f(x)$ has a certain level of computational complexity (which I actually don't know how to measure), what can we then say about the computational complexity of the following indefinite integral?
$$\int f(x) \, \mathr... |
What does $\#P$ closure under addition and multiplication mean?
Does it mean given $NTM$s $N_1$ and $N_2$ we can create in deterministic polynomial time an $NTM$ $N_\times$ and $N_+$ such that for every input $x$ we have $$\#N_\times(x)=\#N_1(x)\#N_2(x)$$ $$\#N_+(x)=\#N_1(x)+\#N_2(x)$$ accepting paths?
|
Suppose I have an array of numbers, and a function boolean isPrime(int n) that I'm allowed to use.
Boolean isPrime(int n) receives a number n and return true if the received number is a prime and false otherwise.
I need to write a function int foo(int[] a) that receives the given array and return the biggest prime numb... |
Apologies for this simple question. I found it in the book Algorithms by Sedgewick and Wayne.
Give a formula to predict the running time of a program for a problem of size N when doubling experiments have shown that the doubling factor is $2^b$ and the running time for problems of size N0 is T.
$$ \frac{T(2N)}{T(N)}=2^... |
Complexity zoo states that $MOD_{2^k}P=MOD_2P$.
It is clear that if $MOD_2P$ accepts (number of accepting paths is off) then $MOD_{2^k}P$ accepts.
Why is it clear that if $MOD_2P$ rejects (number of accepting paths is even ) then $MOD_{2^k}P$ rejects?
Does $MOD_{2^k}P=MOD_2P$ have a different interpretation? I mean som... |
Consider receiving as input $x\in\mathbb N$ and computing some (any) prime $p\in[x,2x]$.
What is the complexity of the above problem?
A natural way to approach this problem is to generate random integers in $x,\ldots,2x$ and check for their primality using Miller-Rabin or a deterministic algorithm such as AKS.
Howev... |
What is the maximum number of edges that a simple directed graph on $n$ vertices can have, if the graph has the following restriction.
Size of Intersection of Neighbourhood of any pair of vertices is at most $k$?
Neighbourhood is defined as follows.
If a vertex $v$ has directed edges towards exactly three vertices $a$,... |
I've recently finished a course on languages in computer science, so we covered characteristics of regular, context-free, decidable and semi-decidable languages. While that is all well and good, we never went into any detail on what applications of this knowledge are (other than compilers being context-free language re... |
I have got assignment to implement set class with linked list, so I first made it with unordered list and time needed to insert million integers is bit less than hour. Then I thought I can get it to work faster by making list ordered (since in average it should take less time to check is element already in set) but it... |
I am looking at the following github. In this, layer3 has a shape of (1, 20, 72, 256) and I interpret this is as a single layer having 20 input nodes and mapping to 72 output nodes and there are $256$ filters, so the depth is $256$. Then, after applying a 1x1 convolution to this, the new shape becomes (1, 20, 72, 2). I... |
I am self-studying the book Intro to Algorithms 3ed by CLRS. One of the problems seems to give a piece of information that is not necessary, Problem 11-4 in the book states
Let H be class of hash functions in which each hash function h ∈ H maps the universe U of keys to {0, 1...m-1}. We say H is k-universal if, for ev... |
I have a black-box function optimization problem:
$$\arg\max_{\vec{x}} \; f(\vec{x}, \vec{y}) \\\text{subject to } \vec{x} \in \mathbb{Z}_2^N, \|\vec{x}\|_1=K, K<N, \vec{y} \in \mathbb{Z}_2^M$$
The function $f(\cdot)$ is a black-box function whose output I can only simulate: I cannot access its exact form. The variabl... |
A sequence of English letters are given, every sequence forms a word and we know that the size of each word is at most $15$ and the number of words is at most $50000$. For a given input word $w$ I need to search if the $w$ exists in the database of words.
The framework of the database and the application is on the web... |
I came across following problem:
Let $L_1$ and $L_2$ are two languages and both of them are accepted by DPDA. If $L=L_1-L_2$ is any language, then what is the smallest language family $L'$ belongs to?
I know DCFLs are not closed under set difference operation. Neither do CFL are closed. However CSLs are closed under ... |
Suppose for different classes $A,B,C$ we have that $A\subseteq P^B$ and $A\subseteq P^C$.
We have $A\subseteq P^{B}\cap P^{C}$. Does it also mean $A\subseteq P^{B\cap C}$?
Supposing $A\subseteq P^{B\cap C}$ also holds does it also give $A\subseteq {B\cap C}$?
If $P^B=B$ then does it mean $A\subseteq {B\cap C}$ or $A\s... |
I'm trying to find a good solution to the following problem:
Given a set of 3d real number coordinates inside a cube, I want to group them into containers. The containers should contain all elements that are in predefined distance to at least one of the other elements. Should two elements be closer than a predefined di... |
I'm trying to find the maximum number of different substrings of string consisting only of lowercase letters 'a' - 'z', if the length of string can be up to $5000$
Firstly, I was thinking that the number of substrings is $\frac{n\cdot(n-1)}{2}$ but then I noticed that a lot of the substrings will be the same, and also ... |
Is there any difference between structural-recursion and Tail-recursion or they both are same? I see that in both of these recursions , the recursive function is called on the subset of the orignal items.
|
I'm familiar with reductions to the language $A_{\mathrm{TM}}=\{\langle M,w\rangle | M \text{ accepts } w \}$, for example $A_{\mathrm{TM}}\le H_{\mathrm{TM}}$.
Are there examples for reductions from $A_{\mathrm{TM}}$.
By that I mean, a reduction such as: $B\le A_{\mathrm{TM}}$ (many to one reduction).
|
The 7th chapter (7.3 section) of "Automata Logics and Infinite Games" by Erich Gradel, Wolfgang Thomas, Thomas Wilke gives a way to convert max parity game to mean payoff game.
I do not understand how to use the solution for mean payoff game i.e $\nu(v)$ to compute the winning region of parity game.
It states "It is o... |
Why do we need binary trees when we have multiway trees. Are binary trees even used. Are they used only for teaching the concepts of trees?
|
The Master Theorem provides a method of solving recurrence relations for divide-and-conquer algorithms. It was first presented to me in my intro algorithms class as the following:
For a recurrence of the form $T(n) = aT(\frac{n}{b})+f(n)$
with constants $a \ge 1$ and $b>1$,
Case 1: if $f(n) = O(n^{\log_b(a-\vareps... |
We will consider a set whose elements I call "precedences". Precedences are related by two relations: "is subclass of" and "higher than", which are specified by some pairs (given on algorithm input) of precedences conforming to these relations and by the below rules. All sets in consideration are finite.
Let "is subcla... |
Take:
An algorithm $A$ that is analytically nice in some way, say, for some class of inputs of length $n$ it runs at $O(f(n))$ on some Turing machine.
$k+2$ independent, identical such machines.
Is there a generic method to produce algorithms $A_{in}, A_{out}, A_{1},\dots, A_k$ for which tapes can be made so that:
... |
I have just played a few games of Rummikub and the manipulations I made during my turns became more and more complex transactions. A few turns reordered the whole field, so that other players did not recognize anything and had to plan their turns again.
As always, I thought about representing this in a computer program... |
This question arose out of a concrete problem I had, which was to find an $\varepsilon$-free variant of the following LL(1) grammar $G_0$ that I developed for a Lisp-like language $L$ (I found a monotone LR(0) variant):
$$
\begin{array} \\
P & \rightarrow & (EP \\
& | & \varepsilon \\
E & \rightarrow &iE \\
& | &sE... |
I learned that algorithms written in programming languages always return some value, not necessarily an input value.
But, if the return type of the main function is void, then does the algorithm return any value?
|
I have an arr[] of M integers. He has to find all integers K such that :
1) K > 1
2) arr[1]%K = arr[2]%K = arr[3]%K = ... = arr[M]%K where '%' is a modulus operator
with following constraints :
- 2<= M <=100
- 1< value of each integer <109
- All integers will be distinct
I have written an algorithm and program for thi... |
Definition : Kolmogorov complexity is a static complexity measure that captures the difficulty of describing a string.
For example, the string consisting of three million zeroes can be described with fewer than three million symbols (as in this sentence)
From wikipedia
In algorithmic information theory (a subfield of ... |
For Christmas my brother got me this puzzle:
The premise is that you have a metal medallion with a series of holes in it and a metal ring with a slit just large enough to slide it from hole to hole, barring obstacles, like the edge of the map and an obstruction near the top. The goal is to be able to remove the ring f... |
Can someone explain with a hands on example how the Gelfond Lifschitz reduct works in order to check stable model semantics?
edit
a simple example here - at least as far as I understand the thing. So far grounding is clear to me - but the the application of the reduct is not. My goal in the end is to check stable model... |
I need to find the minimal path cost from left edge of a $n\times n$ grid to the right edge where each node has some non-negative weight $cost(i,j)$. $i$ represents horizontal coordinates while $j$ represents vertical coordinates. Only the following movements are allowed in the grid:
$$
(i,j)\to(i+1, j-1) \quad\text... |
Suppose that $p>0$ and $n>0$ is a natural number. How do I prove that
$$ \sum_{k=1}^n k^p = 1^p + 2^p + \dots +n^p \sim \frac{1}{p+1}n^{p+1}=\Theta(n^{p+1})$$
for $n \rightarrow \infty$?
|
Doing exam papers now and I came across two questions which I cannot get my head around sadly. Both are regarding Amdahl's law and Parallel Computing but they seem rather simple and frustratingly enough I cannot really find a definitive answer to any of those questions.
The questions are:
Why must Amdahl's law always ... |
start off stating the definition of a loop invariant. It is a condition that must be true at the start of the loop and must be true after each iteration of the loop. I understand what it is but i have trouble trying to come up with one.
Here below is a program which i know is correct and I have stated the loop invarian... |
I'm trying to prove a problem that a friend sent me, he is saying that my solution is not good and I wanted to ask if he is correct and im wrong , and if so why?
here is the questions:
$L=\{<M>| \text{ M accept all languages with no more then 1 palindrome}\}$
prove that L is not decidable by showing that :
$H_{TM} \leq... |
Let there be a set of cardinality $n\in \mathbb{N}$. Let there also be $n$ subsets of that set. What is the smallest k such that union of some $n-k$ of those subsets is of cardinality at most $k$? The problem is very similar to minimal $k$ union problem, but is more specific, how can I prove it is NP-complete?
|
Suppose we are given a digraph A. We need to calculate its connectivity digraph B.
I conceived two algorithms:
1.
Set X = A.
Loop
Set Y = X*A united with identity
Stop the loop if Y = X
Set X = Y
End loop
B = X
2.
Set X = A. [Or instead "X = A united with identity" and remove "united with identity" in the third step... |
Introduction
Hello, I'm designing a generalized model of Turing machines for a formalization in MIZAR. Mizar needs some concrete objects to work with, so I spent some time figuring out how the "tape" of a Turing machine could be defined since that part is usually left out when introducing Turing machines.
After some th... |
Is it possible in theory to build hardware with exactly same computing logic as any computer program? Or in other words: Is it possible in theory to implement any software in hardware?
That's my thoughts: if computers in general is finite automata so the software what is a product of computer is in general finite autom... |
I'm trying to understand TCP right now. In the header there is "Window Size" which to my understand is the maximum amount of data that can be sent at once. My question: How does the server know how much data it can send? If I understand it correctly, the only information the server gets from the client is the ACK numbe... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.