instruction stringlengths 35 11.4k |
|---|
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... |
In Naive Bayes we often do additive smoothing as a fail safe. Consider the following expression:
Lets say
$$P(X_i) = \frac{count(X_i) + \alpha}{\sum_i^n count(X_i) + \alpha*total\_size}$$
How to tune the parameter $\alpha$ here. I observed that my classifier accuracy increased for value from $1$ to $N$ (where N is an I... |
The question for my homework is to create a two-tape DFA for accepting two string such that u is 2x the size of v.
I am just confused on where to go with this, i understand this in a base sense but i can't figure out how i would find if it is 2x V after getting beyond V
|
Using randomized approach we can guarantee that the equality problem has O(1) complexity (in communication).
With other definitions of of equality (not strictly equal), is there a general approach to design a randomized algorithm with bounded error? Or how to determine if there is no way such an algorithm can be design... |
I am having troubles trying to create this two-taped Turing Machine, I understand how I would get it to accept 2 strings of equal length. But to move forwards, I dont know how I would check to see if |u| = 2|v|
|
Let's say someone is using Dragon Dictation, Google Speech, or some other free form dictation software (it will recognize anything they say to the best of its ability). I have some reasonably large set of words and I'm certain the speaker is trying to say one of these words. However, the voice recognition system is not... |
I am relatively new to algorithms, I wrote one pattern matching algorithm and its running time is $O(n^2)$, I tried it by step count method, direct method and also the constant method which all yields same results. Anyhow now I am writing the upper and lower bound for that, the equation which I get is
$$20n^2+11n+1$$
I... |
I hardly remember on a lecture, where it was told, that the distance of the practical actual running-speed of a processor to the previous tic is used, to generated a true random entropy for seeding. But I cannot find any source for proving this memory right.
So my question arises: Is this a way to generate a true rand... |
The naive algorithm for generating all unique substrings involves traversing all the string from 1..n, thus takes $\mathcal{O}(n^2)$, but it also involves maintaining a list for all generated substring to check everytime for repetitions.
So the total time can't be $\mathcal{O}(n^2)$, since there is an added checking of... |
Komi is the additional number of points given to the non-starting player in the game of Go.
For 19x19 board, currently it is 6.5 under Japanese rules, 7.5 points under Chinese rules. In the past it was lower, even 2.5 points.
A question arises: what value it should be so that it is a fair game?
Draws allowed.
(This ha... |
Question:
Suppose we have 2 algorithms $Alg1$ and $Alg2$ for the same minimization problem. We know that $Alg1$ is a $2$-approximation algorithm and $Alg2$ a $4$-approximation algorithm.
Is the following statement true?
There must be an input $I$ such that $Alg2(I) \geq 2 \cdot Alg1(I)$.
My answer:
I think the stateme... |
The Longest Common Subsequence (or Substring) problem (LCS) asks, given two strings $s_1$ and $s_2$, to find one string which is substring both of $s_1$ and $s_2$ and it is of maximum length.
Each instance of the problem (i.e. each choice of $s_1$ and $s_2$) can have multiple optimal solutions.
The size input of the p... |
Shellsort is a generalization of insertion sort that allows the
exchange of items that are far apart. The idea is to arrange the list
of elements so that, starting anywhere, considering every hth element
gives a sorted list. Such a list is said to be h-sorted. Equivalently,
it can be thought of as h interleave... |
Let's assume that I have an MDP $M$ which has a number of maximal end components. I also have a random policy (scheduler) $\pi$ that can convert the MDP $M$ into a Markov chain $m$. Can I argue that all recurrent classes of MC $m$ has states that belong to MDP $M$'s maximal end components?
|
By Stirling's Approximation $n! = \sqrt{2*\pi*n} * [n/e]^n * e^\alpha$
Therefore $T(n!) = O(n^n)$
$O(n^n) \neq O(2^{n \lg n})$
Is this correct? Is there another way to get this result if it is correct? Thanks.
|
Are there any type systems similar to rust that don't depend on subtyping ? Can we express that one value must be consumed or dropped before another? For instance if I had an array of huge values on the heap and I would like to operate on a single item using a reference to it, the compiler would need to be sure I had f... |
First let me explain what I mean by algorithmically derivable.
An algorithm must be able to come up with the proof without prior knowledge of the proof, in the same way mathematicians and computer scientists are able to create new proofs without prior knowledge of the proofs.
Our proof deriver enumerates all possible a... |
I got stuck with a question and would like to have a little guidance for the solution.
I need to prove that the next problem is undecidable:
Input - A program
Problem - Does the number of possible inputs for which the program halts is larger than those for which the program won't halt?
I tried to build a reduction th... |
The Terms are much used in actual IT (Information Technology). Is it possible to make a difference or are this terms nearly synonyms for the same fact?
|
I know a lot of computer languages and they all use tokens. E.g. in very early BASIC you could say LET answer = 42, which is composed of seven tokens, LET, answer, =, 42, and three space tokens.
It seems that every character must be part of some token, including comments, which can be considered free-form tokens after ... |
Problem: Suppose we had a directed graph $G(V,E)$ with strictly positive edge weights, a nonempty set $A$ (special vertices) such that $A \subseteq V$, a positive integer $C$, and a starting vertex $S \in V$. Find the shortest path starting at $S$ and containing at least $C$ vertices in $A$ (cycles are OK). If no path ... |
I came across this question. Palindromes are not regular: It is easy to prove it using pumping lemma. The problem is I want an explicit proof without pumping lemma. I came up with a solution. It goes like this.
Let us assume a language L which is palindrome so L can be expressed as x.xR where xR is reverse of x. If x ... |
It is often stated that nondeterministic Turing machines cannot recognize any more languages than ordinary Turing machines. In particular, it is stated that there is no NTM that can take as input a DTM/input string and state whether that DTM will halt.
Is this proven, or is this an assumption under the same banner as t... |
Boolean circuits are non-uniform models of computation in that they require a different circuit for each length of input. The typical way of uniformizing a family of Boolean circuits is to define a Turing machine that can output, for some input length N, the correct Boolean circuit for that N.
However, I wonder if it i... |
Consider the language defined by the following grammar:
$$
\begin{align*}
&S \rightarrow E \\
&S \rightarrow \epsilon \\
&E \rightarrow E+E \\
&E \rightarrow E-E \\
&E \rightarrow \mathsf{STRING} \mid \mathsf{LOCTRAN}(E , \mathsf{DIGITS})
\end{align*}
$$
How can I prove that this language is not regular using the pumpi... |
In the well-known communication task EQUALITY, Alice has a string $x$ of $n$ bits, Bob has a string $y$ of $n$ bits, and their task is to determine whether $x = y$. In the public coin model, there is a probabilistic protocol which uses 2 bits, is always correct when $x = y$, and is correct with constant probability whe... |
I know there's some easy proof for this, but why is $A \leq_T \bar{A}$ ? ... Suppose that $\bar{A}$ is c.e. and could loop, does this mean that the oracle $TM$ $M^{\bar{A}}$ could also loop?
But shouldn't $\leq_T$ mean that $M^{\bar{A}}$ be decidable?
|
I have a balanced binary tree that stores a number in each node, initially zero. I want to build a data structure that will support the following two operations:
Given a vertex $v$ in the tree and a real value $w$, add $w$ to all nodes in the subtree under $v$.
Given a vertex $v$ in the tree, find the smallest absolu... |
Given a sequence of pairs $(a_1, b_1), (a_2, b_2), ..., (a_n, b_n)$ such that $a_1 \le a_2 \le ... \le a_n$ (i.e, sorted in ascending order by $a$'s), we solve the longest increasing subsequence problem for $b$'s. Now suppose the length of the longest increasing subsequence is $X$.
If we now sort the initial sequence b... |
We can make all the gates using nand or nor gates. My teacher told us that nand gates are cheap too, then why do we need other gates at all?
|
Functional programming does not have mutation. Mutation is usually harmful, however mutation is sometimes beneficial. e.g. Creating a [random number] generator.
In the same way that goto is considered harmful, but now we have structured languages that give us access to a safe set of goto patterns. Is there a safe set o... |
$T(n) =
\begin{cases}
2: & n=0\\
5: & n=1 \\
2T(n-2) - T(n-1): &n \geq 2
\end{cases}$
I have found a few examples including https://math.stackexchange.com/questions/1316301/if-tn-tn-1-2tn-2
But I am still lost about how to solve this one.
|
I was trying to come up with a formula for the number of swaps used in selection sort. So we know that selection sort gives the minimum number of swaps to sort an array.
The formula I came up with is given an unsorted array and it's descending or ascending order. We find the number of elements dissimilar to the sorted ... |
Is there a machine or algorithm available to solve the board game "Chinese checkers"? If there is please let me know about relevant material. I have already searched over internet unfortunately i am unable to have relevant details about it.
|
I'm trying to solve a puzzle where I need to calculate the average weight between every node in the graph.
For example, for the following graph:
The results is calculated like this:
1 -> 2 = 3;
1 -> 3 = 7;
1 -> 4 = 5;
2 -> 3 = 4;
2 -> 4 = 2;
3 -> 4 = 7;
Average = 3+7+5+4+2+7 / 6;
NOTE: I'm visualizing the problem as a... |
I am new to complexity theory and want to know what is structural complexity theory? what are problems theorists try to solve in this field and what is its future?
From the wikipedia:
The structural complexity theory or simply structural complexity is the study of complexity classes, rather than computational complexi... |
This question has been handled various ways, but let me show my case.
I want to find out, if the given list is empty with these constraints:
TRUE = (L a b . a)
FALSE = (L a b . b)
NIL = FALSE
ZERO = FALSE
ONE = (L x y . (x y))
TWO = (L x y . (x (x y)))
PAIR = (L a b s . (s a b))
EMPTY = (PAIR NIL NIL)
EMPTY? = (L... |
I'm taking an introductory course in AI and we've been given the assignment to solve a puzzle using different search algorithms on a state space (BFS, DFS etc). I understand the theory and everything, but I'm not sure what information I should store in the nodes of the tree.
Assume that I have a matrix to represent the... |
For the following assume that values A, B, C, D, E, and F reside in memory. Also assume that instruction operation codes are represented in 8 bits, memory addresses are 64 bits, and register addresses are 6 bits, and data values are 32-bit integers (4 bytes each).
Output
Here are some calculation results
I don't unde... |
I'm trying to solve optimization problems of the form: $\min\{cx|Ax\preceq b,\;x\geq 0\}$, where $\preceq$ means lexicographic order; that is, the set of linear inequalities need only to be satisfied lexicographically. I'm guessing these inequalities are treated conditionally by means of binary variables thus transform... |
We're given a big rectangle, and a list of small rectangles contained inside it, with their vertex coordinates.
We want a list of the minimum number of lines defined by a pair of points (x,y) that cut up the big rectangle into the small ones.
For example for this case:
The minimum number of cuts would be 7, and they... |
I'm following an online course which has the following (multiple-choice) quiz question:
Which of the following statements cannot be true, given the current
state of knowledge?
Some NP-complete problems are polynomial-time solvable, and some NP-complete problems are not polynomial-time solvable.
There is an NP-compl... |
I am a novice in complexity calculation. I need to calculate the overall time complexity.
My attempt is given below:
Here, N = number of data points (N>300), C = Number of clusters (2<C<30)
For line 3 to 10, time complexity, TC1 = O(NC)
For line 11 to 12, time complexity, TC2 = O(C)
For line 18 to 22, time complexi... |
I am currently working on a project to build and train a neural network to play DotA 2 (at least be able to play like a really bad human).
The thing is all the neural network I have built before were made to play small games like 2048 or snake so the inputs were pretty straight-forward. (e.g for 2048 each input neuron ... |
Suppose that $L$ is a regular language and $0<\alpha<1$ and $\alpha \in Q$. Define $L_\alpha$ as
$$L_\alpha = \{\omega \in \Sigma^* \mid \exists \omega_1 \in \Sigma^* .\omega\omega_1 \in L,\frac{|\omega|}{|\omega\omega_1|}=\alpha\}$$
How do I prove that $L_\alpha$ is regular?
Here is my attempt. If we assume that $D$ ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.