instruction
stringlengths
35
29.1k
What could be the basic examples (or the one that we are familiar of) of static and dynamic RAM? My Thoughts: First of all $\color{RED}{\text{RAM}}$ is something whose contents will be lost if power is removed Now, in $\color{green}{\text{Static RAM}}$, the contents of the memory do not change with time and they hold...
I am having a hard time understanding maths behind a 1x1 convolution and how is it actually performed. Assuming that I have a 6x6x32 input to my 1x1xK convolution layer similar to the one presented in this video and shown below. I understand that I would take a 1x1x32 slice from the input ( blue in the image below), bu...
I would like to extend ECMAScript by adding new keywords and syntax to it, for example: |variableName| stipulates a special kind of variable which I would like to be able to include in a normal ECMAScript line of code, for example: |variable1| = 1 + 1 |variable1| = |variable2|.length - 3 a more complex one would be: @...
The programme returns the number of digits of an integer $n>0$. I still have some difficulties to understand the difference between the loop invariant condition and what the loop should actually does. Clearly, we loop until the number is greater than 0. Is this the loop invariant condition? I know that by definition, ...
As a student of mathematics I used to accept the argument that the existence of the empty set followed from the axiom schema of comprehension, so long as we could prove the existence of at least one set: if a is any set, then we can derive the existence of {x:a | bot }. I would then argue using the axiom of infinity th...
I have seen this question here, Closure of Turing-recognizable languages under homomorphism But actually this question answers the question of "What is the relation between homomorphism and concatenation?", so I still have a problem of how to show that the collection of Turing-recognizable languages is closed under hom...
Problem: Given a string $s$ and a DFA $D$, compute the longest subsequence of $s$ such that the subsequence is accepted by $D$, or report that no such subsequence exists. This problem has a runtime of $O(qn)$ where $q$ is the number of states of the DFA, and $n$ is the length of the string. This problem is supposed to...
The number of possible min-heaps containing each value from {1,2,3,4,5,6,7} exactly once is: My approach went like this: fixing 1 in the root for the remaining 6 elements we can choose 3 of them and then make a full node(node with two children). For a given set of 3 nodes we can arrange them in 2! ways i.e the children...
for a class project we have to count the number of collisions from inserting words from a plaintext document into a hashtable. I read that using prime numbers for table sizes can offset the collisions resulting from a poor hashing function. Do I have to create a poor hashing function to demonstrate the effects of table...
I am working on a problem where I need to binary search on a given array and there can be updates for a given index. As the updates can occur frequently, I need to do it as efficiently as possible. Could you please suggest an appropriate data structure which would update the element in O(log n) and allow me to perform ...
$\sum$ is the Alphabet of three infinite languages $L_{1},L_{2}$ and $L_{3}$ where $L_{1}\cup L_{2} \cup L_{3}=\sum^{*}$ and $L_{1} \cap L_{2} = \emptyset$, $L_{2} \cap L_{3} =\emptyset$ and $L_{1} \cap L_{3} = \emptyset$ is it possible that $L_{1}$ is Decidable, $L_{2}$ is Turing Recognizable but not Decidable and...
I am trying to dig further into machine learning and I am making a program to play a game as a start. I have created a game that is based on the mobile game Flappy Bird and can be generalized to the following: Actions $A = \{\text{no action}, \text{tap}\}$ States $S \subset \mathbb{R}^3$ such that $s \in S$, $s_1$ ...
Suppose $G$ is a random graph on $n$ vertices where each edge appears with probability half. Suppose someone looks at the resulting graph and chooses an arbitrary subset $W$ of vertices of size $k>\sqrt{n}$. How do the eigenvalues of the induced subgraph $G[W]$ behave? In other words can we say that for every $W$ of s...
I am going through the following introduction to lambda calculus : http://www.cse.chalmers.se/research/group/logic/TypesSS05/Extra/geuvers.pdf At page 12 , the following has been asked to prove $ \exists $ $ G $ $ \forall X $ such that $GX$ = $GG$ This means to find a function which takes a function as an argument an...
How can one design a regular expression for given string in title ? Also how can we draw DFA of that regular expression? I've tried many expressions but couldn't succeed, please help.
Is it possible to create $O(1)$ memory consuming algorithm, which is generating non-repeating pseudo random numbers? I can remember numbers in the hash set and it will be $O(1)$ time, but the set will grow as numbers generated as $O(N)$. Is it possible to do $O(1)$? UPDATE Narrowing the question: we have parameter $N$....
I'm recently learning the part of I/O buffering of operating system and according to the book I use, When a user process issues an I/O request, the OS assigns a buffer in the system portion of main memory to the operation. I understand how this method is able to avoid the swapping problem in non-buffering situation....
I am taking a course on natural language processing that assumes the students have some background on theory of computation. I dont, but have read up till chapter 3 of the book "Speech and Language Processing by Jufrasky". I therefore understand the following regular expressions and regular languages operations on reg...
i'm currently converting this NFA: into DFA, however it's a bit confusing and my result so far ended with: However, this doesn't seem right to me, and i would love to hear if im on the right track or not
To be specific, the problem is formalized as follows. Given a set of integers $\{a_1,\ldots,a_n\}$, determine whether there exist non-negative integers $x_1,\ldots,x_n$ such that $a_1x_1+\cdots+a_nx_n=0$ and at least one of $x_1,\ldots,x_n$ is positive. Note this is not a duplicate of this problem. In that problem, th...
How can we make a DFA for given condition in title from alphabets {0,1} (binary). What can be the regular expression for this? My calculated expression is (a+b)*a(a+b)(a+b) , please correct me if i'm wrong and help find the correct expression and it's DFA.
I am trying to come up with a matchmaking algorithm based on player ratings for my game, and I am pretty sure the algorithm I have is not the best (or maybe doesn't even work), but have no idea how to improve it. Suppose that I have 5 players, ABCDE, and I want to create a 2v2 match. Each party of 2 have their own rati...
Let's define the sequence of $k$-Fibonacci numbers as $$ F_i = 2^i, ~~ 0 \leq i \leq k-1 $$ $$ F_i = F_{i-1} + \dots + F_{i-k}, ~~ i \geq k $$ I have a problem which requires to compute $n$-th $k$-Fibonacci number modulo $10^9 + 7$ efficiently. $n$ can be as large as $10^6$, $k$ can have any value between $1$ and $n$, ...
The proof is given in the below: If $A$ is decidable, the enumerator operates by generating the strings in lexicographic order and testing each in turn for membership in $A$ using the decider. Those strings which are found to be in $A$ are printed. If $A$ is enumerable in lexicographic order, we consider two cases. If...
I am learning about compilers at the moment and in my textbook it is briefly mentioned that UD/DU (Use-Def, Def-Use Chains) a way of saving information from the reaching definition is. It is just said that, when a variable is used, it has a list of the reaching definitions. The problem that I am having is, that I am no...
Given a complete graph $G$, an arbitrary graph $H$, and a positive integer $n$, are there subgraphs $A_1,\dots,A_n$ of $G$ (not necessarily disjoint) such that their union is $G$, and each of them are isomorphic to $H$? This is a problem which I believe is NP-complete, but I am unsure if it is actually so. Any id...
What are the advantages of using FPGAs over GPGPUs? It seems like GPGPUs have the best of CPUs and GPUs combined.
I am learning how to minimize a DFA. One helpful approach is the Myhill-Nerode Theorem, which explains: Draw a table for all pairs of states (P,Q) Mark all pairs where P is a final state and Q is not a final state. If there are any unmarked pairs such that [delta(P,x), delta(Q,x)] is marked, then mark (P,Q) Combine ...
From what I learned, viola jones needs images with faces upfront. Tilting the head a few degrees to each side can botch the algorithm. Is it possible to take an image, take a several rotated copies of it and run the algorithm on each one? This limitation sounds like only a minor neusense to me. Is there a stronger reas...
Let L1 and L2 be two non empty regular language. How can I show that the following expression is correct with an example ? $\bigotimes$ denote the transducer cross product. $L_1^+ \bigotimes L_2^+$ contains $(L_1 \bigotimes L_2)^+$ ============================================================================ Thanks PHP...
By analytic proof, I mean mainly resolution and also other valid syntactical manipulations of the set of clauses, old and new. So this is a search over problem space rather than solution space. The question is: Is there a family of instances of SAT that doesn't have polynomial-size analytic proofs of their satisfiabili...
I'm reading Rosen's Discrete Mathematics and Its Application, at Page 212, it's about the "Big-O" notation using in computer science. This is the description in the book: And here is my reasoning: Since there wasn't a program with "negative" steps, I only consider the case $n>0$. With $n$ is $O(2^n)$, there exist two ...
In my textbook, it presents the theorem, "A language L is accepted by some DFA if and only if l is accepted by some NFA". My textbook explains that the "if" portion of the proof is given by the subset construction and theorem if $D=(Q_D, \sigma, \delta_D, {q0}, F_D)$ is the DFA constructed from NFA $N=(Q_N, \sigma, \de...
I was learning about heaps, and came to know that the worst case time complexity of heap sort is Ω(n lg n). I am having a hard time grasping this. My reasoning is as follows: 1. Build a max-heap out of the unsorted array, say A. (O(n)) 2. Exchange root of the heap (max element in the heap) with the last element of ...
I need to approximate the sine function without internal libraries. I used Taylor series in 0 to solve this, but my program works for some values, but for others awful results. The program gets x value, unit (degrees or radians) and how many words we want use for the approximation. For values like 1 rad, 5 words resul...
I have a virtual world with a grid filled with squares (x by y). There are entities that can do: 1. move 1 step in the four cardinal directions 2. eat food 3. fight another entity of a different type 4. mate with the same type of entity to reproduce (create one more of that type of entity) The objective is to obtain ...
Let's consider finite grid of points with size of $N$ by $M$ and set of $x$ points ($x$ is small number, up to 10, $N$ and $M$ are big numbers, up to 30000 )). Each of the $x$ points is described with 2 values $(x_i, y_i)$. We want to count the size of set $y$ such that $y$ includes all the points in the grid that are ...
It is known that finding an independent set (or a clique) of size at least $k$ in a graph is $W[1]$ hard, so it is unlikely that there is $f(k)\cdot n^{O(1)}$ time algorithm for finding an independent set of size greater than equal to $k$. I was looking at the complementary problem - "Whether or not removal of at most ...
What is an algorithm that can find the best possible matches given a set of data. I have read up on stable roommates problem and or stable marriage problems. However, from my understanding, these type of algorithms only output a specific match (pairings) and not a set of possible matches. For example, say we have a gro...
First, I am aware at least one or two similar questions have already been asked on stack exchange, but I've gone through the answers they got and didn't find one that was satisfactory for my case. The question itself is as follows. Suppose I have a sum $X=\sum_{i=1}^{n}{X_i}$ of mutually independent indicator random va...
I'm a high schooler who has been self-learning graph algorithms for a month or two now. I was wondering why the distance array in Dijkstra's algorithm is initialized to infinity (INT_MAX in C++) when it could just be set to a negative number? Since Dijkstra's isn't even used for negative numbers, why isn't the distanc...
I know that there are some languages that are unambiguous but not context-free (this is a good fact). Is there any kind of formalism for describing unambiguous context-sensitive languages? Even better yet, is there a parsing algorithm for unambiguous context-sensitive languages?
Let's say there's a cloud computing service that allows people to run arbitrary programs and get the results. The idea being that your machine is too slow, and you don't want to overwhelm it. If your program is something like "factorize 15672965357291016", then it's a perfect candidate for this service, because you can...
Let $\Sigma$ be 0,1,2. I am interested in the language of all strings $w$ such that the sum of $w$ characters (where the char 0 is treated as the number 0, the char 1 as the number 1 etc) is divideable by 5. Obviously this is a regular language, and I can also find a simple linear grammer. My idea for a regular expres...
I saw a similar question to this one here but it's not quite the same as mine: Is every algorithm's complexity $\Omega(1)$ and $O(\infty)$? I've just started a course in data structures and introduction to algorithms and there's a question on a homework assignment whose answer is a little unclear to me: Given $f:\mathb...
Fermat's Little Theorem states that if an integer $n$ is prime them $$ a^n \equiv a \pmod n \hspace{10mm} (*) $$ for any $a \in \mathbb{N}$ My question is, is it correct to say that testing $(*)$ for some given $a$ has complexity $\Omega (n)$, since we would have to calculate $a^n$ which would require $n$ (multiplicati...
The following algorithm is supposed to compare two strings $S_1$ and $S_2$ ("/\" for empty string): X = S1 Y = S2 E = true // (1) S1 = S2 <=> X = Y and E = true while X != /\ and Y != /\ and E == true if head(X) == head(Y) X = tail(X) Y = tail(Y) else E = false // (2) S1 = S2...
A trie can answer a query for all items with a certain prefix in $O(m + \log n)$ time, where $m$ is the number of matches and $n$ is the number of items. A trie also supports $O(\log n)$ insertion and deletion and takes $O(n)$ space. Now suppose each item has a score. I am looking for a data structure that can answer a...
I'm trying to understand "A Systematic Approach to Canonicity in the Classical Sequent Calculus" by Kaustuv Chaudhuri, Stefan Hetzl, Dale Miller. The article discusses a property called "canonicity" with respect to a logic (or perhaps just specifically for sequent calculus?). As far as I can tell, they don't directly p...
Given two integers $n$ and $k$, I want to compute the exact value of the binomial coefficient ${n \choose k}$. Here $n$ and $k$ are given in their binary representation, meaning that the size of the input is about $\log n + \log k$. How fast, in big-O notation, can we compute ${n \choose k}$? One can compute this in ti...
Suppose there is a communications channel between two parties. Suppose I want to send information through this channel, but I want to make it look like noise. Ie, I don't necessarily want to encrypt it, though I'm not prohibiting encryption - the point is I want to be able to transmit information to someone else such t...
I need help with figuring out an algorithm from a generated numbers in a table. I was half way solving this question and I have already got the sequence for N=6, but I'm still stuck at writing the actual algorithm
I'm reading Operating System Concepts by Avi Silberschatz(9thE), in chapter 11 File-System Interface, when the author explains the concepts of file, he states that The information about all files is kept in the directory structure, which also resides on secondary storage. Typically, a directory entry consists of the...
Background: I was trying to detect a face solely on the bases of features and the confidence of the features found. I am using a method to identify the features along with the response (confidence). Stronger features have higher responses. I was trying to identify rotations of face. So, I was thinking about using ellip...
Let $T=(V,E)$ be tree and each edge has a positive scalar weight. I need to print all paths in the tree and then sort the weight of edges in each paths. it needs $O(n^3\log(n))$ time. To solve this problem we can rooted the tree in a leaf and print all vertices by preorder algorithm and in each step we insert the new...
So I have a problem, and it's an assignment from school. This is a figure made out of matchsticks. The goal is to find the optimal location to light up the figure so that it burns in minimal time. You can only light it up at integer positions (C,B) but not A. Different matchsticks may have different burn times. My app...
Let $G(V,E)$ be a graph and each edge e∈E has a positive length $\ell_e$. The radius of the graph is $rad(G)=\min_{v∈V}\max_{u∈V}d(u,v)$ where $d(u,v)$ stands for the shortest path between $v$ and $u.$ Now let we are allowed to increase the edge lengths by total increasing equal to B so that the radius increases as muc...
In our language design book, it is mentioned that GC sweep can be integrated into allocation, such that when you call malloc for example, you sweep until you find a fitting object, which you then return (i.e. sweeping is not a different procedure). It, however, also mentions that this is only viable when the objects al...
I am reading the book "An introduction to statistical learning with applications in R". I am reading Logistic Regression and I don't understand why when it's compared to linear regression model, the author said that "the problem with this approach: for balances close to zero we predict a negative probability of default...
Let $\{x_1, ..., x_n\}$ be a set of $n$ distinct variables, and suppose given a finite set of $m$ inequalities such that, for all $1 \leq i \leq n$, the $i$-th inequality is of the form: $$y_i + a_i \leq z_i + b_i$$ where $y_i,z_i \in \{x_1,...,x_n\}$ are variables and $a_i, b_i \in \mathbb{Z}_{\geq 0}$ are non-negativ...
I'm just a little confused about the wordings for reductions and would appreciate some help as I am very new to reductions. I have a question where I have two sets, A and B, and I have to provide a reduction A $\leq_p$ B and then I have to prove that the reduction is correct. What does this mean exactly? For the redu...
I have an assignement where I need to use a Genetic Algorithm to solve the TSP (Traveling Salesman Problem). I alrerady implemented a solution in C# but the problem is we're asked to use some kind of method to do the Parameters Tunning (For example to pick the population size, mutation rate, etc..). For now, I only try...
Are Brute Force Algorithm and Exhaustive Search both references to the same ideas?
I have gone through a list of scheduling algorithms and their implementation, however couldn't find any reference to implement an algorithm that solves the following problem. Given an array of processes having n process, the i'th process being represented by: Arrival[i] representing its arrival time, Depart[i] represen...
I am studying Computer Graphics and need to design an incremental algorithm for solving the polynomial $y = ax^3 + bx^2 + cx + d$, and then implement that in OpenGL. The input will be the values of $a, b,c,d$ and the desired output is a line/curve to be drawn. The values of $x$ would be in the range $1\leq x\leq100$. T...
To prove that a certain problem is in P we have to give an algorithm that decides or solves it in polynomial time. To prove that a problem is in NP an algorithm must exist so that it can check whether a certain input is a solution to the problem in polynomial time (validate the input). I am very confused as to how we ...
(Note: this was asked in the cstheory stackexchange, but I was told this is a more appropriate place for it.) I have three 8-bit 2's-complement numbers (X, Y, and Z). I want to find a propositional logic formula using only the variables (x1, x2... x8, y1... y8, z1... z8), where xi is the ith bit of x which expresses th...
I know that finding a Hamiltonian circuit is in NP and I know that finding an Eulerian circuit is in P. However, what about the following problem: Must leave the starting vertex and visit every other vertex; You may only return to the start after visiting every other vertex; You can visit the same vertex multiple time...
Prompt: if $N$ is NFA that has at most one choice of state for any state and input symbol, then the DFA constructed from $N$ by subset construction has exactly the state and transitions of $N$ plus transitions to new dead state whenever $N$ is missing transition for given state and input symbol. Prove this contention. ...
My professor gave the reduction of Independent Set (IS) $\leq_p$ SAT where SAT is the set of all satisfiable propositional formulas in conjunctive normal form, and IS the set of all pairs (G,k) where G is an undirected graph with an independent set of size k, given as as an exercise and I'm a little confused as to what...
I'm considering the following definition of one-way functions: Let $f : \{0,1\}^k \rightarrow \{0,1\}^k$ and $b : \{0,1\}^k \rightarrow \{0,1\}$ be computable in poly($k$) time. We say that $f$ is a one-way function with hard-core bit $b$ if, for all polynomial-time randomized algorithms $A$ and all constants $c$, $...
I'm sure this problem has been addressed before, but I'm unable to find an exact description of it. I have $m$ machines, and $n$ tasks that need processing. Each task takes a variable amount of processing time, $t_i$, but this processing time is constant regardless of which machine processes it. Each task is also assi...
The problem I am working on is the following: Show that there exists an $NP$-Complete problem in $SPACE(n)$. Does the existence of such a problem imply that $NP$ is contained in $SPACE(n)$. Why or why not? $SAT$ is contained in $SPACE(n)$. To show that, simply store Boolean formula (takes $O(n)$ space) and try a...
In the below diagram, each node takes up a space of 2KB. I need to find the total memory consumed to reach the goal : I I know that the equation for BFS is b1 + b2 + ...... + (bd+1 - b) Where b is the branching factor and d the depth But how do I calculate the branching factor in the below diagram, where the branches a...
Let $G$ be a finite group given by the table representation and a normal subgroup $H$ of $G$ is given. I want to compute $G/H$ that is quotient group. Model of computation is RAM For all pair of $a$ and $b$ in $G$ just check $a.b - b.a = 0$ , but it is going to take much time $O(n^2)$. Is there a faster algorithm to s...
Does every language $C$ in the class $BPP$ have a mapping reduction to $A_{TM}$? $(C\leq _{m} A_{TM})$ $BPP$ is the class of languages that have a probabilistic $TM$ that accepts them with an error $\epsilon$ less than 1/3. $A_{TM}$ is the acceptance language, takes as input a $TM$ description of $M$ and a word w, then...
I'm about to study a system that takes words in a formal language $L$ and converts them into words in a different formal language $L'$. In other words: a formal language transformer. I was wondering if there is literature on formal language transformers, some standard way of studying, and defining them? All I found are...
I'm reading Operating System Concepts by Avi Silberschatz(9thE), in section 11.4 File-System Mounting, the author explains the steps of filesystem mounting as follows: The operating system is given the name of the device and the mount point—the location within the file structure where the file system is to be att...
An 8-way set-associative cache is used in a computer in which the real memory size is 222 bytes. The line size is 16 bytes, and there are 26 lines per set. A) What is the size of the cache in bytes? What I (think) I understand: Cache line and cache block are synonymous. The textbook says that an n-way set-associative...
Why is there a need to scan each root node of the binomial trees in a binomial heap to find the minimum? For example, why can't the true root of the binomial heap, the one that leads to the root nodes of the binomial trees, be the minimum? If it is not the minimum, then what value should it be?
If X is in NP-complete and complement(X) is in NP, show that for all Y in NP, complement(Y) is also in NP. I am struggling with figuring this out. I know this means Y can be reduced to X, so if I could solve X I could solve Y. I can't solve X, but I have a certifier for X and complement(X). I am having trouble combinin...
In class we have learned that division takes O($k^2$) where k is the bitlength of the numbers used in the operation. What would be the runtime of a function that looks like this? while a % 2 == 0: a = a / 2 I am guessing the worst case is $O(log(k)k^2)$ as a decreases by 2 each time but each division takes $k^2$
When compiling a piece of software (with LLVM for exmple), you first transform your code into some kind of intermediate representation (IR code). This IR code needs to be converted to your target specific assembly code. When we have a fixed processor architecture, often optimizations are made to make the machine run a ...
This "research vignette" (whatever that is) claims that the polynomial hierarchy classifies problems according to a natural notion of logical complexity, and is defined with an infinite number of levels: problems at the zeroth level are the “easiest”, and for every integer $k$, problems at the $(k+1)$-st level have lo...
I read few papers while trying to find some better approachs to solve the TSP (Traveling salesman problem) as close to the optimal solution as possible. I implemented a Improved Greedy Crossover (https://arxiv.org/ftp/arxiv/papers/1209/1209.5339.pdf) and I saw in the same paper that he uses the 2-opt heuristic (and the...
Let $G=(U \cup V, E)$ denotes a bipartite graph. A biclique $C = (U, V)$ is a subgraph of $G$ induced by a pair of two disjoint subsets $U' \subseteq U$, $V' \subseteq V$, such that $\forall u \in U', v \in V': (u, v) \in E$. Given $\delta$, I'd like to identify bicliques $(U',V')$ such that $|V'| \ge \delta$. Since ...
Suppose I have a collection of N items, each of which has A different attributes, a1, a2, ..., aA. Attribute ai can take on Vi different possible (discrete) values, distributed across the population with some kind of complicated joint probability φ(a1, a2, ..., aA). It is quite likely that many possible combinations ...
What is the most complicated kind of deterministic finite-state automaton that can be minimized in $O(n)$ time? Here’s what I’ve been able to find so far: The acyclic case has been solved. So any acyclic DFA can be minimized in $O(n)$ time by the Revuz algorithm [2]. As for cyclic automata, an automaton that is a simp...
As an assignment, I've to come up with constructive proofs for the following languages to be regular supposing A and B are two distinct regular languages. $$L_1=\{w│w^R∈A\}$$ $$L_2=\{w│w=a_1 b_1,…,a_k b_k;a_i∈A,b_i∈B\}$$ $$L_3=\{xy│yx∈0A\}$$ $$L_4=\{w│w∈A,∄y∈B:w=xyz for some x,z∈Σ^* \}$$ $$L_5=\{w│∃x∈B:wx∈A\}$$ I've al...
This proof is from Introduction to Automata Theory Languages and Computation by Hopcroft & Ullman and is regarding a 'bad case' for subset construction. The NFA which is being converted is as follows: The argument for this then goes as follows: Consider the NFA N of Fig. 2.15. $L(N)$ is the set of all strings of $...
I am learning Shamos's rotating calipers algorithm for finding the diameter of a convex polygon in his Ph.D. thesis; Page 78. It reads Consult Figure 3.23 and notice that parallel lines of support cannot be made to pass through every pair of points. For example, no lines of support through vertices $D$ and $F$ can be ...
I'm new to computer vision and I have a common question that I couldn't figure out with Internet or books. As I understood, in general, there are two main approaches in modern computer vision: neural networks based methods and more "classical" methods that use feature extration (edges, keypoints, gradient and etc), lik...
Given a finite set $S$ of points in $\mathbb R^d$, how can we efficiently compute a "most isolated point" $x\in S$? We define a "most isolated point" $x$ by $$x = \arg\max_{p \in S} \min_{q \in S \setminus \{p\}} d(p,q)$$ (I used the $x=\arg\min$ notation even though it is not necessarily unique. Here $d$ denotes the ...
Suppose that we have a CNF SAT instance where each clause contains all variables (i.e. in each clause for each variable either the variable or its negation is presented). Such problem can be trivially solved, since any such instance either contains all possible clauses or is satisfiable. Question: is there some a simil...
I want to compare swarm intelligence algorithms in a optimisation problem. As far as I understand, a typical approach is to perform several runs of each algorithm (say 30 independent runs, with different random number generator seeds) and compute the average performance of best-of-run individual for each algorithm. Th...
Hash tables perform lookup, insertion, and deletion in O(1) time (expected and amortized) while the different variants of binary search tree (BST) - treap, splay, AVL, red-black - offer at best O(log n). So, in a course on data structures, is the study of BST's of any value except as a historical note?
When we have a decision problem, " does $f(x)=1$ hold?", we call the set of strings $x$ for which the answer is yes a "language". Why this strange terminology?
$A\leq_p B \iff \bar{A}\leq_p \bar{B}$ (if A is polynomial time reducible to B does that imply that complement of A is polynomial reducible to complement of B) I was told that this is the case based on the definition of $\leq_p$ but I am having trouble proving this.
I've heard that C++ and Python where implemented using C. How can someone make an object oriented language out of something that doesn't support objects? I've read in the book "Math You Can`t Use - Patents, Copyright and Software" that code is considered an equivalent of mathematics because it will eventualy be ran on ...
There are several pseudorandom number generators that we have no known polynomial time algorithms for inverting (finding the initial seed). Is it correct to say that inverting these generators is an NP problem?