instruction stringlengths 35 29.1k |
|---|
I was wondering about a problem in analyzing a social network (counting friends-in-common between all pairs of members) that requires squaring its adjacency matrix, and started reading up on algorithms for multiplying sparse matrices.
However, all I found so far were different ways of arranging the more or less naive "... |
how i can define what are Client-Server Architecture for a website that suggestion courses for students after students insert the history of courses. The language will be PHP,mysql and HTML. In this case ,server side is the PHP and client side will be the HTML . Is that how i can define the Architecture? If no , what ... |
I would like to know about how we can detect how 'deep' into a scene a user is looking. If looking into a 3D environment, with an object close to the user and one further away, how can we detect when the user is looking at the object further away? Or, rather, how can we detect which object a user is looking at in a 3D ... |
I know how to find SURF feature points and have code to find them, but I have no idea how to find the same point in 2 different images, I have
laplacian, scale, orientation, descriptor, response and x, y. If i give it a very simple image, a triangle with no bottom and place it in two different places in two different ... |
$n$ people want to have dinner together around a table for $k$ nights so that no person has the same neighbor twice.
How big can $k$ be in terms of $n$?
Does everybody get to sit next to everybody else?
How many seating arrangements are there?
|
What is the simplest example of a rewriting system from binary strings to binary strings
$$f:\Sigma^*\rightarrow\Sigma^*\qquad\Sigma=\{0,1\}$$
that can perform universal computation? Binary string rewriting systems in general can compute any computable function, but I have trouble finding particular instances that can ... |
What would be an ideal environment/manner to judge the effectiveness of multiple segmentation algorithms? The goal is to determine which algorithms provide the best results for pre-clinical imaging. Our group has considered a GUI in MATLAB, and have different modules for different algorithms. Various papers have conduc... |
Assume you have two parameters, $N \gg 1$ and $\epsilon < 1$.
I have an algorithm (and matching lower bounds) that runs in $\Theta(\epsilon^{-1}+\log N)$ for $\epsilon > N^{-1}$, and $\Theta\big(N\log\big(\frac{2}{N\epsilon}\big)\big)$ otherwise.
I would like to write it using one notation (possibly with $\max$ or $\mi... |
This might be too easy... But I just don't get it.
I've been reading about flow in networks and I stumbled upon this definition in wikipedia: https://en.wikipedia.org/wiki/Flow_network
$\sum\limits_{w\in V} f(u,w) = 0 $
$(\forall u \in V-\{s, t\})$
That implies
$\sum\limits_{(u,v)\in E} f(u,v) = \sum\limits_{(v, z)\in... |
For example, we can say we have a abstract program that, given a finite binary string as input, removes all of the zeros (i.e. 0010001101011 evaluates to 111111), which is definitely a Turing-computable function.
How can a cyclic tag system compute this (which it can, by definition of it being Turing-complete) when it ... |
I have a fairly general problem and I wonder if it has a name. The problem statement, as best I can put it, is the following:
Let $I=\{i_1,i_2,...,i_n\}$ be a set of items. Let $C=\{C_1,C_2,...,C_m\}$ be a set of containers. Each container is unique and contains a set of items from $I$. Let $C_{a,b} \subseteq C$ be th... |
The primary definition of Turing machine (TM), at least in my own reference
textbook (Hopcroft+Ullman 1979) is deterministic.
Hence my own understanding of the halting problem is primarily for
deterministic TM, though I am aware that it may be considered for other kinds of automata.
I also noticed that determinism is o... |
In a research paper I read $F(n) \leq O(g(n))$ and $F(n) \geq \Omega(h(n))$.
Isn't this the same as $F(n) = O(g(n))$ and $F(n) = \Omega(h(n))$?
Is there a difference?
|
Given a graph G, and positive integers k, q, pack the edges of G in (pairwise edge disjoint) connected sub-graphs, each of size (number of edges) at most k, and such that, no vertex is part of more than q of these connected sub-graphs.
What is the closet related problem already studied? What can be said in case we rest... |
In the field of data structures (and maybe in graph theory), can we use the term topology to speak about the shape of a tree? For instance, consider the two following trees :
1) The first one:
Node $a$ is parent of $b$ and $c$.
Node $e$ is parent of $a$ and $d$
2) the second one:
Node $a$ is parent of nodes $b$, $c$ an... |
My question is why the dynamic programming of the knapsack problem does run in polynomial time? The question is answered here Why is the O(nW) algorithm for the Knapsack problem not a polynomial one?
I understand the argument of the answer above. Also the answer is given in this book ''The Desing of Approximation Algor... |
Recently I was faced with the following Graph traversal problem:
"Given an arrangement of buildings in form of a DAG. All the buildings have to be colored, but there is an order for that represented by edges in the DAG. If there is an edge from A->B, this would mean building B can only be colored after building 'A' has... |
L is as usual the complexity class DSPACE($\log n$), of languages decidable using a deterministic Turing machine using logarithmic workspace.
Is L closed under linear-time reductions?
It is possible that for some pair of languages Q and R, every linear-time reduction from Q to R requires more than logarithmic space.
... |
In the context of communication complexity I see a definition of differential privacy which isn't totally clear to me as to why it makes sense.
So the two parties $A$ and $B$ draw two strings $X$ and $Y$ from the set $S^n$ where $S$ is some finite set. Let $P$ be the protocol. Now if $z_1 = (X_1,Y_1)$ and $z_2 = (X_2,... |
For the program
mean(A,n)
if n = 1 then
return A[n]
else
return A[n]/n+mean(A,n-1)*(n-1)/n
end
Show that if the recursive call to mean (A, n-1) returns the mean of A[1,...n-1] then the call mean (A,n) returns the mean of A[1,...n].
I know that the program always terminates with mean (A... |
There's tons of research on program transformations for optimization. Is there any research on transformations that improve numeric stability? Examples of such transformations might include:
Transform $\log(\exp(a)+\exp(b))$ into $\max(a,b)+\log(\exp(a-\max(a,b))+\exp(b-\max(a,b)))$
Convert multiplication of an inve... |
I'm trying to use computer vision to identify objects an image. I am currently using the SURF algorithm, but Harris and SURF both find virtually no points on our objects (a paper ball and a deodorant can) due to their simple features. If it does find points it finds one or two that aren't the same points it find in the... |
I am having trouble finding an example for the following algorithm to prove that it calculates a 2-approximation:
Repeatedly select a vertex $v$ of highest degree, add one of its edges $(v,w)$ to the cover, and remove all edges incident to $v$ or $w$.
Please give me insights on how to pick an example.
|
I was listening to Eric Demaine's video lecture on AVL trees and there was a claim that comes up that keeping a trit on each node (to indicate whether the node is left heavy, right heavy or balanced) should be sufficient for all AVL tree operations, so essentially we don't need to keep heights of the node for every nod... |
could someone provide me/refer me to a intuitive idea/proof behind Kirchhoff's Matrix Tree Theorem that uses as little technical details involving matrices/linear algebra as possible? I'm trying to give a group of talented high schoolers who haven't seen matrices before a sketch/cursory proof of the result, but I could... |
Thanks in advance...looking for recommendations on an algorithm to find all paths of length n starting from a single node in a directed, cyclic graph.
I am not concerned with at which node the path completes. i.e. not looking to travel from i to j in a path of a certain length. I would like to start from i and end ult... |
I jsut read up on the principle of centrality, where
"Think of a "network" as an NxN matrix, which has information about how N people (or N pages or N countries..) are connected to each other.
Adjacency Matrix is an NxN matrix, let's say it looks something like this. People who aren't connected to each other have A[i]... |
I have the following algorithmic problem. I am given a set of elements. Each element has a set of properties. For example:
A: has properties p1, p2, p4
B: has properties p2, p4
C: has properties p2, p1
The task is to find the number of subsets of elements, where the union of the properties of the elements in the su... |
I have to solve the following problem:
Al and Bob are arguing about their algorithms. Al claims his $O(n\log n)$ time method is always faster than Bob’s $O(n^2)$ time method. To settle the issue, they perform a set of experiments. To Al’s dismay, they find that if $n<100$, the $O(n^2)$ time algorithm runs faster, and ... |
In graph theory, the crossing number cr(G) of a graph G is the lowest
number of edge crossings of a plane drawing of the graph G.
(from wikipedia)
I know that the problem of counting the Crossing Number of a graph to be less than or equal to K is proven to be NP-Complete by Garey and Johnson in 1983. I couldn't f... |
I am trying to understand the concept of logical to physical addressing.
I am given 72 physical addresses (0-71) with values
A virtual address = 2^(p+w)
p = page bits
w = word bits
I know the page table is of size 6 indexed 0-5
If a page size is 16 words does that mean that the offset(w)=4, giving me 2^(p+4).
If tha... |
I'm studying ones' complement representation and I read in a book that a negative number in ones' complement is a pseudo-positive of value $R^n - 1 - |x|$.
However there is no demostration and I can't find it anywhere. If someone could tell me the reason I will be very thankful.
|
Perhaps my limited understanding of the subject is incorrect, but this is what I understand so far:
Functional programming is based off of Lambda Calculus, formulated by
Alonzo Church.
Imperative programming is based off of the Turing machine model, made
by Alan Turing, Church's student.
Lambda calculus is as powerful... |
Given the following recurrence:
$$ T(n) = T(n-1) + n^2$$
How can I prove it to be $O(n^3)$ with the substitution method? The $O(n^3)$ guess derives from the fact that at every step of the recursion we pay $n^2$ and we have $n$ steps of recursion therefore having: $n \times n^2 = n^3$.
I would even expect this to be $\T... |
As is widely known, Alan Turing discovered/invented the Turing Machine in his classic 1936 paper. Here he also gave how these machines are specified in terms of their machine states and instructions on how they operate. Is there any official or widely accepted name for this "first" mathematically defined programming la... |
Look at the diagram in the middle of page 6-3 here,
http://stellar.mit.edu/S/course/6/fa14/6.845/courseMaterial/topics/topic3/lectureNotes/qctlec6/qctlec6.pdf
I am confused as to how should one think of the Hadamard gate.
As per the mathematics shown below it seems that the Hadamard gate, $H$ acts on tensor products o... |
By a word frequency algorithm:
An algorithm gets a document as an input, and returns each unique word along with the number of times it has appeared in the document.
For example:
in:"Hello my name is Hello"
out: {'Hello':2, 'is':1, 'my':1, 'name':1}
In my implementation, I used a hash table to store the words.
But I'... |
In algorithms we use to find Big-O (upper bound), Big-omega (lower bound) and Big-Theta but why we are always interested in finding upper bounds instead of lower bounds?
|
I understand what parity is (Sort of):
A data recovery mechanism where missing data is calculated based on the data that exists. However i have encountered terminology which i can't define or put into perspective of the RAID system.
This terminology is 'dedicated' and 'distributed' Parity. Now i imagine that it is som... |
I want to find all the simple cycles with bounded length that pass through a vertex in a directed graph. Enumerating all the cycles in large graph takes exponential time. Since I need to find only the cycles that passes through a given vertex and I can save the running time. But I am not getting any proper algorithm to... |
I got this question in a past test that I'm trying to solve but i don't have the solutions to check my self:
Given a set of n segments $[a_i ,b_i]$ where $i=1,..,n$ and $a_i < b_i$.
write an algorithm which find a segment that the number of segments $[a_l ,b_l]$ before it $(b_l < a_i)$ are equal to the number of segmen... |
I'm trying to show that
$L=\{ \langle M \rangle \colon L(M)=L(M)^R\}$ is undecidable, but I don't even know where to begin. Google wasn't much of a help, maybe because it's hard describing the language in words. Any hints?
|
I have a large number of floating point numbers (~10,000 numbers) , each having 6 digits after decimal. Now, the multiplication of all these numbers would yield about 60,000 digits. But the double range is for 15 digits only. How can I get my product with minimum loss in precision?
I thought of storing the numbers as 6... |
I'm designing an in-memory object database for a very specific use case. It is single writer, but must support efficient concurrent reads. Reads must be isolated. There is no query language, the database only supports:
get object/-s by attribute/set of attributes (there may be support for expressions, e.g. x.count < 5... |
I have the following interface:
public interface TreeElement<T>{
public List<TreeElement<T>> getChildren();
}
Now, suppose I have a collection of TreeElement<T> representing a valid tree. How to find it's root element? Is there something more efficient than iterating over the whole collection?
|
Assume that initially in array each element has infinity as value.
Now M queries are input of the type l r x.
Here l to r is range where value need to be updated if a[i]>x where l<=i<=r. and l<=r<=n
After M queries you need to output the minimum value at each index.
One way to this is to use Brute Force
memset(a,inf,si... |
Let $L(M_k) = \{ \langle M \rangle | M \text{ halts on }\epsilon \} \cap \Sigma^k $
Disprove that $\exists f\colon N \rightarrow \Sigma^* . f(k)=\langle M_k \rangle$.
I am not sure where I am wrong:
I said that I can convert the question to whether the language of all the Turing machines that accept the language $L(M... |
Let's say I have some very long hex fraction like this:
0.3F30A21306AEFCBADE3230A593EFAEB395A39E
What are some algorithms with an acceptable complexity to convert it to the associated decimal string:
0.246835...
?
|
I'm reading "Structured Programming with go to Statements" by Knuth, and in it, he gives the following algorithm and a run-time cost analysis of some hypothetically generated code, letting $n$ stand for the number of times around the loop, and where instruction fetch and memory accesses cost one unit, so for example $r... |
This comes from trying to understand the "Simon's algorithm".
So we have a set of $2^n$ kets $|x_i \rangle$ one each for $i \in \{0,1\}^n$. Each $x_j \in \{0,1\}^n$. And we have the further constraint that $x_i = x_j$ iff $i = j + s \pmod{2} = j \oplus s$ (bitwise addition modulo $2$) for a certain $s \in \{0,1\}^n$. ... |
I'm not sure if this is an open question, but what is the graph with $8$ vertices and $12$ edges that has the most spanning trees?
|
I have trouble determining the running time function for algorithm below. I know that there are initially two assignment operations, int i=n and int s=0.
Also, I know that the while loop is represented by $\lfloor \log_2n \rfloor + 1$, but the for loop depends on the value of $i$ which decrements by half.
So, the first... |
I was having a heated debate with a friend of mine (who considers me an idiot, mind you) and we were arguing about whether a compiler has an index, or coefficient, that judges how poorly code is written. Things such as useless for loops, declared variables that aren't used, excessively verbose parameter names, and the ... |
Consider the (big-step) semantics of a language ($a, e$ terms, $v$ values), defined by two mutually recursive relations, $\downarrow$ and $\Downarrow$, given by a set of rule-schemata (simplified):
$\frac{a \cdot x \Downarrow e ~~ e \downarrow v}{a \cdot x \downarrow v}{\tiny PROJECT} ~~~~~~~ \frac{a \downarrow \{ \ldo... |
I am starting to study about Multi Agent Systems and I wanted to know which sciences are most used in these systems, I am aware of game theory and Markov statistical relations (Markov Decision Process and Markov Hidden Model).
But I am not aware of all.If someone could name them for me it would be appreciated.
I also w... |
I am trying to calibrate a Markov Chain. Usually you would have the amount that "moves" from one state to the other and then the resulting value, with data at any given time with the following arrangement:
$$
\begin{matrix}
F_{a,a} & F_{a,b} & F_{a,c}\\
F_{b,a} & F_{b,b} & F_{b,c}\\
F_{c,a} & F_{c,b} & F_{c,c}\\
... |
I have an edge weighted $N{\times}N$ graph and the edge similarity values are bound to $[0,1]$. What I am trying to do is to find a cut-off threshold below which I can say that that edges are noisy/ non relevant. What I have tried so far is removing edge values that are below median or 60% - 70% quantile. Another appr... |
My question is about D2D as it relates to 3GPP (release 13+, I believe). All I have read on the subject uses Game Theory as a mechanism to explain usage. Why would authors use Game Theory for explaining D2D with 3GPP (5G, LTE) communication? Have telephony companies had to do the same with 3G and 4G for some reason?... |
Suppose we have a DAG of tasks:
Arrows represent flow (reversed dependencies: 8 must be run after 7). Some of the tasks (like 4, 5, 6) can be run in parallel (Par block). Dependent tasks (like 7, 8, 9) must be run sequentially (Seq block).
I need to parse this DAG into recursive structure of Seq and Par blocks (collec... |
In an answer to a previous question Luke Mathieson wrote:
A place where this might fall down is when you are working with numbers. As a number with magnitude $m$ can be encoded in $n=O(\log m)$ bits, if our running time were $O(m)$, this would be $O(2^n)$ - exponential in the actual input size - which would make the m... |
I have already taken a college course at my uni on machine learning where we implemented all the basic ML programs: linear regression, logistic regression, basic neural network with logistic regression (not perceptron, but we learned the theory of perceptron as a history lesson), k-means, and naive Bayes classifier. Th... |
Languages to express domain rules are quite diverse from very simple and inexpressive to Turing-complete programming languages. If we consider developing some DSL (domain-specific language), is there any generally useful scale (Chomsky hierarchy comes to mind as an analogy, as well as Description Logic "letters", like ... |
I'm not really sure, if this is the right place to ask this question. I would have asked on stackoverflow, but since my question is rather theoretical, I ask here. When I'm wrong, please migrate. Thank you :)
I'm trying to multiply polynomials using FFT. When doing an FFT in-place, the output is in bit-reverse order,... |
I am quite new to vision and OpenCV, so forgive me if this is a stupid question but I have got really confused.
My aim is to detect an object in an image and estimate its actual size. Assume for now I only want length and width, not depth.
Lets say I can detect the object, find its size(length and width) in pixels and ... |
I am looking for an efficient method to find all unique combinations of $n$ rows in a matrix.
For example, if $n=6$, then I want to find all sets of 6 rows from the input set C in which the columns have only unique values.
Input:
C =
[[ 3.031 3.392 2.987 4.248 3.364 3.354]
[ 3.031 3.392 2.987 3.975 2.911 3... |
I have a map size of 8 x 8 cells with no obstacles. I should generate random path from start cell to the end cell with given length. Path can move up/down/left/right directions but not cross itself. What algorithm I can use to do this?
|
Some lambda terms, such as the church number 3: (f x -> (f (f (f x)))), are easily typeable on the simply typed lambda calculus. Others, such as pred, (a b c d e f -> (d (g -> (t -> (t (g e)))) (g -> f) (g -> g))), are known to require more complex systems such as System-F. Some of them aren't typeable on System-F itse... |
I don't know if there is a canonical problem reducing my practical problem, so I will just try to describe it the best that I can.
I would like to cluster files into the specified number of groups, where each groups size (= the sum of sizes of files in this group) is as close as possible to each other group in this clu... |
How many operations are performed in the following in order to get a running time function of an algorithm:
x = x + 1
x += 1
x++
I know that in (1) there are 2 operations: an assignment and an addition.
Does the same criteria apply to (2) and (3)?
|
Would a class in Linear Optimization/Programming be useful for a CS degree?
What is it used for or how useful is it.
Can someone please help me decide. Thanks in advance
|
Let's say I have a programming language that allows procedures, i.e., methods without return values, and immutable data-structures, so no sideeffecting inside a procedure. Is it possible to simulate a program written in a language with return values in our language?
In other words, do return values allow for a more adv... |
Recently I've accepted a job offer to work on compiler design. To be properly prepared I've decided to review the material. The book that is being used for that is Cooper and Torczon's Engineering a Compiler. That's the one we used in a class. On page 645 there is a definition of a schedule, but I can't figure out what... |
The question is a bit unclear, so let me explain. Finding local alignments in sequences like protein sequence is a well studied area in bioinformatics, and I do not think there is any lack of information on that.
However, recently, I had to tackle a problem in which sequences had partial orders - meaning that some par... |
I was watching a lecture and got confused over a slide. This is what it says:
Consider a polynomial - first representation
$$P = 2 + 4x^{3} + 8x^{6} + 7x^{25} + 6x^{99}$$
The space complexity is 100 memory locations.
The time complexity is:
Access lookup operations: 100
Multiplication operations: 4 + 7 + 26 + 100 =... |
In my Algorithms and Data Structures course, professors, slides and the book (Introduction to Algorithms, 3rd edition) have been using the word NIL to denote for example a child of a node (in a tree) that does not exist.
Once, during a lecture, instead of saying NIL, my classmate said null, and the professor corrected... |
According to the answer of Andrew Yeats in this link, quantum computer's advantage is so narrow that personal computer is not likely to benefit from the development of quantum computer. I think this is understandable, so will the growth of calculation speed of personal computer end after that of classical computer will... |
I've been programming in languages (C/C++/Ruby/Java/HTML) for some time now and am currently entering my senior year of high school. I'm taking AP Comp Sci, which uses Java, but want to have a better grasp of some of the more "math-y" concepts in computer science, like hashes/algorithms/etc. For someone who has done ba... |
I'm reading a book on compilers, Engineering a Compiler, 2nd ed. by Keith D. Cooper & Linda Torczon and I came a across two new terms that I can't understand, they are:
transitive successor and transitive predecessor of a node $i$
I tried to find definitions of those online, but I'm having hard time with it. Everythi... |
For a set of items with two properties, how can it be detemined if they can be ordered in a way so that for every value of either property all items of that value are grouped together.
Obviously trying every possible ordering is out of the question.
For example, if each item has a number and a letter, the following seq... |
A threshold function is a function $f: \{0,1\}^n \to \{0,1\}$, defined by $n$ integer-valued weights $w_1, w_2, \ldots, w_n$ and an integer valued threshold value $w_0$. It works as follows:
$$f(x_1, x_2, \ldots, x_n) = \begin{cases}0 \text{ if } \sum_{i=1}^n w_ix_i \ge w_0 \\ 1 \text{ otherwise.} \end{cases}$$.
I'm co... |
http://cs.jhu.edu/~misha/Spring14/Preparata77.pdf
This is a divide and conquer algorithm for computing the convex hull in 3 dimensions.
I am having trouble understanding the merge step, which is titled Merge in 3 Dimensions, outlined in the paper.
I am specifically having trouble understanding how the number of compa... |
I'm working on a programming task that I, without good evidence, have a sneaking suspicion is NP-Complete. With that said, I would like confirmation on this if possible, as well as some suggestion for a way to approximate a reasonable solution. Lastly, if this problem is just some popular problem in disguise, I'd love ... |
I have been reading about the Rabin Karp algorithm and I kept wondering what's the big deal with keeping our rolling hashes values bounded by a value Q?
I'd thought that as our integer number representation on the typical computer is 2-complement, it's actually exactly equivalent as bounding all our operations over th... |
The project I am currently working on (in C#) requires generating random integer between 0 and Int64.MaxValue.
I have access to a Uniform RNG, which for pseudo-code purposes in the question, I will refer to as:
MyRNG(min, max)
My overall question has to do with how best to use MyRNG(min, max) to create a Non-Uniform ... |
I have an AVL Tree which every node has a filed with a key which is an integer. I need to save a pointer to the Minimum , Maximum and the $\left \lfloor \frac{n}{4} \right \rfloor $ nodes. the first and the second were pretty easy i just saved a pointer between each node and its follow and back nodes. But i couldn't f... |
For a code similarity detection framework I need to eliminate references to non-local variables, for example having the following closure:
{
var a;
var b;
var f = function() {
a = 5;
b = 6;
}
f();
}
would be converted into something like:
{
var a;
var b;
var f = function() {
var a = 5;
... |
Where is program counter stored? CPU caches?
Also how big are these counters?
What happens if that memory has been filled up?
I know that it's a value that stores the next instruction for the CPU to process, as well as it increments with the size of the next instruction to cycle for the next instruction for the CPU to ... |
I tried to prove that the following language is recursive: for $\Sigma=\{0,1\}$, $k$ a positive integer:
$$
L_k= H_{\mathrm{TM},\varepsilon}\cap \Sigma^k
$$
where $H_{\mathrm{TM},\varepsilon}=\{\langle M\rangle\mid M \text{ is a TM that halts on an empty input}\}$
It is easy to prove because $L_k$ is finite, but I didn... |
I have this language $ L = a^* \cup \left \{ a^mb^n|m>n\geq 0 \right \}^* $ I have to prove that this language is not regular but still satisfies the pumping lemma for regular languages (Since the pumping lemma is a necessary but not sufficient condition for a language to be regular).
First I made the leap that $L$ i... |
I'm trying to understand how trace scheduling works. The book that I'm reading, Engineering a Compiler by Keith D. Cooper & Linda Torczon, states that this method is using profiling. Profiling ranks each edge if the CFG by its frequency of execution. In other words the more a particular edge is followed the higher rank... |
I was just wondering on a more technical side, if anyone could explain what Google does to create these amazing images from it's deep dream system.
Could anyone explain to me in a step by step way, what the program does and how it does it.
|
I am given (or rather, generate randomly) three positive integers $a, b, c$. I want to know if there exist integers $m \ge 2, s \ge 1$ such that $ms+m = a, ms+1 = b, 2s+1 = c$. If there are multiple solutions, I want the minimal (if possible).
It is clear that $c$ has to be odd, so if $c$ given to me is not, then I ca... |
I have some heavy calculations that essentially takes a point in the plane as input and gives an integer as output. Points in the same region gives the same integer (think about the regions as pieces in a jigsaw (every point in completed puzzle belongs to a specific jigsaw piece), the boundaries being simple, closed cu... |
I tried to prove that the following language is recursive/decidable/in R: for $\Sigma=\{0,1\}$, $k$ a positive integer:
$$
L_k= H_\text{TM,epsilon}\cap \Sigma^k
$$
where $H_\text{TM,epsilon}=\{\langle M\rangle\mid M \text{ is a TM that halts on epsilon input}\}$
It is easy to prove because $L_k$ is finite, but I didn't... |
According to various informal analysis, we know that the running time of quickselect is o(n), by assuming thay the partition is always taking half of the array. However, my lecture gives without proof that if we do a formal analysis, we will get the following formula:
$$C_N = 2 N + 2 k ln (N / k) + 2 (N – k) ln (N / (N... |
We all know in the case of web sites, to make update just means opening the code, editing it and saving it. And to view the changes we just have to refresh the browser.
But what about in the case of compiled programs like a game or other apps or even an OS. How does it work? What happens to the code?
|
Is it possible to do universal classical computation using bits and 2-bit gates when you cannot perform a NOT operation on a single bit (hence cant do CNOT and so on). If yes, what are the possible universal sets of gates that do not utilise the NOT transformation. Thanks!
EDIT: to clarify, you can perform any set of o... |
I'm referring to the proof outlined here (and wikipedia.org):
https://proofwiki.org/wiki/Deterministic_Time_Hierarchy_Theorem
In my understanding, if I relaxed the conditions such that $K$ decides the input in time $O(f(m)^3)$, there should not be a contradiction in the final step because an appropriate TM $K$ should r... |
For the sake of simplicity, lets say I have a bunch of 2d points, each have X and Y. The points are distributed somewhat randomly but not completely, they will be biased to be closer to the world center (where ever that might be, completely random) and they are likely to have some kind of a shape. You can imagine that ... |
There is a similar question that has been asked, but my question addresses particular detail of an answer.
I am trying to reduce SUBSET-SUM to SET-PARTITION. I found the following description:
SUBSET-SUM is defined as follows: Given a set X of integers and a target number t, find a subset Y from X such that the members... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.