instruction
stringlengths
0
29.8k
⌀
If a predicate is not computable, what can be said about its negation?
|computability|proof-techniques|
If $f(x_1,\dots, x_n)$ is a total function that for some constant K, $f(x_1,\dots, x_n) \leq k$ for all $x_1,\dots, x_n$ then f is computable. I want some hints on how to prove/disprove the above claim. This an exercise from the book [Computability, Complexity, and Languages][1]. As I didn't find the solutions to t...
How to prove or disprove that f is computable?
|computability|proof-techniques|
null
If a function F is computable, so is !F, as you can simply compute F and return the negated result. For the same reason, if a function isn't computable, neither is its negation.
If $f(x_1,\dots, x_n)$ is a total function that for some constant $K$, $f(x_1,\dots, x_n) \leq K$ for all $x_1,\dots, x_n$ then $f$ is computable. I want some hints on how to prove/disprove the above claim. This an exercise from the book [Computability, Complexity, and Languages][1]. As I didn't find the solutions ...
Do "inductively" and "recursively" mean very similar? For example, if there is an algorithm that determines a n-dim vector by determine its first k+1 components based on its first k components having been determined, and is initialized with the first component, would you call it works recursively or inductively? I h...
Do "inductively" and "recursively" have very similar meanings?
I wouldn't say that ray-tracing/path-tracing is dead ... if anything, there's been quite a resurgence of popular interest in the field due to the inherent parallelism of the many associated algorithms in this area combined with the speed of GPU-based systems that are allowing for millions of rays to be calculated per-s...
>This is a problem from Interview Street in Dynamic Programming section. https://www.interviewstreet.com/challenges/dashboard/#problem/4f2c2e3780aeb >Billboards(20 points) >ADZEN is a very popular advertising firm in your city. In every road you can see their advertising billboards. Recently they are facing a se...
If you look at [wikipedia](http://en.wikipedia.org/wiki/Topological_entropy) you see that *topological entropy* is modeled after *Kolmogorov-Sinai (KS)* entropy, but it is defined without reference to a probability measure $\mu$ on the space. For [KS entropy,](http://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Sinai_e...
Given an adjacency matrix $A_G$ of an undirected graph $G$, it is easy and straightforward to compute the characteristic polynomial $\chi_G(\lambda)$. What about the other way around? The problem can be formulated as follows. > **Problem** Given a polynomial $P$, decide whether there is a graph $G$ with the correspo...
null
Given $a,b,c,d \in \mathbb Z$, $$ \begin{eqnarray*} \frac a b < \frac c d &\iff& ad < cd \end{eqnarray*} $$ My questions are: Given $a,b,c,d$ 1. Is there any way of deciding $ad<cd$ without having to preform the multiplications (or divisions), $a\cdot d$ and $c \cdot d$. Or is there some sort of proof t...
Comparing rational integers
|algorithms|integers|rational-integers|
Given $a,b,c,d \in \mathbb Z$, $$ \begin{eqnarray*} \frac a b < \frac c d &\iff& ad < cb \end{eqnarray*} $$ My questions are: Given $a,b,c,d$ 1. Assuming we can decide $x < y \in \mathbb Z$ in $\mathcal{O}(|x| +|y|)$, is there any way of deciding $ad<cb$ without having to preform the multiplications (or...
null
Define the function $f: \mathbb{N} \to \{0,1\}$ as follows. Let $f(x) = 1$ if turing machine $x$ halts on itself as input and $f(x) = 0$ otherwise. Then for all $x$, we have that $f(x) \leq 1$. Yet, if $f$ is computable, then the Halting problem should be decidable.
Questions involving rational integers. Rational integers are essentially fractions, and consist of two integers, called the numerator and denominator. A rational integer is equal to the numerator divided by the denominator.
null
Emil Post wanted to find the answer to exactly this question: Is there a non-recursive (non-computable) set which does not solve the halting problem. He succeeded only in part, but what he did, was create what is called **simple sets**. From Wikipedia: >A subset of the naturals is called simple if it is co-infini...
null
Given $a,b,c,d \in \mathbb Z$ and $b,d \notin \{0\}$, $$ \begin{eqnarray*} \frac a b < \frac c d &\iff& ad < cb \end{eqnarray*} $$ My questions are: Given $a,b,c,d$ 1. Assuming we can decide $x < y \in \mathbb Z$ in $\mathcal{O}(|x| +|y|)$, is there any way of deciding $ad<cb$ without having to preform ...
Here's a *very partial attempt* at disproof. Suppose that we can make use only of a (constant number of ) additions and subtractions in our decider, as well as a constant number of ${mod}$ w.r.t predefined numbers. In other words, we can do a constant number of $mod\ 2$, $mod\ 3$, etc. in our decider. Then the only qu...
Given $w_1,\ldots,w_n,t$, let $X$ be the set of assignments such that $\sum_i w_i x_i \geq t$, and consider the linear program with variables $z_1,\ldots,z_n$ and the $2^n$ constraints $$ \begin{align*} \sum_i z_i x_i \geq 1 & (x_1,\ldots,x_n) \in X \\ \sum_i z_i x_i \leq 1 & (x_1,\ldots,x_n) \notin X \end{align*}...
To answer the literal question that you asked, $\mathsf{HALT}$ is a boolean function, i.e. a function whose values are in the set $\{\mathsf{false}, \mathsf{true}\}$. The negation of $\mathsf{HALT}$ is the composition of this function with the negation operator $\mathsf{not}$. Since $\mathsf{not}$ is bijective, any alg...
null
I was going to meet with my TA today but just didn't have the time. I am in an algorithms analysis class and we started doing recurrence relations and I'm not 100% sure if I am doing this problem correct. I get to a point where I am just stuck and don't know what to do. Maybe I'm doing this wrong, who knows. The qu...
Can anyone help with reccurence relations?
|algorithms|time-complexity|
Just continue your reasoning as follows. \begin{align} T(n) = T(n-1) + cn^2 \\ = T(n-2) + c(n-1)^2 + cn^2 \\ = \ldots \\ = T(n-n) + c(1^2) + c(2^2) + \ldots cn^2 \\ = T(0) +c\sum_{1\leq i\leq n} i^2 \end{align} Do you know how to simplify this using the addition formula for the fir...
Here's a *very partial attempt* at disproof. Suppose that we can make use only of a (constant number of ) additions and subtractions in our decider, as well as a constant number of ${mod}$ w.r.t predefined numbers. In other words, we can do a constant number of $mod\ 2$, $mod\ 3$, etc. in our decider. Then the only qu...
Given $w_1,\ldots,w_n,t$, let $X$ be the set of assignments such that $\sum_i w_i x_i \geq t$, and consider the linear program with variables $z_1,\ldots,z_n$ and the $2^n$ constraints $$ \begin{align*} \sum_i z_i x_i \geq 1 & (x_1,\ldots,x_n) \in X \\ \sum_i z_i x_i \leq 1 & (x_1,\ldots,x_n) \notin X \end{align*}...
I am trying to understand dynamic programming and I am watching this mit video. If you guys could take some time out , can you refer to the slide on 41:36 . Why is the height m+n. I just don't get it why is the heigh of this recurrence tree m+n. http://videolectures.net/mit6046jf05_leiserson_lec15/ Thank you.
Regarding the height of a recursion tree on dynamic programming
|recurrence-relation|dynamic-programming|
I'm assuming that by `n`, you mean the total number of nodes in the binary tree. The height (or depth) of a binary tree is the length of the path from the root node (the node without parents) to the deepest leaf node. To make this height minimum, the tree most be fully saturated (except for the last tier) i.e. if a spe...
In my Java class, we are learning about complexity of different types of collections. Soon we will be discussing binary trees, which I have been reading up on. The book states that the minimum height of a binary tree log2(n+1) - 1, but doesn't offer further explanation. Can someone explain why?
Why is the minimum height of a binary tree log2(n+1) - 1?
|data-structures|
Given $a,b,c,d \in \mathbb N$ and $b,d \notin \{0\}$, $$ \begin{eqnarray*} \frac a b < \frac c d &\iff& ad < cb \end{eqnarray*} $$ My questions are: Given $a,b,c,d$ 1. Assuming we can decide $x < y \in \mathbb Z$ in $\mathcal{O}(|x| +|y|)$, is there any way of deciding $ad<cb$ without having to preform ...
Just continue your reasoning as follows. \begin{eqnarray} T(n) &=& T(n-1) + cn^2 \\ &=& T(n-2) + c(n-1)^2 + cn^2 \\ &=& \ldots \\ &=& T(n-n) + c(1^2) + c(2^2) + \ldots cn^2 \\ &=& T(0) +c\sum_{1\leq i\leq n} i^2. \end{eqnarray} Do you know how to simplify this using the addition formula for the first $...
> If $L$ is a regular language, prove that the language $L_1 = \{ uv |$ $u \in L, |v| =2 \}$ is also regular. My idea: L can be represented as a DFA and then you could add 2 consecutive transitions from every final state for the letters of v, creating a new NFA diagram. Is that correct? I'm not sure how to make ...
Regular Language Proof
|automata|regular-languages|check-my-proof|
Each level you subtract $1$ from the left _or_ the right in the worst case (when $x \ne y$). So intuitively if you go down the left over and over again (along the leftmost part of the tree), it will reach $(1,n)$, at level $m$, and you will only be able to go right from there. Then you will go down $n$ more levels to t...
Your idea correct. You should take the following path to formally write it up/prove it. First assume that $L$ is accepted by some DEA $M=(Q,\Sigma,\delta,q_0,F)$ then define a new NEA $M'=(Q',\Sigma,\delta',q^'_0,F')$ based on $M$. Just express you ideas formally, for example start with * $Q'=Q\cup\{q_\text{new...
null
I was going to meet with my TA today but just didn't have the time. I am in an algorithms analysis class and we started doing recurrence relations and I'm not 100% sure if I am doing this problem correct. I get to a point where I am just stuck and don't know what to do. Maybe I'm doing this wrong, who knows. The ques...
|algorithms|time-complexity|recurrence-relation|
Your idea correct. You should take the following path to formally write it up/prove it. First assume that $L$ is accepted by some DEA $M=(Q,\Sigma,\delta,q_0,F)$ then define a new NEA $M'=(Q',\Sigma,\delta',q^'_0,F')$ based on $M$. Just express you ideas formally, for example start with * $Q'=Q\cup\{q_\text{new...
A binary tree has 1 or 2 children at non-leaf nodes and 0 nodes at leaf nodes. Let there be $n$ nodes in a tree and we have to arrange them in such a way that they still form a valid binary tree. Without proving, I am stating that to maximize the height, given nodes should be arranged linearly, i.e. each non-leaf no...
A binary tree has 1 or 2 children at non-leaf nodes and 0 nodes at leaf nodes. Let there be $n$ nodes in a tree and we have to arrange them in such a way that they still form a valid binary tree. Without proving, I am stating that to maximize the height, given nodes should be arranged linearly, i.e. each non-leaf no...
null
Imagine two machines of different architecture which produce output of a standard format. If you have a program for one machine and can observe it's operation and output, what techniques exist to automatically produce an equivalent program for the alternate architecture? By equivalent I mean produces equal output...
Instruction Translation
|artificial-intelligence|
In my Java class, we are learning about complexity of different types of collections. Soon we will be discussing binary trees, which I have been reading up on. The book states that the minimum height of a binary tree $\log_2(n+1) - 1$, but doesn't offer further explanation. Can someone explain why?
|data-structures|binary-trees|trees|
I'm trying to trace back the origin of the general concept of Discrete Event Simulation and found a 1968 article by Fishman and Kiviat mentioning the term. It is titled *The statistics of discrete-event simulation*. However, I'm unable to verify this as the origin of the term. Is there further historical informat...
Who conceived the concept of Discrete Event Simulation, and when?
|simulation|history|
You can do it in $O(N \log N)$ time and $O(N)$ space. Instead of finding the billboards that you want to keep, find the billboards that you want to get rid of. You need to find the minimum cost set of billboards such that there is no gap of more than $K$ between two billboards. Do this by constructing a table wher...
A "simple" way of solving this problem is to write an emulator for the first machine's instruction set on the second machine. Then set the first program as input to this emulator. One could also apply [partial evaluation][1] techniques to optimise things a little, which would result in an emulator that runs only the fi...
From , the proofs by the probabilistic method are often said to be non-constructive. However, a proof by probabilistic method indeed designs a randomized algorithm and uses it for proving existence. Quoted from p103 of [Randomized Algorithms By Rajeev Motwani, Prabhakar Raghavan][1]: > We could view the proof ...
Are randomized algorithms constructive?
|randomized-algorithms|
The probabilistic method is typically used to show that the probability of *some* random object having a certain property is non-zero, but doesn't exhibit any examples. It does guarantee that a "repeat-until-success" algorithm will eventually terminate, but does not give an upper bound on the runtime. So unless the pro...
I want to learn quantum computation and information. I am studying from Nielsen & Chuang book for this. Is there any online vedio (lecture series) starts from basics of quantum computation and information up to factorization, discrete log, search etc?
Help need to learn Quantum Computation and Information
|quantum-computing|
> $L_1$ and $L_2$ are two languages defined on the alphabet $\sum$. > $L_1$ is reducible to $L_2$ in polynomial time. Which of the following > cannot be true? > > - $L_1 \in P$ and $L_2$ is finite > - $L_1 \in NP$ and $L_2 \in P$ > - $L_1$ is undecidable and $L_2$ is decidable > - $L_1$ is recursively enume...
Polynomial time reducibility
|complexity-theory|reductions|complexity-classes|
The probabilistic method is typically used to show that the probability of *some* random object having a certain property is non-zero, but doesn't exhibit any examples. It does guarantee that a "repeat-until-success" algorithm will eventually terminate, but does not give an upper bound on the runtime. So unless the pro...
I haven't watched them myself, but you could probably do worse than Michael Nielsen's videos, [Quantum Computing for the Determined](http://michaelnielsen.org/blog/quantum-computing-for-the-determined/). I'd recommend also that you look online for written lecture notes; there is a very strong culture in the field of...
null
> If $L$ is a regular language, prove that the language $L_1 = \{ uv \mid u \in L, |v| =2 \}$ is also regular. My idea: $L$ can be represented as a DFA and then you could add 2 consecutive transitions from every final state for the letters of $v$, creating a new NFA diagram. Is that correct? I'm not sure how to ma...
If $L$ is a regular language, how to prove $L_1 = \{ uv \mid u \in L, |v| =2 \}$ is also regular?
|reference-request|simulation|history|
In my Java class, we are learning about complexity of different types of collections. Soon we will be discussing binary trees, which I have been reading up on. The book states that the minimum height of a binary tree is $\log_2(n+1) - 1$, but doesn't offer further explanation. Can someone explain why?
Why is the minimum height of a binary tree $\log2(n+1) - 1$?
|data-structures|binary-trees|discrete-mathematics|trees|
I'm assuming that by $n$, you mean the total number of nodes in the binary tree. The height (or depth) of a binary tree is the length of the path from the root node (the node without parents) to the deepest leaf node. To make this height minimum, the tree most be fully saturated (except for the last tier) i.e. if a spe...
A binary tree has 1 or 2 children at non-leaf nodes and 0 nodes at leaf nodes. Let there be $n$ nodes in a tree and we have to arrange them in such a way that they still form a valid binary tree. Without proving, I am stating that to maximize the height, given nodes should be arranged linearly, i.e. each non-leaf no...
|reference-request|education|quantum-computing|
Cornell's Conway, Johnson and Maxwell's paper [Some Problems in Digital Systems Simulation][1], was published in 1959 in Management Science. It discusses many of the key points of a discrete event simulation, including managing the event list, they call it an element-clock) and refer to "more efficient but more compli...
You can do it in $O(N \log N)$ time and $O(N)$ space. Instead of finding the billboards that you want to keep, find the billboards that you want to get rid of. You need to find the minimum cost set of billboards such that there is no gap of more than $K$ between two billboards. Do this by constructing a table wher...
What is the time complexity of computing $\frac{1}{2^n} {{n}\choose{(n+2)/2}}$? $$\frac{1}{2^n} {{n}\choose{(n+2)/2}} = \frac{1}{2^n} \frac{n(n-1)\cdots ((n-2)/2)}{((n+2)/2) (n/2) \cdots 1}$$ The numerator and denominator in $\frac{n(n-1)\cdots ((n-2)/2)}{((n+2)/2) (n/2) \cdots 1}$ will take O(n) multiplications....
What is the time complexity of computing $\frac{1}{2^n} {{n}\choose{(n+2)/2}}$
|time-complexity|
Cornell's Conway, Johnson and Maxwell's paper [Some Problems in Digital Systems Simulation][1], was published in 1959 in Management Science. It discusses many of the key points of a discrete event simulation, including managing the event list (they call it an element-clock) and refer to "more efficient but more compli...
I'm assuming that by $n$, you mean the total number of nodes in the binary tree. The height (or depth) of a binary tree is the length of the path from the root node (the node without parents) to the deepest leaf node. To make this height minimum, the tree most be fully saturated (except for the last tier) i.e. if a spe...