instruction stringlengths 35 29.1k |
|---|
Disclaimer: I'm very new to computer science & game programming
I'm having trouble with understanding how to implement a static evaluation function in chess. The logic seems simple like just apply a weight to each piece on the board and subtract the pieces from each side, but its much more complex than that isn't it? Y... |
Problem domain - I'm implementing a home monitoring system using smart phones. At regular intervals rear camera of the phone takes images and compare them for a change detection. This change detection is done inside the android app itself. Only after a change is detected, image is sent to server.
I want to know a fast ... |
In the field of the intelligent swarm, there are many algorithms can find global optimization, such as Ant Colony Optimization (ACO), particle swarm optimization (PSO).
Is there any optimization algorithm implements using MapReduce which can run at Hadoop?
|
Im studying finite state machines, in particular the deterministic and the non-deterministic versions.
What i have not understood is :
why in a non-deterministic state machine it's allowed that from a state it's possible to go nowhere ?
This is not allewed in DSM. Why ?
|
Note: Not sure with the tags.
I'm quite new to this area of Computer Science. I was used to just developing software and applications and applying certain algorithms when necessary. However, I am tasked right now with a very complex task. I apologize in advance, although being a Computer Science graduate, I've only bee... |
The overall architecture of the Android OS is a Stack. What specifically justifies Stack to design the overall architecture of Android? Are all mobile OS like Windows Mobile, iPhone OS developed as software stacks? If yes then why? Why not a queue, tree, graph, heap, etc.?
For more information and clarity to my questi... |
Does there exist a universal constant $c$ such that for any strings $x, y$, we have: $$K(xy)\leq K(x) + K(y) + c$$
where $K(\cdot)$ denotes the Kolmogorov Complexity of a binary string and $xy$ means the concatenation of $x$ and $y$? I know the answer to this problem is no but I am seeking a proof for this, any hint?
U... |
"Each process that is executed is divided into blocks of same size, called pages."
"Thread is a part of process being executed."
Are pages and threads both part(s) of process? Whats the difference between thread as a part of process and page as a part of process?
|
In response to a clock interrupt, the OS saves the PC and user stack pointer
of the currently executing process, and transfers control to the kernel clock
interrupt handler.
Then the clock interrupt handler saves the rest of the registers, as well as other machine state, such as the state of the floating point register... |
I'm looking for a method for determining a path for a UAV that interpolates a set of input locations, with a constraint on maximum curvature and given an initial velocity vector.
The cost (length) of the path should be as small as possible.
I know a little bit about Dubins curves but that's in 2D and only for two point... |
I am reading in my book that this NFA machine accept the string 10100. If we follow the execution, we will find our self in branch with the state final q0.
The only answer for me is that when we are in state q0 after 1010 and 0 is coming we can't move any more so this branch will die even it is in the final state. Am ... |
I was recently thinking about the validity of proof by contradiction. I’ve read for the past few days things on intuitionistic logic and Godel’s theorems to see if they would provide me answers to my questions. Right now I still have questions lingering (perhaps related to the new material I read) and was hoping to get... |
I've read some about genetic algorithms and the general approach, but I haven't found anything about using it when the length of the solution is unknown. How would the generation of the initial population look like? Would mutation then include adding/removing alleless? Are there any general methods for this?
|
Consider a (smooth) function
\begin{align*}
F: \mathbb{R}^2 \to \mathbb{R}
\end{align*}
with the contour
\begin{align*}
\mathcal{C} = \{x \in \mathbb{R}^2 | F(x) = 0\}
\end{align*}
The function (and possibly derivatives) will be given as analytical expression, and be continuously differentiable everywhere. I am trying ... |
One strategy for ordering the growth of functions involves substitutions when comparing functions using the limit as $n$ goes to infinity comparing two equations using the following rule.
$$
\lim_{n\to\infty}\frac{f(n)}{g(n)} =
\left\{ \begin{array}{cc}
0, & f(n) \in O(g(n)) \\\
\infty, & f(n) \in \Omega(g(n)) \\\
c... |
I am attempting to learn neural networks using the Keras libary on the MNIST hand written digit dataset, using dense layers only. I am trying to figure out what the best shape for the network should be but I can't seem to find any literature or discussion on the subject.
By shape, I mean should the hidden layers have m... |
After reading Dimitris Andreou's blog post on reachability, it seems that reachability can be reduced to order-maintenance. A solution to the order-maintenance problem has the following interface:
Insert (X, Y ): Insert a new element Y immediately after element X in the
total order.
Delete (X): Remove an element X fro... |
If I were to sort the list of numbers 1,7,5,7,1 using Hoare's algorithm as described at the very beginning of wikipedia item on Hoare partition scheme with 5 being the pivot, and the indexes start at 1 and 1, then what would happen? If they are switched, nothing is really sorted. And the same goes for the two indexes b... |
An adversarial autoencoder helps us to impose a prior distribution $p(z)$ on the encoded values of the inputs, or $q(z)$.
On the contrary, an ordinary autoencoder (which we train like an ordinary neural network (comparing output to input using mean squared error) does not give us any control over the encoded distribut... |
Given a directed acyclic graph G, give a linear time algorithm to determine if the
graph has a directed path that visits every vertex.
You can assume you are given a list of nodes and two adjacency lists: Enter[v] which contains all the edges entering node v, and Exit[v] which contains all the edges leaving node v.
I ... |
What I know is that $W = \lim V$ for some $V$ if and only if $W$ is the language of some deterministic buchi automata, namely that of $V$.
So, to attack this problem I tried to come up with some language of the form $U^\omega$ which cannot be determinized. But I keep failing trying to come up with something like this.
... |
A naive greedy algorithm tries to find an optimal solution based on the best solution so far, hence it may get stuck in local optima.
To avoid this problem, we may keep track of the best $n > 1$ solutions (instead of the best only). What is the name(s) of this algorithm?
Surprisingly, I can't seem to find the answer fr... |
I ran into this exercise problem from Introduction To The Theory Of Computation by Sipser. Given a context free grammar:
$ S \rightarrow SS \ | \ T \\ T \rightarrow aTb \ | \ ab $
I have to show that the grammar is ambiguous. So I have to find at least two leftmost derivation of a string. I have tried a lot but have fa... |
In the following loop
for i = 1 to n
doSomething O(1)
for j = 1 to k
doSomething O(1)
Is the runtime still $O(nk)$ even with the expression in the outer loop? Because if I change the order of the loops and $n \neq k$ then doSomething is executed a different amount of times.
|
You are given a rectangular board of known size, e.g. 20x20 cm. Some 1x1 cm pieces are missing. Your task is to cover this board with a maximum number of 2x2 cm tiles (an example is attached below), while it's not allowed to cover missing tiles. Currently, I solve it using the following greedy algorithm:
for x in N:
... |
I find it hard to find reductions that only work on one side:
A is mapping reducible to B, but B is not mapping reducible to A.
what could be an easy way to find such two languages A,B ?
I tried Atm,Htm,EQtm,Etm,RegTm, and many others, and whenever I found that A is reducable to B, I also found that B is reducable to A... |
The algorithm I am looking for has the following requirements: Input is a set of strings. You are looking for a string containing all input strings. The resulting string should be as short as possible. At least shorter than just concatenating all input strings if possible.
Examples:
Input: a ab bc
Output: abc
Input: a... |
In order to find Big O for a recursive algorithm, it is needed to know the stopping criteria of that algorithm. For the recursive algorithm to find Factorial of a number it is very easy to find the stopping criteria.
int fact(int n)
{
if((n==1)||(n==0)) return 1;
else retrun n*fact(n-1);
}
And we can make a ma... |
The CURE algorithm is a method of clustering data. An outline of it can be found here on slide 5: https://www.slideshare.net/ellepiu/cure-clustering-algorithm. I personally learnt it from this video: https://www.youtube.com/watch?v=JrOJspZ1CUw, where the algorithm is explained at 7 minutes.
This is my understanding of ... |
In the paper "PRIMES is in P" the following is said (page 1):
Let PRIMES denote the set of all prime numbers. The definition of prime numbers already gives a way of determining if a number $n$ is in PRIMES: try dividing $n$ by every number $m \leq \sqrt{n}$ — if any m divides $n$ then it is composite, otherwise it is ... |
I am doing problem 1.g.
My Approach is to first create a NFA that accepts this string i.e. all strings having 110. Then converting it into DFA and then complementing it. I have the answer what should I get however my NFA to DFA conversion doesn't work. I don't know why. Can anyone guide me. Thanks. Here is my NFA. Note... |
I recently started to learn about machine learning. I have created a feed forward neural network (ffnn) and a recurrent neural network (rnn) to predict user ratings of movies. I am using a subset of 2000 users and their ratings of the "Netflix Prize" dataset.
The ffnn as well as the rrn have an accuracy of ~40% - 45% o... |
I'm studying Complexity Theory. Many times i found written that in complexity theory every problem come in pair, that is a search version and verification version.
But why this happens ? What establish this ?
|
Theory of computation often involves nondeterministic models of computation. Some examples include nondeterministic finite automata (NFAs), nondeterministic pushdown automata (PDAs), and nondeterministic Turing machines. Real computers, however, are deterministic (or at best, randomized).
What is the point of studying... |
Im studying Complexity Theory and i have a question.
What principle establishes that every NP problem can be solved by a deterministic turing machine in a exponential time ?
|
I am currently looking into timed automata for a project.
I am thinking about a timed automaton where a clock only advances when the automaton is in a certain state.
However, my little knowledge in the domain makes me wonder whether somebody already defined timed automata like that.
As an example:
I.e. I have a timed a... |
If the body of a simple for loop has time complexity $O(n)$ and it is
executed $n-1$ times what is the time complexity of the complete loop?
I am trying to figure out the correct answer to this question for my upcoming exam. My reasoning is that if the body of the loop is executed $n-1$ times and its complexity is... |
$O(n) = \{n, n^{2}, n^{1000000}, 2^{n}, ...\}$ [Source A], [Source B]
Say $t_{n} \in O(n)$
By formal definition $t_{n} \leq k \cdot n$ [Source C]
But how can this be? Say $t_{n}$ is actually $n^{2}$, then $t_{n} \leq k \cdot n$ is just false. Would it not be more logical to have $t_{n} \geq k \cdot n$ as a formal de... |
Let's say I'd like to search a database and I have a function $f$ such that $f(x) = 0$ for all incorrect entries and $f(x) = 1$ for all target entries.
The crux of Grover's search seems to be that there exists a way to construct a quantum operator $\hat{f}$ in a way that it takes a superposition of states as input and... |
A similar question has been asked here, but this one is more complicated and has more constraints.
I'm trying to find an algorithm to solve the following (real-life) problem:
A customer has $M$ amount of money each month that he wants to invest according to her preferred asset allocation.
Example
60% stocks
20% bonds... |
This is a very simple question, but I cannot find the answer anywhere, mostly because I don't know how else to ask about what I'm looking for. I have a homework assignment that has to do with pumping lemma, which asks me to use the pumping lemma to prove that the language given is not regular.
{x₁#x₂#x₃|x₁, x₂, x₃ ∈ {a... |
Can anyone please help me understand the quasi-liveness and liveness properties of petri nets. Suppose that you explain that to a person with 10 years old.
For my part, i have the following definitions.
- quasi-liveness petri net: its mean that every transition in the net can be enabled at least one time for specific m... |
Consider a sequence $s$ of $n$ integers (let's ignore the specifics of their representation and just suppose we can read, write and compare them in O(1) time with arbitrary positions). What's known about the worst-case time complexity of producing a sequence of all distinct elements in $s$, in any order?
By randomized ... |
In Vizirani's textbook says in page 332,
Gap preserving reductions are weaker than their L-reductions [...] one of the motivations for the PCP theorem was that establishing an inapproximability result for MAXSAT would directly yield inapproximability results for all Max-SNP-hard problem.
Now my question is: Why Gap p... |
(This is a question of information theory, data compression and entropy, so I believe it fits CS forum)
Does the fact that the computer itself is a part of the universe make it logically impossible for the computer to contain the information of the whole universe?
I want to know if it's possible to simulate the whole u... |
I have $k$ unit vectors in $\mathbb{R}^k$. Can I efficiently identify a set of $2n+1$ vectors $v_1, \dots v_{2n+1}$ such that $\sum_{i< j} v_i\cdot v_j < -n$ for any $n$ -- or determine that no such set exists?
As some motivation, if I have 3 vectors (so that $n=1$), the minimum value of their pairwise dot products if ... |
An $\omega$-word $s \in \Sigma^\omega$ is eventually periodic if it is of the form $s = uv^\omega$ for finite words $u, v \in \Sigma^*$.
I want to show that the set of all eventually periodic words is not buchi-recognizable.
I do not know how to proceed. My attempt was to find a part of the word and then pump it indefi... |
Team A has 2 Spots
Team B has 1 Spot
Player 1: 10 Units when on team A, Can't work on team B
Player 2: 8 Units when on team A, Can't work on team B
Player 3: 9 Units when on team A, 2 Units when on team B
I'm trying to craft an algorithm that will maximize the total units of output between the two teams. I'm representi... |
I've been reading the proof that axis-aligned rectangles are PAC learnable from the book Foundations of Machine Learning by Mohri (Proof pt. 1, Proof pt. 2), and a small technical detail stuck out to me.
The proof goes through dividing the target rectangle $R$ to four rectangular regions $r_i$ (Fig 2.3), each having p... |
There are $2^{2^n}$ possible functions that have $n$ boolean inputs and a single boolean output. Some of these functions have very short boolean logic circuits. Some have longer circuits.
A classic result in circuit complexity is that, if you count the total number of gates needed to implement $f$, most $f$s take $\The... |
Suppose I have an undirected graph that consists only of a cycle. Each vertex has a depth value that must be $1$ greater than its predecessor (i.e. if we reach vertex $F$ from vertex $C$ which has a depth of $2$, then $F$ has a depth of $3$). The beginning vertex has a depth of $0$. I need to show that every vertex mus... |
Say we have a Priority Queue of size 1000 that is implemented using Max Heap.
Now if i want to get the top 5 elements, the most laid back method is to poll the maximum 5 times, resulting in a set of five maximum numbers. The complexity of a poll function using heap is Log N. Hence, retrieving 5 top values or say, K to... |
What is the time complexity of this algorithm? I assume that is $O(3^n)$
n=3
recLoop(int n)
{
for(int i=0; i<3; i++)
{
if(n>0)
{
recLoop(n-1);
}
count++;
}
}
n 0 1 2 3 4
count 3 9 27 81 243
From this, I get $O(3^{n+1})$
If I change my algorithm to:
recLoop... |
For the following code fragment:
i = 1;
s = 1;
while(s <= n) {
i++;
s = s+i;
printf("x");
}
How can we go about proving the time complexity of this code is $\Theta(\sqrt{n}))$?
Usually, I use sigma series analysis to figure the time complexity but I am having trouble turning this code into series notation... |
I'm not sure if my logic is correct when it comes to the algorithm for decision problems. The concept is confusing me when I fail to distinguish its answer from that of a proof.
For example:
Given two finite automata $M_1, M_2$ that operate on a common alphabet, find an algorithm to show that:
$$L(M_1) \subseteq L(M_2)... |
What are advantages of closed hashing over open hashing?
I know the difference between those two but can't figure out why would closed hashing be better in any way.
Thanks.
|
Basically, when given an Undirected graph, the problem of getting maximum cycles is known.
This case is quite different.
The graphs I'm dealing with are made by converting geometric polygons to vertices and edges, so vertices relative position matters, and there are weights on the edges representing the distance betwee... |
I have a set of locations, around 100, I want to divide into groups.
I say these locations are in a graph because the geometric proximity (straight line distance) doesn't matter to me, and I have a matrix of the distance (non straight line distance) and time, that would take to travel from any location to another. Eith... |
I am trying to prove by induction that if
$$\hat\delta_d(q_0, w) = \hat\delta_n(q_0, w)$$
I know by practicing inductive proofs of the $\hat\delta$ for DFAs, that on the basis of the definition of $\hat\delta_d$
for any $q \in Q$, $\hat\delta(q, \epsilon) = q$
for any $q \in Q$ and $a \in $ the language of the DFA, ... |
I was thinking yes because $0 \leq \sqrt{h(s)} < h(s)$ but I'm not entirely sure.
|
I don't know if this is the right place to ask this, but here goes:
I have a set of players in 3 age groups. Each player has the attributes:
gender
mental skill (1-10)
physical skill (1-10)
age group (1-3)
I want to sort them into 14 teams that have balanced "stats", as in each team has (or as close as possible):
s... |
Consider an un-weighted directed acyclic graph (DAG) consists of m source (root) vertices and n target vertices. When there is only one source vertex (m=1), the problem to find a directed path connecting a maximal number of target vertices is the longest path problem in a DAG, which can be optimally solved within linea... |
So If I understood correctly, the conversion from 4-SAT statement to 3-SAT statement follows the following approach:
(a or b or c or d) -> (a or b or z) and (-z or c or d)
Where the z is a new literal. However, with 4 literals there exists 4^2 different permutations (a or b or c or d) and (-a or b or c or d) and (a or ... |
I'm confused about this exercise.
We have assembly code:
01: ADDI $1, $0, 1000
02: LW $2, 0($1)
03: BEQ $0, $0, LABEL
04: MULT $3, $2
05: ADDI $2, $2, 1000
LABEL:
06: MFLO $4
07: ADDI $2, $1, 5
08: SW $2, 0($1)
09: NOP
with:
- 6-stages Pipeline
- Branch Delay Slot
- No Bypassing
Is this correct?
D... |
I am trying to get a better understanding of Fibonacci Heaps. I noticed the
following definition for the potential function.
$$ \Phi(F)=|W| +2\cdot \text{# marks}. $$
I do not understand why it is defined that way, or what its significant is. I am hoping somebody can explain it to me.
|
I have to prove that the following language is not regular:
$$\{ x | x = 10^{2n} + 10^n + 1, n ≥ 1\}$$
I am trying to prove it using Pumping Lemma, however, when I expand the expression I have both addition and multiplication.
I assume that the pumping length is three ($p=3$) and I work on the following word of this l... |
I have a fixed rectangle of size X x Y.
I also have a bunch of rectangles of different sizes.
I want to check if these rectangles can fit in the larger X x Y rectangles knowing that one can rotate any one of them by 90°.
Any great algorithm to do this ?
I know that some packing algorithm exists and several threads disc... |
I'm trying to practice for my upcoming distributed systems test. My teacher said that their will be a problem where he'll give us atomic instructions and we're going to have to implement Mutual Exclusion (ME) using those instructions.
Where can I find practice problems/solutions for these types of problems? I can't s... |
For some given $n$, how can we check whether there exists $a,b \in \mathbb{N}$ ($b > 0$) such that $a^b = n$ in polynomial time with respect to the number of digits in $n$?
|
Just a quick question here, is there a known description of a graph family where for every graph $G=(V,E)$ it holds that for every $(u,v) \in E$ you have $|N(u) \cap N(v)| \geq k$? There was a definition for such graph as $k$-community. Even non-trivial examples (e.g., cliques) might be interesting.
Also, how to constr... |
I thought of a problem which must certainly be known:
n persons get an uneven share of m oranges, m being a multiple of n. All the persons having more than m/n oranges are to give their excess share to the less fortunate. What is the minimum number of transactions needed to reach a perfectly even distribution, each tra... |
I was going through the B+ tree deletion operation from the book Database System Concepts, 6th Edition by Henry F. Korth. One particular thing caught my attention.
A B+ tree is given. We have to delete the record "Gold" from this tree.
So we first locate the record by going down the tree and once we find the node, we ... |
Aim: schema aware transformation.
I've written a code(in js) which can transform data {projectDetails: [ {detail : {}, id : "gwl" }], name: "amit"} into string @gwl|amit. But I'm not able to complete the decoder to transform it back.
Problem: logic to transform string back to object
In detail
Consider that following sc... |
I have a confusion regarding how the Kernel is loaded during the boot time. The intuition I have is like following:
During installation of an OS, the compiled Code of the Kernel (depending on the architecture of the system) is written to the part of the Primary Memory that is restricted to the OS. When the PC is turned... |
If i want to implement a Deterministic Turing Machine from a Non-deterministic Turing machine is always suggested to use the Breadth-first algorithm ?
If yes, why ?
|
Im studing complexity theory and im reading this question on Quora.
According to what the guy is saying : if we are able to solve a NP-Hard problem in polynomial time we have prooved that P=NP.
But, in P we find problems that can be solved and checked in polynomial time and in this case we have only prooved that NP pro... |
I study computer science and hardware. Some problem are about parallel computing and applied Amdahl's law. For instance, some calculation is that the sequential part of a program takes x seconds and the parallel part takes y-x seconds. Can I then safely assume that it is the same percentage of the time that is parallel... |
Suppose you have $m $ sources $s_i$ and $n $ sinks $t_j$, but every source produces a certain type of flow, out of $k $ types, and every sink demands a certain type as well. We would like to know if it is possible to satisfy all demands given the constraints in the network. Assume different flows types all have a certa... |
Let's say we have given array of $n$ elements, now we want to create data structure that will allow us to get the MEX of its elements, MEX (Minimum EXcluded) meaning the smallest positive integer that is not present in the set. More info from wikipedia. The data structure should also support insert and remove elements ... |
im not familiar with the terminology of computer-science which makes it pretty difficult to search for the problem I have.
I'm looking for a function that generates a sequence of bits (B) of a given length (i.e. 1024 bit) from a chosen bit-sequence (A) (i.e. 32 bit).
This function needs to have the following properties... |
Are there any algorithms that use the spectral properties of a graph to solve the minimum spanning tree problem?
To clarify further what I have in mind, starting with the Laplacian matrix I want to algebraically arrive at the required set of edges. This is opposed to Prim's or Kruskal's algorithm where the result is o... |
Can we implement every algorithm using only immutable variables such that their space and time complexity is the same as using mutable variables?
|
Let: $INF = \{ w \in \Sigma^* | \quad |L(M_w)| = \infty \} $.
It is easy to show with Rices theorem that $INF$ is not decidable.
($INF$ is non-trivial because of $\emptyset$ and $\Sigma^*$).
How can you show this with a reduction onto the halting problem (for example)?
Here are my thoughts:
I had an idea of running t... |
While reading a book about algorithms, I came across this derivation:
$$
\frac{2a_0(2N) \ln(2N) + O(2N)}{2a_0N\ln N+O(N)} =
\frac{2\ln(2N) + O(1)}{\ln N+O(1)} =
2 + O\left(\frac{1}{\log N}\right).
$$
Could somebody please explain to me how we went from the left to the right?
|
I am working on finding a PDA that accepts the following language:
L = {0^i 1^j 0^k 1^l | i < j and k < l}
I am having trouble figuring out how to break this down/ where to start. I am able to form simpler PDA's such as when there are twice as many 0's as 1's but am drawing a blank on what approach to take to begin to... |
Is it known if there are two classes of languages $A$ and $B$ such that:
$A$ and $B$ are defined wrt the exact same type of machine (e.g. 1-tape Deterministic Turing Machines, 2-tape Deterministic Turing Machines, 1-tape Nondeterministic Turing Machines, etc);
neither $A$ or $B$ are defined wrt a restriction on space ... |
The requirement for the conservation of flow in a flow network is, as I see it in the MIT lectures on Algorithms, that $\sum_{v\in V}f(u,v)=0$ for every $u\not\in \{s,t\}$ where $s,t$ are the source and sink respectively. I think I get the intuitive idea expressed here, that there should be no accumulation or net loss... |
Is there any algorithm which takes regular expression as input and finds if the regular language which expression describes is infinite?Does it have to do with pumping lemma?
Additionally,is there an algorithm which finds if a regular language of a regular expression is the empty set?
Thank you
|
I have graph creation problem.
Given a set of nodes of graph, and node constraints such as given every node's number of neighbors and number of neighbors of neighbors and so on. I want to create a graph that can satisfy all these constraints (# of constraints is polynomial in n).
I have formulated the problem as an i... |
What do people mean when they refer to the "big O complexity" of a function? What is the big O complexity of $9n^2 + 10n$, for example?
|
I am trying to remove duplicates from an array using the following two algorithms
void PrintDuplicates(int[] arr)
{
if (arr == null)
throw new ArgumentException("arr can't be null.");
Hashtable table = new Hashtable();
for (int i = 0; i < arr.Length; i++)
{
if (... |
Suppose you have even number of vertices, they form as a complete graph denote the graph by $G$. Now, suppose we compute the minimum weight perfect matching denoted by $P$ (so $P$ has alternating edges, i.e. one is a perfect matching and one is not along all the path $P$ through all vertices of $G$). Now, suppose $T^*$... |
Defining
$$
o_r(n) = \min \left\{ \hspace{1mm} k \in \mathbb{N} \hspace{2mm} | \hspace{2mm} n^k \equiv 1 \hspace{3mm} (\text{mod } r) \hspace{1mm} \right\}
$$
How can we show that finding the smallest $r$ such that $o_r(n) > \log^2(n)$ can be done in polynomial time?
|
I have to decide if the following language is regular or not.
I suspect it is not regular, so I try using pumping lemma to prove it, but something goes wrong. Any help on how to use pumping lemma on this language would be appreciated:
$$\{{a^{n^2+2n}|n\ge 0}\}$$
I assume the language is regular.
I assume p is the pump... |
This question is based on Problem 2 from the 'Bioinformatics contest' of 2018.
Given a phylogenetic tree $T=(V,E)$ of $n$ vertices, in which some leaves are assigned an integer color $c$ from $[1,n]$, the task is to find a coloring of the vertices $C:V\rightarrow [1,n]$ such that the subtree induced by each color is co... |
I am trying to learn the Big O notation through the example below, can you help?
Let S be a set of n vertexes of a graph G and R be a set that the set of edges of G. Specify an upper bound of the size m of R with the big O notation. The bound shall be as tight as possible.
Are upper bound of the size m and runtime two ... |
I have spent a few hours now trying to understand how the Y Combinator is working and how it allows us to construct recursive functions with higher order functions.
I have been going through this derivation http://mvanier.livejournal.com/2897.html which is using the factorial function for explanation which I find quite... |
I have a directed graph with the following properties:
Except for a few special progenitor nodes, every node has two parent nodes
Any node can have any whole number of child nodes
The graph is generated such that no node is a descendant of itself in the following way: I starting with a few progenitor nodes (which have... |
I learned the proof for the theorem:
If A $\leq_m$ B and B is recognizable, then A is recognizable
and was provided with the theorem:
If A $\leq_m$ B and A is unrecognizable, then B is unrecognizable
So does this work both ways? i.e. does this also hold?
If A $\leq_m$ B and A is recognizable, then B is recognizable
I... |
I have the following proof that the Empty String problem:
ES = {M | M accepts $\epsilon$}
is undecidable:
$f<M,w>$ = Construct a new machine $M_2$ such that:
$M_2$ = given input x erase x from the tape and run M on w:
if M accepts w $\longrightarrow$ accept
if M rejects w $\longrightarrow$ accept
if M loops on w $\... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.