instruction stringlengths 35 29.1k |
|---|
A distribution $P$ over $\mathbb{R}^{d} \times\{-1,+1\}$ being $(\gamma, R)$ -separable. We now let $\mathcal{P}_{\gamma}$ denote the set of all $(\gamma, 1)$ separable distributions. For a distribution $P \in \mathcal{P}_{\gamma},$ we let $\mathbf{w}_{P}$ denote the unit length (ie. $\left.\left\|\mathbf{w}_{P}\right\... |
Which is the lowest level of code (human written instruction for computers) in computer architecture? After doing minor research, I have come to the conclusion that, as far as determining a hierarchy in terms of the level of computer code, the following is the general level of code hierarchy: High-Level->Low-level->Ass... |
I try to find tree height such that first i define:
$H(n,k)=H(\frac{n}{2},k)+H(n,\frac{k}{4})+1$
then find height of left branch of tree=logn & right branch of tree=logk,but now why height of tree is equal to logk+logn?i guess height of tree is Max(logn,logk)why my geuss is not true?
|
Just checking if this version of Max Cut is still NP-hard:
Given a fully connected graph $G(V,E)$, where every vertex is connected to every other vertex, and where every edge has a weight associated with it. Find a cut in $G$ such that the average weight of the cut edges is maximal. See the example below, where other c... |
The $\text{IEEE-754}$ uses $32$ bits to represent single precision floating point numbers. The partitions of the register are as follows:
Biased
sign Exponent Mantissa
+-----+--------+---------+
|1 bit| 8 bits | 23 bits |
+-----+--------+---------+
Now in general $8$ bits can represent $2's$ complement numb... |
Let $L$ be an $\mathrm{NP}$ language.
Then there exists a verifier $V$ of $L$ and a polynomial $p\colon \mathbb{N} \to \mathbb{N}$, such that for every $x \in \Sigma^{*}$, $x \in L$ if and only if there exists a certificate $u \in \Sigma^{p(|x|)}$ for $x$ satisfying $V(x, u) = 1$.
Suppose that $\mathcal{V}_{q}$ be all ... |
I have seen two observations from the paper by Har-Peled but I do not know how to prove them
(i) If $C1$ and $C2$ are the $(k, ε)$-coresets for disjoint sets P1 and P2 respectively, then $C1 ∪ C2$ is a $(k, ε)$-coreset for $P1 ∪ P2$.
(ii) If $C1$ is $(k, ε)$-coreset for $C2$, and $C2$ is a$(k, δ)$-coreset for $C3$, the... |
I have seen two observations from the paper by Har-Peled but I do not know how to prove them
(i) If $C1$ and $C2$ are the $(k, ε)$-coresets for disjoint sets P1 and P2 respectively, then $C1 ∪ C2$ is a $(k, ε)$-coreset for $P1 ∪ P2$.
(ii) If $C1$ is $(k, ε)$-coreset for $C2$, and $C2$ is a$(k, δ)$-coreset for $C3$, the... |
What is the difference between Hamming Distance and Manhattan Distance for non-binary data (specifically I am comparing points in $\mathbb{R}^2$)? I understand Manhattan sums the absolute difference in the and x and y directions but doesnt hammming distance do the same thing?
|
I have the following TRS $R$:
$$
l_1 = f(g(x)) \to f(x) = r_1 \\
l_2 = g(f(y)) \to g(y) = r_2
$$
I want to know if $R$ is confluent, and whether $g(f(f(x))) \leftrightarrow_R^* g(g(g(x)))$.
I have already proven termination.
I use the fact that $t = f(y)$ is a subterm of $l_2$ and can find a substitution $\sigma$ ... |
If $f(n)=n^a$ for a given $a>0$, I need to find a function $g(n)$ such that $f(n)\notin O(g(n))$ and $f(n)\notin \Omega (g(n))$.
I am not sure how to find such function, which satisfies both of the conditions.
|
Are there any known techniques for "diffing" trees, such as phylogenetic trees?
|
We consider a set of sets $S = \{S_1, S_2, \dots, S_n\}$, and we want to find a subset $I$ of $S$ that maximises the size of the union of the set $S_i$ included with a penalty for each set included. We can represent this problem as the optimisation of the following quantity:
$I = argmax_{I} |\cup_{S_i \in I} S_i| - |I|... |
Is the decision version (i.e. does a solution exist) of this puzzle NP-hard (for an nxn puzzle)? It feels like it has very local strategies which allow easily solving the instances, but it's not obvious to me that these generalize to larger puzzles. The rules are as follows:
Each tile has exits on some of its edges
Ea... |
If $L(R_1) \subseteq L(R_2) \subseteq L(R_3)$ then $L(R_1)^* \subseteq L(R_2)^* \subseteq L(R_3)^*$. Does this also imply that $L(R_1)^* \subseteq L(R_3)$?
|
I am having trouble with some homework regarding proving that DCONN is NL-Complete. As part of the exercise, the fact that RCH is NL-Complete can be assumed.
Problem definitions:
RCH: Given a directed graph G and nodes x, y , is there a path from x to y?
DCONN: given a directed graph G, is it connected?
To my under... |
Given a string s and a hashset of strings words, what is the time complexity of the operation: s in words? Assume all strings have length M. My current guess is O(M) to compute the hash of s, O(1) to find that bucket in the hash table, and O(M*number of strings in the bucket) to compare the strings in the bucket and th... |
Let $D_{1}$ and $D_{2}$ be two probability distributions over $n$-bit strings such that the total variation distance between them is $\mathcal{O}\left(1/{2^{n}}\right)$. Given as input a polynomial number of samples from any one of the distributions, the task is to output $1$ if the samples come from the first distribu... |
This is my guess:
-Use amortized because we want to know the "averaged" complexity over n operations assuming the operation is going to be used frequently
-Use unamortized when you know the operation is going to be used rarely
|
Suppose we are given a language $\Sigma$ where, suppose, $|\Sigma| = O(1)$. Consider two fixed strings $A, B \in \Sigma^n$. Define the Hamming metric between these strings as
$$d_{H}(A,B) = \sum_{i=1}^n \boldsymbol{1}\lbrace A(i) \neq B(i)\rbrace$$
If we define $B^{(k)}$ as the $k$-shift (to the right) cyclic permutati... |
I was asked in an interview question, can a perceptron classifier ever reach 100% accuracy on some kind of non linearly seprabale training data in 2D.
I said that no it can't because the data is not linearly seprabale.
We then proceed to the next question, but maybe its just me, but from the look of the interviewr, I'm... |
I'm now to problem solving, and I need some help and insight on the following problem from HackerRank:
Given a sequence $p(1),\ldots,p(n)$ of distinct numbers from $1$ to $n$, find numbers $y_1,\ldots,y_n$ such that $p(p(y_1))=1,\ldots,p(p(y_n))=n$.
My approach was to perform a double index lookup on each element in ... |
I was thinking. Since any data can become linearly seprabale through kernel methods, meaning there is a dimension where this data is linearly seprable, so feed this processed data set into the perceptron algorithm and then it might get to 100 percent accuracy.
Am I correct?
|
Here is the description for 3SAT satisfiability problem. I already know about the DPLL algorithm, but it's implementation is pretty complex. I would like some algorithm that is relatively simpler but improves the performance by some extent. I would prefer something that is not Tree/Graph based instead bit-mask or multi... |
I am computing the count of the amount of intersections between disjoint horizontal line segments and disjoint vertical line segments. The algorithm I have come up with runs in $(2n+m)\log(2n+m)$ time. I was wondering if the Big-O for this is $O((n+m)\log(n+m))$? I don't know how constants in the interior of logs with ... |
I want to know the speed of preorder traversal of an tree. I do not mean its order of magntude which we know is O(n).
I want something like 27n operations where an operation is precisely defined.
Thanks
|
These are the reduction rules associated with $\beta$ reduction and $let$:
$$(\lambda x. e_2) e_1 \to_{\beta} e_2 [e_1 / x]$$
$$let \,x = e_1 \textit{ in }e_2 \to e_2 [e_1/x]$$
These reduction rules are very similar.
What is the point of having $let$ as well as $\beta$-reduction?
I can't see why it is of any use.
|
Proposition: The binary search algorithm runs in $O(\log n)$ time for a sorted
sequence with $n$ elements.
When justifying this claim, first we say that with each recursive call the number of candidate entries still to be searched is given by the value
$$ high - low + 1 $$
The middle index, $mid$, is given by
$$ mid = ... |
In the simply typed lambda calculus if we have an addition operator, $+ : n \to n \to n$, its typing imposes that we can only combine it with something of a given type. So if $n$ is the type of natural numbers, we can only combine $+$ with things of type $n$.
In the untyped lambda calculus can we invent a function whic... |
Are there other encodings of the natural numbers in the untyped lambda calculus which are neither the Church encoding nor the Scott encoding?
|
I am searching for an algorithm with a time complexity of $\Theta(n2^n)$ time complexity.
I am aware, that e.g. the Fibonacci sequence has a time complexity of $\Theta(2^n)$.
My plan was to add a loop in the implementation, so that before you go into recursion, you are going
to count from 1 to $n$. My question is, whet... |
Sorry for the perhaps basic question, but my time at university is long ago and I need to brush up on Big-O stuff for interviews.
My question is, what would the time complexity be when an algorithm does depend on the input but not on the size of the input? For example, assume I have this function:
func doSomething(numb... |
I am really new concerning loop invariants and I am currently trying to figure out a loop invariant of an algorithm for prime numbers. I tried a lot of ideas, but I still have problems since there are two nested loops. I am also really grateful if someone have any tips regarding finding a loop invariant.
My idea is tha... |
Two sorted arrays of positive integers, X[] and Y[] are given.But, the array sizes are unknown to us. We may assume that accessing any index beyond the last element of the array returns -1. The elements in each array are distinct but the two arrays may have common elements. An intersection point between the two arrays ... |
It is not hard to show that $DSPACE(n+1)/2^n$ contains undecidability. But is it possible to make the advice string subexponentially long (while the machine is allowed to have any $poly(n)$ space) using some succinct representations? Or is this an open problem with potentially interesting results?
|
I have a question concerning the use of the Ford-Fulkerson algorithm. Since a minimum cost flow problem is a linear programming problem, it has a dual problem. That dual would be to maximize a certain function. Considering this, is it possible to apply the Ford-Fulkerson algorithm to that dual in order to solve the min... |
Given a query instance $x_q$ to be classified
Let $x_1,\ldots,x_k$ be $k$ instances which are nearest to $x_q$
$$ \hat{f}(x_q) \gets \operatorname*{argmax}_{v \in V} \sum_{i=1}^k \delta(v,f(x_i)), $$
where $\delta(a,b)=1$ if $a=b$, else $\delta(a,b)=0$ (Kronecker function).
If $f$ is an objective function to be opt... |
I was given the following recursive formula: L(m)=16L(m/2)+m and I want to find for which function f, L(m) is theta of f.
In other words L(m) is big O of f and also small omega of f.
What I did until now? Nearly 95% of the job but still not sure whether this is an omega or big O or theta...
|
Amdahl's Law generally divides a task into "things that can be parallelized" and "things that can't". Now, I know what "things that can be parallelized", and it's not too hard to imagine things whose parallelizations aren't obvious, but it's not clear to me what makes a task fundamentally non-parallelizable, whether s... |
In his book "The Annotated Turing" in the first sentence on page 32 Charles Petzold wrote:
These are binary numbers between 0 and 1, and (judging from the way we
created these numbers) all the binary numbers between 0 and 1, and
hence all the real numbers between 0 and 1.
And then at the bottom of the page there is ... |
$$\ T(n) = \sqrt{n} \cdot T(\sqrt{n}) + 1 $$
I've found so many similar questions but I couldn't understand any of the answers explanations. When I try to draw a recurrence tree, I see that each 'level' has as many operations as nodes (because of only $\ 1 $ operation in each node) so in the first level it has $\ 1 $ n... |
We know that BPP is described as $\{L\mid \exists \text{ TM }M, \text{ s.t. }\Pr[M(x)=L(x)]\geq2/3\}$. I saw a proof which uses Chernoff bound to prove that any probability larger than $1/2$ can be turned to any probability in $(1/2,1)$. My question is what about probabilities below $1/2$. Do they fall on a different c... |
Does free variables have some meaning in lambda calculus? If I follow this β-reduction
(λx.λz.y x) y
-> (λz.y x){x/y} (variable FV(y) captured)
-> ((λz.y x){a/y}){x/y} (rename FV(y) -> FV(a)){
-> (λz.a x){x/y}
-> (λz.a y)
Here we have FV(y) captured during the β-reduction, so I rename it to FV(a... |
I have the following question:
We begin with a computer implemented in single-cycle implementation.
When the stages are split by functionality, the stages do not require
exactly the same amount of time. The original machine had a clock
cycle time of 7 ns. After the stages were split, the measured times
were IF, 1 ns; ... |
I understand the concept that if there is no Hamiltonian path so there will be 2 smaller paths and with them I can build more then one topological sort but I am not sure how make it formal.
Can you help me to structure the proof?
|
I know that this language is not regular L = {w | na(w) = nb(w)} where na(w) is the number of a's in w. But what if now the language changes to that the number of a's has to be greater than b's? I think not, because we do not have finite number of prefix equivalence class. And in that case, how can I prove it? Or if it... |
I have the given regular language and i am suppose to check if it is regular and if it is, to provide a regular expression
However, if the language is not regular i have to prove using the "Pumping Lemma" that it is not regular
it is regular if, it can be represented by a finite state automata (FSA)
or, if it can be ... |
I was wondering which runtime is a tight upper bound for $f(n,m)= n^2 + 1/2^k$ with $k = n - m$
Intuitively I thought that $f(n,m)$ is in $O(n^2)$ but the longer I am thinking about this the more I tend to say that $f(n,m)$ is in $O(2^k)$.
Can anyone help me?
|
In asymptotic notation the transivity holds, however what happens when we have small o such as if f(n)= o(h(n)) does that means that also g(n)=o(h(n)) holds?
i take as granted that both of f(n)=o(h(n)) is true and f(n)= O(g(n)) (from THETA) then i need to show
g(n) < c h(n) given that i have f(n) <= d g(n) and f(n) < c... |
I'm trying to use the pumping lemma, to show that the language $$L = \{w \in \{a, b\}^+: na(w) = nb(w)\}$$ is not context free, where $na(w)$ is the number of $a$'s in $w$ and $nb(w)$ is the number of $b$'s in $w$.
I have this: By contradiction, if $L$ is context free, we use the pumping lemma, then let $N$, and $w = a... |
Euclidean division is an iterative process
that has been made super-efficient at the CPU level, right?
Its specification is that if I do (q, r) = f(n, d), I get super efficient result verifying that n = d * q + r with maximal q.
I need to perform a similar decomposition of an integer number, into the highest inferior t... |
I'm trying to grasp what does associative actually mean in n-way set-associative cache. I understand n-way set-associative cache as a concept; n is the degree of associativity, i.e., how many cache lines a set can hold.
If I take associative to mean "having the tendency to connect", I get to the "sets tend to connect t... |
Given a set of integers S (positive and negative, may contain duplicates) can S be divided into three disjoint subsets that all sum to the same value? Prove this problem is NP-complete.
Is it possible to show directly that Subset Sum $\le_p$ 3-Partition, or would I have to do
Subset Sum $\le_p$ Partition $\le_p$ 3-Par... |
I have this language $L=\{a^nb^nc^n,n\geq0\}$, I know this language is not context free, but I don't know how to show that it is context sensitive, do I have to use a PDA?
|
As mentioned in several resources such as Wikipedia the optimal number of hash functions for a bloom filter is known to be $$k=\frac{m}{n} \ln 2$$ but how is this number derived? It seems that it's the number that minimizes the false positive rate which is equal to $$(1-(1-\frac{1}{m})^{kn})^k$$
Can anybody explain the... |
Show that for every large enough $n$, there is a boolean function $f\colon \{0,1\}^n\longrightarrow\{0,1\}$, whose average case hardness is exponential. The question is taken from Arora Barak Computational Complexity textbook, Chapter-16, Ex-3.
Average case hardness of a boolean function $f$ is defined as, the largest ... |
I have the an algorithm for computing a matrix determinant:
$$\ det(A) = \sum_{i=1}^n (-1)^{i-1} \cdot A_{i1} \cdot det(A_{-i,-1})$$
Where $\ A_{-i,-1} $ is the matrix $\ A $ without the row $\ 1 $ and column $\ i $
Drawing the recurrence tree, I see each level $\ k $ has $\ \frac{(n-1)!}{(n-k)!} $ nodes. So I think th... |
I'm looking for suggestions on algorithms, data structures or at least problems (so that I look for solutions in that domain) to consider. I realize that exact solution probably doesn't exist. But the more similar problems/solutions I can find the more ideas they may inspire.
We need to transfer reactants from source v... |
Let $G=(V,E)$ be an undirected graph. I would like to maintain information about the connected components of this graph(I want to be able to tell in what component particular node is lying). The graph operations are the following (basically, everything except vertex deletion):
Add vertex
Add edge
Delete edge
What are... |
I am unsure what it means for a grammar to be $X$. More specifically, what it means for a grammar to be LR(0).
For part of an assignment I had to form the DFA for a grammar, which I had no issues with. And then I have been asked whether the grammar is LR(0).
My guess is yes, but not because I understand exactly what it... |
For a boolean function $f:\{0,1\}^n\longrightarrow\{0,1\}$ $H_{avg}(f)$ is defined as the largest $S(n)$ s.t. for all circuit $C_n$ of size $S(n)$, $\Pr_{x\in U_n}[C_n(x)=f(x)]<1/2+1/S(n)$. Here $U_n$ is uniform distribution over $\{0,1\}^n$.
According to Nisan Wigderson 1988, I know that if there exists $f\in E$ with ... |
Given an array of integers, how can we generate all the increasing subsequnces of length of 4 ?
Example: given this list
l = [1, 2, 4, 5, 3, 6]
The answer should be :
[1, 2, 3, 6]
[1, 2, 4, 5]
[1, 2, 4, 6]
[1, 2, 5, 6]
[1, 4, 5, 6]
[2, 4, 5, 6]
I generated this algorithm using python :
def verif(x,temp):
work=[... |
I'm trying to find out what the data of a packet means. I'm a newbie to networking, and I try to find what's sent in this packet:
https://pastebin.com/hZEqjmBx
How can I do that? What does that data mean? How do you decode it, or is it crypted or something? I pasted the whole HEX + ASCII dump of the packet.
|
I need to proof, that both definitions of the Big 0 notation are equiavlent, but I am not sure if my proof works both ways of the equivalence.
Definitions:
Let f,g be functions.
$f(n)\in \mathcal{O}(g)\Longleftrightarrow \exists c>0\exists n_0 \forall n\geq n_0 :f(n)\leq cg(n)$
$f(n)\in \mathcal{O}(g)\Longleftrightarr... |
The exercise says "Show that the solution of $T(n) = T(\lceil{n/2}\rceil) + 1$ is $O(\lg(n))$." I came up with a solution for this exercise using the substitution method but I don't know if it is correct. My solution goes like this: I claim $T(n) \leq c\lg{n}$ and assume it holds for $\lceil{n/2}\rceil$, then
$$
\begin... |
I just read the chapter on locks in the book Operating Systems: Three Easy Pieces, and it discusses an implementation of locks (see in Figure 28.9) that involves a test-and-set hardware instruction.
The textbook emphasizes that both hardware support and OS support are necessary to build an efficient locking mechanism. ... |
An array of length K is called good if for each subarray of the array, the sum of the subarray is not divisible by K+1. You are given an array A of length N. Find the number of subsequences of length B of array A which are good. Since the answer can be large, return it modulo 10^9+7.
Constraints:
1 <= N <= 1000
1 <= ... |
I'm breaking my mind to find a good explanation to split two variables with the XOR operation.
The operation is the following:
x ^= y # => (x ^ y, y)
y ^= x # => (x ^ y, y ^ x ^ y) = (x ^ y, x)
x ^= y # => (x ^ y ^ x, x) = (y, x)
and my doubt is about the second line, in particular (x ^ y, y ^... |
I am trying to proof $f\in o(g)$
Let be $r,p\in \mathbb{R}$ with $p>0$
We have $f(n)=ln^r (n)$ and $g(n)=n^p$
I have already proofed that $ln(n)\in o(n)$ via l'Hospital
$\lim\limits_{n\to \infty}\frac{\frac{1}{x}}{1}=0\Longrightarrow \lim\limits_{n\to \infty}\frac{ln(n)}{n}=0\Longleftrightarrow ln(n)\in o(n)$
I tried s... |
I want to create a turing machine that describes the language L={x#y | x,y\in {0,1}* and x is a substring of y}.
However I'm not sure how to start writing the transition function δ as I've just gotten acquainted with turing, can you point me the transitions so I can draw the state diagram and understand more?
|
I have the following Turing machine: A 2R-3L-TM is similar to a standard TM with the change in which the head can only move either 3 cells to the left or 2 cells to the right (those are the only possible moves).
and I want to prove equivalence between 2R-3L-TM and standard TMs (one tape and the head can move single cel... |
I posted this on mathoverflow but haven't recieved any comments. I wonder if there might be some insight from this community. Thanks!
The problem
Suppose you have nonnegative integer vectors of length d, $x$, $y$, $z \in \mathbb{Z^+}^d$. We know that $\sum_{i=1}^d x_i + y_i = \sum_{i=1}^d z_i$. I wish to find permutat... |
The language $L=\{W\in\{0,1\}^{*} \mid W=0^{x}1^{y} \text{ where } x\geq0, y>0 \text{ are integers and } y\nmid x\}$ is not regular.
How would one prove this using Pumping Lemma?
I thought about it for quite a while but couldn't quite figure it out. Lots of number theory is necessary I'd imagine.
|
I have the following problem. Given a below boolean formula (of the type explained below) containing $n$ literals and two parameter $k$ and $l$, come up with a satisfying assignment of literals such that no more than $k$ of them are set to true. ($l$ will be explained below.)
An example boolean formula with 4 literals ... |
I search good articles or books on neural network. unfortunately i don't a lot of time and only now i started to research this field. so i actually search a good source that will give the fundamental (basic theory and tools to understand complexed neuroal networks).
any suggestion?
|
I have an unlabeled dataset: 500 X-rays of seeds in husk. In each image there are different number of seeds, for instance, from $10$ to $50$.
A seed has some features. The main features are a seeds' square and a husks' square in pixels. I need to calculate the these features ratio.
I am looking for an objects recogniz... |
I have this language {0+1+0+} and i need to prove it is regular,i had the idea to use the closure properties but i can find any regular languages to unify perhaps.Any ideas?
|
Let's say I have a code which does coin toss at 25% win probability.
If I run this code n number of times in the same system it will yield ~25% win.
If I run this code on n devices (once each) will the result be ~25%.
n = very large number.
Are my assertions right?
Edit:My key doubt was, since computers use pseudo ra... |
I am wondering how to calculate the number of spanning arborescences in a directed graph when a root is specified. For example:
where there are 5 spanning arborescences. Note that there is an edge from b2 to b3 and one from b3 to b2.
Angela Pretorius mentioned a method in Number of Spanning Arborescences, Mathematics,... |
On our lecture slides we have two different notations of the gaussian function.
First it gets introduced as follows:
$$p(x_n|\theta) = \frac{1}{\sqrt{2\pi}\sigma}exp\{-\frac{(x_n-\mu)^2}{2\sigma^2}\} \text{ with } \theta=(\mu,\sigma)$$
But later it is used like this:
$$\frac{1}{\sqrt{2\pi}\sigma}exp\{-\frac{||x_n-\mu||... |
I have to prove that if a language $L$ is regular then:
a) $NONPREFIX(L)=\{u \in L / $none of the prefixes (not $\epsilon$ or $u$) of $u$ are elements of $L \} $ is regular
On this one I think I can divide the words of L in two parts and get it, since regular languages are closed under concatenation, I dont know if thi... |
Typically, OCaml and Scala seem to be used for designing any programming languages tool. But what features offer them an edge over other languages.
A related question, is a type system for a language always written in the native language itself?
|
So I recently came across Benford's law and immediately tried to code it out but the answer I got was rather confusing. I've been thinking about it for about an hour now and still can't get it, I think my code is correct I'm pretty sure it is but the result is just not the one others get. Here's the code:
float[] a=ne... |
Besides the fact that the real numbers ℝ go on forever whereas the floats only go up to a certain point (Float.MAX_VALUE) in Java, what else could I compare between these two sets of numbers?
|
I need to create a PDA that accepts by empty stack and accepts the language formed by strings over the alphabet $\{a, b\}$ of the form: $uw$, where $w$ is the string $u$ reversed and doubled. So, for example, if $u=ab$ then $w=bbaa$ (the $ab$ is reversed then its characters are doubled).
Examples of strings in the lang... |
I have this language: $L=\{x^ny^jz^k:k=j\cdot n\}$, I know I can use the pumping lemma for CFL, but I have managed to do it for $k, j, n \leq 0$, and with $k = j \cdot n$ I have not been able.
|
I am learning computational geometry by myself using these lecture notes from ETH Zurich. Here is an exercise (8.9) I have been stuck for a few days:
For a line arrangement $A$ of a set of $n$ lines in $R^2$, let $F$ denote the union of the closure of all bounded cells. Show that the complexity
(number of vertices and... |
I'm looking for the correct terminology in regard to map (dictionary) data structure.
When I'm talking about the semantics of the values stored in map in the direction from keys to values, I'd say, for example
messages keys are mapped to message strings
When I'm using the opposite direction - describing the values fi... |
I was reading Ke chen's paper about coreset construction for K-median clustering. In this paper, he assumed that $A$ is an $[α, β]$-bicriteria approximation for K-median clustering for some $α, β=O(1)$. I am wondering if the construction still work if $A$ is an arbitrary set of $αk$ centers?
Can anyone help prove the c... |
I know that I can $(\lambda x.1) 0 \rhd_\beta 1$. This is the constant 1, but can I contract it automatically? I mean, is $1$ the normal form of $(\lambda x.1)$?
It seems reasonable to do it but when goes to combinators this sense stops, I mean, if I can $\lambda x.1 \rhd_\beta 1$, then I would $\lambda xy.y \rhd_\beta... |
I am struggling with the calculation of the worklist algorithm, I do not want to implement the iterative algorithm as so many redundant steps it takes.
The algorithm I am following to calculate the worklist for live variables is as below
Can anybody explain to me for my example given below, what would be my initial wo... |
Given an array $S$ with $n$ real numbers. Design a linear time algorithm that finds $x,y \in S$ such that that $|x-y| \leq \frac{max(S)-min(S)}{n-1}$.
I was thinking that it is similar to the closest point problem but that can only be solved in O(nlogn).
Please help
|
I just got my master's degree in mathematics, it was related to abstract algebra. I'm thinking about applying for a doctoral degree, however, I deeply want to study something with an "applied" appeal.
Does anyone know a branch of computer science that can be done by math students but that can still be considered math?... |
You are given $n$ real (unsorted) numbers $_1,_2,...,x_n$. We want to compute the maximal difference between two consecutive numbers in sorted order. Explain how to do it in $()$ time when you are allowed to use additions, subtractions, multiplications, divisions and “floor” function. Notice that sorting immediately le... |
Let's say we consider IEEE 754 double precision floating-point numbers, and we use RNTE - Round To Nearest, Ties to Even - rounding.
I know that the RNTE rounding works this way:
given two consecutive floating-point numbers, a and b, and a real number x,
if a <= x < (a+b)/2, x gets translated to a
if (a+b)/2 < x <= b,... |
Let $X$ be a finite multisubset of $\mathbb{N}^2$. Let's introduce the following notation:
$A$ is a set of all first elements of pairs from $X$ and $B$ is a set of all second elements of pairs from $X$.
$cnt_1(n) = |\{(n, b)|(n, b) \in X\}|$ (that is a number of elements in a corresponding set).
$cnt_2(n) = |\{(a, n)... |
$P \ne NP$ would imply that any polynomial is a lower bound on the time complexity of any NP complete problem.
Is some non-trivial lower bound known at all?
|
I have one formula that I do not understand why it is CNF and one that is not CNF, namely.
p && !q (NOT NCF)
and
!!p(CNF).
According to the exercise where I found these examples, 1 is not CNF and 2 is CNF.
How can the first formula not be CNF, when for example p && q is CNF.
If for example !!p is part of a formula ... |
Now that Apple is switching the MacOS platform to ARM chips, much has been said about the benefits of ARM processors (they save energy, are passively cooled, and the Apple M1 seems to be faster than even an Intel Core i9 processor).
I'd like to know what advantages of the x86 platform are left. Are there any specific c... |
Given $n$ cities, describe a data structure which supports the following functions:
Init$(n)$ - initializes the data structure in $O(1)$
Visit$(j,i)$ - adds "citizen from city $j$ would like to visit city $i$" in $O(1)$
Favorite($k$) - prints the $k$ most favorite cities in descending order in $O(k)$ (ignore ambiguity... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.