instruction
stringlengths
35
29.1k
The top rated answer to Why, really, is the Halting Problem so important? lists a few examples for a noncomputable problem. However, these mostly involve an infinite search space. Are there noncomputable problems with a finite search space? If not, why not?
I am attempting to compute a known sum or closest value to that sum using the multiples of a subset of numbers. In this approach I want to minimize the multiples or coefficient. For instance if I have the number 120 and I have a set of 50s and 20s, I would get 120 = 2*50 + 1*20. The set of numbers can be limited how...
I'm trying to understand the algorithm for implementing semaphores on SMP system using test and set instruction described here: https://people.mpi-sws.org/~druschel/courses/os/lectures/proc4.pdf (and a bunch of similar implementations on the web). Locking semaphore looks like this: void P(Semaphore s) { Disable inter...
You have to arrays of single digit numbers. (0 - 9). A = [....1 billion elements....]; B = [3,5,8,1,2,5,8,3,4,9,1,0,2]; I want to find combo of as few as possible subsets that of array B in A. So whole Array B could be in Array A by coincidence since it's very large and that would be the largest match as whole sequen...
This question was made during a class of Computer Theory in Rome, Italy. Let $G$ be a regular grammar, $\Sigma$ its alphabet and $L(G)$ the language generated by $G$ Given a regular grammar $G$, is $L(G) = \Sigma^*$ a decidable property? My approach I can design a Finite State Automaton that recognize the strings in...
Let combinator $X = \lambda x . x KSK$ as described by Hankin (1994). Then $K = (X X) X$ and $S = X(X X)$. Identity combinator however seems to have much more verbose form. If $I = SKK$ then also $$I = (X(XX))((XX)X)((XX)X)$$ I could possibly make this a bit shorter: $$I = (X (X X)) ((X X) X) X$$ but is this as far as ...
$L \subseteq \Sigma^*$ is a regular language. Show that the following language $L/2 = \{x \in \Sigma^* \mid \exists y \in \Sigma^* : xy \in L, |x| = |y| \}$ is a regular language as well by describing how you change an arbitrary given DFA for $L$ to another DFA or NFA which accepts $L/2$. About $L/2$, it only acce...
Given a stack, what is the minimum amount of swaps needed to sort it? Since the bottom of it stays intact and we slowly move to the upper part of it, if the stack contains n elements, the amount of swaps f(n) would be f(n) < n for n = 1, 2, 3, 4, is that correct? I cannot find a more accurate way to express it. Also...
This question wask asked in a homework of Computer Theory in Rome, Italy. How to simplify the DPLL algorithm in order to solve HORNSAT? My Approach: I know that an Horn clause is an OR of literals where it contains at most one pure literal and any number of negative literals. I would start with the following algorit...
I was reading about $\pi$-calculus, and some authors include in the basic operations a Choice operator $P \oplus Q$ which means that either $P$ or $Q$ will be executed, but not both. On page 8 of "Applied $\pi$ - an introduction" (available on http://www.cl.cam.ac.uk/~pes20/apppi.ps ), the author says that the coice op...
. Matches any single character, * Matches any sequence of characters (including the empty sequence). dict = ["cat", "cats", "and", "sand", "dog"]. pattern = "* t", -> true (can match cat) pattern = ".a *" -> true (can match cat, cats, can also match sand, because * can also express empty sequence) Is below recurrence r...
I have this grammar: $S\rightarrow SS |S \rightarrow(S)|S\rightarrow\epsilon $ Now this grammar generates the set of balanced parentheses. But this grammar is ambiguous. I am trying to find an unambiguous grammar for this language but all in vain. This has led me to believe that the language is inherently ambiguous. A...
I was trying to solve the King of the North problem in Kattis. Basically, the problem is, the king has a castle to protect. To do this, he wants to place bannermen across the open areas surrounding the castle (some parts are closed thanks to natural barriers). A more detailed description of the problem: Given a grid ...
What is the algorithm with the best complexity that finds solutions in a given range to the equation $x^2+y^2=z^2$ ? The best i could do is to iterate through all $x$ and all $y$ and store $x^2+y^2$ in a hash and then iterate through all possible $z$ and check if $z^2$ is in the hash.
There are n girls and n boys. Each girl i has an objective attractiveness constant Pi (a natural number). The bigger the number, the more attractive. Each boy has a range in which he is comfortable asking the girl out [Ai, Bi] (inclusive). A boy will not ask someone out who is below Ai or above Bi. I need to pair as ma...
I've come across this situation numerous times in the past few years where I have some classes like (pseudo-Java): interface Node<T> { ... } final class BranchNode<T> implements Node<T> { List<Node<T>> children; } final class LeafNode<T> implements Node<T> { List<T> elements; } If you know the height of a ba...
Given a planner graph which it's vertexes have weights and an integer, W, this graph should be partitioned into two subgraphs which sum of weights for each subgraph becomes at least W. I wanted to show this is np hard by reduction and I have used Max cut to show that (in max cut we have a graph with weights for edges a...
I couldn't wrap my head around for finding an example for the following recurrence. $T(n) = a T(n/b) + f(n)$ where $a \neq b$ and $b > 1$ If we divide n elements with b, it should give us a sublists each with size n/b Could somebody please give me a practical example of this?
I faced with the following issue: if the value of a floating point format number is in the range of underflow, it must be 0 or a denormal number.If the value is not 0 than what is the exact value of it?Is it conventional constant value or depend on different architectures? I am sorry but could not understand through wi...
Let $G=(V,A)$ represent a directed acyclic graph, where a value $v_i \ge 0$ is assigned to every vertex $u_i$. Let $T$ represent a threshold and $N = |V|$. Problem statement: maximize: $\sum_{i=1}^{N}v_i x_i$ subject to: $\sum_{i=1}^{N} x_i \leq T$ and $x_i \in \lbrace 0,1 \rbrace$ and $x_i(x_j-1) = 0 \quad \forall a\i...
How to describe a $\operatorname{LL(1)}$ parsing algorithm for strings generated by a given grammar? I have to design a parser for a specific grammar. Let $G$ be the grammar described as: $$S \rightarrow aBC $$ $$B \rightarrow bB \mid cC $$ $$C \rightarrow c \mid S $$ My approach 1. Test if the grammar is $\operatorn...
I need an algorithm that can compute all the different partitions of a set of n elements into subsets of size m. For example for $n=4$ for the set $\{a,b,c,d\}$ and $m=2$ the output should be $\{\{\{a,b\},\{c,d\}\},\{\{a,c\},\{b,d\}\},\{\{b,c\},\{a,d\}\}\}$
I came across the paper: "Efficient Self-Interpretation in Lambda Calculus" by Torben Mogensen, 1994: http://repository.readscheme.org/ftp/papers/topps/D-128.pdf It talks about the intepreter $E$ and the reducer Lambda Calculus forms, but after a brief reading I cannot see, what is the real usage for them. Could someon...
When we talk about the enumeration of TM's, do we mean the "regular" deterministic ones? So if we want to enumerate nondeterministic or probabilistic TM's, do we need a separate enumeration? I can see how we could describe probabilistic TM's as strings, just as we describe the deterministic TM's only now we have two tr...
The exercise I'm trying to solve is You are implementing a binary search tree class from scratch, which, in addition, to insert, find and delete, has a method getRandomNode() which returns a random node from the tree. All nodes should be equally likely to be chosen. Design and implement an algorithm for getRandomNode(...
need some help with the following question: I've watched a few youtube tutorials but I'm struggling to convert this specific CFG
I'm trying to understand how to find the asymptotic complexity of a linear recurrence relation. So far, what I understand is that if only one linear recurrence call is made (ex. cn + T(n-4)), substitution or the recurrence tree can be used. However, what should one do if there are 2 or more linear recurrence calls? For...
"Introduction to Algorithms" by Cormen et al., 3rd edition, Lemma 13.1 states that A red-black tree with $n$ internal nodes has height at most $2\log(n+1)$, i.e. $h \le 2\log(n+1)$. Can equality part of the above, $h = 2\log(n+1)$, ever be satisfied? If not, what is the best known upper bound? My attempts to assert t...
If a B+ tree has an occupancy of 67%, does that mean the tree holds all of an index, and has additional empty nodes taking up the remaining 1/3rd?
This question is asked during a class of Computer Science. What is the transitive and reflective closure of the derivation relationship? I know that if $R$ is a relationship on $A^2$, a transitivive and reflective relation on $R$ is the following $R^*$ $$R^* = R^+ \cup \{<x,x> \mid x \in A\}$$ but I don't now how t...
I read that no LL(1) grammar can be ambiguous. Can we just make a LL(1) predictive parser table for a grammar to determine whether it's ambiguous? If the grammar is not LL(1), can we say that grammar is ambiguous?
I wonder to know if given a Machine $M$, a string $x$ and a symbol $\phi$, would $M$ ever write $\phi$ ? My approach Maybe i can show if the problem is undecidable by contradiction using $M$ to prove $\operatorname{HALTING PROBLEM}$, but i'm stuck here. Any hints ?
Say we want to find a shortest possible sequence of x86 instructions to move the $9^{th} - 16^{th}$ bit of the $eax$ register to the $24^{th} - 31^{th}$ bit of the $ebx$ register without changing the other bits of the $ebx$ register, where the least significant bit is defined to be the $0^{th}$ bit. An obvious solution...
I am given the following invariant: Invariant The greatest $i$ keys of an Array are always in sorted order on the last $i$ indices of the Array. I am supposed to create a sorting Algortihm using this invariant. But I seem to have understood the concept of an Invariant differently, because with the information I find on...
I'm keen to learn more about machine learning, as I feel it could be something that might have its uses in my place of work. I write PC software that controls scientific instruments, and one of its functions involves measuring a voltage every 100ms for (say) 10 seconds, then plotting this on a chart in my software. The...
Since most examples of complexity analysis I've seen involve functions that return either nothing (e.g. in-place sort) or a single value (e.g. computation, lookup), I haven't been able to figure this out just by reading examples. If a function returns a new list, should the space complexity analysis of the function inc...
https://people.eecs.berkeley.edu/~luca/cs172-07/solutions/sol8.pdf I'm checking those solution and i'm having trouble understanding the proof that shortest path belong to NL (2.a). So being Shortest path = {(G=(V,E), k, s, t) | shortest path from s to t in G has length k} and rk-1 being the number of vertices reachabl...
I am trying to understand Floyd's cycle detection algorithm. I can see why the algorithm works. When the Hare moves twice as fast as Tortoise, if there is cycle, they will meet definitely at some point in the cycle. Is there any proof that proves the above point? I mean, without assuming that Hare and Tortoise meet a...
During a class, we was asked how to prove that a language L is strictly context-sensitive. In particular, we have to prove that $L = \{a^nb^nc^n \mid n > 0\}$ Could you help me to find the answer providing a detailed solution? My approach: I know that a language is strictly of type $n$ if there isn't a type-$j$-gramm...
During a lesson, our TA asked: What kind of languages can be recognized by a deterministic Turing Machine such that we can use only a tape portion that contains the input? My thoughts: my Theory of Computation book says that there is a special TM called linear bounded automaton (LBA) that corresponds to a non-dete...
Input : An matrix $A$, whose entries are from $\mathbb{Z}$ (set of integers) Output: det A (determinant of matrix A) Question : Suppose we are solving this problem over $\mathbb{Q}$ using gaussian elimination, what could be the size of numerators and denominators of the intermediate results? Gaussian elimination: By do...
I have recently been interested in low level computer science (as a hobby), and I have just learned about the way a computer organizes and stores information on a hard drive. I have learned the basics of how a filesystem works. I understand that in the case of Unix, an inode entry is created for each file in the inode ...
for example the runtime of this program: Thanks!
Be $L$ a formal language over the alphabet $\Sigma$. $L$ can be defined by induction: $L^0 = \{\epsilon\}$ and for $i>0: L^i = \Sigma*L^{i-1}$. Means that $|L^n|$ is the number of words in $L$ of length $n \in \mathbb{N}$ letters from $\Sigma$. Find $|L^n|$. For $\Sigma = \{a,b\}$, $|L^n| = 2^n$ scince $|\Sigma| = 2$ a...
Suppose we take all MSTs of a graph and build a new graph where each vertex corresponds to a MST of the first graph and two vertices are connected if their corresponding spannings trees differ by only one edge. Is this second graph make of a single component? I am guessing it is, but guessing is not prooving... Becaus...
What is the relationship between the number of clauses and the difficulty of a 3-SAT problem?
If the lower level cache contains blocks that are not present in the higher level cache or other caches then it is said to be exclusive. It is exclusive because it is only there. How can there be cache miss when CPU is looking for it? See img:
When analyzing the asymptotic running time of an algorithm where the tightest lower bound and upper bound are not the same, is it bad to denote the running time in theta notation? If an algorithm has a running time of $\Theta(n)$, is it safe to assume that the upper and lower bound are the same?
L ⊆ ∑* is a regular language. Show that L^+ (aka kleene plus) is a regular language by describing how you can build a DFA or NFA for the language. I would build a NFA. That NFA must have exactly one starting state and one end state, where the starting state is never the end state. The amount of characters of the ...
Is the longest path in a (weighted) DAG always from a source to a sink? This seems correct to me by intuition, but I'm not 100% confident. Like, for example, if I had an array in which each index represented a node in topological order, and stored the length of the longest path with that node as its endpoint in the gra...
I'm trying to prove $U = \{ \langle M, x, \#^{t} \rangle \vert M $ is a NTM that accepts $x$ within $t$ steps on some branch$\}$ is NP-complete. Showing it is NP is trivial. NP-hardness is the hard part. One way to do it would be to reduce a known NP-complete problem to $U$. Another way would be to find a general way t...
I'm trying to understand the modification to the MCTS algorithm called Partial Expansion. From what I've been reading it enables one to not require all child nodes to have been expanded before expanding grandchild nodes. However, I'm having a hard time conceptually understanding this process and its potential benefits....
For two problems $A$ and $B$ and a Karp Reduction $R$ from $A$ to $B$, we call the reduction $R$ natural if, for any instance $I$ of problem $A$, the size of $R(I)$ (as well as the possible numerical parameters of $R(I)$ depends only on the size of $I$ and the sizes of $I$ and $R(I)$ are polynomially related. We know t...
The Voronoi diagram is a well-known data structure that helps solve various proximity problems. We have several nice algorithms that build this diagram for $n$ point in optimal time $O(n\log n)$. I am interested to solve this problem for a set of simple, disjoint polygons and I am collecting information about known sol...
As far as I know, a minheap is data structure whose parent node's value is less than child node and maxheap is when parent node is greater than child node. Here they have used minheap. But as the node closer to root have less length code than nodes below that level i.e., level 1 codes will have shorter codes than level...
I'm trying to build a maze solver using A* algorithm. The maze is a grid with movement allowed in 4 directions (up, down, left, right). If there's a starting cell (x1, y1) and a destination (x2, y2), which of these should I make my heuristic? Euclidean Distance abs(x2-x1) (x2-x1)^2 + (y2-y1)^2 abs(x2-x1) + abs(y2-y1) ...
I am currently trying to prove whether the above language is decidable, partially decidable or fully undecidable. I am certain that this language is partially decidable and reducible to the halting problem. However, I am having trouble actually proving it. Can anyone assist me with constructing the TM that decides this...
I've been learning various disk scheduling algorithms in Operating systems. I wanted to know if there was any default scan order in SCAN, C-SCAN, LOOK and C-LOOK algorithms, like towards higher cylinders or lower cylinders ? Or are they OS-specific ?
Suppose that we have an alphabet Σ = {a}. My question is, is it possible to create a language with this alphabet, which is recursively enumerable, but not recursive? My assumption is a no, i think we can construct a deterministic finite machine, which accepts every language, constructed with a single element in its alp...
I imagine finding the closed form of an algorithm should yield fewer steps than the original. But in the case of a summation from 1 to n, I'm not sure if it actually does. Here's the original sum Sum(N) total = 0 for x = 1 to N total = total + x ret total Here's the closed form Sum(N) ret N*(N-1)/2...
I've been reading Herlihy and Wing's paper Linearizability: A Correctness Condition for Concurrent Objects (ACM Transactions on Programming Languages and Systems, 12(3):463–492, 1990; PDF) and there's one piece of the paper that is a fairly small detail, but on which I'm stuck anyway. They define a sequential history a...
How you define a search of text to find a string A, but exclude results that contains B only (which contains A), but not the both string A and string B? For example: String A : "Great Wall" String B : "Great Wall of China" Text 1: "The Great Wall" Text 2: "The Great Wall of China" Text 3: "The Great Wall of China is a...
There are $n$ vectors, represented as $(d_x, d_y)$ pairs. Someone stands at point $(0, 0)$ of infinite euclidean grid. For every vector he can either move by $d_x$ in $x$ axis and $d_y$ in $y$ axis or ignore the vector and don't move at all. Each vector can be used at most once. He wants to get as far away from $(0, 0...
TL;DR What revolutions have there been in computer science, which entirely changed our view about the subject, due to 'one way of thinking' being replaced by 'a new (incompatible) way of thinking' (such as Einsteinian physics replacing Newtonian physics). To explain a bit further: I was trying to think about revolutio...
The language that determines if two Turing machines are equivalent is not recursively enumerable because you can reduce it to the emptiness problem (does a Turing machine take no input). Then for the complement of this language (ie. if two Turing machines are not equivalent) would you be able to reduce that to the non...
A quick search on the role of compiler brings up the following: A compiler is a special program that processes statements written in a particular programming language and turns them into machine language or "code" that a computer's processor uses. However, I also read that every language needs to have a target ru...
I have a graph like this one: Each step from one node to another is a multiplication. So for instance given the entry node TE and an entry value of 1. TE = 1 TB = 1/10010 GB = 999/(10010*1000) GE = (19990*999)/(10010*1000) and so on. I want to find the best path from TE to TE to return the highest value. In this case i...
Sorry for the long post. I tried to make it small but couldn't make it any smaller. Any help would be really appreciated. It would be great if you can explain from the basics. In the book "Computer Networking A Top-Down Approach" the following is written:  One important characteristic of cable Internet access is that ...
Are there any techniques for solving functional equations for unknown functions in lambda calculus? Suppose I have the identity function defined extensionally as such: $I x = x$ (that is, by writing down an equation for the expected behaviour of that function) and now I want to solve it for $I$ by doing some algebraica...
Define a hypergraph as a set $V$ of vertices and a set $E$ of hyperedges, where a hyperedge is a non-empty subset of $V$. (This is a generalisation of an undirected graph, in which edges are allowed to connect any number of nodes, rather than just two.) Define a cycle in a hypergraph as a cyclic sequence $C$ of vertice...
In state diagram of DFA is it mandatory to keep a final state. I mean whether DFA is possible without final state or not?!
What are the largest classes which are low for EXP and NEXP? For example: I am aware the class P, QP are low for EXP as well as NEXP. We also know that NP is not low for either of them. Is class BPP low for EXP or NEXP? What is the largest oracle class we can provide to EXP (or NEXP) which doesn't increase its power? ...
Is it hard wired CU or microprogramed?
Is there a variation of trilinear interpolation that works on a "cube" that has been distorted (by moving one or more of its corners by an arbitrary amount into an arbitrary direction)? I know that I could use the inverse of the distance to each of the 8 corners as weights to get an interpolated point within the distor...
As per the example given in this MIT OCW link URL https://ocw.mit.edu/courses/civil-and-environmental-engineering/1-124j-foundations-of-software-engineering-fall-2000/lecture-notes/sorting/ Why selection sort requires $O(N)$ time since the number of exchanges is at most N. Pls give example algorithm that prove this fa...
What's the most effective algorithm to calculate LCM for 2 numbers where each of them has their own "shift"? Example: We want to find LCM for 25 + 5 as c and 30 + 10 as c Then for the first case, the sequence will look like this: 25*1+5, 25*2+5, 25*3+5, 25*4+5... And the second one: 30*1+10, 30*2+10, 30*3+10, 30*4+10.....
A widely used example of reductions, is a reduction of $A_{TM}$ to $HALT_{TM}$. How to show the opposite reduction, meaning of $HALT_{TM}$ to $A_{TM}$, if possible.
I have seen a proof that $E_{LBA}$ is not decidable. But is it at least turing recognizable? How to prove it? NOTE: $E_{LBA}$ is defined as the emptiness problem for Linear bounded automaton
Given a graph $G(V,E)$ with $n$ vertices labeled $1,2,...n$ and $m$ positively weighted edges $(u,v,w)$ with the condition that $u<v,$ $\forall u,v \in G$, so the graph we are considering is actually a DAG. We need to find an odd path from $1$ to $n$ that have the smallest weight median. i.e when the weights on the pat...
Can complexity theoretic reductions that lead to proofs of say NP completeness be formalized using an existing theorem prover such as Coq? If so, can you provide an outline of how to formalize a simple reduction argument? I’d also appreciate pointers to the literature.
I have a list of configurations. Each configuration contains a number of parameters. The parameters have the same name but sometimes different values. I now want a neural network, that can detect, which Parameters always have the same value when Parameter 1 has value 'A'. I want to find out which Parameters are "relat...
I'm having trouble understanding how the calculation of the constant $c$ in the Median-of-Medians-algorithm is build up ($cn$). The only calculation I found was on Wikipedia: $$\frac{2g(g-1)}{g-3}$$ My question: Why is it exactly minus 1 or multiplied by 2 etc.? How did this term come together? I do understand the othe...
Recently I have learned about both the Strassen algorithm and the Coppersmith–Winograd algorithm (independently), according to the material I've used the latter is the "asymptotically fastest known matrix multiplication algorithm until 2010". As It can multiply two ( n * n) matrices in 0(n^2.375477) time. As of now (...
I have 2 images, called left and right images. I have some matched points $[c_l,r_l]$ and $[c_r,r_r]$ in both of them (these points are in pixel coordinates). For a 3D point in the real world, they are related by: $\lambda_l*[c_l , r_l,1]^t = W_l*[X,Y,Z]^t$ $\lambda_r*[c_r ,r_r,1]^t = W_r*[R|T]*[X,Y,Z,1]^t$ Here $W_l$...
I want to reduce $L$ (stated above) to the Halting Problem in order to say that L is recursively enumerable but not recursive just like the Halting Problem, but is it enough to say that if I can solve the Halting Problem then I can solve $L$, because then I can feed into the Halting Problem the input $w_i$ twice, as bo...
To prove the blank-halt problem is undecidable (does a given Turing machine halt on the empty input), it's a case of reducing the halting problem to the blank-halt problem and since the halting problem is undecidable, the blank-halt problem is undecidable. However to prove the blank-halt problem is recursively enumerab...
If I have DFA accepting $\{w \in \{a,b\}^*$ s.t. on every odd position in $w$ there is a $b\}$ Would the empty word be accepted? Also, would the word $eb$ be accepted?
In this answer, it is told that the minimal $p$ value is $1$. One of the conditions of the pumping lemma is that $|xy| \leq p$ Now if we try to split a string $01^p$, we might do it like this: $x=\epsilon$, $y=01$, $z=01^{p-1}$ But this decomposition contradicts the above condition. If we arrive at a contradiction, the...
The following theorem (from "The Design of approximation algorithms" by Williamson & Shmoys, pg 43) states: For any $\alpha > 1$, there does not exist an $\alpha$-approximation algorithm for the traveling salesman problem on $n$ cities, provided $P \neq NP$. In fact, the existence of an $O(2^n)$-approximation algor...
I'm trying to find all the neighbors of a given cell in a voronoi diagram. For example, given the following diagram, if I want to find the neighbors of the cell 1, then I should be able to return the points 2, 3 and 4. Any hints on how to do so ? [EDIT] I didn't explained myself very well, I only have the image (pixe...
It is well-known that the Merkle–Hellman knapsack cryptosystem can be solved using the LLL algorithm. In the Merkle-Hellman knapsack cryptosystem, we're trying to find a solution $x_i \in \{0,1\}$ such that \begin{align} \sum w_i x_i &= K, \end{align} where the $w_i$ are integer weights. Is it possible to find an appr...
Ackermann's book "Solvable Cases of the Decision Problem" discusses decidable instances of first order logic, particularly monadic logic, and so called "equality formulas". However, the book is from 1954, the notation is terse, full of German letters, and presented in a very non-algorithmic way (which is unsurprising, ...
Is the following language regular? $$ \{ 0^m0^n : 0\le m\le n \}. $$ According to me, it is not regular. However, some of my friends are arguing that every string in $0^*$ can be divided into $0^m0^n$ satisfying the constrains between $m$ and $n$, hence it is regular. Although I am absolutely sure that their reason...
It is well-known that every non-trivial NFA of $k$ states (an NFA that does not accept all strings) rejects a string of length at most $2^k$. But is this upper bound asymptotically tight ? I found a rough sub-exponential bound in this strategy. Let $p_i$ be an $i$-th prime. On the singleton alphabet, $\Sigma = \{a\}$,...
Interactive Proof System : An interactive proof system for a language $L$ is a two-party game between a verifier and a prover that interact on a common input in a way satisfying the following properties: The verifier strategy is a probabilistic polynomial-time procedure (where time is measured in terms of the length o...
Question no:$1$ "Any problem whose domain is finite is always Decidable" lets take a TM,$M$ and finite domain of problem i.e. finite set of strings for eg. {$a,abaa,bba$}, Now the problem "whether $M$ accepts these set of strings or not is decidable or not?" What I think is, this is Undecidable problem because, ...
What is the minimal number of DFA states required to recognize binary numbers (encoded MSB to LSB) which are divisible by 6 and 8? For divisibility by $6$ we required $6$ states. For divisibility by $8$ we require $4$ states. So in total, we need $6 \times 4$ states = $24$ states. Am I correct? Can we do it with fewer ...
I am trying to analyse a weighted multi-graph which represents a snapshot of a rail network for a particular day. As such, the vertices of the graph can be considered stations and the weighted edges represent the time taken to travel from one station to another. For any particular vertex, there might be multiple edges ...
Given an alphabet $\Sigma = \{0, 1\}$ and a formal language $$L = \{ w \in \Sigma^* |\ |\mathrm{odd}(w)|_1, |\mathrm{even}(w)|_1 \text{are even numbers} \}$$ That means that the number of 1's in the odd and even positions of a given string are always an even number. I've tried using the Pumping-Lemma on a $1^{4n}$...
I am having hard time to proving this problem $C=\{\langle M \rangle \mid M \text{ is a Turing Machine , } L(M) \text { only contains two different strings}\}$ some ideas that i have tried are : i have to prove if $C$ is not recursively enumerable. I know if $A$ is recursively enumerable, and $co\text{-}A$ is recursiv...