instruction stringlengths 35 29.1k |
|---|
I am aware of Turing's proof of the undecidability of the halting problem (and I think I understand it). What I'm asking is quite different. I shall define what I mean by "effectively solvable":
A problem $P$ is effectively solvable if there exists an agent $A_P$, such that for any specific instance of $P \, (P_i)... |
I want to compress the string 0cc175b9c0f1b6a831c399e269772661. I can do so by storing the string a, and, when decompressing, using a as input for the MD5 hash algorithm to get the original string.
I realize it's impossible to represent $2^{128}$ possible strings with inputs less than 128 bits long, even if MD5 had no ... |
I have a combinatorial puzzle to solve. The puzzle has 10 interconnected spots for polyhedral blocks to fill in. The blocks have these attributes:
weight,
shape (denoted by number of faces, $n_{\rm block} \in [4, 14]$, $n_{\rm block}=4$ is a tetrahedron, $n_{\rm block}=5$ is a pentahedron etc.),
a rank number print... |
I am not sure if this question is more suitable for CS, theoretical CS or math so feel free to improve the description and migrate it.
In a scenario very similar to popular binary classification machine learning contests, competitors are required to submit their answers to the test set containing N data points. The acc... |
How does one easily determine if an algorithm has an exponential time complexity? The Word Break naive solution is known to have a time complexity of O(2n) but most people think its O(n!) because of the decreasing subsets as you go down the stack depth.
Word Break Problem:
Given an input string and a dictionary of w... |
I am working on theory of computation problems, and I came across this one:
Show that for A and B, a language J exists such that $A \leq_T J$, $B \leq_T J$
The only $J$ I can think of for the moment is the language that uses a $TM$ $N$ which contains a recognizer $M1$ for $A$, and another recognizer $M2$ for $B$. $N$ ... |
By using this fooling set, I am able to prove that the concatenation of bz is in the language L, but I still need to prove that az is not in the language to complete the proof.
This is also the point that the ceiling function is very tricky to deal with. It is also where I am lost.
Any hints and suggestions will be a... |
few days ago I attended a interview, and the interviewer asked me a very common but strange question. Explain static and dynamic binding without using method overloading and method overriding ? I explained him the concept but, I am not able to give him the example without overloading and overriding. So I want to ask, I... |
In a programming language with short-circuiting, a conjunction of N independent conditions has the following expected cost:
where:
t_i = the expected cost of evaluating a conjunct
p_i = the probability that a conjunct evaluates to true
I am trying to prove the following statement:
If you have an optimally ordered co... |
It's said that in Zermelo–Fraenkel set theory (ZFC) one can develop all of mathematics. How about computer science?
Is it possible to define algorithms as a first step? More specifically, how to define "if x = 1 then y else z"? How about loops?
|
I have trouble understanding The classic Mailbox Manufacturers Problem. You can read it here: https://open.kattis.com/problems/mailbox I have also found a solution text: http://www.ida.liu.se/projects/progcontest/progsm/2002/prognm2002-hints.pdf
I just cant get my head around this problem and i cant even understand the... |
in the textbook of CLRS, p.1062 he says the following:
if we use "reasonable" encoding of a graph as its adjacency matrix, the number m of vertices in the graph is $\Omega (\sqrt n)$, where n = |$\langle G\rangle|$ is the length of the encoding of G.
I want to know why $\Omega (\sqrt n)$? I mean it is adjacency matr... |
Imagine you need $n$ random numbers from a Gaussian distribution with $\mu=0$ and $\sigma=1$. And you need to use each of these $n$ numbers $k$ times in various operations. Let's identify the numbers by $j \in 1 \ldots n$.
I see 3 methods of accessing these $n$ numbers during the operations:
Generate $n$ numbers once,... |
How can i draw a PDA which has only 2 states and accepts strings which have odd number of a and even number of b?
the alphabet is {a,b}, and the PDA has to be only 2 states?
|
I have $n=6*10^4$ people which should be sorted into groups. Each person has a list of up to 20 preferences according to which they should be assigned, and a score for each group (a real number). There are $\approx2*10^3$ groups, each taking $5 \leq k_{group} \leq 250$ people at most.
Imagine a following scenario: Eac... |
I'm having a hard time wrapping the idea in my head. Can anyone explain this as different from Sipser's perspective?
(I saw one discussion in reddit but it's for regular languages)
https://www.reddit.com/r/compsci/comments/1pnjrp/the_pumping_lemma/
|
We can have acceptance with empty stack, but in that case our stack at the start has to have a A in it, otherwise this machine will accept the empty string which is wrong
But can we have a non empty stack at the start? is my method right?
|
$L=\{W_1W_2 \mid W_1 \ne W_2 \: \text{and} \: |W_1|=|W_2|\}$
Alphabet = { a , b }*
Considering L={WW} is not context free, shouldn't this be non context free as well? otherwise can you provide a machine or grammar which accepts this?
|
I started an algorithm course in C two months ago, for the last weeks I've been trying to solve this problem , i ran out of time but I cannot find an acceptable solution. Basically It's a coin change problem, Given a sum (S) I need to find (and print) the combination that uses the least amount of coins, I can only use ... |
I know that with the knapsack problem in general, there is no known greedy algorithm to solve it. But, say we add the following constraints:
• All items have values equal to their weights (for all $i$, $w_i = v_i$)
• The weights are all powers of 2 (for all $w_i$ there exists $n ∈ N$ such that $w_i$ = $2^n$).
Now, a k... |
Which kind of collision resolution for a hash table should I pick if I want to store a mapping
from key of type uint64 (word) to value of type uin64 (word)
from key of type string to value of type uint64
respectively?
|
I've read this similar question How to prove correctness of a shuffle algorithm? and I understand the answer. However I still couldn't figure out how to apply that inductive proof to a similar shuffle algorithm --- inside-out shuffling algorithm, which is as follows:
for i from 0 to n − 1 do
j ← random integer ... |
I'm taking the course computer networks and we currently had our second lecture. We got the following question:
What are the differences between integrity and confidentiality of a message? Is confidentiality possible without integrity? What about integrity without confidentiality? Explain.
From what I understand the ... |
Hey so I'm studying for a midterm and I've run into this problem in the material. I'm not sure how to go about solving it. If I use regular induction in part a, I get something a bit tautological. Any suggestions?
Questions
As we all know, US dollar is the official currency in United States. There are different bills o... |
The problem emerged from a practical case, but thinking on it resulted more and more theoretical directions.
Typically, the lock-free algorithms do relative simple things in the practice, but their implementation is already not very simple. It has mainly debuggability reasons. However, it shouldn't be so, if there woul... |
I've just started my undergraduate course and have tried my hands on MIT's OpenCourseWare on Discrete Math on Logic and Proofs. There was a particular question asking to prove Cantor's Theorem:
Problem 4. If a set, $A$, is finite, then $|A| < 2^{|A|} = |\cal P(A)|$, and so there is no surjection from set $A$ to its po... |
I have the following question as homework in an algorithms, analysis and data structures class:
And here's an answer I wrote up:
A queue is a first-in-first-out data structure. A heap is a data structure that makes searching for objects in a sortable space faster than linear search.
Now, every data structure needs to... |
If I wanted to create a sentence like:
African elephants can carry coconuts; Asian elephants cannot.
How would I do that with propositional logic?
|
Does $n\log n = O(n \log n + n)$ hold?
I don't think it does trivially because I think as $n$ grows larger, $n\log n$ will converge to one value, and as the $+ n$ grows, $n\log n + n$. But I am uneasy about my initial thoughts about this. For example, mergesorting a list and then iterating through each element to com... |
Is the VC dimension of an origin-centered circle 1 or 2?
It seems to me that the VC dimension of an origin centered circle should be 1, because for two points with distances from the origin r1 <= r2, r2 will never be able to be labeled 1 without r1 also being labeled 1, so the r1 = 0, r2 = 1 labeling could never be pos... |
I have been asked to give a formal description of a finite state machine. I have tried for over five hours to minimize it, to understand what gets accepted, and what gets refused, to no avail. I really am in need of help. If solving the problem does not seem reasonable, I would really appreciate any tips to attack this... |
My question was around the rolling hash function in RobinKarp algorithm. It is intuitive for me to understand how to get from xi to xi+1 without the mod, however with the mod i am not sure how we still get the right answer. Is there any mathematical theroem anyone could quote which would help me understand?
So i get,
x... |
If you observe the results of many image segmentation algorithms, you can notice the occurrence of region borders where a human observer wouldn't draw one, for instance across slow gradient/textured areas. This seems to be a universal phenomenon.
I have annotated the image below with yellow arrows to show what I am thi... |
Microsoft is committed to the building of the scalable, industrial size topological quantum computer, Visual Studio integrated programming language and SDK will be released by the end of this year (2017). From the other side, logical/symbolic methods in computer science (natural language processing, inference, knowledg... |
What does $\omega{(1)}$ mean as a factor?
In some papers, there exists some asymptotic analysis which comprises a product of multiple Landau notation like $\omega(1)\cdot O(logN)$.
In this example, what is the meaning of the additional factor $\omega(1)?$
|
I wounder why the complexity of algorithms always depend on the size of the input, but not on the size of the output.
For example, in a problem that I have solve, the size of the input is exponentially smaller than the size of output. In addition, the complexity of the algorithm is polynomial by the size of the output,... |
I know that if a set is a decidable, there exists an algorithm that enumerates it and prints value 1 if a given element belongs to the set and 0 otherwise. Therefore, its image is decidable, too. I think, though, that this is not true for the preimage of of the set under a partially computable function. Can someone pro... |
I'm given that two sets, $A$ and $B$ are enumerable. I have to show that there exist subsets $A \supset C$ and $B \supset D$ ($C$ and $D$ also enumerable) such that $C$ and $D$ are disjoint and $A\cup B = C \cup D$. I was thinking to take $A=B=\{0,1\}$ and define $C=\{n : f(n)=1\}$, $D=\{n: f(n)=0\}$.
Do you think thi... |
Hello, all,
First time poster, here.
Anyways, here is my question from the textbook Introduction to the Theory of Computation, 2nd Ed. (Sipser, 2006). Question 1.19 is asking us to convert a regular expression to a nondeterministic finite automaton. The regular expression is given as:
(0 union 1)* 000 (0 union 1)*
Whic... |
The book that I'm reading says it is equivalent
But what about the aa string ? i produce it this way :
$$
S\Rightarrow S_1B\Rightarrow aS_1bB\Rightarrow aaB\Rightarrow aa
$$
But that language doesn't have aa in it, what am i doing wrong here?
|
I’ve always read advice and warnings about the poor scalability and time spent trying to invert a matrix and why it’s better to solve a system of equations whenever the inverted matrix will be used with a product of something, e.g. (A^-1)b vs. solving Ax=b.
However, I’ve been playing with matrix factorization through a... |
Consider given directed unweighted cyclic graph with $N$ nodes, and $N$ edges, and each node has at most one out-going children. Find the longest path.
Example
Consider the following graph, the path $2, 3, 1$ is the longest covering all 3 nodes.
What I think for the solution
Because every node has at most one children... |
I am trying to apply Linear Regression method for a dataset of 9 sample with around 50 features using python. I have tried different methodology for Linear Regression i.e Closed form OLS(Ordinary Least Squares), LR(Linear Regression), HR(Huber Regression), NNLS( Non negative least squares) and each of them gives differ... |
I am trying to understand how the master theorem is invoked on the following recurrence relation:
$$ T(n) = \sqrt{6006} T(n/2) + n^{\sqrt{6006}}. $$
So basically, I found the following source where they have Master theorem definition defined.
I found the similar solution (See the Link #1 in the comment below) where the... |
Assumptions
Let's say we have any recurrence relation (however this is perhaps more applicable to "unpredictable" recurrence relations):
$$T(n) = \;?$$
For example:
$$T(n) = aT\left(\frac{n}{b}\right) + h(n)$$
We could have this recurrence where the input is an array of length $n$ and $a$ and $b$ are determined by part... |
When you learn programming they tell you choose data types that suffice for the concepts you're expressing, i.e. not too small because then your data won't fit and not too big because you don't want nonsensical values stored.
Table of unsigned integers
8-bit: 0 to 255
16-bit: 0 to 65,535
32-bit: 0 to 4,294,967,295
64-... |
A common issue in app development is avoiding over-fetching of data, such as in this naive (pseudocode) example:
get_user(id) {
return sql_query("SELECT * FROM users WHERE id=$1", id);
}
render_some_webpage() {
// ...
print get_user(session.user_id).username;
// ...
}
While this would work, it requires the da... |
Are you just accessing the data and things on the PC you are connecting to or, if it had a better processor/ram/etc, are you able to take advantage of that?
|
Which of the following sounds better (or more rigorously):
x grows with $N^2$ or
x grows with $O(N^2)$ or
x grows quadratically with $N$.
|
What's the difference between $O(1)$ and $o(1)$ ?
|
I tuned some hyperparameters and got 2 best models.
These two models are almost the same "test(not train)" and "validation" errors. But model A has lower "train" error than model B.
In this case, the model with lower "train" error (model A), would show good performance on new data? (good generalization)
Or model A is m... |
In the book Operating System Concepts, it is said that:
A claim edge $P_i \rightarrow R_j$ indicates that process $P_i$
may request resource $R_j$ at some time in the future.
[emphasis added]
Here one can assume two different things from this line:
$P_i$ may request for $R_j$ in the future, but we don't know abo... |
Forgive if this seems like a repeated question. However, I couldn't find a specific algorithm to my needs.
I have nodes that have weights with each other. I want to find all unique groups of nodes, with the constraint that every node in the group has a weight with every other node a value that is less than a certain pr... |
If Alice and Bob each have a bit string of length $n$, what is the randomized communication complexity (either one or two-way) of computing the Hamming distance mod $4$? It seems this is hard to search for online but I am sure it must be well known.
The one-way deterministic communication complexity is clearly linear... |
Let's say there is a set of $N$ real numbers, $x_i, i\in\{1,2,...,N\}$, and we would like to choose $n$ points out of them to get the sum of the chosen points as close as possible to a certain number, $y$, i.e. minimising
$$
f(J) = \left[y - \sum_{j\in J}x_j \right]^2 s.t. ~J \subset \{1,2,...,N\} ~\mathrm{and}~ |J| = ... |
This is my take :
Epsilon ---> 1
0 --> 2
01 ---> 3
10 ---> 4
11 ---> 5
001 ---> 6
010 ---> 7
.
.
.
So therefore we can count them.
But based on this video : https://www.youtube.com/watch?v=oe-ZAJQz9Cc&index=5&list=PLsFENPUZBqiqbnD-WatYxUhRWLMNDoMun
They should not be countable, but i did not understand that video, th... |
So given two DFAs, is the problem of finding if they generate the same language a Decidable problem?
I already know that Equality of two CFL is not Decidable
but what about Equality of two DFAs? considering most of the problems with DFAs are decidable, is this decidable as well ?
|
Perhaps this isn't exactly a computer science question, but I thought this wouldn't strictly fit in Electrical Engineering either. Let me know if I should move this somewhere else
Suppose I have a process that is single-threaded and rather poorly optimised. It doesn't max out my processor, and instead stays stuck at ar... |
So considering that set of all turing machines is countably infinite, can we also say that set of all FA machines(DFA/NFA) or set of all PDA machines(DPDA/NPDA) are countably infinite, Considering that we can build all of them with Turing machine?
|
In the original Practical Byzantine Fault Tolerance (PBFT) paper they mention they implemented a fault tolerant NFS service. To do that they made a library for PBFT. Does that exist anywhere?
As that paper is quite old now and was well received, I thought it should not be hard to find implementations. However so far I ... |
Let's say we have given 2-dimensional maze in form of matrix, conisting only of the letters x and .. For example the following maze:
xxxxx 11111 .....
x...x 1...1 .xxx.
x.x.x 1.2.1 .x.x.
x...x 1...1 .x.x.
xxxxx 11111 .....
Let's group those elements, we will group x's only, such that two elements will ... |
Suppose that a stream of data is arriving like $(4,5) (5,6), \cdots ,(7,8)$, where for each particular tuple $(a,b)$, we have $a \in [n]$ and $b \in [k]$. I want to store this stream. In my setting $k = O(n^2)$, and there are no duplicates, so the stream has at most $nk$ pairs.
I want a data structure that supports thr... |
I'm trying to figure out how an SMT solver works as simple as possible.
Let's assume we have a simple input program with symbolic values x and y.
E.g.
if (x+y < 20) {
if (x > 10) {
if (y > 10) {
assume(false);
}
}
}
Here we have different paths, depending on the conditions. To reach assume(fa... |
The only thing I found online about this is the following blog: http://blog.computationalcomplexity.org/2005/03/tape-reduction.html
where they write:
Roughly the simulation guesses every step of the transition function
on one tape and uses the other tape to verify the transition function
on each tape of the origi... |
I'm interested in the dynamic connectivity problem for forests. In this problem a forest is subject to updates (edge insertion that do not create cycles and edge deletion) and queries if two nodes are connected.
Link cut trees and Euler tour trees supports these three operations in $O(\log n)$ (Erik Demaine's notes). ... |
Here is an excerpt from the book Algorithms, 4th edition by R. Sedgewick and K. Wayne:
Proposition E. In the resizing array implementation of Stack
(Algorithm 1.1), the average number of array accesses for any sequence
of operations starting from an empty data structure is constant in the
worst case.
Proof sketc... |
I'm trying to figure out how to create a CFG for univocalic words...
Univocalic words are words that have only one the same vowel letter throughout the word
Example:
September, Anna
Would appreciate any of your help..
|
In their paper "Alternation" Chandra et al. show how an Alternating Turing Machine can simulate a Deterministic Turing Machine with time-complexity $t(n)$ using only $\log(t(n))$ space what implies $P \subseteq AL$.
I wonder why one cannot use the same (or at least a quite similar) construction in order to simulate a ... |
I have a set of rectangles that needed to be grouped based on their locations.
(All the rectangles follow the same orientation.) Two rectangles would be in the same group if the distance between them is less than a certain (constant) threshold.
The obvious algorithm will find all groups in ${O(n^2)}$ time. What I am... |
I am trying to implement bilinear interpolation as described in the paper Spatial Tranformer Networks by Jaderberg et. al (see link to paper). They describe bilinear interpolation in Equation 5 as:
$$
V_i^c = \sum_{n}^{H}\sum_{m}^{W} U_{nm}^c \max(0,1-|x_i^s - m|)\cdot\max(0,1-|y_i^s - n|),
$$
where:
$V_i^c$ is the re... |
I have a totally random source of signal data that looks like a typical normal distribution. I've included an image as I like pictures:-
The source has a mean of 0, and a standard deviation of 1. It's analogue and therefore of infinite resolution. Very typical.
I then sample the signal with a Tricorder and record th... |
I'm running A* search with a theoretically consistent heuristic. I'm doing a lot of float multiplications, and I'm not sure how best to ensure that my heuristic remains consistent down to the last decimal point. Is this something that is safe to ignore?
If it matters, my search objectives typically are around 5000,... |
I guess that this is a chaos, randomness and modelling question. Can it be conceived that a sufficiently powerful (perhaps quantum) computer might be able to accurately predict the scores on a physical die tossed from a cup?
I understand that dice land the way they do because of highly complex and chaotic interactions... |
Consider the following problem. Given a set of $n$ items having weight $w_i$ and value $v_i$ and a maximum capacity $W$, maximize $\sum\limits_{i=1}^n a _i v_i$ under $\sum\limits_{i=1}^n a_i w_i \leq W$ where $a_i \in \{0,1\}$. That is, choose a subset of items giving the maximum total value while still fitting into t... |
$$T(n) = 2 T(n/2) + \sum_{k=0}^n (k+2)^2$$
I want to use the substitution method. How can I generate my guess and how can I determine the growth of summation in the recurrence?
|
The Cuckoo filters paper (https://www.cs.cmu.edu/~dga/papers/cuckoo-conext2014.pdf) claims a 95% load factor, however it seems to make an implicit assumption that the table size is a power of 2, and their implementation also enforces that (https://github.com/efficient/cuckoofilter/blob/master/src/cuckoofilter.h#L90). T... |
How can I describe a Turing Machine recognizing the language $P=\{a^{2^n} | n \geq 0 \}$?
This Turing Machine is deterministic and uses two tapes, both bidirectional and R / W (read & write)
The computation should be done in linear time.
I've read Counters in Turing machines but it doesn't address my question. It can ... |
I encountered a question from a test that I cant understand the answer
given a range of numbers $[0...(logn)^{logn}-1]$ we need to find the quickest sort available and give his running time
now it seems like something to do with radix sort but if I try to switch bases to $logn$ I get $n$ numbers that each contain $... |
In order to generate scale-free networks, we can use this algorithm, derived from Barabási–Albert model:
1) we assign every node a "weight" $\theta_i$ (or two in the direct case).
2) we place $m$ edges between nodes by choosing the ends of the edges with probabilities proportional to the weights.
With the right choice ... |
I recently got into a discussion about Priority Queues when the requirements allow for "best effort" removal (i.e. the removed key may not always be THE very highest priority, but it is relatively close).
After thinking about it a bit I stated "I could probably make it $O(1)$ by using buckets" and approximating the mi... |
I am new to programming and want to learn how to compare algorithms having the same complexity and pick the best one. Certain problems can be sloved using several algorithms which have the same complexity. How do i compare such algorithms
|
How should I create the truth table to solve each of these questions? Maybe can give me an example?
$Smoke \implies Smoke$
$Smoke \implies Fire$
$(Smoke \implies Fire) \implies (\neg Smoke \implies \neg Fire)$
$Smoke \lor Fire \lor \neg Fire$
$((Smoke \land Heat) \implies ((Smoke \implies Fire) \lor (Heat \implies Fir... |
How do I access the bit at a particular index in a number using shift operator.
Say the number is $n$.
Let the index be $i (i: 0 \le i < n).$
Rightmost bit is $0$.
The only thing I can think of is:
$def \, bitAt(n, i)$
$\,\,\,\,\,\,\,\,m = n >> i+1$
$\,\,\,\,\,\,\,\,v = n >> i$
$\,\,\,\,\,\,\,\,m = m << 1$
$\,... |
$u^*v(w \cup xu^*w)^*$ and $u^*v(w \cup x(u)^*w)^*$
Is that extra set of parentheses around the second $u$ needed?
|
I'm using Haskell notation for illustration, hopefully it is known widely enough for this to make sense.
In the following fold function the second argument is what I'm calling the identity:
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
It is trivial to fold/reduce over a list of values with certain operations ... |
Regarding the problem:
What is the largest bet that cannot be made with chips worth $\$7.00 $
and $\$9.00$? Verify that your answer is correct with both forms of
induction.
I need to find an algorithmic approach, but till now my approach is to try all possible combinations with 0,1,2,3,4,5,6,7,8 (9) as the column head... |
In the regular version of the game Nim, you have $n$ piles of stones, and you may remove one or more stones from a single pile in your turn. A modification I thought of involves the concept of piles that may contain not just stones, but also other piles. Let's call these "super-piles". Similarly, we may have "super-sup... |
I am attempting to output the largest stack of boxes given an input of a set of boxes.
Currently I have an array called maxWeight that has the values of the boxes sorted from largest to smallest, this is the array being operated and changed, I then have another array that also has the values of the boxes going from lar... |
How can I describe a Push Down Automaton that recognize the language $P=\{a^{2^n} | n \geq 0 \}$?
My approach
I know that the language can be described by a Turing Machine, but how i can the stack recognize that language?
|
I am going through the book , introduction to compiler design , by Torben Ægidius Mogensen.
It provides the following definition of an epsilon closure :
Given a set M of NFA states, we define $\ \epsilon $-closure($\ M $) to be the least (in terms of the subset relation) solution to the set equation $\ \epsilon $-closu... |
I have an undirected Graph $G$, which is stored in the form of an adjacency list in external memory.
I'm looking for an I/O efficient algorithm which computes a valid coloring for $G$ with at most $k+1$ colors where I provide the $k$.
I tried searching for I/O efficient graph coloring algorithms but couldn't find any... |
The problem states the following:
Draw a deterministic finite automaton (DFA) accepting strings containing at least three occurrences of three consecutive 1's on alphabet $\Sigma=\{0,1\}$ with overlapping permitted.
I was able to come up "without overlapping" version as follows:
Regex of this DFA is (1+0)*111(1+0)*1... |
Good Afternoon,
I am comparing A* search to Simulated Annealing for an assignment, mainly the algorithms, memory complexity, choice of next actions, and optimality. Now, I am not 100% sure about my answer, and was wondering if someone could give me some input.
A*: Optimal, finds path of shortest distance to goal state ... |
I have been reading this book for my class, Randomized Algorithms. In this particular book, there is a whole section dedicated to finding the median of an array using random selection, that leads to a more efficient algorithm. Now, I wanted to know if there are any practical applications of this algorithm, in the domai... |
I've just started learning about the concept of undecidability and turing machines, and while I am finally beginning to grasp it, I'm still curious about one thing. Is it possible for a problem to exist for which it is impossible to prove whether it is undecidable or not? In other words, can the problem of "is it decid... |
I'm currently taking a class on algorithms, and we are studying algorithmic efficiency. I understand classifying algorithms based on their time complexity, but I am confused about the following category of questions:
Suppose algorithm A has time complexity C (C being along the lines of n^2, n + 1, 3 * 2^n, etc.), and i... |
I've got two questions about bitonic sorting:
Does a bitonic sorter compare a pair of elements more than once?
How many comparisons does a bitonic sorter perform in the case where the size of the array not a power of two.
|
Given string w such that every odd position in w is a 1
My solution is
The book's solution is
from my understanding $\epsilon$ should not be an accepted state, however in the book's solution it is. How is it handling this case?
|
I encountered a question to give an example of a set $A$ that is not decidable as $A$, but which becomes decidable if it is concatenated with itself, i.e. $AA$.
In case a set $A$ is decidable, then it is easy to see that $AA$ is also decidable, since a $TM$ that decides $A$ can be modified to also recognize $AA$... But... |
I have a typical subset sum problem and I'm looking to choose the proper algorithm to solve it, the set contains (around) 1000 elements, and elements are constrained to max 22 bits for now.
I have been looking around and looks like the well known O(2^(n/2)) is not an option, and looking into the Dynamic Programming ver... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.