instruction stringlengths 35 29.1k |
|---|
In my algorithm class my teacher said that we should always use counting sort when we want to sort integers. After he said this I was curious to know in which situations I should choose one sort algorithm over another.
Looking at the complexities of the worst cases of the algorithms I know (heapsort, mergesort, quickso... |
I'm new to analyzing time complexities and I have a question. To compute the nth fibonacci number, the recurrence tree will look like so:
Since the tree can have a maximum height of 'n' and at every step, there are 2 branches, the overall time complexity (brute force) to compute the nth fibonacci number is O(2^n).
Now... |
Recently i got a question in one of my exams about asking for an algorithm which searches an element in a sorted array such that $A[i] = i$. My algorithm was based on binary search and did a $O (\log n)$ order of comparisons.
The other part of question demanded to prove there exists no other algorithm which does better... |
I have an x*y bit matrix where the total number of bits fluctuates between ~1,000,000 and ~20,000,000 bits. The rows are much smaller than the columns. An example matrix might be of size 1,000,000 x 20. The percentage of 1's in this matrix is around 15% and these 1's can occur anywhere within the matrix, with the remai... |
If a policy yields an action for a state, how come a 3-state MDP with 2 possible actions, i.e. $S = \{Hot, Mild, Cold\}$, $A = \{East, West\}$, has 8 possible policies? Isn't it 6 if there are 2 possible action for every state?
|
Given $n_1$ and $n_2$ number of verteces and the adjacency matrix for both graphs, one should determine whether $G_2$ is a subgraph of $G_1$.
I am supposed to use C++ for this, and though I could probably come out with a solution including $20$ for functions, it's most likely not the best approach to the exercise.
Do I... |
Let's denote $IS(G)$ to be the size of the maximal independent set in $G$.
Consider the following language:
$$A = \left \{ G\ |\ IS(G)\ge \frac{1}{5}n \right \}$$
I know that $gap-IS [1/8 + \varepsilon , 1/4-\varepsilon]$ is $NP$-hard.
How can I infer that $A$ is $NP$-hard by utilizing the gap problem?
|
I am having some trouble understanding the notion of the VC dimension. The definition I have is the following:
The VC dimension of a set of hypothesis functions $H$ is the cardinality of the largest set which $H$ can shatter. We say that $H$ shatters some set $S \subseteq \mathcal{X}$ if we can realise any labelings o... |
Are there any guidelines for how to recognize, for a given problem, which approach is more likely to yield good results? SAT solver or SMT solver?
Is there any guidance anyone can offer about which sorts of problems can be handled better by SAT solvers than by SMT solvers, or vice versa?
|
I am reading a free algorithms textbook http://www.cse.iitd.ernet.in/~Naveen/courses/CSL630/all.pdf
and on page 13 i am stuck on an example they give.
"At this time, the fastest computer in the world is the NEC Earth Simulator, which clocks 40 trillion steps per second. Even on this machine, fib1(200) would take at... |
My goal is to understand the exact differences between SoEMT, SMT and "time-slice multi threading".
Thus far I already found information on SoEMT and SMT and it does not seem to hard to find more on google. However my problem is: Time-slice multithreading. The best I found - apart from a long winded book, was:
– Proce... |
Please bear with me, since I have just started working on this.
Assuming that the laws of thought apply.
The basic goal of the algorithm is to recast the statement into true or false premises and check if a true and false clashes. If there is a clash then the statement or the set of statements is/contains a paradox. Th... |
I know how to use the master Theorem for a general formula e.g. $T(n) = a \cdot T(\frac{n}{b}) + f(n)$.
I saw some books suggest that we can use the mastere theorem for formulas like:
$T(n) = T(\frac{n}{5}) + T(\frac{7n}{10}) + O(n)$
How is that possible?
My guess: We use it separately. Once for $T(n) = T(\frac{n}{5}) ... |
Currently I'm trying to understand a proof of the statement:
"A language is semi-decidable if and only if some enumerator enumerates it."
that we did in my lecture. One direction of the proof goes as follows:
Let E be an enumerator that enumerates L. We construct a TM M, that semidecides L in the following way:
Given... |
Let we have a SAT instance where every clause has length $\ge3$ (when length $2$ is allowed, it can be unsatisfiable) and each pair of literals appear only once.
Non-example: $(x\lor y\lor z)\land(x\lor y\lor t)$. Here a pair $\{x,y\}$ appears twice.
Example: $(x\lor y\lor z)\land(x\lor\overline y\lor\overline z)$. $\{... |
I'm working in a project to create levels for a videogame using genetic algorithms.
I'm using a undirected graph to represent the level, each node represent a room and each room have a maximum of four possible connections (north, south, east, west). Also each connection just have one compatible connection (North <=> So... |
I am learning about the OS.
I know: that Address Space Size = # of pages x page size
So if I increase Address Space Size, then the number of pages increases:(not the page size). However, isn't the Virtual Page Number a one-for-one mapping to Physical Page Numbers(frames), so if the number of pages increases with the ad... |
For hobbyist reasons I wrote a program which takes the equations of the logic gates of a digital circuit as input, does some analysis, outputs the analysis results and generates program code for doing logic simulation.
Combinational logic is not a problem but sequential logic is:
Currently my program requires you to sp... |
Consider the following definitions of CPOs, monotonicity and continuity:
The pair $(M, \leq)$ is called CPO (complete partial order), if
$M$ is a set,
$\leq$ is a partial order on $M$,
there exists a least element according to $\leq$ in $M$ (called bottom, $\bot$),
for every chain $m_0, m_1, m_2, \dots$ in $M$ its sup... |
Assume that the model of computation is a standard Turing machine model with input alphabet $\Sigma = \{0,1\}$, work alphabet $\Gamma = \{0,1,\_\}$, 1 input tape, 1 work tape and 1 output tape.
We can build a Turing machine $U$ that accepts a (reasonable) binary representation of a Turing machine $M$ and simulates it (... |
I have just started learning algorithms and data structures and I came by an interesting problem.
I need some help in solving the problem.
There is a data set given to me. Within the data set are characters and a number associated with each of them. I have to evaluate the sum of the largest numbers associated with each... |
As turing machine always halts on dead configuration,so consider the case where it halts in final state,if on second last state by reading an input alphabet it comes to final state. Now in final state it will try to find the transition for the next symbol(i.e blank) and as there will be no transition on final state so... |
It might just be a stupid question but I simply see no obvious reason why dependent sum type is a generalized form of product type. Concretely, the sigma type $\Sigma(x:S)T$ degenerates to a product type if $T$ does not depend on $x$ and is expressed to be $S\times T$ in this case.
Where the SUM part in dependent sum t... |
My first thought was using the third case of the master theorem, but I am not sure if I can use $\epsilon \rightarrow 0$, so $f(n) \in \Omega(n^{log_2^4+\epsilon})$.
Otherwise, I tried solving the equation by iteration where I got $T(n) \in \Theta(n^2log_2^3n)$ instead of $T(n) \in \Theta(n^2log_2n)$.
Which solution is... |
I have a stream of jobs (so I don't know upfront how many jobs). And I have N workers in the system.
Now I want to schedule / queue a job to one worker (a worker can have multiple jobs in his queue).
However, it's not the case that the workers can equally well do all jobs (think delivery -- delivery people who are clos... |
I have a knapsack problem that has been frustrating me for weeks, in which we consider a set of n items, described by their integer value, and being of one of C colors.
There exists a constraint on the number of different colors of objects in the knapsack (but no "weight" constraint), and the goal is to maximize the va... |
Everyone knows code bloat is a real thing, of course.
Everyone knows that programs are getting bigger too (this may be nothing to do with 'bloat' of course - they are more sophisticated, safer or faster even: maybe).
So why can't I find any papers on Google Scholar or in the ACM Library that back up either claim?
Happy... |
Problem: Prove that if a Mealy machine is strongly connected and completely specified, the corresponding Moore machine will also be strongly connected and completely specified.
My approach so far:
As the Mealy Machine is completely specified, we have 2 cases for each state:
All transitions coming into this state have ... |
In this blog the author states that the following
So we now have a rather poor estimate of the number of values in the
dataset based on bit patterns. How can we improve on it? One
straightforward idea is to use multiple independent hash functions. If
each hash produces its own set of random outputs, we can recor... |
Question : To show that any language $L \in NP$ is many one reducible to HP.
Let $L$ be a language in NP, it means there exist a non-deterministic Turing machine for $L$. Let $x$ be a input string to this non-deterministic Turing machine, now I have come up with $f(x)$ such that $x \in L \equiv f(x) \in $HP and $f$ s... |
I have an edge-colored network, in which edges also have a length, and I am considering the problem of determining the shortest Path between a pair of nodes, with the additional constraint that the number of colors of edges in a path should not exceed an integer $k$.
It corresponds to finding shortest Paths on a multi... |
Suppose I want to show by contradiction that the amortized cost of a data structure with some operations cannot be less then $\Theta(k)$. I assume for the sake of contradiction that it is possible. Can I then choose an $n$, large enough, and a special sequence of operations and show that they take $\Theta(nk)$ and conc... |
I'm trying to understand the log-space algorithm for $$UCYCLE = \{ \langle G \rangle \ | \text{ $G$ is an undirected graph containing a cycle} \}$$
The basic idea is traversing from every $v\in V$, remembering the first edge and checking if we got back to $v$ from another edge.
What I don't quite understand is the way ... |
Given a Boolean function $f$ over the set of variables $X =\{ x_1,...,x_n \}$, the influence of $x_i$ is defined as the probability that changing only $x_i$ on random input changes $f$.
Given a function $f$ presented in $\text{CNF}$, and a coordinate, are there any known methods for determine if the coordinate has posi... |
I am reading from "Discrete Mathematics and Its applications" by Kenneth H. Rosen, 7th edition. Consider the highlighted part in the following example taken from the same book:
Question Use predicates and quantifiers to express the system specifications “Every mail message larger
than one megabyte will be compressed... |
Say I have 2 Gaussian sources X and Y. They are generated with mutivariate gaussian distribution with mean = [0, 0] and co-variance = [1, 0.9;0.9, 1] with 100 observations
That is: means is zero and both X and Y are correlated with 0.9 and in total there are 100 variables for each of them.
I wanted to convert these cor... |
Is the language $L = \{ w \mid w \in (a,b)^* \wedge w \text{ is not a palindrome} \}$, context-free? I think this grammar:
$
S \rightarrow aSa \mid bSb \mid aAb \mid bAa\\
A \rightarrow aAa \mid bAb \mid aAb \mid bAa \mid a \mid b \mid aa \mid ab \mid ba \mid bb
$
generates it, but I'm unable to conclude anything using... |
I am writing a 2D light casting algorithm with OpenGL compute shaders.
The algorithm is simple:
For each light source shoot out light rays from it, the ray begins at the light coordinates, it ends at a pixel in a circle around the light source (the light distance). When calculating the ray sample the pixel underneath i... |
I've an hash (base 32 for what it's worth):
hash = 'ab352eghjhngd4'
And I've subscribers that want to listen to new hashes in a range.
listener = { startAt: 'ab31', endAt: 'ab40', obj }
listener2 = { startAt: 'ab350', endAt: 'ab351', obj }
In this case listener1 should be notified of the new hash while listen... |
I am doing a small project which explains how operations (file open, file write etc.) are done in client side and server side in network File system. Can anyone help me out providing its source code so that i can track its operation.
It would be helpful if you can explain how the process takes place in real time.
|
Can I use an infinite alphabet for the tape in a turing machine?
e.g. with input string as (1, 0)*
can I define the symbol 1j as the symbol 1 with j marks on top of it where j in a natural number, to be used on the tape?
|
Is it possible to find a TM with O(n) complexity that finds the middle of an input string?
Or at least to prove that it cannot be done?
I can use a two-taped TM if it helps.
|
I'm trying to model a scenario where there are n items, each having weight and volume. We also have m number of knapsack, each having a weight and volume capacity, where these items need to go inside. A feature that I am looking for is that the value property of each item which depends on which knapsack it goes into. F... |
I'm studying the Minimum Test Collection problem and I can't find an example of some instance of the problem, given values to the sets. The Garey and Johnson book only contains the proof of its NP-Completeness.
I hope someone can give me an example in order to understand in a better way the problem.
The problem is def... |
I am trying to find the running time of the given recurrence by the Master Theorem: $T(n)=16T(\frac{n}{2})+n^3\log^4 n$
I get $a=16$, $b=2$ and $f(n)=n^3\log^4n$, It seems that it's Case 1 of the master theorem. because $f(n)=O(n^{4-\epsilon})$ for some $\epsilon >0$ (?)
but I can't find this epsilon, and I am doubting... |
Let we have a formula $\varphi(x_1,x_2...x_k)$. Now we apply a refutation method: $\varphi(x_1,x_2...x_k)\Leftrightarrow(\varphi(x_1=1,x_2...x_k)\lor\varphi(x_1=0,x_2...x_k))$. Latter formula seems to be longer, but no, good algorithm reduces number of literal occurences. On each step we can modify the formula without ... |
Here is the question:
You are doing the Tour de France and you are given a map with all the n places
where you can refill your water bottles. Your bottles fit 2 liters of water with
which are enough for m kilometres. Your goal is to stop as few times as possible
to refill your bottles, since you care about a good time ... |
I know that such sets exist and they are called sets that are not m-complete, but I am not sure how to find them. Can someone give examples?
|
I'm learning 2's complement conversion for positional number systems. For the most part I have only seen 2's complement for represented in 8-bits. I had a discussion with a friend who explained that for values that exceed 8-bits (>255) you would need to go to the next largest word size i.e. 16-bit followed by 32 and 64... |
Most of us know the typical answer to this question: if a function calls itself, it's recursion, if it's a loop, it's iteration. We also know that recursion can be simulated using iteration (by manually unrolling the call stack) and iteration can be turned into recursion.
Yet there's something about this that keeps bug... |
From what I read, a many-to-one reduction $A \leq_m B$ means that $\forall x \in A$, there exists a computable function $f$ s.t. $f(x) \in B$. However, $f$ is not necessarily surjective (i.e. not all elements in $B$ have to be mapped).
But what if I try to reduce the language $ATM$ : {$(i,w)$ | $TM_i$ accepts $w$} to ... |
I am trying to calculate a signal to noise ratio to achieve a rate of 300Mbps on a bandwidth of 3Mhz.
The shannon capacity formula C = B*Log(x,(1+SNR)) should be my friend on this one, but this is my first time doing this calculation.
Currently I am at 300Mbps == 3000000 * Log(2,(1+SNR)) From this point I would just g... |
I.e. - if a TM accepts the word 0011100 on one path, while on another the same word is rejected. Do we say that 0011100 is part of the language, or do we say that it is not a valid TM?
|
What languages can be decided by a two-state TM that has two states: one accepting and one rejecting?
As a newbie in TMs, there are some definitions I am not familiar with, of which the answer is obviously dependent, like:
Can we draw an outgoing arrow from the Accept or Reject states?
Can either of these two states ... |
I'm reading Arora Barak and in that it is written that when $O \in \mathrm{P}$, then $\mathrm{P}^O = \mathrm{P}$. Can this be generalized?
Intuitively, I think that $\mathrm{NP}^\mathrm{NP} \neq \mathrm{NP}$ but $\mathrm{EXP}^\mathrm{EXP} = \mathrm{EXP}$.
Am I right? Any elaboration on the same would be appreciated.
|
I know what is turn around time but i am confused why wating time is not considred as Performance Metric for Scheduling Algorithms Since it gives the time for which a Process will wait till it gets Scheduled...This can also be Performance Metric
|
I am trying to solve the recurrence: T(n) = 2t(n-1) - t(n-2) +5n +7 but without success.
And from here I don't know how to continue?
|
It seems that their purpose is in making designing certain NFAs less onerous? Does this mean that no automata that are implemented have Epsilon-transitions, and that they are kind of a mathematical conceit we adopt for our own ease of design? I'm having a lot of trouble understanding what is "happening" when an Epsilon... |
There are several equivalent computation models, each capable of simulating each other. For example, the lambda calculus or the SKI calculus which are based on rewriting, Cardelli's object calculus, Hoare's communicating sequential processes, and of course the universal Turing machine, all of them formally defined.
I d... |
In chapter 2.2 of
Giacobazzi, Roberto; Ranzato, Francesco, Uniform closures: Order-theoretically reconstructing logic program semantics and abstract domain refinements, Inf. Comput. 145, No.2, 153-190 (1998). ZBL0921.68057.
it's said:
An (upper) closure operator (or simply closure) on a poset $C$ is an operator $\... |
I need to write (A and B) in 3CNF, and for whatever reason, I can only come up with (A or B) in 3CNF (A OR B OR X) AND (NOT(X) OR A OR B). Any help is greatly appreciated!
|
Say we have $x$ amount of sorted arrays, each with $n$ elements, and we combine them one at a time. So merging the first two arrays would give us $2n$ in terms of cost, and $3n$ for the next array, all the way until $xn$ for the cost of merging. How would one go about finding the tightest possible Big-O bound for the c... |
We can use multi-tape enumerators.
(Of course it is not valid to use turing machines albeit the fact that any enumerator has an equivalent TM)
What we need is to prove that if $A$ and $B$ are decidable then $A\cup B$ and $A\cap B$ are also decidable.
Can it be done? If so, what is a possible approach?
|
Assume you have a graph/network N;
Boundary Conditions:
each vertex/node $n \in N$ can support a maximum number of $e_{max}$ connections
Nodes can join and leave the graph.
Each node $n$ has an address $0 < a < 1$, e.g. $v_{0.123987144}$.
The addresses are roughly uniformly distributed.
Each node can destroy any c... |
I'm studying the expression problem at the moment and it seems like I'm missing something. I used a data-centered approach (i.e. OOP) as the basic setup and then introduced two type variables, one for each operand in Add. These type variables are bounded to subtypes of Exp - this constraint is further narrowed down, wh... |
This reference from the german wikipedia article on neural networks states:
There are also many other important problems that are so difficult that a neural network will be unable to learn them without memorizing the entire training set, such as:
Predicting random or pseudo-random numbers.
Factoring large integers.
D... |
I want to prove that the NP-hardness of Maximum Independent Set implies that there is no FPTAS for the Maximum Independent Set problem unless $P=NP$.
I found the following approach after some research online:
Assuming that such an FPTAS exists which computes a $(1 - \epsilon)$-approximation for Maximum Independent Set ... |
I have seen this definition almost everywhere, but I don't know the underlying proof behind this definition.
|
I'm taking an intro to computability course right now and I'm having some trouble with a couple examples that the professor doesn't seem too clear on.
We're learning about languages and doing some Kleene star examples. For instance, we were asked:
True or false, L+ = L or L+L+ (L+ being positive closure). We determined... |
I have found this challenge and now I'm interested how hard it is being generalized.
It can be reformulated like this:
Given numbers $N,k$ find a if there exists string of directions (W,E,N,S) that will reach every reachable cell on every $N\times N$ grid from any position of length at most $k$.
We only need to find a ... |
Many people have seen this fantastic meme answer
before about how we should use a parser to parse HTML instead of using Regex. The argument is that HTML is not regular and thus cannot be parsed using Regex.
However, a closer look at JS regexes, it seems JS regexes can indeed describe irregular languages via backrefer... |
How can we prove that the total number of mesh points k or fewer jumps away from an arbitrary point in a 2D mesh is: $2k^2 + 2k + 1$.
I tried making a $3 \times 3$ mesh.
a --- b --- c
| | |
d --- e --- f
| | |
g --- h --- i
For point $e$, the number of points $k=1$ jump away i... |
I am reading Operating systems from the book "Operating System Concepts" by Peter Baer Galvin, 7th edition.
Performance of Demand Paging:
Let p be the probability of a page fault (0 $\leqslant$ p $\leqslant$1). We would expect p to
be close to zero—that is, we would expect to have only a few page faults. The
effec... |
The minimal vertex cover problem has a 2-approximation algorithm.
We can reduce the maximal independent set problem to the minimal vertex cover problem as shown here.
Does this mean that I can use the $2$-approximation for minimal vertex cover to get a $1/2$-approximation for maximal independent set?
My approach:
// is... |
consider the language:$$CLIQUE = \left\{\langle G,k\rangle \ |\ \text{ $G$ is a graph containing a clique of size at least $k$ } \right\}$$
Suppose there's a polynomial time algorithm for $CLIQUE$. I need to show a polynomial time algorithm for finding a clique of size $k$.
Now, the idea is pretty easy if there's onl... |
De Casteljau's algorithm is a method for calculating a point on an order $N$ Bezier curve at time $t$ by performing a linear interpolation between two order $N-1$ Bezier curves at time $t$. You do this recursively until you reach order 0 which is single point / data value.
Calculating a point on an order 1 (linear) Be... |
Let $G = (V, E)$ be an undirected graph without self loops and with edge weights $w: E \to \mathbb{N}$. The girth $g(G)$ of $G$ is defined as the length of the shortest cycle in $G$, i.e.
$g(G) := \min\left\{ n \in \mathbb{N} \mid \exists \text{ cycle }(e_1, e_2, \dots, e_k) \text{ in $G$ satisfying } n = \sum_{i = 1}^... |
ETM = {|M is a TM and L(M) is the empty set} is not decidable.
This is typically shown by a reduction from HALT. I can kind of comprehend the proof, but intuitvely I still find it very strange that ETM is undecidable.
For example, why wouldn't the following algorithm not work?
1) Mark all states that can be reached st... |
Is there a way to convert, i.e., C code into English? The purpose would be to convert source code into a Text-To-Speech converter which would enable someone to "listen" to source code.
EDIT: An alternative idea would be to parse C code to be more "listenable", for example parse:
#include<stdio.h>
funcName()
{
... |
Presentation of the model: we consider the regular lattice created from $\mathbb{Z}^2$ (It's no more, no less a square lattice).
At $t=0$, each site is said "active" independently with a probability $p$, "inactive" otherwise.
At $t$, if a site is inactive, it becomes active if at least $2$ of its neighbours are active... |
I saw the proof for STCON being NL complete here : https://en.wikipedia.org/wiki/St-connectivity
I understand the reduction, but how is it logspace?
I understand each state is of $O(\log(n))$ space. What I don't understand is how I can create the graph in logspace.
I tried to do some kind of DFS, but remembering the s... |
A DPDA which accepts by empty stack cannot accept all Regular Languages?
Is it true that the DPDA cannot accept all regular languages?
I am not able to understand this.As per my knowledge DPDA are more powerful than regular languages as they have finite automate and also the stack.So finite automate can handle all the ... |
I have a directed graph with non-negative weights on the edges.
I can divide the nodes in two "classes", X (roughly 1700 nodes) and Y (~300).
I want to collect all the shortest paths from x in X to y in Y.
The weight of the edges depend on the previous edge in the path I am currently on.
Testing the possible paths be... |
Are there known techniques for converting a loop like the following to an if and a multiplication?
while (x < 0) {
x += 60;
}
It seems clear that this could be replaced with something like the following
if (x < 0) {
x += f(x, 60);
}
where f contains no loops, presumably using multiplication. This would have t... |
Can someone explain how to prove what this question is asking? I'm terrible at proofs and the fact that I don't even understand the hint is very troubling. This is a homework question.
Consider the Interval Scheduling problem. We have seen that the “earliest deadline-first” greedy algorithm finds an optimal set of jobs... |
I'm learning about data structures and have been reading up on upper bounds. Most of the stuff I understand but my professor gave us a problem in class to solve on our own for fun. I'm not sure how to find the $O$ notation as a function of $N$ for this one.
for (i=1; i<=N; i++)
for (j=1; j<=N; j+=i)
x=i+j;
... |
I have a question over this quote directly out of Computer Organization and Design, 5e:
Signed versus unsigned applies to loads as well as to arithmetic. The function of a signed load is to copy the sign repeatedly to fill the rest of the register—called sign extension—but its purpose is to place a correct representat... |
I was wondering what the time complexity of computing the natural log of a number is.
Note: I realize that the natural log of number is irrational, so my rephrased question would be "What is the Big-O of approximating ln(x) to d-decimal places?"
|
I've been self-studying Markov Chains and came across a problem online here: http://websites.math.leidenuniv.nl/probability/lecturenotes/CouplingLectures.pdf
I'm not asking for anything too formal (I'm still a newbie on the subject), but I would appreciate an intuitive explanation.
I'll summarize the problem as follows... |
From what I have learned in Introduction to Automata Theory, Languages, and Computation, regular expressions can be represented with $R^{(k)}_{ij}$.
I understand that $i$ and $j$ represent the starting state and the closing state respectively. However, I am still trying to understand the purpose of $k$.
To put it simpl... |
I'm doing an online course in which I'm struggling with the following (multiple-choice) question:
Suppose we run the FLoyd-Warshall algorithm on a directed graph $G =(V,E)$ in which every edge's length is either $-1,0,$ or $1$. Suppose further that $G$ is strongly connected, with at least one $u$-$v$ path for every pa... |
Let $0<a < b<1/2$. Suppose that there's an efficient $a/b$-approximation for $A$, where $A$ is a maximization problem. Why does $\operatorname{gap-A}[1.5a, 1.5b +1/4]$ also has a polynomial solution?
We've learned in class that if $gap-A[a,b]$ has a polynomial solution then there's a $\frac{a}{b}$ approximation. That... |
$C_1 \subseteq C_2$ implies $C_1^A\subseteq C_2^A$?
I've given a caveat that one shouldn't make this implication blindly and it shall be justified.
I can think of examples such that $C_1^A \subsetneq C_2^A$ and examples such that $C_1^A = C_2^A$.
but could it be that $C_2^A \subset C_1^A$? I can't see how.
So what's ... |
Something that has been bothering me for a while is the formula for the maximum amount of nodes of a tree with height d and branching factor of b.
$$(b^{d+1}-1)/(b-1)$$
This holds true for all positive integer values of b, including 0, with the exception of b=1.
If b = 1, we would be dividing by 0. Which, well, we al... |
While studying Automata at my University, I faced the following problem from SIPSER, M textbook:
Consider D = { w | w contains an even number of as and an odd number of bs and doesn't contains the chain ab}. Draw an DFA with 5 states that recognizes D and a Regular Expression that generated D.
I tried doing the follo... |
Let's assume that I have an LTL formula and I want to convert it to a Buchi automaton. For which fragment of LTL, GBA is more succinct and for which fragment BA has the same size as GBA.
|
I tried doing this, but kept failing to prove. I know how to prove that the language is nonregular when n0(w) = n1(w). The following is the proof for n0(w) = n1(w) using pumping lemma:
Assume L is regular. Then, by the Pumping Lemma, there is a natural number m such
that any w ∈ L with |w| ≥ m can be factored as w = ... |
I've been googling this topic but still couldnt get a legit answer. So can someone explain with some examples that if we were to use cache memory instead of LRU we would have lower miss rate (better peformance). Or simply when LRU is not an optimal choise.
|
Say I have an instance of the Set Cover problem, and use the typical greedy algorithm to obtain a solution.
Is there an efficient way of verifying if, for that particular instance, the given solution is optimal?
|
We can express property that graph has vertex cover of size at most k with first order formula:
$$\exists x_1 \exists x_2...\exists x_k (\forall y \forall z (E(z,y) \ \rightarrow \ \bigvee_{1 \leq i \leq k} y=x_i \ \vee \ \bigvee_{1 \leq i \leq k} z=x_i))$$
But, there is also theorem (proven for example in Libkin's boo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.