instruction stringlengths 35 29.1k |
|---|
I have covered floating point (32 bit) conversion from float to decimal and decimal to float. I am happy with the theory and I have created a conversion tool in Excel VBA which works just fine following the IEEE754 , so I am happy with theory. Also happy with add, sub , mult , div of 32 bit floating point binary number... |
MAX 2SAT is NP complete.
Instead of satisfying the maximum number of clauses, I have a fully satisfiable 2SAT formula and I want to have the maximum number of positive literals in the assignment (such that all the clauses are satisfied, of course).
What is the difficulty of this problem?
|
I am trying to plant a row in a garden. Certain plants are good for some plants and bad for others, and I am trying to find the best order of plants: most adjacent friends and no adjacent foes, as defined in this table(I have one of each):
Num Vegetable Friends Foes
1 Watermelon 7,4,3 8,6
2 Tomat... |
Sipser defines $TIME(t(n))$ as the set of all languages that are decidable by an $O(t(n))$ time TM and then $P = \bigcup_k TIME(n^k).$
However I see also many definitions like
$$
P = \{ L \mid \text{There is a polynomial } p(n) \text{ and a TM which accepts each string } w\in L \text{ in max. } O(p(n)) \text{ steps.} \... |
Is there any existing literature on applying the theory of Type-2 computability to the generation of random variates? By "random variate generator" I mean a computable function $f\colon\subseteq\{0,1\}^{\omega}\rightarrow D$ such that, if $p$ is a random draw from the standard (Cantor) measure on $\Sigma^{\omega}$, the... |
The INDEPENDENT-SET problem is a well-known NP complete problem that takes in a graph $G$ and an integer $k$. It returns true if $G$ has an independent set of size $k$.
An instance of the TFS (triangle-free-set) problem takes in a graph $G$ and an integer $k$ and it returns true iff $G$ has a subset of size $k$ whose i... |
From Wikipedia:
Each universal code, like each other self-delimiting (prefix) binary
code, has its own "implied probability distribution" given by $ p(i)
={2}^{-\ell(i)} $ where $\ell(i)$ is the length of the $i$th codeword and $p(i)$ is the corresponding symbol's probability
What is "implied probability"?
Give... |
This is possibly related to reflection and quoting but I don't want to assume anything beforehand. Here is my requirement.
My typed lambda calculus (Curry style) is a simpler variant of Calculus of Constructions (CoC). Is it possible to write an analyzer (e.g., type checker) that inspects the runtime representation of ... |
Is 3-SAT $\leq_{p}$ Primality? And/or is Primality $\leq_{p}$ 3-SAT? I think the answer is no and yes, respectively, but I'm not sure. Any help would be appreciated.
Thank you.
|
My first thought is to make OPT(i, j), where i is n, and j is some condition on the column. But
my experience with DP is from knapsack and weighted interval scheduling, but I'm unsure of how to approach this. Any ideas would be great.
|
I have been searching for a while now but couldn't find anything about this exact pair of functions with the little $\mathcal{o}$ notation.
Given the functions $f(n) = 2^{n}$ and $g(n) = n!$ I am supposed to prove, or disprove, the following statement: $f(n) \in \mathcal{o}(g(n))$.
I am fairly sure that it's true but n... |
Suppose we have a universe of $u=|U|$ elements. We called a set of $H$ function $(U,m)$ order-preserving minimal perfect hash family (OPMPHF) if for every subset $M\subset U$ of size $m$ has at least one function $h\in H$ which is an over preserving minimal prefect hash. It is shown in [1,2] that for every $(U,m)... |
In two separate projects, I have come across this problem and I still don't have a good solution for it, so I thought it was worth describing here. Consider the following problem:
I have a set of strings that appear in a corpus with their counts. I would like to merge the counts into any substrings that also appear in ... |
Per my understanding, the Rete algorithm and relational database engines essentially solve the same problem: answering to a certain query about a (large) set of relational facts. To me, the Rete algorithm is just more special-purpose along with a fancy caching procedure; I fail to see why it is superior to any of the e... |
Can anyone give a model of the following LTL formula?
$$
\Box\Diamond p \land \Box\Diamond q \land \lnot \Diamond (p \land q).
$$
That is, we want each of $p$ and $q$ to hold infinitely often, but $p \land q$ should never hold.
|
As far as I understand, the structure tensor is:
$$
M = \sum_{(x,y) \in W} \begin{bmatrix} I_x^2 & I_xI_y \\ I_xI_y & I_y^2 \end{bmatrix} =
\begin{bmatrix} \sum_{(x,y) \in W} I_x^2 & \sum_{(x,y) \in W} I_xI_y \\ \sum_{(x,y) \in W} I_xI_y & \sum_{(x,y) \in W} I_y^2 \end{bmatrix}
$$
How do I compute $I_x^2, I_y^2, I_xI_y... |
Question: Given a list of integers (possibly negative) and a target integer, return the number of triplets whose product is the target integer and two of the triplets must be adjacent.
More precisely, given a triplet $(i,j,k)$ with $i<j<k,$ it satisfies the question above if $A[i] \times A[j] \times A[k] = target$ a... |
A hard disk spins at 6000 rpm (revolutions per minute), and it takes 100 μs (on average) for the head to traverse one track. Consider the following sequence of disk track requests: 27, 129, 110, 186, 147, 41, 10, 64, 120. Assume that initially the head is at track 30 and is moving in the direction of decreasing track n... |
Given the functions $()=^{n}$ and $()=10^{10n}$, I am trying to establish the following relationship: $()\notin o(())$.
I know to show for the opposite, $()\in o(())$, I would need to choos $c$ and $n_{0}$ such that $\exists$ $c$, $\exists$ $n_{0}$, $\forall n\geq{n_{0}}$ then $f(n)\leq c. g(n)$, but how should I choo... |
I'm looking for an algorithm for the problem:
"Given an undirected graph with positive weights on its edges and some of the edges are red and some are blue. Describe an algorithm that finds the shortest (lightest) path which includes an even number of red edges, that goes from S to any vertex v."
The solution I thought... |
Wikipedia mentions, that from the formula
$$
T(n) \leq T(n/5) + T(n\cdot7/10) + c \cdot n
$$
one can "easily" show using induction that
$$
T(n) \leq 10 \cdot c \cdot n
$$
I am, as it seems, not so smart. So, can anyone tell me how to show this using induction?
|
How do we uncurry functions when they are polymorphic? For example, is it possible to uncurry the following types? If so what is the uncurried type?
$\forall X. X \rightarrow int \rightarrow X$ ?
$int \rightarrow \forall X. X \rightarrow X$ ?
$int \rightarrow \forall X. X \rightarrow int \rightarrow X$ ?
|
In a two-level cache system, the level one cache has a hit time of 1 ns (inside the CPU), hit rate of 90%, and a miss penalty of 20 ns. The level two cache has a hit rate of 95% and a miss penalty of 220 ns. What is the average memory access time?
What is a two-level cache system and how to calculate the time required... |
I am reading a blog post of Lance Fortnow, which includes a proof of Mahaney's theorem.
I am not sure why $a’$ cannot be in between $w_i$ and $w_j$ in Case 1, and also why $a’$ cannot be in between $w_0$ and $w_1$ in Case 2.
Can anyone give me some explanation?
|
The terms contention and race are used interchangeably when it comes to thread's state(at critical section). Are they same?
|
How is information extraction related to data extraction? Is it a subfield or can it be used equivalently? Data is also information. What is the relation and what are the differences?
I want to write about the general topic "data extraction". I can hardly find papers about "data extraction", but most papers deal with "... |
I am trying to solve the 4.6-2 question in CLRS book which is
$T(n)= aT(n/b) + \Theta(n^{\log_ba}\lg^{k}n)$
While solving the above equation I reach the following point:
$T(n)= n^{\log_ba} + n^{\log_ba}\left( \sum_{j=0}^{\log_bn - 1}\lg^k(n/b^j)\right) $
when I searched online, I saw people have solved this as below... |
Consider a byte-addressable cache with block size 16 bytes, bytes 0-15 form one block.
First I write an int(let's say 7) to address 0, so now bytes 0-3 contain the int 7. Now if I try to write another int(9) to address 2, then how does the cache handle this? Also if i try to read from byte 1, what effect does that have... |
I want to build a non-oriented k-nearest neighbor graph for use in a clustering method (unsupervised learning). The nodes of the graph correspond to points defined in a multidimensional real space and the edges to the distances between the points. This graph must be optimal (not strictly speaking) on two criteria. The ... |
My question is what does [this construction gives a Hamming Distance a distance of 3] means? Why the Hamming Distance of ASCII letter A is 3? How do you determine the Hamming Distance is 3?
This is an excerpt from Computer Network by Andrew S. Tanenbaum page 206.
|
Problem: Given n paths in a directed graph G(V, E) and an integer k, find out k paths among them such that no two of them pass through a common node.
Prove that the given problem is in NP-complete.
I was able to prove that the problem is in NP. Hint is that we need to come up with a polynomial time reduction of the ind... |
I am reading Arora-Barak's Complexity book. In Chapter 4, they state and prove the following theorem.
Why $S$ should be space constructible? Wouldn't all three containments of theorem hold, even if $S$ is not space constructible?
My other question is about Remark 4.3, the book claims that if $S$ is space constructible... |
Im trying to make an invariant for this Z schema about routes.
1) The invariant should express that each route should contain at least 20 different places. First of all i thought of doing a universal quantification such as:
∀x : ran routes • ( #x>20 ∧ x ≠ x')
However i'm really not sure if thats correct that implying ... |
I am trying to answer this question:
$3x^3 +2x + 1$ is $ \omega(x \cdot \log x)$
My question is how to solve this question.
Here is what I have tried so far:
I applied the definition $3x^3 + 2x + 1 > c \cdot x\log x$ for all c, given $n \geq k$, for some k
I tried to apply the technique of applying the equality that:
$... |
The atomic fetch-and-set x,y instruction unconditionally sets the memory location x to 1 and fetches the old value of x in y without allowing any intervening access to the memory location x. Consider the following implementation of P and V functions on a binary semaphore S.
void P (binary_semaphore *s) {
un... |
I know that converting between CNF and DNF produces an exponential blowup in size, but I would like to know which is the bound in size for a converted formula when one can choose between any of the two normal forms. Or, stated otherwise, given the predicate $p$, how to find:
$$
\rho = \max \min \left\{\alpha, \beta\rig... |
Assume $f\colon ω × ω → ω$ is a computable function. How can we prove that there is a primitive recursive function $g\colon ω × ω → ω$ where the following holds:
$∀n [∃s(f(n, s) = 1) ↔ ∃k(g(n, k) = 1)]$
So for every $n$, there is an $s$ such that $f(n, s) = 1$ if and only if there is a $k$ such that $g(n, k) = 1$.
Been... |
I read this post: Showing Cycle is NL-complete?, but I am not sure why the reduction is log space, as it requires keeping track of the new graph, which has $n^2$ nodes.
|
Given an one dimensional array of size nxn, where n is a perfect square
How can one mathematically determine the row, column, and/or sub-square the cell resides in? Additionally, is there a mathematical way to traverse the subsquare?
|
If I have a team, with between $n_1$ and $n_2$ people per team, with results of team's head to head matchups, how would I be able to estimate each person's value?
Example data (I drew this up quickly, the actual one is many lines longer):
| Home | Away | Home Score | Away Score | Home Members | Away Members |
... |
Say I have a deterministic machine X, and I prove that a turing machine can't solve the halting problem for this machine when given a certain input. Does this imply that this machine X is turing-complete or more powerful than turing-complete, or is it possible for X to be less powerful than a turing machine?
|
Equip any complexity classes $C$ and $B$ (to be more specific: any complexity classes that contain only decidable problems) with the same oracle $O$ that solves the halting problem for a Turing Machine. Is $C^O = B^O$ for any $B$ and $C$ that, again, only contain problems decidable by a TM with no access to an oracle (... |
The question was asked in an interview, and I'm not sure if this is the most optimized answer, but here goes-
You have an undirected acyclic graph, where each node has a non-negative value x and the edges have 0 value. You need to find a path with any number of nodes on it such that the total sum of all node values is ... |
i'm trying to prove every trace over PROP = {p} is a model of the formula.
I am very stuck in figuring out a model pi that satisfies this formula, can anyone point me in the right direction?
|
I have just started to understand the "Minimum Spanning Trees" (MSTs), and had come across the cycle property. I am referring to the book - Algorithm Design by Jon Kleinberg and Eva Tardos. The statement of the property as written in the book is:
Assume that all edge costs are distinct. Let C be any cycle in G, and le... |
I'm a slight disagreement with my professor over whether or not a certain reduction is possible. He asked us to reduce the problem of 3-Coloring to the problem of 3-Clique. The problem is that I'm fairly confident that 3-Coloring is NP-Complete, while 3-Clique is P. Correct me if I'm wrong (which is very likely), but f... |
Let $\mathcal{L}$ be context free language over alphabet $\Sigma$. Define $\mathcal{G}$ as
$$\mathcal{G} = \{ v_2 v_4 \ldots v_{k} : v_1 v_2 v_3 v_4 \ldots v_{k-1} v_{k} \in \mathcal{L}, \text{ $k$ even} \} $$
I have seen a similar question (asked 5 years ago) but I am not sure how it can work.
Proposition
$\mathcal{L}... |
Speedback is the merging of speed-dating with feedback: a 2 min. 1-on-1 talk with all members of a group of people.
I'm in a team and I want to plan the ideal speedback setup: all team members have to give feedback to eachother.
I want to group people in a way that maximizes the concurrency of simultaneous pairs so we ... |
A program must construct and then use a set $S$ of 1000 integers.
/* part 1 */
S = empty
for i from 1 to 10000 {
...
x = ...
add x to S
}
/* part 2 */
for j from 1 to 100000 {
...
y = ....
test if y belongs to S
...
}
To represent S you have the choice between
a double-linked list
a balanced binary search tree... |
I am trying to compute the shortest binary string that contains all binary palindrome of length n as substring. For example, for n=3, 00010111 is such a shortest string. However, brutal force performs really bad even for n=6, n=7 etc. Is there any optimization like branch and bound I can do here. My current optimizatio... |
I have a network line that runs at a speed of 400kbps. How long do I have to download 6GB.
|
Can somebody explain the characteristics for a BFS Tree from a complete graph?. Thanks in advance. I would need the shape of the tree, explain me a little bit how the algorithm would work in this certain graph
|
I'm working with a list of objects ("Section") that contains a string value among other fields. The strings in all of the sections can be concatenated to form the complete text. I am, however, wanting to implement a method that searches for a specific (given) value and returns the Section object(s) it found the value i... |
Note: First posted this on Theoretical Computer Science Stack Exchange, but deleted it from there since it seems to be off-topic.
The Slepian-Wolf theorem states that sequences of outputs from two separate random variable sources A and B that have a joint probability distribution defined on them, if encoded with the fo... |
Let's define a "semi-rewritable" memory device as having the following properties:
The initial blank media is initialised with all zeroes.
When writing to the media, individual zeroes can be turned into ones.
Ones can not be turned back into zeroes.
Making a physical interpretation of this is easy. Consider for insta... |
What does [ we cannot both correct double errors and detect quadruple errors because this would require us to interpret a received codeword in two different ways] means? I understand how double error correction works but I cannot imagine quadruple error detection. Can anybody show me example why double error correctio... |
How can I prove that for a natural number K, a language that accepted by a Turing machine with K cells after the input word ends, belongs to R (which R is the set of languages that there is Turing machine that accept them while for each input the run is finite)?
|
If we remove subtyping (https://coq.inria.fr/distrib/current/refman/language/cic.html#subtyping-rules) from CIC we will lose some expressive power. But is that power necessary for a programming language?
If we demand programmer to write e.g. Type(1) and Type(2) to mean respectively type and kind, that won't be anything... |
I have been reading about Unification algorithm here https://en.wikipedia.org/wiki/Unification_(computer_science)#A_unification_algorithm
. And I wonder about the importance of occur check.
I know that without occur check an unsound inference may occur. But OTOH, does the algorithm always terminate without occur chec... |
I'm having a hard time understand the reasoning in the solution of 18.7 in Elements of programming interviews (EPI):
Let $s$ and $t$ be stings and $D$ a dictionary, i.e., a set of strings. Define $s$ to produce $t$ if there exists a sequence of strings from the dictionary $P = \langle s_0,s_1,\ldots,s_{n-1} \rangle$ s... |
this is a HW question, but its considered a bonus question so I'd appreciate a direction.
Definitions:
The actual question:
**Images taken from HW in TAU Complexity course by Amnon Ta-Shma.
My thoughts on the question:
My intuition is that C2 = NL, because NSPACE(O(f(n)) ⊆ DTIME(2^O(f(n))), so for a verifier for a l... |
I've been trying to find information on various program data virtual memory compression algorithms that are in the "WK" family of algorithms. So far, I've been successful with the "WKdm" compression algorithm ( see here and here ). The other algorithm that I'm interested in is a variation on the "WKdm" algorithm called... |
For the union of sets we use the union operator $\cup$ (or $\bigcup$). And for a concatenation (Kleene star) we also use the union operator. The operations are different, but why the same terminology and operator?
The following is my understanding of the union of sets versus the concatenation of sets (Kleene star). P... |
I've just started Algorithms at university. There's a task to write an algorithm for a Turing machine to solve quadratic equations. The task doesn't specify if it's x^2+bx+c or ax^2+bx+c. I've searched whole bunch of information over Russian and English Internet.
I did find articles, which say it's not possible because... |
Suppose, I wanted to verify the solution to $2$^$3$. Which is $8$.
The $powers~of~2$ have only one 1-bit at the start of the binary-string.
Verify Solution Efficently
n = 8
N = 3
IF only ONE 1-bit at start of binary-string:
IF total_0-bits == N:
if n is a power_of_2:
OUTPUT solution verified, 2^3 == 8
A solu... |
I am a bit confused about using the subset of the turning machine to prove the desirability of the turning machine.
If I have a Turing Machine M and we have already know M has a single halting state. If we already the machine takes a string was the input and reaches to the state q0, is it possible to prove that M is de... |
From where are the following probabilities?
We consider BSCε with ε = 0,1 and block code C = {c1, c2} with the code words c1 = 010 and c2 = 101. On the received word y we use the decoder D = {D1,D2} which decodes the word to the code word which has the lowest hamming distance to y. Determine D1 and D2 and the global er... |
How do i solve this? I am not sure where to start.
I am trying to define a Optimum solution which i can use to create a dynamic program. I am not sure what the characteristics of the optimum should be.
right now i am thinking,
at any instance of the problem, we know, the person will move right , left or up.( He can'... |
A question asks me to simplify the following boolean expression then use a multiplexer to implement it.
$$\overline{A}BC + \overline{A+B+C}+A\overline{B}\overline{C} + B\overline{C}$$
I evaluated the expression and got this result:
$$\overline{A}BC + \overline{C}$$
However, I stuck here because I cannot see the connect... |
I'm trying to found a way how to prove this language is not context free. Using pumping lemma I'm halfway done. Consider word $a^{n^2}b^n$. If you divide it into $uvwxy$ and have only $a$'s in $v$ and $x$, you clearly get out of language when you pump up. If you do the same with $b$'s and pump down, you get out of lang... |
I've been using Intel Pin tool to perform analysis of cache miss rates of a parallel application in multi-level caches, using one of the examples allcache.cpp, the results differentiate load and write misses, and the miss rates of each one vary significantly in L1, load miss rates of 20% vs store misses 90%.
Why can be... |
$k$-Path problem
The problem: Given a graph $G$ with $n$ vertices and $m$ edges, does there exist a path of length $k$ in the graph?
The trivial algorithm to solve is in $O^*(n^k)$ time using dynamic programming. ($^*$ hides the polynomial factor.)
Question: What is the fastest algorithm for the $k$-Path problem?
|
In a graph, I need to remove some vertices in order to get at least k-connected components. The no. of removed vertices should be low. Is there a heuristic that I could follow for this?
|
Is there an undecidable language A that is mapping reducible to its complement?
If it is possible, since A is an undecidable language, so A's complement must also be an undecidable language. But i don't know whether undecidable languages is closed under complement or not.
|
This is a question from the book Algorithms by Jeff Erickson.
Suppose A is a circular array. In this setting, a “contiguous subarray” can be either an interval A[i .. j] or a suffix followed by a prefix A[i .. n] · A[1 .. j]. Describe and analyze an algorithm that finds a contiguous subarray of A with the largest sum.... |
In this question in the first answer someone mentions a "special transduction hierarchy". I cannot find anywhere anything about it. Could someone point me to resources on this topic?
|
Give a CFG for the languague L = $ \{ 1^n +1^m = 1^{n+m}| n,m \in N_{0}\} $ , with the alphabet $\Sigma =\{1,+,=\}$.
I am currently trying to solve the given task, I thought a good way is to split the Languague into two more simple languagues, but I am keep failing. May some can help
|
Situation :
I started watching Algorithm Lectures from Stanford University (Corsera). I stuck on one video lecture(https://www.coursera.org/lecture/algorithms-divide-conquer/counting-minimum-cuts-96RUg).
In the lecture the professor is proving largest number of minimum cut in a graph.
My Problem :
To prove largest nu... |
I need to prove that a Turing machine that can move only $k$ steps on the tape after the last latter of the input word is not equal to a normal Turning machine.
My idea is that given a finite input with a finite alphabet the limited machine can write only a finite number of "outputs" on the tape while a normal Turing ... |
Let $G$ be a CFG in Chomsky normal form that contains $b$ variables. Show that if $G$
generates some string with a derivation having at least $2^b$ steps, then $L(G)$ is infinite.
This question is from Sipser(Introduction to the theory of computation)
|
P is RE, but is the complement of the class of languages decidable in polynomial time also recursively enumerable?
If both are RE then this makes P recursive?
|
Given the language:
$MIN_{TM}$= $\{ \langle M,k\rangle: there\ exists\ a\ TM\ D\ s.t.\ L(M)=L(D)\ and\ D\ has\ less\ than\ k\ states \}$
I need to prove if this language is in $R$ or $RE-R$ or $coRE-R$ or $\overline{RE\cup coRE}$.
I suspect this language is in $\overline{RE\cup coRE}$
but I can't prove it. (I Tried us... |
I'm kind of desperate at this point about this question.
A predicate-logic resolution derivation of a clause $C$ from a set of clauses $F$ is a
sequence of clauses $C_1,\dots,C_m$, with $C_m = C$ such that each $C_i$ is either a clause
of $F$ (possibly with the variables renamed) or follows by a resolution step from t... |
How strong have the oracles needed to be for these two classes to be proven equivalent with respect to them?
For instance: is $P^H$ = $NP^H$ (ie. is $P$ equipped with an oracle to solve the halting problem equivalent to $NP$ equipped with an oracle to solve the halting problem)?
From Theodore Baker, John Gill, and Robe... |
Terms:
A literal is a variable or its negation.
A clause is a set of literals.
An exact 3-in-1 clause is satisfied if an assignment of values to variables results in exactly 1 true literal and 2 false literals.
Exact 3-in-1 SAT is the problem, given a set of exact 3-in-1 clauses, is there as assignment of variables tha... |
Given a point in N-dimensional space, I'd like to be able to determine which face of an N-dimensional hypercube of edge length 1 that the point is closest to.
In the 2-dimensional case it's fairly trivial, you simply split the square along its diagonals:
if (x < y) then
if (x + y < 0) then
// Side 1
els... |
A is decidable if A$\le_m$A complement
Can i think that it is true because decidable is close under complement, so if A complement is decidable, so is A
|
Both are based on the principle of locality. Then why virtual memory uses table lookup while cache memory uses associative memory for block identification?
|
I have a 256 bit string (indistinguishable from random) which I wish to encode into a greater length string using an error correction code.
The result must also be indistinguishable from random. It should not be possible to detect the presence of error correction from the result.
Is it possible? And if so, how?
PS: Rel... |
Is there a factor in $M$ that is $>$ $1$, but $<$ $M$ that is NOT a factor of $N$?
False Result Example
$N$ = 8
$M$ = 16
1, 2, 4, 8, 16
There is no integer that is NOT a factor of $N$ that is $>$ $1$ but < $M$
True Result Example
$N$ = 2
$M$ = 26
1, 2, 13, 26
There is an integer $13$ which is NOT a factor of $N$ that i... |
Here is an excerpt from Andrew S. Tanenbaum, Computer Networks, 5th edition, Chapter 3 (The data link layer), Page 208:
The internal state is kept in six memory registers. Each time another bit is input, the values in the registers are shifted to the right. For example, if 111 is input and the initial state is all zer... |
Given an edge-weighted digraph $G = (V, E \subseteq V^2, w \in E \to \{0, 1\})$, is there an algorithm that returns TRUE if there is a cycle in this graph whose total weight is odd and FALSE otherwise, which runs faster than $O((|V| + |E|)(c + 1))$ (where $c$ is the number of simple cycles in the graph, which is of cou... |
We want implement a data structure that have the following methods: Init(A,k)- Gets an array A with n different values and initialize our data structure that so it will divide A into k equally sized sub-arrays (+-1), that each value in the i'th sub-array will be larger than any value in the (i-1)'th sub-array, and smal... |
Can you give some real world examples of what graphs algorithms people are actually using in applications?
Given a complicated graphs, say social networks, what properties/quantity people want to know about them?
—-
It would be great if you can give some references. Thanks.
|
In CLRS in the dynamic programming chapter, there is a theorem about the longest common subsequence prefix that states the following:
Theorem Let the $X=(x_1,x_2,\dots,x_m)$ and $Y=(y_1,y_2,\dots,y_n)$ be sequences, and let $Z =(z_1,z_2,\dots,z_k)$ be their LCS.
If $x_m = y_n$, then $z_k = x_m = y_n$ and $Z_{k-1}$ is... |
Never used this site before so not sure the best way to get help. However, I've been looking at many-one reductions in relations to sentences in logic.
Let TH(N) = {ϕ : ϕ is a first order sentence in the language of arithmetic and N |= ϕ} (Where N is the standard model of arithmetic - , x, <, +, 0, and the successor; ... |
Q: Prove that for any AVL tree that has $n$ nodes ($n\geq 1$)
and has a height of $h$ this property is true:
$n \geq F(h)$ where $F(h)$ is the $h$-th element in the Fibonacci sequence:
$F(0) =0, F(1)=1, F(n) = F(n-1) + F(n-2) ~~~~\forall n \geq 2$
This is my go:
We know it is an AVL tree so $h = \log_2{n}$
Thus we ... |
If I have a proof for a separation between two complexity classes (using no oracles) and I want to see if it relativizes, how do I go about doing so?
Especially in the case where there already exist proofs for these classes being equal with respect to one oracle and not equal with respect to another oracle. I'm wonderi... |
I am trying to write a mini parser for a simple language whose specification is as follows:
A search term is represented by. Both searchkey and searchvalue is a word formed by using alphanumeric characters.
<searchkey> <searchoperator> <search value>
: represents the exact match(similar to "=").
ex :
response:success
... |
I have problem in determine whether it is decidable or not, can somebody help me please
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.