instruction
stringlengths
35
29.1k
I have a Rails application using Postgresql. Texts get added to the application (ranging in size -- as short as a few words, to as long as, say, 5,000 words?). The text gets parsed, both automatically and by hand, to associate each word/position in the text with specific information (part of speech, grammar tags, lemma...
Given this sorting algorithm: Sort(A, n): if (n == 1) return isSorted = true for i=1 to n-1 do: if (A[i] > A[i+1]): isSorted = false temp = A[i] A[i] = A[i+1] A[i+1] = temp end for if (isSorted) return else Sort(A, n-...
i am reviewing older exams from my computational theories lesson in university and i am struggling to figure this one out: Construct a regular expression for the following language: Strings of even length in alphabet {a,b,c} that contain exactly one a. Roughly translated from greek, hope it makes sense. Thanks
According to this post it is saying Two's complement is only for integers, but in Wolframalpha is is saying the Two's complement of 16.5 is 0010000.1, how?
I am asking this question here, because I am not allowed to comment on the thread that I am actually interested in, but maybe someone can still help me? I alredy found an anwser to the Problem above (in the post linked to this question), but I still don't understand, why I can't just use that one case $s = \alpha \beta...
what steps should I take to find out what is the context free grammar of $L(w) = \{a^i b^j c^k \mid k = |i-j| \}$
Working through some material on CPU architecture and am unsure on the following question: Suppose that an instruction encoding format has 4 bits for argument registers. How many registers is the architecture most likely to have? Why? What is the general principle is here - how the size of argument registers correspon...
I am looking for an algorithm to uniformly generate a descending array of N random numbers, such that the sum of the N numbers is 1, and all numbers lie within 0 and 1. For example, N=3, the random point (x, y, z) should satisfy: x + y + z = 1 0 <= x <= 1 0 <= y <= 1 0 <= z <= 1 x >= y >= z My guess is all i have to d...
I start off by apologizing for the fact that I don't really know how to use latex/markdown. My question, however, is directly from the Introduction To Algorithms book by Cormen et al. The topic discusses about the time analysis for disjoint set operations using forests with union-by-rank and path-compression heuristics...
We are given 2 algorithms A and B such that for each input size, algorithm A performs half the number of steps algorithm B performs on the same input size. We denote the worst time complexity of each one by $g_A(n),g_B(n)$ Also, we know there's a positive function $f(n)$ such that $g_A(n)\in\Omega(f(n))$ Is it possible...
Which of the following are proper network (not host) addresses? 192.168.23.0/24 193.205.16.132/26 172.16.4.0/20 10.57.13.64/28 How can I tell? What is a proper network address? Is a proper network address when the IP address is the same as the network address? For example in the first one that is the case.
I try to find a context free grammar for the language $L = \{u\#v \mid u,v \in \{a,b\}^* , \vert u \vert_a \neq \vert v \vert_a \text{ or } \vert u \vert_b \neq \vert v \vert_b\}$. There is a hint in the task that one should first construct the context free grammar for cases such as $L_1 = \{u\#v \mid u,v \in \{a,b\...
I want to implement my version of the Codeshare service. Now I'm thinking of an implementation where all users have access to one string that can change (if you already have a better option here - please write about it). What algorithms and data models are suitable to find the difference between two strings and to comp...
Is it possible to design a Turing Machine for the language defined as L = {0n1n | n >= 0} with only the symbols in the set of {blank, 0, 1}?
I've recently been made aware that there exist Monte-Carlo algorithm(s?) for determining whether a Hamiltonian path exists in a graph. I am struggling to figure out how it would work. What is the random element?
The problem of minimizing weighted flow-time (min-WPFT) is defined as follows: We are given a set $J$ of $n$ jobs, each job $j$ having a release time $r_j$, a processing time $p_j$, and a weight $w_j$. We want to find a preemptive scheduling of the jobs on a single machine. (Preemptive meaning we are allowed to halt a...
I have an array of $N$ weights $w_i$, say $w_i=\{4, 5, 12, 16, 3, 10, 1\}$, and I need to divide this array into $P$ partitions such that partitions are optimally balanced, i.e. that maximum sum of weights of any partition is as small as possible. Luckily the problem is constrained by the fact that the weights can't be...
Given a fair coin and a number $p\in(0,1)$. How do you design a game that finishes in a finite number of tosses with probability $1$, and further, with probability $p$ you win the game? I thought about random walks where head, you add 1, tail you subtract 1. And you want to get to $n$. But that gives an approximation t...
I'm trying to change below context free grammar such that it becomes unambiguous, but I don't know what steps I should take. Is there any specific way of doing that? Here is my CFG: \begin{align} &S \to SS \mid T \\ &T \to aTb \mid ab \end{align}
If A and B are regular language, what is a context free grammar of the following language? $$ A \circ B = \{ xy \mid x \in A \text{ and } y \in B \text{ and } |x|=|y| \} $$
I need to find an algorithm to find a sub-graph $G'=(V, E')$ of a directed unweighted graph $G = (V, E)$ where for all $(u, v)\in E$ there exists a path in $G'$ from $u$ to $v$ and the size of $E'$ is minimal. As an example, $(1, 2) (2, 3) (1, 3)$ reduces to $(1, 2) (2, 3)$. Additionally, $(1, 2) (2, 3) (1, 3) (3, 1)$ ...
I have an undirected graph where each vertex is given some items from a set of items. My goal is to find the lowest cost path from my source vertex to destination vertex while collecting all such items. The added constraint is that I may split my path once at a node once to collect items from some other path and reach...
I'm reading about CPU caches and I read that typically, cache line sizes start from 32 bytes. Since memory is slower than CPU caches therefore data is frequently loaded from the RAM into the cache and the size of the data loaded depends on the cache line size. Now I wanted to know what are the typical sizes of the dat...
I just got started with Python PCEP course material on netacad.com. I've come across the following exercises: 2 % -4 = -2 2 % 4 = 2 As I understand it, the modulo operator returns the remainder of a division. So 2 divided by (-4) gives (-0.5). How does Python3 calculate the remainder of that as 2? I know it's s...
I wonder how can I find out what is context-free grammar of the following language? $$ L_4 = \{w_1\#w_2 \mid w_1,w_2 \in \Sigma^*, w_1 \neq w_2^R \} $$
In his book "Theoretical Computer Science", Juraj Hromkovic informally defines the Kolmogorov complexity $K(x)$ of a word $x$ consisting of zeros and ones as the binary length of the shortest Pascal program that generates $x$. The Kolmogorov complexity $K(n)$ of a natural number $n$ is then defined as the Kolmogorov c...
I can't find out how to find a context free grammar for bellow language, is there any specific way to solve that? $L = \{w: n_c(w) \ne n_a(w) + n_b(w)\}$
I'm trying to familiarize myself with correctness proofs and need some help. In the proof for SimpleSelect (P.25), why do we assume both $A'[i] < A'[k]$ and $1 \leq i \leq k$? I'm not quite sure why we do this, as the text states that because "of what it means for an algorithm to meet its specification, any proof of co...
I'm a CS student and I'm trying to understand the searching algorithms used in AI. My problem is that I don't really understand how to treat a problem like a search problem. I don't know which would be the first steps for solving it and how shall I choose the right algorithm for that. For example, I have a problem like...
To be clear, I didn't hear of this in any particular venue, and so can't point you to one. Two variants that I can bring you: String spitting Given a string (sequence of elements), and a function that takes a substring and returns a score/penalty. Overall score is the product of scores of chosen split. Find the optim...
The recurrence form of bubble sort is $T(n)=T(n-1)+ n- 1$ How can I prove by induction that this is $\Omega(n^2)$? I'm stuck with $T(n+1) \geq cn^2 + n = n(cn+1)$
Here is the problem: We have an ordered To-Do list with n tasks. The duration of every task is given and tasks need to be completed in order. We need to distribute the tasks to m days. Individual tasks cannot be split between days. How can we minimize the variance of the total task duration of days?
I've given a task and wonder if there are any better solutions. Inputs of task are: Distance of district pairs Population of pairs Goal is: Find n districts at which its population and districts x miles range districts' population is max. Extra information: Unique district size is tens of hundreds. As an example...
im trying to check if this grammar is LL(1). S -> L = R L -> * L | id R -> L | R + R | num As you can see there is a Left recursion on R production. So i remove that and what i get is: S -> L = R L -> * L | id R -> L R' | num R' R' -> + R R' | ε Now the problem that i have is that First and Follow set of R' rule ...
Goldbach's Conjecture says every even integer $>$ $2$ can be expressed as the sum of two primes. Let's say $N$ is our input and its $10$. Which is an integer > 2 and is not odd. Algorithm 1.Create list of numbers from $1,to~N$ 2.Use prime-testing algorithm for creating a second list of prime numbers 3.Use my 2_sum solv...
In Weihrauch's Type-2 computability theory, a string function $f\colon\subseteq \Sigma^{\omega}\rightarrow \Sigma^{\omega}$ (the $\colon\subseteq$ indicates that $f$ may be a partial function) is computable iff there exists a Type-2 Turing machine that exactly realizes $f$, which implies that the Turing machine must fa...
Suppose there exists some NP-complete problem such that the number of inputs that gives 1 as an output is bounded by a polynomial; that is, if the problem is $f \colon \{0, 1 \}^* \to \{0, 1\}$, then, for every $n$, $|\{ x \in \{0, 1 \}^n : f(x) = 1\}| \leq p(n)$ for some polynomial $p$. Then, I want to show that the e...
Let's have expressions that are composed of elements of $\mathbb N$ and a limited set of binary operations {$+,\times,-,/$} and functions {$\exp, \ln$}. The expressions are always well-formed and form finite trees, with numbers as leaf nodes and operators as internal nodes, binary operations having two child sub-expres...
You are given two algorithms $A$ and $B$, with worst-case time complexity $f_A(n)$ and $f_B(n)$, respectively. Assume: (i) For each $n$ there exists an input $x$ of size $n$ such that the number of steps of algorithm $A$ on $x$ is half the number of steps of $B$ on $x$. (ii) $f_A(n) = \Omega(h(n))$ for some positive fu...
If sequence X has m symbols, then X has 2m possible subsequences. Where does the base (2) come from? The origin of this question is the following paragraph: We are given two ordered sequences of symbols, and we wish to find a longest common subsequence of $X$ and $Y$. A subsequence of $X$ is just $X$ with some (or pos...
I am trying to show that the best case time complexity of Quicksort is $\Omega(n \log n)$. The following recurrence describes the best-case time complexity of Quicksort: $$T(n) = \min_{0 \le q \le n-1} \left(T(q) + T(n-q-1) \right) + \Theta(n).$$ But I have difficulty in proving that $T(n) = \Omega(n \log n)$ using the...
Assume $n=2^k$, write an algorithm that can find $k$. **log function is not allowed. Is there an efficient way to find the power instead of multiplying by 2 until it equals $n$? What is the optimal efficiency?
I am supposed to minimize the following DFA automa, which contains dead state: But after the minimization of the automata, it stayed the same. Is it correct?
When one "downloads" a language (say, downloading the python file, or doing apt-get ruby or something), is it always the compiler/interpreter you are downloading? In other words, does a "language" ever exist outside of its syntax and behavioral descriptions? Perhaps standard libraries can be written in the language it...
In Types as Abstract Interpretation, Patrick Cousot sketched how different type systems could be constructed from the collecting semantics of a language. However, the notation of the paper is very old and I'm not able to reconstruct it. Does anybody see what would be an abstract interpretation corresponding to the sim...
I have a function $f(m, n)$ with time complexity $T(m, n)$ characterized by the recurrence relation $$\begin{align} T(m,\ n) &= 2T\bigl(\frac{m}{2}, \frac{n}{2}\bigr) + c_0 \log n + c_1.\\ T(m,\ 1) &= T\bigl(\frac{m}{2}, 1 \bigr) + c_1 \\ T(0,\ n) &= 1 \\ T(m,\ 0) &= 1 \end{align}$$ I can see that for fixed $m$, this i...
i'm studying for an exam i'll have soon and i don't understand how to draw a DFA for a regular expression, i asked my professor by mail but he doesn't asnwer... In the courses available on my college's website there is no step by step exemple Here is the expression i'm trying to convert b(a∗dc)∗ Thank you for the help ...
$L_1 = \{ \langle M, w\rangle : M \text{ is a TM that never moves its head past the input string } w \}$ $L_2 = \{ \langle M\rangle : M\text{ is a TM that never moves its head past any input string} \}$ Consider the two languages above. I want to know which ones are decidable. I know that $L_1$ is decidable, because...
I have a list of unordered line segments, some of whose endpoints lie on the same point. How do I connect these segments efficiently to form a minimal amount of paths? For example, if I have the following lines $(x_1, y_1, x_2, y_2)$: [[0, 0, 2, 2], [4, 0, 2, 1], [2, 2, 4, 0]] the algorithm should be able to join these...
Given a finite, partially ordered set with the following two properties: Every element in the set has one of two types: "A" or "B". The type does not define the total ordering of the set and is metadata. Every element in the set is a natural number and the poset can be ranked by the numbers themselves. This means that...
Good programming relies heavily on choosing an efficient algorithm for the task at hand and yet an average programmer hardly uses 50 pages worth of algorithms from the Cormen book in his/her career. Recently I started reading some CS books, long after completing my bachelors degree. One of the books is the Theory of Co...
Function Problem that finds the solution Given integer for $N$. Find $2$ integers distinct from $N$. (But, less than $N$) That have a product equal to $N$. This means we must exclude integers $1$ and $N$. An algorithm that is pseudo-polynomial N = 10 numbers = [] for a in range(2, N): numbers.append(a) for j...
So, this is kind of a long shot, but does anybody here familiar with cellular automata know what type this is? In the game, it starts as a flat pink/red and then becomes this over the course of a few seconds, and when like this it kinda just vibrates. I'm not sure what type or style of cellular automata this is though,...
I'm learning about NP Completeness, and I have come across the following problem The decision-version of the high-degree independent set (henceforth "HDIS") problem is stated as follows: Given a graph $G = (V, E)$ with $n$ vertices, does $G$ have an independent set of size $k$, consisting of vertices with degree at lea...
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...