instruction stringlengths 35 29.1k |
|---|
I've been trying to find an efficient way to solve the problem of finding a minimum (not minimal) set of time points that cover a given family of intervals on the real line, that is, for each interval $I$ there should be some time point $t$ from the chosen set such that $t \in I$. However, I am not sure if it's that st... |
I used a set of natural language statements and their formalization from Gries and Schneider. I attempted to transform the propositions into Haskell equations. For example, for S0 : $a \land w \Rightarrow p$ the conjunction was split giving $a \Rightarrow p$ and $w \Rightarrow p$ and then the contrapositive rule was... |
I'm a Computer Science student currently learning about concurrent processing. I found the benefits and disadvantages in my book vague, did some online research and put together a more detailed way of defining the disadvantage of concurrent processing; thoughts and corrections are appreciated.
Book version: "The drawba... |
If i have a language like $L = \{a^n b^m c^n b^m a^n \mid m,n\ge0\}$
when i pick a word for the language, would it be correct if i pick any of
these words: $w = a^k c^k$, $w = a^k b^m c^k $, $w = b^m b^m$, $w = b^m c^n b^m$.
|
For the expression (ab)*ba I came up with the following (very poorly drawn):
However, this was not the correct answer - apparently the solution requires five states. I don't understand why my DFA doesn't describe the expression. My interpretation of the expression is "ab any number of times, followed by ba". Is this c... |
It is a very standard situation that we have a class of problems $P$, and a subclass $\tilde P\subset P$ which has a certain restricted property.
For example, $P$ could be the problem of searching through an arbitrary list of people for someone with height $1.8$ meters, while $\tilde P$ could be the same problem, excep... |
What we see on our devices is essentially the private IP given to us by the ISP; thereby, whenever we access the internet, this private IP is first converted to public IP (by ISP through NAT), following which requests are made on the internet. If the assumptions above are right, then how does a website gets my private ... |
Can the same PDA accept both by final state and empty stack in the sense that there are some set of strings that are getting accepted by empty stack, while other set of string by final state and language accepted by the PDA is union of these two?
For example, Consider the PDA shown below:-
I was trying to figure out t... |
Are all integers kept in 2's complement form in all microprocessors or do microprocessors use 1's complement form and unsigned integer form too?
|
I know there is this paper but I wanted to do a special case proof for just IMP for fun. So the theorem is:
$$ \langle P , \sigma \rangle \to_{Big} \langle \{ \} , \sigma' \rangle \iff \exists N \in \mathbf N: \langle P , \sigma \rangle \to^N_{Small} \langle \{ \} , \sigma' \rangle $$
in words; the program P in state... |
Obviously, B would be recursive if for every TCF f, there was an inverse fuction that would return all possible values, as we could just take these and then check if any of them is in A. However I cannot find a proof (or counter-proof) that you can invert TCFs this way. AFAIK, all injective functions are invertible, bu... |
Suppose I have two digit arrays, A and B as follows
A = [3,4,5,6]
B = [9,8,3]
Now, I have to interleave the two arrays which would mean to pop the first element from both the arrays, at any given point of time. One such interleaving would be as follows,
Choose 3 from A
A = [4,5,6]
B = [9,8,3]
Choose 9 from B
A = [4,5... |
Today I stumbled upon a problem which looked like the partition problem but certainly is different.
Given array of positive integers, guaranteed to not be divisible into two continious subsets of equal sum, remove a ceratin continious subset to form two subsets of equal sum.
Example:
Array: 7 5 9 1 3 9 6
Remove eleme... |
Simple question from an algorithm noob...
If $i=1$ then the inner loop will include what I believe to be an invalid range. Is this acceptable pseudocode?
For i=1 to n
For k=1 to i-1
...
|
I was reading this answer about Turing machines and it refers to a bussiness-card-sized one, which claims to be a universal Turing machine, based on this paper. However, I don't understand the logic of that particular machine. I understand that in a universal Turing machine the "program" is just another machine encoded... |
I am trying to write a general purpose locking algorithm which allows me to lock a range of contiguous values in a sorted array. To start with, these could be exclusive locks - so two concurrent locks must be non-overlapping. What could be a good, scalable algorithm to do this? (Scalable ~ concurrent)
A specific exampl... |
Given two lambda terms $t_1$ and $t_2$, it is semi-decidable if they are equivalent (i.e. can be rewritten as each other using alpha, beta, and eta conversions). An algorithm to do this is to try every sequence of rewrites starting with $t_1$, and if any of them end with $t_2$, then output true.
What other algorithms c... |
The problem goes like this:
Given arrays $\{ a_i: 0\leq i \leq n-1 \},\{ b_i: 0\leq i \leq n-1 \} $ and $\{ c_i: 0\leq i \leq n-1 \}$, we want to know what is the $k$-th smallest combination $a_r+b_s+c_t$ where $r, s, t$ are arbitrary indices.
Since $k$ is relatively much smaller than $n^3$ (we may suppose $k \approx ... |
There is a lot of research about techniques that try to reuse the previous result of an instruction, either memory loads or arithmetic, such as dynamic instruction reuse, value prediction, based on the concept of value locality.
What I wonder if there is any commercial CPU from Intel/AMD/ARM that actually uses any of t... |
I found the following question -
For the circuit shown in the figure, the delay of the bubbled NAND gate is 2ns and that of the counter is assumed to be zero
If the clock (Clk) frequency is 1GHz, then the counter behaves as a
(A) mod-5 counter
(B) mod-6 counter
(C) mod-7 counter
(D) mod-8 counter
What I can see i... |
I have been reading $CO$ by Carl Hamacher. I have read generally $PC$ is incremented during the fetching phase of the instruction only, so if interrupt occurs because of branching or call during execution of instruction, then first the current instruction is completed followed by the storage of address of next instruct... |
I was trying to solve the question given below.
Algorithm :
Using divide and conquer technique, divide the input till we get a very small size array's ( let us say of size 2 ). Solve these small size array's in a brute force way. In the Merge phase it will take $\mathcal{O}(n)$ time to sum both arrays, if we get a po... |
As we know that average access time is given by
t=p*(tc)+(1-p)*(tc+tm)
where t represent the average time, p is the hit ratio , tc is the time to access the data from the cache and tm is time to retrieve data from main memory.
I was wondering wouldn't it be possible to decrease this time to
t=p*(tc)+(1-p)*(tm)
if we se... |
I have a map that is 300x300 units. I have to place squares of 20x20 units inside that map from outside to inside. There are 3 different types of square, the space available inside the map needs to be split equally to them, so from outside to inside the squares type 1 start to fill in the map until their limit is reach... |
How to build tree with more than 6 vertices, that after operation splay() would have depth = number of vertices? Is it possible?
UPD:
Example for n = 4:
insert 60
insert 10
insert 20
insert 50
splay(10)
You can use splay tree visualization
|
There is a factory which produces 5 types of ice cream. If the $i_{th}$ ice cream is produced then $b_i=1$ otherwise $b_i=0$
How can I express the following constraints:
The simultaneous production of all 5 types ice cream is not possible
The type 1 and type 2 must be either both produced or none be produced ($b1 \opl... |
I am revising for my algorithms exam and I have come across one topic in particular that I do not quite understand; which is how to analyse dependent nested loops. I know if we have a 2-nested loop, both of which iterate $n$ times, the order will be of $n^2$; but if we have a dependent nested loop such as:
input = an n... |
Let $X$ be an integer sampled uniformly from the (integer) range $\{ 0...2^k - 1 \}$ .
Now, consider the distribution of
$\#\text{bits}(X) = \begin{cases} 1 & X = 0 \\\\ 1 + \lfloor \log_2(X) \rfloor & \text{otherwise}
\end{cases}$
and
$\#\text{bytes}(X) = \begin{cases} 1 & X = 0 \\\\ 1 + \lfloor \log_{256}(X) \rfloor... |
I have an upcoming CS course in uni that uses C and I want to get ahead a little bit this Christmas break but I'm having a hard time figuring out where I can actually code using C. My school uses this compiler called Seashell but it's not available until the term starts.
I've looked at visual studio but I only see C++,... |
Consider a system which has 2 level paging.The page table is divided into 2K pages and each page is having 4K entries.Memory is word addressable and Physical address space is 64MW which is divided into 16K frames.Page table entry size is 2 words.
(A)Length of logical address
(B)Length of physical address
(C)$1^{st}$ le... |
Problem to get the min. no. of swaps required for arranging pairs togethe.
There exists an array of size 2N with integers ranging from 0 to 2N-1 arranged at random. Each integer is paired with another
i.e. 0 paired with 1, 2 paired with 3,...2N-2 paired with 2N-1. What is the minimum number of swaps required to have
a... |
I have been learning Verification by model checking recently and I get the following question:
$Whether\ the\ LTL\ formula\ M, q_3\ \models (X\ \lnot a) \rightarrow (F\ G\ \lnot a)\ is\ established\ or\ not\ in\ this\ model\ M?$
And there is the description of the model.
.
I think it is correct, because the next state ... |
I have been learning Verification by model checking recently and I get the following question:
Is the CTL formula $s_{0} \models EG\ AF\ p$ valid in the following model?
I think it is incorrect because there is a deadlock or infinite loop about $s_0$ after the state is starting from $s_0$, which make it invalid unde... |
I have looked into wikipedia and this MIT slide. A step by step iteration of the algorithm with a clear example would be appreciated.
|
I'm studying continuous CSP from the slides of my professor and i got that with the PATH-CONSISTENCY algorithm you can check consistency for PA (Point Algebra), SIA and ORD-Horn; however it cannot be used to determine consistency for IA (Interval Algebra), since it is just a necessary but not sufficient condition. From... |
Is there a set A such that it's not recursively enumerable and not(K'≤ A) ?
where K' is complement of K= {n| φ n (n) halts}
Thanks!
|
Say you have N input Boolean function, let's use a parity tree for the example. The function outputs a one or a zero depending on the values of the N inputs. Are the N inputs considered the preimage of the function?
|
Suppose you have a graph with weighted edges and nodes. Edges always have non-negative costs (representing e.g. fuel costs), and nodes always have non-negative benefits (representing e.g. collectible fuel tanks). A path from A to B is a series of contiguous edges starting at A and finishing at B. The net cost of a path... |
Consider the sequence of machine instruction given below:
\begin{array}{ll} \text{MUL} & \text{R5, R0, R1} \\ \text{DIV} & \text{R6, R2, R3} \\ \text{ADD} & \text{R7, R5, R6} \\ \text{SUB} & \text{R8, R7, R4} \\ \end{array}
In the above sequence, $R0$ to $R8$ are general purpose registers. In the instructions sho... |
I am trying to solve a problem which turns out to be a form of the set cover problem. I've implemented the greedy Set cover approximation algorithm for set cover, but it turns out to not be accurate enough for my needs.
Specifically I have a fixed, finite, list of special sets and I am trying to create a function which... |
I am trying to prove the NP-Completeness of problem [A].
I know there is a well-known NP-Complete problem called problem [B].
I can model [A] into an instance of [B] ([B] is a very general problem and when I assign some edges a weight value then it becomes [A]).
Is this sufficient to say [A] is NP-Complete?
|
I have:
A programming language (P). Programs should take no input and produce a sequence of integers as output.
A way to enumerate all valid programs in this language (R) in a way that each program is at least as long as all programs before it.
I execute in order each entry in R. Each time I encounter output I have n... |
Can there be a function HALT(f, y) so that:
There are some x such that f(x) halts iff there are some y such that HALT(f, y) return true;
There are some x such that f(x) doesn't halt iff there are some y such that HALT(f, y) return false;
HALT always halt and return a boolean
? It makes lots of old conflict don't work... |
Given positive constants: $c_1, c_2, ..., c_k, c^\prime$, assume that
$T(n) = T(c_1n) + T(c_2n) + ...+ T(c_kn) + c^\prime n$
There are two cases:
$c_1 + c_2 + ...+ c_k < 1$
$c_1 + c_2 + ...+ c_k = 1$
As I observed (from some problems), in case 1 $T(n) = \theta{(n)}$, in case 2 $T(n) = \theta{(n\log{n})}$
But I didn'... |
I learned that recursive language are decidable; correct me if I am wrong. However, I have found some arguments that seem to contradict this. These may or may not be correct; please let me know.
If a language is an REL (recursive enumerable language), I know that there exists a TM (Turing machine) that accepts it (reg... |
Given $k$ arbitrary words, such as $\{\text{"fjqke"}, \text{"gbqig"}, \text{"a"}\}$, is there a way to mergesort these words in linear time so that the final output would be "abefgggijkq"? I tried to approach it by first sorting all the words independently and then merging the words into the final output, but sorting a... |
Is the optimization of a linear classifier convex?
Is there any local optima or saddle points for a linear classifier?
|
I have a question regarding the quotient of two regular languages, $R$ and $L$.
I saw the answers to this question: are regular languages closed under division
and the proof sketch is not constructive, because $L$ can be any language.
I'm thinking about a constructive proof when $L$ is regular: how can we construct th... |
i have found the equivalence classes of given $R_L$ and i need to find the separating words between the equivalence classes(which i don't know how to do). would appreciate if you could explain to me how to do so. also, if you can, would appreciate if you could check if i obtained the correct equivalence classes for bot... |
i had a question and its
"A man has 5 female and 7 male friends and his wife has 7 female and 5 male friends. In how many ways can they invite 6 males and 6 females if husband and wife are to invite 6 friends each? Answer. 267,148."
i tried to have cases by that each person invited six and total of 6 females and 6 ma... |
I know that generalized suffix tree can match substring for a given pattern.
But I have need a data structure which is able to
match prefix of many strings.
match sub string of of many strings.
For example:
The strings I have:
abc, abcd, bcxabc,
If the pattern is abc, I should match all three strings.
If the pattern... |
Let $G$ be a graph with total vertices $|V(G)|$. Let the maximum degree of the graph be $\Delta$. Let us assume the graph is total colourable( no adjacent vertices, adjacent edges and an edge and its incident vertices receive same colour) with $\Delta+1$ colours. Let the vertices be properly coloured with $\Delta+1$ co... |
I was thinking about TM (Turing Machine) as a computation model, and I came up with the following question :
Is it possible to make a TM that answers binary search (tell wether $x$ belong to a sorted array $A$) in $\log$ time ? That is, is it possible to simulate random access on a TM ?
My thoughts so far are that it ... |
this question came up while a group of students at my school were studying for our qualifying exams. The question on an old exam was:
Prove that every context free language $A$ is in $\mathrm{SPACE}(n)$. You can assume that $A$ is given in CNF (Chomsky Normal Form)
I saw CYK algorithm but it's space complexity is $O... |
I have been thinking about some problems in combinatorics and I came across a problem I'm having trouble with.
Suppose you have a list $L$ of length $n$ (wlog the elements of the list are 1,2,3,...,n) and you want to sort it circularly (meaning [3,1,2] is sorted) with swaps of adjacent elements, but you are also allowe... |
There are instances when WL algorithm fails. For example graphs G1 and G2 below have the same coloring after WL-1 algorithm.
However, one of these graphs is disconnected. So what are the instances of undirected connected graphs for which WL algorithm fails?
|
You are given a tree with $n$ nodes and $n-1$ edges. Each edge has a weight. There are $m$ queries. In each query you have to answer the following question:
How many edges are there in the path between node $a$ and node $b$ with weight less than $k$?
$a$, $b$, and $k$ vary in each query. You're allowed to preproces... |
Q) Consider 1MBps hard-disk is interfaced to the processor in a cycle stealing mode of DMA whenever $64$ bytes of data is available in the buffer,then it is transferred to main memory (1 word = 64 bits) and machine cycle time is 2 micro sec. Then,
1.) Percentage of CPU time consumed for DMA operation is ?
2.) Percent... |
I am trying to invert a matrix using Woodbury identity. The inversion using Cholesky decomposition has the following pseudo-code:
For $t=1,2,...$
$(1)\;\; \text{Read}\;x_t\in\mathbb{R}^n$
$(2)\;\;D_{t-1}=diag(|\theta_t^1|,...,|\theta_t^n|)$
$(3)\;\;A_t=A_t+x_tx_t'$
$(4)\;\;A_{t}^{-1}=\sqrt{D_{{t-1}}}\left(a\mathbf{... |
$(a^n)^mb^n$ for $m,n\ge 1$
This can be rewritten as $a^{nm}b^n $
i.e. number of $a$'s is a multiple of number of $b$'s, or for every m $a$'s there is one $b$. I thnk this language can be accepted by NPDA. For every m $a$'s one a can be pushed into the stack, and similarly one can be popped on encountering a $b$. Bu... |
On page 17 on the paper Online Learning with Predictable Sequences, we find a regret of an algorithm equal to
$$
\text{Reg}_T=\frac{R^2}{\eta}+\frac{\eta}{2}\sigma^2(T+logT+1)
$$
where $T$ is the entire time, $\eta$ is learning rate, $R$ is constant, and $\sigma^2$ is the variance of data. The above using arithmetic me... |
I am having a confusion. Empty stack pda will always accept episilon. Therefore a language not accepting episilon will still be accept episilon, so how can we avoid this?
|
I am reading the Artificial Intelligence: A Modern Approach book and in the chapters about logic i noticed that in propositional logic the Modus ponens inference rule (used by the forward and backward chaining algorithms) requires the KB to be a conjunction of Horn clauses, while in first order logic the Generalized Mo... |
I'm learning about Turing reductions at the moment and I'm just wondering is there any difference between an oracle and a decider, As they seemingly do the exact same thing. I understand the point of a oracle is that we don't have to know how it gets its answer but it will always give us the right answer.
An oracle fo... |
For an algorithm I need to be able to iterate over all bit strings where $k$ bits are flipped given a bit string with length $n$ and $n \geq k$. For instance let's say I have the bit string $1001$ and I want to have all bit strings with $2$ bits flipped. That should result in the following bit strings:
1010
1100
1110
0... |
The SLR(1) parses AFAIK does not have any lookahead with it then why do we write it as SLR(1) and not as SLR(0). The thing about parsers which I read online taught me that if it's LR(K) then K represent the number of lookahead symbols. Thereby it's not making much sense to me.
Kindly help me here
Thanks in advance!
|
We know that the decision problem of whether an arbitrary context-free grammar is ambiguous is undecidable. My question is how are made the unambigous grammar of programming language? My guessing is that maybe starting from a simple grammar, which is easy to prove that is not ambigous, then adding some rules for which ... |
I am trying to optimize a program, where I need to know whether a given set of keywords present in the set of words. I believe using the dictionary is the only way to optimize it. Any other technique so that I can get better time complexity? The below python script is my version of the code, this works for a small sent... |
Why don't we consider them as linear? I don't understand. You just have to check for factorization up to sqrt of n. So it's even faster than linear.
I assume it's not linear only if we compare the number of operations relative to the input in terms of binary representation. But why would we do so?
It seems to me wron... |
I am doing a project in applied math, which involves counting spanning trees and selecting spanning trees uniformly at random for near-maximal planar graphs with ~430 vertices, as part of a larger Markov process. Though I am aware of theoretical methods for both of these tasks, I was unable to find even rough estimates... |
Definite clause grammars have been around a long time and are included in logic languages such as Prolog.
They can be translated into (are just syntactic sugar for) Prolog programs and are therefore I assume turing complete (unless I have missed an important limitation of DCGs relative to full Prolog).
Prolog is a logi... |
I'm working on an object tracker where I need to report the azimuth and elevation of targets. Both values should be scaled from degrees to unsigned 32-bit integers. For now I can ignore lens distortion, assume Z=0, and make an arbitrary North (the center of the image?).
The images are single frames taken at 60fps. I do... |
Given a 4-regular graph, is it NP-complete to test whether it can be decomposed into two edge-disjoint Hamiltonian cycles?
|
The wikipedia page on meta-heuristics states that they are "heuristics designed to find, generate, or select a heuristic".
The wikipedia page on hyper-heuristics states that they are "heuristic search methods that seeks to automate [...] the process of selecting, combining, generating or adapting several simpler heuris... |
Consider the following grammar:
Stmts -> Stmt | Stmts;Stmt
Stmt -> Var =E
Var ->id[E] | id
E-> id | (E)
in accepting state we get
S' -> stmts .
stmts -> stmts . ;stmt
isn't it a conflict ?
|
This question stems from my effort trying to learn ASN.1.
After I went through the PKCS#1 standard for RSA cryptosystem and X.680~X.683 side-by-side, I noticed that, they've defined
ALGORITHM-IDENTIFIER as a class, and
AlgorithmIdentifier as a sequence type that can be encoded using BER the basic encoding rule.
I'... |
Consider below two Languages
$L1=\{<M>|$M takes atleast 2000 steps on some input $\}$
$L2=\{<M>|$M takes atleast 2000 steps on all inputs$\}$
Where for each Turing machine M, $<M>$ denotes specific encoding of M.
Here I think both are recursive, because let's say I bound the number of steps the Turing machine runs to 2... |
Count the number of literals in the following expression :
F = AB' + BC' + CD' + DE'
According to me, the answer should be 8. But my solution suggests that the answer should be 6. Can anyone help me out. What am I doing wrong?
Thanks in advance!
|
I am trying to go through the proof of the Master Theorem in Introduction to Algorithms of Cormen, Leiserson, Rivest, Stein (CLRS). The theorem providers an asymptotic analysis for recurrence relations $T(n)=aT(n/b)+f(n)$ where $a\geq 1, b > 1$ and $f(n)$ is an asymptotically positive function.
The authors create a fo... |
Is there is an efficient algorithm to solve the following optimization:
$\mathbf{x}^* = \arg\min_\mathbf{x}\sum_i ||\mathbf{A_i x} - \mathbf{b_i}||_1$
for given $\mathbf{b_i}, \mathbf{A_i}\ \forall i$, where $|| \mathbf{y} ||_1$ is the $L_1$ norm (i.e. $\sum_j |y_j|$) and $\mathbf{A_i}$ are big matrices which we don't ... |
I am going through Antonin Guttman's paper on R-tree. It mentions the max no of nodes given N index records in an R-tree is |N/m| + |N/m^2| + 1.
If there are N index records and if we choose to have minimum number of entries (m) in each node, wouldn't we just need N/m nodes at max? Why do we also have N/m^2 + 1?
Here's... |
Consider the following SQL Queries executed on the relation Employee:
Employee (Eid, Ename, sal)
Eid is the primary key
Queries:
S1:SELECT count (*) FROM Employee;
S2: SELECT count (Eid) FROM Employee;
Will these queries return the same result or different results?
According to me, these queries should return same ... |
In a language supporting CPS, but no built in global state, we can represent a state based computation using a function. We call this function a state function. Assume the function takes three arguments, get, put, and cont. The intended interpretation of these functions is that get takes a continuation, and applies tha... |
I was reading The Algorithm Design Manual by Steven Skiena, and I noticed his use of "process functions" in depth-first search and breadth-first search. Consider the following pseudocode for depth-first search:
DFS(G,u)
state[u] = "discovered"
process_vertex_early(u)
entry[u] = time
time = time + 1
... |
What I wonder is what exactly would it entail. Would it,for instance imply that P=NP or would there be different consequences,I haven't found any assorted consequences so far in my research.
Thank You,
Akash
|
I have been confronted with two meanings of the term "optimization" or "optimization algorithm":
to find the absolute maximum in a set $X$ according to some criterion $f:X\to \mathbb R$
to find a "relatively high" or "increasingly high" or "locally maximum" element in a set $X$ according to some criterion $f:X\to \mat... |
I'm just looking for the general idea on how to approach the following problem:
Find a term $\Delta=\lambda x.xUV$ such that:
$\Delta\Delta=K$
$\Delta K=S$
(it's a system of 2 equations, I didn't know how to format it properly)
Where $K=\lambda xy.x$ and $S=\lambda xyz.xz(yz)$
I think I need to use Bohm theorem but I... |
The online lecture I am watching stated a proof idea:
The set of all possible programs is countably infinite, yet
the set of irrational numbers is uncountably infinite.
I don't think this is sufficient, it assumes one program can only return one irrational number.
How to show that I can not write one program that ret... |
I have a Problem with an Optimal Loading a Hopping Airplane example . This is the Part of Minimum Cost Flow Problem.. .. I dont understand a Picture at all. I should to make one example with numbers and i need to show, how could i send flow along the Airline with bigger Revenue und possible smallest cost... Thank you f... |
I just wanted to make sure if I'm reasoning correctly. So, if two computers are solving the same mathematical puzzle i.e. SHA-256 function of Bitcoin (finding nonce that satisfies difficulty target), the computing power used by each of them can be compared in units of Gigahashes, Terahashes etc. and we know which one u... |
I don't understand the use case of count min sketch.
Based on Count–min sketch, it says "serves as a frequency table of events in a stream of data.".
If I know there are N types of events, why can't I just allocate an array of N slots or a hashmap to keep track of the event frequencies as the stream is ingested?
Am I r... |
Let $\Sigma=\{0,1\}$ and $L=\{u \in \Sigma^* : u \text{ has odd number of 0's and odd number of 1's}\}$. How can I build a regular expression or an automaton for this language? I have no idea, and I guess $L$ is not regular, but I haven't been able to prove it with the pumping lemma.
If it is not regular, can you give ... |
I want to show that $A_\mathrm{LBA}$ is PSPACE-Compelte.
Say we proved it is in PSPACE. Now for PSPACE-HARD:
I had an idea, which was very similar to some solution i found on the web- say we have a TM M which decides some language A in PSPACE. Then given an x in A we can simulate M on x to determine the number of step... |
I haven't found anything in the literature that suggests what would happen if that is the case.
Thank you,
Akash
|
I'm trying to find a formal definition of an algorithm but I only found this. I don't know if it is the accepted one, or even the only one, and I would like some literature on the formal definition(s?). Any help would be appreciated. Thanks.
EDIT:
I'm asking about the formal mathematical definition, not the definition ... |
If I am a Bitcoin node, I can evaluate two blockchains in terms of each one consisting of more Terahashes than the other and thus deduct which one is the "correct" one. There is impartial source of consensus - hashes done.
But what if I had two blockchains, each one making a different function, e.g. one is Bitcoin and... |
A rectangular board with three rows and $n$ columns is filled with $3n$ counters, of which $n$ are red, $n$ are white, and $n$ are blue. The object is to rearrange the counters to have counters of each of the three different colors in every column. The only operation allowed is to swap counters in the same row. Design ... |
I am creating a two-tape Turing machine to recognize the language $\{0^{2^n}|n\geq 0\}$. My idea is to put an input string, such as 0000, at the first tape, and use the second one to count the number of 0s in binary form (as a suggestion at A two-tape deterministic Turing machine that recognizes an exponential string).... |
K-means clustering is the problem of partitioning a set of points in a metric space into $k$ sets (clusters), such that the sum of squared distances between each point and the center of its cluster) is minimized overall, i.e. the clusters as as "tight" as possible.
While NP-hard in the general case, I know it is $\text... |
The problem is:
Given 2n distinct endpoints of n chords on the unit circle, count the number of intersections between chords (if k chords intersect at one point,
that point counts as $\binom{n}{2}$ intersections). What is the complexity of this problem as a function of n?
The solution algorithm is given in this paper. ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.