instruction stringlengths 35 29.1k |
|---|
I've been struggling with this problem for quite a while now and every explanation I have managed to find doesn't seem to correctly solve it.
Question
Proving $L = \{a^nb^m \mid n, m≥0, n \neq m\}$ is not regular by use of Pumping Lemma. I know the correct way of prove with factorial or using closure. However today s... |
Given a character array A of size n, compute the length of a longest sub-sequence S of A such that, S read backward is also a sub-sequence of A.
Example: A = cabca
the sub-sequence S = abc is the longest of such sub-sequences.
reading S forward (abc): cabca
reading S reverse (cba): cabca
How to compute the length of su... |
Could anyone briefly show me how the Longest Common Sub-sequence of two sequences is a special case of the Sequence Alignment problem? I cannot wrap my head around this. Thank you.
|
With locality sensitive hashing (specifically multi-probe hashing http://www.cs.princeton.edu/cass/papers/mplsh_vldb07.pdf) how are the guarantee of similarity returns made? Why are there multiple tables involved in the hash indexing? Wouldn't that make it LESS probable that an item hashed to a bucket is similar to ano... |
I just started learning about linear programming in my class, and I'm having some trouble understanding the MST Formulation Integer Linear Programming (Cutset Formulation).
This is the definition:
An integer linear program that solves the minimum spanning tree problem is as follows:
$$
\begin{align*}
\text{Minimize} &... |
This question is not meant to be too theoretical or nitpicky. I have experience programming, so I'm trying to get a better understanding of what it takes to get Turing-completeness by using my intuition about practical programming languages.
Basically: What minimal elements of a language like Javascript do we need to h... |
Maybe my question is a bad question, but if it is, I want to know eactly how it is a bad question.
Suppose we have some Turing machien $M$ that takes as input a natural number $n$ in the form of a binary string, writes $n^2$ in binary on its output tape, and then halts.
What is the type signature of this machine? Here... |
If $D(n)$ is the internal path length (sum of the depths of all nodes) for some tree $T$ with $n$ nodes then we have the following recurrence relation: $$D(n)=D(i)+D(n-i-1)+N-1$$ where I simply taken an arbitrary tree with a left subtree containing $i$ nodes and the right subtree containing $n-i-1$ nodes.
Correct me i... |
I'm doing some practice questions on Big O notation and came across this question. What is the Big O order of function () = ^2 + log2() + log2(). Show your working.
My answer is O(n^2) because it's the term with the highest degree. However, I'm not really sure how to show it. Am I right by saying that it has to be pro... |
I want to get a better intuition for the curry howard isomorphism, and my intuition is mainly based on object oriented programming languages like JavaScript.
So as an example, I am going to formalize the notion of "topological space" in a hypothetical object oriented programming language with dependent type theory and ... |
In this wikipedia article, the following comment is made:
Consider an arbitrary decision problem in the class NP. By definition each problem instance $x$ which are answered 'yes' have a certificate $y$ which serves as a proof for the 'yes' answer. Thus, the set of these tuples $(x,y)$ forms a relation. The complexity ... |
I can easily make counter for consecutive numbers. But for patterns, described in below question, I'm quite unsure about my approach.
Question - We want to design a synchronous counter that counts the sequence $0−1−0−2−0−3$ and then repeats. The minimum number of $J-K$ flip-flops required to implement this counter i... |
What I have looked up into:
here, here and here
What I have learnt:
What is an interaction net, its deduction & interaction rules,
How deduction rules can be changed into interaction rules -- you "link" the two sides of one deduction rule, "magically" turn their arrows up and rearrange the bubbles, and then split them... |
A many-one reduction of problem $A$ to problem $B$ is essentially a function that converts a problem instance in problem $A$ to an instance in $B$. This allows you to use a $B-$solver one time to solve this converted instance, in order to solve an $A$-instance.
To show that $A$ is in NP-complete, people use reducibilli... |
I am reading through the Girvan-Newman description, having come from the topic of "detecting communities in a complex system".
What exactly is a community in this context and why is it useful for a network to know about it? In simpler terms, what's a real-life usage of this algorithm?
|
PS It isn't a homework problem..
(But the results seems to be working for me when I checked manually a couple of values of m and n)
Let's say I have two FSM's(calling them A and B)
A is the the machine for checking divisibility by any +ve number (calling it m)
B is the the machine for checking divisibility by any +ve ... |
Some textbook show that the grammar $G=(N,T,P,S)$ below belongs to context-senstive grammars:
S->aSBC
S->abc
cB->Bc
bG->bb
where N={S,B}, T={a,b,c}.
I am confused by the fact that the production rule cB->Bc cannot satisfy the definition of a CSG. So, why is the above grammar belongs to CSG?
|
I want to formalize Interval Newton Methods in Isabelle. As a research, I have the curiosity of whether there is anything done in the field. For that, I need to know what mathematical contents have been formalized in different proof assistants.
For Isabelle, this is easy: just google the Archive of Formal Proofs. What... |
I have seen a few proofs that the Blank Tape Halting Problem is undecideable, however I'd like to check if the following is a valid proof (and if it isn't why not)
Proof: Suppose that the Blank Tape Halting problem is decideable, then there exists a universal turing machine $M$ that decides it. So given any turing mach... |
Say I have an array of integers like so:
[2,2,3,5,5,5,5,6,6,7,7,7,7,9,10]
I'd like to find all combinations of these values that when summed exceed the maximum (in this case 10) by the smallest amount (in this case a number that is closest to 11).
The function for this array would output [[9,2], [6,5], [7,2,2], ... etc... |
In the context of CS, how the hash-table and hash-map are different?
I was watching a part of "Algorithm with Swift" video in Udacity, and I discovered the terms "hash-table" and "hash-map" are somewhat confusing.
As far as I understand,
hash table → stores keys only → Swift Set.
hash map → stores key/value pairs → ... |
A Field-programmable gate array (FPGA) is generally more efficient than using a "hard-coded" processor like a CPU or GPU for highly specific applications like bitcoin mining or doing structurally identical computations many times over.
however, FPGA as far as I know are beaten in computational efficiency by Application... |
This is a continuation of a question I asked here. The puzzle Icosoku is now described by Wikipedia as: "The puzzle frame is a blue plastic icosahedron, and the pieces are 20 white equilateral-triangular snap-in tiles with black dots and 12 yellow pins for the corners. The pins are printed with the numbers from 1 to 12... |
As i've been told , a Branch Target Buffer (BTB) acts a lot like a cache for Branches , keeping a map of where branches are in the address space.
If implemented well , it should allow the processor to detect branches before even decoding them , redirecting the PC to the presumed target ( with the help of the branch pre... |
We know that P $\subsetneq$ EXPTIME, and that P $\subseteq$ NP $\subseteq$ EXPTIME.
I hear alot about the P = NP question and why it would intuitively be weird if it holds true, but I don't hear about the intuition behind why people think that NP $\subsetneq$ EXPTIME.
Are there intuitive reasons to assume that NP = EX... |
Not sure if this is a proper place, but I really don't know where else to ask. I'm craving for an algorithm generating certain sequences of numbers (the problem comes from physics).
I'm looking for all such sequences of $a_n$ an $b_n$ that:
$$
\begin{cases}
\sum \limits_{n=1}^{K} (n a_n) + \sum \limits_{m=1}^{K} (m b_m... |
I also came across something, which is not completely understandable for me, so I ask here.
Given is a qubit in an entangled state, this is:
$$ \frac{1}{\sqrt{2}}(\left|00\right>-\left|11\right>) $$
Now it is said that one could also apply the Hadamard transformation to the first bit and measure the first bit of the pa... |
I am attempting to resolve the following problem using Backtracking:
Suppose that you have $n$ men and $n$ women and two matrices P y Q (n x n); such that $P_{ij}$ is the preference of the man $i$ for the woman $j$ and $Q_{ij}$ is the preference of the woman $i$ for the man $j$.
Depict an algorithm that follows the B... |
My problem is a modification of the known problem. Suppose you have a building with n floors. (Where n can be any size). Furthermore you have an indestructible egg at your disposal. If the egg is thrown from a floor which is not the maximum one gets a message. If the floor was too high you don't get a message. How ca... |
I came up with this Hangman variation, where you must figure out the hidden word by asking whether a string is a substring of this word. E.g. if the hidden word is "abracadabra" and I guess "cad" I will get a positive result, and if I guess "arb" I get a negative result. When I guess the word I win.
My first question i... |
My problem is mainly from this lecture notes on convex optimization here page4
Consider a s-t Minimum problem, on unweighted undirected graph $G=(V,E)$,we can formalize in following linear integer programming problem
\begin{equation*}
\begin{aligned}
& \underset{}{\text{minimine}}
& & \sum_{u,v\in E}|x_u-x_v| \\
& \tex... |
We have to derive an optimal binary encoding for the infinite set of symbols $\{s_1, s_2, \dots \}$. Their distribution is given by
$$p(s_i) = 9 \cdot 10^{-i}$$
My intuition was to use a Huffman encoding. Obviously the Huffman encoding
algorithm needs to first find the smallest two elements, which we can't do. But, if ... |
As the title reads, I’m just trying to understand if there is any difference between memcomputing and neuromorphic computing. If so, what are they?
Memcomputing: https://www.popularmechanics.com/technology/a16308/memcomputer-quantum-computing-alternative/
|
Suppose you have files with size $1,2,3,4\dots$ (which can be arbitrarily large and which have and can have any value that you want) and a USB-stick whose memory size $s$ you don't know, where $s$ is a positive integer and can be arbitrarily large. If $s$ is not smaller than your current file you get a message that it ... |
I'm given a set of $n$ numbers. Is there a data structure that builds in $O(n)$ (linear time) and gets the $k$'th largest element in $O(k)$ time? Also, is there anything better than $O(k)$?
|
Suppose st: string -> nat and X stands for the string 'X'.
Given the hypothesis not(st X <> 0), I can successfully derive
assert (st X = 0). { omega. }
But in Coq's constructive logic, a proposition of the form (P -> False) -> False does not in general imply P.
I imagine the fact that st is a function enables one to p... |
How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs
... the result of any execution is the same as if the operations of all
the processors were executed in some sequential order, and the
operations of each individual processor appear in this sequence in the
order specified by its ... |
I have an assignment where I have to prove that solving a crossword puzzle is an $NP$-complete problem by reducing from EXACT 3-SET COVER. I have more or less given up at this point. If anyone could give me a hint or know where to find the proof, it would be much appreciated.
Problem: [${\bf CrossWordPuzzleConstructi... |
This is an interview question.
Say you have a function foo() which returns some integer.
You need to write an algorithm that does the following:
(1). Call foo() in a loop, till the returned value of foo() is -1.
(2). Returns true if during the loop there were two calls of foo() which returned the same... |
My question is about small set expansion properties of random unbalanced bipartite graphs.
Fix a positive $\delta<1/2$, and a positive integers $n,m,d$. Let us call a bipartite graph $\mathcal{G}$ an $(n,m,d,\delta)$-expander if the graph has $n$ left vertices, $m$ right vertices, every left vertex has degree $d$, and... |
The scenario is something like this
I have tasks that get requested, with a category and a priority
For simplicity let's assume that rate of incoming tasks and completion is about the same, with some existing backlog of tasks
Each category of tasks can only be completed at some certain rate
Completion of tasks is hand... |
I am trying to solve an assignment problem-like from a bi-objective persepctive where I have a marketplace of vendors proposing different machines with different types and specs. The goal is to select a small number of vendors (F1) while meeting the specs of some client machines and maximizing a utility function (F2).
... |
I am working on a problem in robotics, where we have a problem of having finite time horizon T, and a set of actions. Each take some time to perform and each have a utility. We can transition from any action to another after completing that particular action, and each transition takes a unique, finite time. Our goal is... |
Given an array of numbers, I want to select some entries, preserving their order, so that I end up with the longest possible sorted sub-array. It does not matter which entries I discard in the process. In case it matters, each value may only appear once.
How might I attack this problem?
Examples:
[1, 3, 2] - > [1, 2]
[... |
If $A$ is a regular set, then:
$L_1=\{x\mid\exists n \geq0, \exists y \in A: y=x^n\}$,
$L_2=\{x\mid \exists n \geq0, \exists y\in A: x=y^n\}$.
Which one of them is regular?
My reasoning is since in $L_2$ we can have uncountable $x$ from even one value of $y\ (y^0, y^1, y^2,...),\ L_2$ cannot be regular. But that thinki... |
$L= \{a^{2i}b^{j}vc^{j}(ac)^{i} | i,j \ge 0, v \in \{a,b\}^*\}$ over the alphabet $\Sigma = \{a,b,c\}$
How can a grammar be created from the language without the use of the empty string. Below is my example that does use the empty string.
$S \rightarrow aaSac|B$
$B \rightarrow bBc|C$
$C \rightarrow aC|bC|\epsilon $
|
In 1995, two DB theory researchers, C.J. Date and H. Darwen, published a text with the rather impressive-sounding name "The Third Manifesto" with their ideas regarding future DBMSes, which would better harmonize a relational model with object-oriented programming, including user-defined types.
It is my understanding th... |
How do I show that $2^x - x^2 \in \Omega(2^x)$?
Basically, I know that this means that $\exists a, x_0 \in \mathbb{R^+}, \forall x \in \mathbb{N}, a.2^x \leq 2^x - x^2$.
I worked around a bit with this and I seemed to have gotten something that makes sense for the case of an upper bound;
$$2^x -x^2 < 2^x + x^2 < 2^{x+1... |
I am trying to understand the larger problem of the decidability of the equality of two DFAs. I understand that this problem can be solved using minimizing DFAs, but my textbook states this can be done using symmetric difference.
Theorem: Let $EQ$ be a language, where $EQ$ = $\{<A,B> \mid \text{A and B are both DFAs an... |
I am not well versed in this topic so please pardon any ambiguous notation.
I am trying to describe the language of this grammar in set-theoretic notation.
The Grammar is given by:
$ S \rightarrow ASA|B$
$ A \rightarrow a|b$
$ B \rightarrow BC|\epsilon$
$ C \rightarrow a|b|c$
I think I can accurately describe this lang... |
With 7 nodes of distinct values (unique), how many Binary search trees (BST) can be formed such that:
Exactly $1$ leaf node(s) present?
Exactly $2$ leaf nodes present?
I was able to solve the first one(and the actual problem was also that, but then I though what if the process can be extended)
Here's my take on the ... |
I was reading this thread The stable marriage algorithm with asymmetric arrays and started to solve the problem asked in this thread about matching 5 students with 10 dorms.
One of the answer suggested to add 5 dummy students to make number of students equal to 10.
Lets suppose before adding the dummy students the pref... |
Let s say we have an algorithm that takes as input 3 matrix A,B and C
$$ \text{Input} :A,B,C \in Mat(n\times n)$$
$$\text{Question} :\text{is } A\cdot B=C$$
the algorith works as follow ;
$$ \text{if }(A\cdot B)_{ij}=C_{ij} \Rightarrow A\cdot B=C $$
$$ \text{if }(A\cdot B)_{ij} \neq C_{ij} \Rightarrow A\cdot B \ne... |
I want to make the regular expression of this language but I can't: I tried but the regular expression didn't match some strings that it should. Is it even possible?
|
This is an interview question.
Suppose you have an array of n segments, when each segment is a pair of two integers: start point and end point. For example: (1,3).
Two segments s1,s2 are intersecting if
(s2.start<=s1.start<=s2.end) or (s1.start<=s2.start<=s1.end)
For example: (1,3),(2,4) are intersecting. ... |
Hiring problem is discussed in section 5.1 and 5.2 of the CLRS* and I'm referring this for exercise solutions.
However, for Exercise question 5.2-2 my solution deviates from the one given in the reference and mine seems be correct. I am still not satisfied with the reasoning of my solution though. Here it goes.
The Que... |
Traditional programs work significantly through control flow. I know that there are simple algorithms that have no control flow at all (i.e. they just perform a fixed sequence of executions), but I cannot imagine anyone building a large complex program without any control flow.
However, as far as I understand, there is... |
There are many papers and textbooks in computer science that claim that computational problems are not feasibly computable (technically, not theoretically as with the halting problem) using a classical computer if the number of operations needed to be performed for solving them is exceeding the total number of atoms in... |
Was hoping if anyone had any way to prove the following claim using proof by contradiction
Let $G = (V, E)$ be a simple graph with at least one vertex, and let $G'$ be the graph formed by adding a new vertex $v$ and making it adjacent to every vertex in $V$.
Claim: $G$ has a Hamiltonian Path if and only if $G'$ has a ... |
In both B-trees and B+trees, a node (a.k.a page) contains K keys and K+1 pointers:
node = [ ptr_1, key_1, ... , ptr_K , key_K , ptr_(K+1) ]
Now suppose that I want a B/B+ tree (whichever possible), where each node contains exactly K keys and K pointers, in form of {key,ptr} pairs:
node = [{key_1,ptr_1} , ... , {key_K... |
Imagine a person called Albert. Albert lives in Europe and would love to move to America. One day he got his wish come true. A person called Margareta gave him a key. The value of the key is the same as the address for a house in USA. Albert doesn't have that much money to travel to America to confirm whether the key i... |
I have a list of sets $L$. I want to partition the sets in $L$ to produce a new list $L'$ that is a Laminar Set Family
Concretely:
For any $L'_i, L'_j \in L'$ if $L'_i \not\subseteq L'_j$ and $L'_j \not\subseteq L'_i$ then $L'_i \cap L'_j \equiv \varnothing$.
I want a minimal length $L'$ (which is equivalent to sayi... |
Let $L_1 = \{a^nb^nc^n\}$
and $L_2 = \{a^ib^jc^k \mid i\ne j\text{ or }j\ne k\}$ (which I think is a non Context free but I am not sure)
So, $L_1 \cup L_2$ will give $L_3 = \{a^*b^*c^*\}$ which is a CFG.
Is this correct?
|
In Introduction to Algorithms, the stack data structure's enqueue operation has the following pseudocode
ENQUEUE(Q,x)
Q[Q.tail] = x
if Q.tail == Q.length
Q.tail = 1
else Q.tail = Q.tail + 1
I started writing it in Swift and figured the queue should be modeled as a structure
struct IntQueue {
var items = [Int](... |
I am unsure of how to prove this language is non-regular. I do not even know where to start to develop a string that would prove the language is non-regular by contradiction. Any help would be appreciated.
I understand that the string has to have a length greater than the pumping length of L. What does that even mean ... |
The question is:
There is a n x n grid (Maze) which has either 0, 1 or 2. 0 means a path
exists, 1 means the cell is blocked and 2 means there exists gold in
that cell. Task is to start from 0, 0 and cover the grid such that
all the gold is collected and then returned to a specific cell (x, y)
in the grid. Th... |
What if an $L$-complete problem has $NC^1$ circuits? More generally, what evidence is there against $NC^1=L$?
|
Given strings s1 and s2, consider the problem of converting s1 to a palindrome string p such that s2 is a substring of p,
where the only operation allowed on s1 is replacement of any character with any other character.
What is the minimum number of operations required for this task?
|
Suppose that $P \neq NP$, and $P = BPP$.
Assume one is given a decision language $L \in NPC$, and she has only polynomial time turing machines. Additionally, she can't use randomness (not sure that's relevant since I assumed $P= BPP$).
How can she compare between two algorithms $A_1, A_2$? Clearly, $A_1$ and $A_2$ cann... |
can any one explain why the greedy algorithm solution i.e sorting according to finishing time is optimal in the interval scheduling algorithm ?? I want proof in layman's language. I was watching this video and i am not able to understand the proof
|
Could somebody please help me understand what is going on here (in plain English)? I think that $(k \mathbin{\&} 63)$ has the effect of modular division. Is that right? How are the primes encoded / how can I know exactly where a number starts and ends by moving my finger across each 64-bit word?
2, 3, 5, 7, 11, 13, 17... |
A Question from CLRS book:
(CLRS 11.1-4) We wish to implement a dictionary by using direct addressing on a
huge array. At the start, the array entries may contain garbage, and initializing the
entire array is impractical because of its size. Describe a scheme for implementing a
direct-address dictionary on a hu... |
The standard implementation of breadth-first search looks like
queue = [root]
while queue:
node = queue.pop()
visit(node)
for_each child in node.children:
queue.push(child)
Just by switching the queue to a stack:
stack = [root]
while stack:
node = stack.pop()
visit(node)
for_each child ... |
Premise: Let $A := [ k(1), k(2), ..., k(n) ]$ and $B:=[ l(1), l(2), ..., l(n) ]$ be two Arrays where $k$ and $l$ are permutations. (What I'm trying to express: $A$ and $B$ contain the same elements in different orders.)
$A$ and $B$ are of different types, thus it is not allowed to mix them in the same data structure.
... |
It’s Friday night and you have $n$ parties to go to. Party $i$ has a start time $s_i$ end time $t_i$ and a value $v_i \ge 0$. Think of the value as an indicator of how excited you are about that party. You want to pick a subset of the parties to attend so that you get maximum total value. The only constraint is that in... |
Given a matrix $A$ with entries $a_{ij} \in \{0,1\}$, the matrix $B$ is formed by $b_{ij}=a_{ij} + a_{i+1,j} + a_{i,j+1} + a_{i+1,j+1}$. $B$ has one row and one column less than $A$. The problem is given such a matrix $B$ to find one possible matrix $A$ that produced $B$. This can be done by reducing the problem to 2-S... |
Recall that an NFA $N = (Q,\Sigma,\delta,S,F)$ accepts $w=w_1w_2\ldots w_n$, where $w_i \in \Sigma$, if one of the following holds:
(a) $\hat\delta(S,w) \cap F \neq \emptyset$, where $\hat\delta\colon P(Q) \times \Sigma^* \to P(Q)$ is given by
$$
\hat\delta(Q',w) =
\begin{cases}
Q' & w = \epsilon \\
\bigcup_{q \in \... |
The wiki for the subset sum problem found here it states that you take the list of N elements and split it into two lists of N/2 elements. You then generate all the subsets for each list (each having $2^{N/2}$ subsets). It then states...
"Each of these two lists is then sorted. Using a standard comparison sorting alg... |
Consider a language $L$ such that $L \subseteq \Sigma^*$, where the cardinality of $\Sigma$ is $1$ (i.e. the alphabet has only one symbol). E.g. $L \subseteq \{a\}^*$.
Can anything be said about the time complexity of $L$? Is it the case that $L \in P$?
I can't come up with any example of a language with a single symb... |
I have a optimization problem:
$$\max_z\ \sum_{i=1}^n \frac{W_i}{D_i - z_i} \quad \text{s.t.}\ \sum_{i=1}^n z_i \leq k, z_i \in [0,k],$$ where each $W_i$, $D_i$ are constants and $z_i$ are integer variables. Assume each $D_i >k$.
The optimal solution obviously satisfies $\sum_{i=1}^n z_i =k$.
But it seems there is no e... |
I have a schema R = {A,B,C,D,E} and the set F of FDs:
F = {A --> BCDE, CD --> E, EC --> B}.
Candidate key = A
Non - Prime Attributes = BCDE
Prime Attributes = A
According to me, there is no partial dependency because no non-prime attribute is dependent on part of CK.
E and B are transitively dependent on A so the schem... |
A language is called semi-decidable if there is an algorithm for identifying members. There are well-known examples of semi-decidable languages where identifying non-members is equivalent to $\emptyset'$, such as the Halting Problem.
My question is: how hard can identifying non-membership be?
|
I have a relation R = {A,B,C} and F={AB -> C , C -> B}.
In order to check if R is in BCNF.
I checked if AB and C are both superkeys and since C is not a superkey I conclude R is not in BCNF.
After decomposing R into BCNF, I have two relations :
R1(C,B) F1{ C -> B}
R2(A,C) F2{ A -> C}
Now since A and C are both su... |
While reading on randomization for online learning from the text "Online Learning and Online Convex Optimization" by Shai Shalev-Shwartz, I found the following statement (Pg 115)-
"The adversary can still know the learner’s forecasting strategy and even the random bits of previous rounds, but it doesn’t know the actual... |
Came across this interesting problem in one of my interviews. Suppose you have a circular turing tape, i.e. simply a circular array. You do not know the size i.e. the number of cells available in that circular array.
The array consists only of binary digits. Lets say you are currently at one of the cells. You can read... |
If my grammar does not have productions of the form $A\rightarrow\lambda$ and $A\rightarrow B$ for some variables $A$ and $B$ then I know that each step in the derivation must involve an increase in the sentential length. Therefore if I do an exhaustive search for some word $w$ then I know I can stop searching after $|... |
For every nondeterministic finite state automata (NFA) that has self-loop(s), there exists an equivalent NFA that does not have any self-loop.
How do I prove this?
|
Is there a notion of a context-free complete language (in the analogous sense to a $NP$-complete language)?
|
The task is to find a efficient algorithm to the following problem. There are n boys and n girls who need to be divided to pairs. You get a list with all possible pairs that could be made. It means that if the pair (a,b) is in the list then the boy a can be paired with the girls b.
It is known that each boy appears in ... |
What is the $NP$ problem whose status in $P$ or $NP$-complete is still unsettled, as of 2018?
This question is inspired by the following two recent breakthroughs:
The work of Mulzer et. al on $NP$-completeness of min-weight triangulation.
Recent quasi-polynomial algorithm of Babai for graph isomorphism. The link is to... |
As far as I understand correctly, to say that a decision problem $X$ is in P means that there exists a polynomial $c\cdot n^p$ such that as $n$ goes to $\infty$, the steps required to solve $X$ is bounded by $c\cdot n^p$.
But strictly speaking, this doesn't restrict the complexity for finite $n$ in any way. Strictly sp... |
Let $\to_\beta$ be $\beta$-reduction in the $\lambda$-calculus. Define $\beta$-expansion $\leftarrow_\beta$ by $t'\leftarrow_\beta t \iff t\to_\beta t'$.
Is $\leftarrow_\beta$ confluent? In other words, do we have that for any $l,d,r$, if $l \to_\beta^* d\leftarrow_\beta^* r$, then there exists $u$ such that $l\leftarr... |
I have been reading a book about Decision Trees and it caught my attention the following part:
In case of numeric attributes, decision trees can be geometrically
interpreted as a collection of hyperplanes, each orthogonal to one of
the axes
I tried to look for information about this in Internet, but I did not fin... |
Given a weighted graph (negative weights are allowed) and two vertices $u$ and $v$, can we find the simple min-weight path between $u$ and $v$? There can be a negative cycle on the path from $u$ to $v$, but we want to ignore that, and calculate the weight of a simple path between them. Can this be done in polynomial ti... |
We already know that $NEXP\subseteq EXP/poly\implies NEXP=EXP$. What if we change $EXP$ to $NEXP\cap coNEXP$.
As the title states, prove the statement in the title.
The original proof use the self-reducibility of the searching problem. For a language $L\in NEXP$, the corresponding search problem has its decision versio... |
What are the properties of summation with Big Omega? I have been looking online but cannot find any sources on summation with Big Omega, only for Big Oh. For example, my main inquiry is if this statement is true or not, If $a(x) + b(x) ∈ \Omega(c(x))$, then $a(x) ∈ \Omega(c(x))$ or $b(x) ∈ \Omega(c(x))$.
|
I am having trouble to understand dynamic programming. Mainly because of its name. As far as I understand, it's just another name of memoization or any tricks utilizing memoization.
Am I understanding correctly? Or is DP something else?
|
There is a controversy about Monad implementation in S.O .
The original question is,
What's so special about Monads in Kleisli category?
Is there any counterexample that Functors cannot do what Monads can do except the robustness of functional composition by flattening the nested structure?
What's so special about Mon... |
When solving the problem of coin exchange by greedy algorithm, why will we will always have the correct result if the coin values are $1, a, a^2, \cdots, a^n$, where $a\ge 2$ and $n\gt 0$?
For example, if $a = 3$, $n =3$, we get the following coin values: 1, 3, 9, 27. When total exchange is 16, answer is 4 coins, as re... |
I am wondering, from where static and dynamic scoping got their names.
After understanding the concept of static and dynamic scoping in C, what I assume is that whenever we failed to find out the declaration of the variable within the scope of the function than in order to resolve this name, we refer the global variabl... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.