instruction stringlengths 35 29.1k |
|---|
Suppose I have a $n$-state non-deterministic finite automaton $F$ over alphabet $\Sigma$. Let $S(x)$ be the set of states reachable from the starting state by consuming string $x$.
I am interested for a given NFA to compute a $n \times n$ simultaneous reachability matrix $R$, such that $R_{ij} = [\exists x : \{i, j\} \... |
Suppose $L$ is a regular language over $\Sigma$ and we want to show that $$\frac{1}{2}L = \{x \in \Sigma^* \mid \exists y \in \Sigma^* (xy\in L \wedge |x| = |y|)\}$$ is regular. I thought of taking the set of even length strings over $\Sigma^*$ (given by $(00\cup01\cup10\cup11)^*$) and then interescting with $L$, which... |
Finding a clique $C$ in an undirected graph $G= (V, E)$ such that $|C| > |V|/2$ is in P or NP-hard? How can I prove it?
|
I noticed that in complexity classes, logspace class is defined but there is no logtime.
I was wondering how is that possible?
Normally, I would expect the opposite, It is possible to do a search query in an ordered list in time less than the time of iterating over all items (==> Logtime?). However you can't store a li... |
I have a grammar:
$G → id > id$
$| id < id$
$| G and id$
Does anybody know how I can do left recursive elimination on this one, when it doesn't have any extra non terminals?
|
Hello I am currently working on an implementation of MCTS and I ran into the problem that my tree traversal policy selects nodes with terminal game states. Furthermore how do I prevent selecting a Node that only has children Nodes with terminal game states ( and so on and so on )?
|
A theorem says if $f$ is a computable function and we can prove $x \in A \Leftrightarrow f(x) \in B$, then we can use reduction so $A \leq_m B$.
But i'm confused if should I prove if :
$(x \in A \Rightarrow f(x) \in B )\land (f(x) \in B \Rightarrow x \in A)$
Or
$(x \in A \Rightarrow f(x) \in B ) \land(x \notin A \Ri... |
I recently started learning about distributed computation on graphs (not to be confused with parallel computation with threads).
I have seen as a side note in a few lower bound proofs, a reference that says the proof could be shorter using the "linear lower bound theorem for the Equality problem", but I couldn't find t... |
Assuming we have a regular language $L$, how can we prove that $L'= \{ xz \mid \exists y : xyz \in L \text{ and } |x|=|y|=|z|\}$ isn't necessarily regular.
So far I can't come up with much for how to solve this. I was thinking we could solve this by either generating an example where $L'$ isn't regular or we could use ... |
I've got a very general question about the relational model and it's relationship to 1st order predicate calculus. It will probably seem very basic to most, I'm afraid, a consequence of me grappling with these concepts on my own for the first time. I would love it if someone could please clarify.
One often sees example... |
I recently read the Berry and Boudol's chemical abstract machine [1, 2]. I found the way they describe the semantic really nice and quite intuitive for a process calculus.
The aspect that really appealed me is that, in the chemical abstract machine (ChAM hereafter), configurations are multiset of processes (and process... |
I am curious about something pretty simple, though I have never heard, read and more sadly seen any example of it.
Take any image, represent it as a matrix, invert the matrix (assuming the inverse exists) and represent it as an image again.
This in some sense visualizes the process of inverting a matrix. It would be pr... |
In my Computability and Complexity class, we are focusing on P, NP,
NP-complete, and NP-hard problems and the one thing that keeps coming up
is the SAT problem, in the context of reduction from one complexity to
another or to explain certain concepts.
Why is SAT so ubiquitous in theoretical computer science?
|
Suppose that I want to enumerate all English language words of length 5.
If I've got nothing more than a check of whether an arbitrary string is an English word, I have to do 5^26 calculations.
However, suppose that I can check a partial specification to see if there are any words consistent with it.
By partial specifi... |
Assuming the input photo is focused on a person's face, if the person is wearing a surgical mask, most face recognition software fail to identify the subject's face.
Most facial landmark models are trained to identify at least the eyes and the tip of the nose (for example, dlib's 5 point landmark).
Is it possible to co... |
The Problem:
I'm trying to simulate part of the game tantrix which is a board game played with hexagonal tiles. Each tile has 3 lines of different colors that each start at one side of the hexagon and end at another side. a line is drawn between these tiles. Adding multiple tiles together one can make a line consisti... |
Recently, I've encountered the following problem:
Given a collection of sets $S_1 \dots S_n$ of elements $e_1 \dots e_k$ with element $e_k$ denoted privileged, and a $k-1$-vector $r$, choose at most $m$ of the $n$ sets to maximize the number of times the privileged element $e_k$ occurs in the multiset union of the chos... |
I am having trouble on the following algorithms question:
Given $f(n) = \sum^n_{y{=}1} (n^5\cdot y^{22})$, I am trying to find a $g(n)$ such that $f(n) = O(g(n))$.
I know that this means I need to find constants $c,n_{0}$ so that $f(n) \leq g(n)$ for all $n > n_{0}$.
I began by considering the expansion of $f(n) = n^{5... |
I am reading chapter 3 Decomposition of Graphs of Algorithms by Dasgupta, Papadimitriou & Vazirani and they show a pictorial representation of pre and post numbers with brackets for tree, forward, back and cross edges. I have pasted the image of the area I am unclear on.
I am assuming that u is the node/vertex we see f... |
Many times, I've wished to plug in my backup hard disks into my PC without the risk of any of the data being deleted, overwritten, or modified in any manner. Purely for "inspection" and copying over certain files from it.
But, unlike on the old floppies, there's just no hardware switch anywhere to enable "read-only" mo... |
The distance transform gives the distance of each pixel in a mask to the nearest zero.
E.g. lets take the Taxicab distance transform:
input distance
1 1 0 2 1 0
1 1 1 -> 3 2 1
1 1 0 2 1 0
I'm looking for a generalized distance transform where each each element in the mask also has a "weight" or "i... |
I am trying to devise a Las Vegas algorithm to solve Maximum Independent Set, but I don't know how to start.
Also, I want to devise a Mont Carlo algorithm for this problem.
I would appreciate any help.
Thank you.
|
I was reading about simulated annealing on its Wikipedia page, and was drawn to a particular example illustrating the annealing schedule. Below is the picture and its description:
Example illustrating the effect of cooling schedule on the performance of simulated annealing. The problem is to rearrange the pixels of a... |
I read following explanation from Dasgupta's Algorithms book for Median finding, this is the same philosophy applied in randomized quick-sort.
Here as per book terminology $S$ denotes array of integers, $v$ is pivot, $S_{L}$ and $S_{R}$ are left and right side of pivot element.
To distinguish between lucky and unlucky ... |
For algorithms involving binary trees, time or space complexity is often O(logn) in the best case of a completely balanced tree, and O(n) in the worst case of a completely unbalanced tree. Sure, it's a generalization, but it's also a reasonable one.
But in real algorithms, we're typically not interested in the rare wor... |
Suppose that there are two probabilistic automata $A_1$ and $A_2$ with a same finite alphabet $\Sigma$. The languages of them are $\mathcal{L}_{1} \subseteq \Sigma^*$ and $\mathcal{L}_{2} \subseteq \Sigma^*$ respectively.
For every input $x \in \Sigma^*$, $\Pr \{ x \in \mathcal{L}_{1}\}=p_1(x)$ and $\Pr \{ x \in \mathc... |
Suppose the use of linear regression. The result of the MSE is 120.5(mean squared error) for the train-set. Wev'e reached the minimum of training the data.
Is it possible that by applying Lasso(L1 form) we would get a lower MSE for the train? and for the test? is the same also holds for Ridge(L2 form)?
Lasso Train
Las... |
I need to build a turing machine that decides $A=\{0^{2^n} | n \ge 0 \}$ with an alphabet of two symbols - $\{0, \_ \}$.
I'm aware of the known TM that decides this language with three symbols $\{0, x, \_\}$ but I am not able to come up with one that does it with just two.
Any advice would be highly appreciated
|
I have some problems to understand computability and hope you can help me.
In the lecture we had following problem:
Consider the three partial functions $f,g,h\colon N \to N$, where $f$ is computable and $g$ is not computable. The following two statements are correct:
If $h(x) = g(f(x))$, then $h$ could be computable.... |
In several posts on StackExchange and elsewhere, I have seen claims that you only need to show you can construct constants, successor, projection, composition, and minimization to prove a language Turing-complete, since primitive recursion is allegedly a special case of minimization. But as I have been thinking about i... |
How do I construct a DFA for the language $\{0^m1^n \mid m+n \text{ is even}\}$? The corresponding regular expression is
$(00)^*(11)^* + (00)^*0(11)^*1$.
|
I'm trying to come up an efficient algorithm that, given a list of positive integers $a = \left(a_1, \ldots, a_D\right)$ and positive integer $c$, finds a list of non-negative integers $b = (b_1, \ldots, b_D)$ that minimizes $\prod_{i = 1}^{D}\left(a_i + b_i\right)$ such that $\prod_{i = 1}^{D}\left(a_i + b_i\right)$ i... |
I try to express datastructures in a form of mathematical functions. For example an array or a dictionary is just a function to me.
Is there a good way to model a tree in terms of functions?
|
Say we have two strings s and l, and they only have characters 'a' through 'z' (lowercase English alphabet characters). The task is to find the maximum number of consecutive occurrences of s in l.
Ex.
s = "ab"
l = "defgababajklabe"
The answer here would be 2, because there is "abab" which would be 2 consecutive occurre... |
I am given the following problem description:
Given $l$ lists, $L_1$, $L_2$, . . .$L_l$ each containing $N$ bit vectors of $n$ bits each, we want to find tuples $(x_1,···,x_l)$ with $x_i$ in the corresponding $L_i$, such that:$$⊕_{i=1}^l x_i = S $$ for some target n-bit vector $S$. In other words, we want to find one... |
I understand that the language $L = \{ a^mb^nc^k \mid m=n \text{ or } n=k \}$ is context-free because it can be represented as the union of $L_1 = \{a^mb^mc^k\}$ and $L_2 = \{a^mb^kc^k\}$, which are both context-free. But I can't figure out the working of the PDA accepting $L$.
To check whether $m=n$, first of all $m$ ... |
In this circuit, if the two qubits are initialized at state 0, then after the oracle they are entangled and in the state:
$$\frac{1}{2} (|00\rangle+|01\rangle+|10\rangle-|11\rangle)$$
My question is, how do the two $H$ gates act on them? Do they act like:
$$\frac{1}{4} [(|0\rangle+|1\rangle)\otimes(|0\rangle+|1\rangle... |
I am struggling with a specific question regarding complexity classes. The question goes as follows:
There are three languages A,B,C so that:
A is NP-complete
B is in P
C is polynomial time reducible to A $\triangle$ B (symmetric difference)
Which of the following statements is valid:
C is in P
C is in NP
C is ... |
As I was preparing for the CCC this year, I am quite confused as to why a certain code modification was able to speed up my code for CCC Seniors Problem 2.
Here was the C++ source code for my first attempt, which scored 13/15 in the cccgrader website as well as the DMOJ online judging website.
#include <bits/stdc++.h>
... |
For an optimization problem $x^* =\text{argmax}_xf(x)$ s.t. $x \in Y$ satisfy to some constraint $Y$.
Can I argue that if there is a polynomial algorithm for this optimization problem. Then there must exist a polynomial algorithm checking if $x$ satisfy constraint $Y$?
|
If a constraint satisfaction problem $x \in Y$ is NP-Complete.
Can I conclude that the optimization problem $^* =\text{argmax}_x (x)$ s.t. $x \in Y$ is also NP-Complete?
|
I am trying to design an LL(1) Parser that accepts regular notation where 'E' represents epsilon, and 'U' represents "or" like ' | '.
So far I made one that accepts T = { a, b, *, +, (, ), E}
S -> T S'
S' -> + S | ε
T -> F T'
T' -> T | ε
F -> P F'
F' -> * F' | ε
P -> ( S ) | c | E
c -> D M
M -> C | ε
D -> a | b
I ... |
If 2 CPUs have the same Instruction Set Architecture, which of the following properties will be the same?
Clock Rate
CPI
Execution time
No. of instructions
MIPS
|
I learned two approximation algorithms for the min Steiner tree:
The first algorithm:
1- Compute the metric closure G' of G.
2- Compute a min spanning tree T' of G'
3- Construct the union U of the shortest paths in G which correspond to edges in T'
4- Output the Steiner tree T contained in U.
The second algorithm:
1-Fi... |
I have come across this video on skip lists:
https://www.youtube.com/watch?v=UGaOXaXAM5M
Clearly, the creation of skip-list from a sorted singly linked list is a randomized algorithm.
But I am confused: is it a Las Vegas algorithm or a Monte Carlo algorithm?
I feel it is a Monte Carlo algorithm since there is a possibl... |
I am still a bit confused by how to convert into CNF even though I have the rules written down.
How do I convert the following sentence into CNF?
$(I \lor M) \Rightarrow H$
I know I need to get rid of the implication symbol and when its in the form $(I \Rightarrow H)$ or $(M \Rightarrow H)$ then I can see how to do it,... |
Given an undirected graph with non-negative edge weights, and two vertices $s,t$ in the graph. I would like to find the minimal cut such that $s$ and $t$ are on different sides of the cut.
For example I have a graph describing the network of roads connecting Berlin and Munich and I want to find the minimal cut such tha... |
If we know the vertex cover number for a simple graph $G$ denoted by $\tau(G)$, is it possible to find the minimum vertex cover set for $G$ in quasi-polynomial time? As I found, we cannot find any quasi-polynomial time solution for NP-hard problems (or at least it is a strong conjecture) such as finding the minimum ve... |
Given a graph $G$ where each node has a value $c$ and weight $w$, I want to select a connected subgraph $V^*$, such that,
Sum of all values in $V^*$ crosses threshold $t$.
Sum of all weights(say $w^*$) in $V^*$ is as low as possible.
A practical example is finding smallest continuous area of a country that hosts at ... |
Let $A$ be a matrix of size $K \times N$, $K \leq N$. Let $n_1...n_K$ denote a $K$-permutation of integers $1...N$ (understood as a unique assignment of a column to every row in the matrix). How to most efficiently calculate the sum, over all $K$-permutations, of products $A[1,n_1] * A[2,n_2] * ... * A[k,n_K]$?
For exa... |
Suppose we have a simple graph $G$. We know that finding the minimum vertex covering set for $G$ is in the NP-hard class. But, what about the complexity class of finding the size of the set, i.e., the vertex cover number denoted by $\tau(G)$. Is there any previous result about this research question?
|
Problem Statement: There are $n$ hours in a day and you have $w$
workers. For each worker $i$ you will be given $x_i$ (work experience),
$s_i$ (shift start time) and $e_i$ (shift end time) on a separate line.
Here $s_i$ and $e_i$ are both inclusive. At any given hour $t$ in a
day, you have to determine who is the mos... |
I am writing an application that will maintain heart rate within a specified range by adjusting the resistance on a turbo trainer.
I could cobble together something that would gradually increase resistance until heart rate reached the right level but I imagine reaching the desired heart rate quickly, not overshooting a... |
If RAM is a short term memory and SSD is a long term memory, why don't microarchitecture of computer nowadays use SSD or another long term memory for saving temporary data like hidden variable for programming?
If it's about speed, then SSD can improve its speed, is it possible that SSD will become faster than RAM at so... |
Exam question:
Draw the Red Black Tree that results from inserting the following
values in the given order:
[10, 20, 30, 4, 5, 50]
Draw the red connections with a dotted line and the black ones with a continuous line.
What I understand about Red Black Trees:
Every node is either red or black.
The root and leaves ar... |
I am trying to get my head around the Pumping Lemma to prove a language is non-regular.
I am reading the Sipser text book and he gives the following example.
Let B be the language $\{0^n 1^n | n \ge 0\}$
Let $s = 0^p 1^p$
I understand that the idea is you can split this string into xyz such that y can be pumped. It is ... |
Is there any difference between saying
$ L_1 = \{(a^n b^n)^m \mid n, m \ge 1\} $
with $ L_2 = \{a^n b^n \mid n \ge 1\}^+ $?
I know that for $v = abab$ we have $v \in L_1$ and $v \in L_2$
my understanding is that there is no difference between them and for $w = abaaabbb$ we have $ w \in L_1$ and $w \in L_2$ . but I have... |
Why is it that when I read about finding the shortest path for a DAG I usually just hear about topological sort? Why not use dynamic programming where the shortest path to a vertex is simply the minimum of all vertices that have a path to it?
|
I have started learning about quantum computing, and I have been told that you can forget about the physics and think of qubits as a natural generalization of the notion of bit. According to this view, one should think about a qubit as a generalization of a bit, where the states $0$ and $1$ are in superposition; there ... |
I am curious on the use of the potential method for amortized analysis for a dynamic array which quadruples in size after it becomes full.
I understand how the potential function is defined and used for such an array which doubles in size, but am having difficulty showing that the insert operation takes constant time i... |
In the alpha-beta pruning version of the minimax algorithm, when one evaluates a state p with $\alpha$ and $\beta$ cutoff and gets a v value, i.e.,
v = alphabeta(p, $\alpha$, $\beta$)
are these properties true?
alphabeta(p, -$\infty$, $\beta$) = v when $\alpha$ < v
alphabeta(p, $\alpha$, $\infty$) = v when v < $\beta$... |
I'm trying to understand why:
$$L_{\Sigma^*}=\{\langle M\rangle|L(M)=\Sigma^*\}\notin coRE$$
As I see it TM, $\langle M\rangle$, should accept all the inputs, and if one of the inputs rejected it's not $L(M)=\Sigma^*$ any more, so why it's not? $$L_{\Sigma^*}\in coRE$$
$*$ I familiar with the reductions $HP\le L_{\Sigm... |
I want to prove that $L = \{a, b\}^* - \{(a^n b^n)^m \mid n, m \ge 1\}$ is a Context Free Language.
so far, I tried to find a Context Free Grammar for $L$ or to use properties of Context Free Languages but have not been successful yet.
Any guidance and explanation would be greatly appreciated.
|
I have some users in groups, like this (groups are letters, users are numbers):
{
a: [1, 2, 3],
b: [4],
c: [5],
d: [6],
e: [7, 8, 9, 10]
}
I receive a new description of the grouping of these users like this:
[1, 2, 3, 4, 5, 6, 11],
[7, 8, 9, 10]
Now, I need to rearrange the users to minimize "changes", so ... |
I am currently studying Chapter 8 of Krama and Hammer's textbook on Boolean Functions, and having a hard time understanding what it means for a function to be "k-monotone."
I am currently working off the following definition of "K-monotone" in Chapter 8:
A Boolean function $f$ on $\mathcal{B}^n$ is $k$-monotone ($1 ≤ ... |
So if we assume that we have some strongly connected component G with n vertices. I would like to find the length of the longest path in that component.
My idea is: In a strongly connected component we can get from one vertex to every other vertex.
If we start at some vertex u then we can visit each of the remaining n-... |
I am studying the maximum matching problem and I was trying to understand why the classical augmenting path algorithm does not work for the general graph (i.e. for non bipartite graph) and you must recur to the blossom algorithm.
The explanations that I found (1. here, 2. and here) are based on the fact that the direct... |
In QuickSort Algorithm, the pivot is chosen as the first element or a randomised element. However, if the range of data to be sorted is known, For example, from 1 to 100, and they are mostly equally distributed, then, the best choice for first pivot would be 50, even if it's not present in the array, then, for left su... |
Often in CLRS, when proving recurrences via substitution, $\Theta(f(n))$ is replaced with $cf(n)$.
For example, on page 91, the recurrence
$$ T(n) = 3T(⌊n/4⌋) + \Theta(n^2) $$
is written like so in the proof
$$ T(n) \le 3T(⌊n/4⌋) + cn^2. $$
But can't $\Theta(n^2)$ stand for, let's say, $cn^2 + n$? Would that not make s... |
I am currently self studying approximation algorithms from The Design of Approximation Algorithms (Williamson and Schmoys; page 50 here), specifically the minimum-degree spanning trees (MDST) problem. Given a graph $G$, we need to find a spanning tree $T$ that minimizes the maximum degree of any vertex in $T$.
I unders... |
I am asked to write an C code Selection Sort algorithm and use loop invariant to show its correctness.
We are given array A[1...n] of n integers. (Indexation 1 for clearance. In my code it starts at 0)
int i, j, min_index, temp;
for(i=0; i<n-1; i++) {
min_index = i;
for(j=i+1; j<n; j++)
if(A[j] < A[min_... |
What is the complexity of inverting a $n \times n$ diagonal matrix?
From what I learn in algebra, the inverse of a diagonal matrix is obtained by replacing each element in the diagonal with its reciprocal.
So is it correct to say that the complexity of inverting a diagonal matrix is $\mathcal{O}(n)$?
|
My specific problem is as follows:
Given two list of texts (in the order of 5 to 50 items)
Find best matching pairs with their corresponding matching score (weight)
Where each item can only be matched once with another item (from the other list)
While minimizing the calculation of the weights (Levenshtein edit distanc... |
Given a bipartite graph $(X\cup Y, E)$ with edge weights, it is easy to find a matching in which the product of weights is maximum: replace each edge weight with its logarithm, and find a matching in which the sum of weights is maximum.
Now, we would like to find a fractional matching which maximizes the product of val... |
I tried to figure out the proof of insertion operation in AVL-tree is O(log n), but I do not know how.
I also tried to find it somewhere on the Internet, but I could not find any good results. Do you guys have any ideas how do we proof that?
|
Given an undirected graph that is represented by its adjacency matrix, return whether or not is it possible to add no more than two edges to this graph in order to make all the degrees of nodes even. Keep in mind that in the resulting graph there should be at most one edge between any pair of nodes.
For
graph = [[false... |
$$L =\left \{ \langle M \rangle \mid \exists x\in \Sigma^* \left(\left | x \right |\leq 10000 \wedge H(M, x\right) \right \}$$
Where $H(M, x)$ denotes whether Turing machine $M$ halts on input $x$.
My guess is neither $R$ or $Re$ because I would have to run infinite TM's in order to find out if every TM halts on x or i... |
Let's say there's a single process performed in the machine which utilizes all available processors (whether physical or logical processors). The process use 100% processor utilization most of the time on all processors.
Which machine will perform better?
Machine with 2 cores, 1 thread per core (2 physical processors)... |
In the general case of an n bit booth multiplier, the maximum negative value is -2n-1. So with 4 bits we can represent -8 x -8 (M=1000, Q=1000). Now if we follow Booth's algorithm for multiplying n-bit numbers:
count
A
Q
Q-1
Operation
4
0000
1000
0
Initial Conditions
3
0000
0100
0
(00) Shift and decrement cou... |
Based on CLRS Theorem 4.1, master theorem doesn't apply to $T(n) = 4T(n/2) + n^2 \log n$. However, I saw the 4th condition of master theorem on slides of Bourke.
If $f(n)=\Theta(n^{\log_ba}\log^kn)$, then $T(n)=\Theta(n^{\log_ba}\log^{k+1}n)$. So $T(n)=3T(n/3)+n\log n$ can apply to case #2, see for example this questio... |
I'm stuck with nested for loops that are dependent on the previous loop:
for (i=1; i<=n; i++)
for (j=1; j<=i; j++)
x = x+1
the part that is confusing me is j<=i.
I'm trying to figure out the asymptotic running time.
|
Suppose P $\neq$ NP. Prove or disprove if language is in P using a reduction or an algorithm:
$$ \left\{ \left(G = (V,E), k, 0^{2^{|V|}} \right) \mid (G,k) \in VC \right\} $$
Suppose I have the this input $00000000$ I can construct a TM which calculates the number of vertices by applying log operation. So for this e... |
I implemented a hierarchical linkage algorithm for a set of 5,000 points. Each point is defined with a longitude and a latitude.
I read about this algorithm here.
These are the steps:
Compute distance matrix between all points (great-circle distance, not Euclidean)
Find the pair of points with the minimum distance bet... |
This is the formal definition of a minimum spanning tree taken from Algorithms by Dasgupta, Papadimitrious and U. Vazirani.
Input: An undirected graph $G = (V,E)$; edge weights $w_e$.
Output: A tree $T = (V,E')$, with $E' \subseteq E$, that minimizes
$$ \operatorname{weight}(T) = \sum_{e \in E'} w_e. $$
My confusion... |
So I have the following language:
C = {<G,w>|G is a CFG in Chomsky normal form and w has more than one parse tree in G}
How to prove that this language is in P (decidable in deterministic polynomial time)?
I tried to come up with a polynomial-time algorithm and tried to show a reduction to a different language in P, bu... |
This is a follow-up to a question that I recently posted here: Completing tasks on a graph. In that question, I posted the following:
Consider a graph $G = (V, E)$, where $V = \{0, 1, 2, \ldots, n\}$. The graph $G$ is complete, which means we can traverse $(i, j)$ for all $i, j \in V$. At each vertex $v \in V$, there i... |
I know this question may look stupid, but still..
Is the meaning of both "have no satisfiable assignment"?
|
I saw some proof but I didn't understood it, any simple one?
|
I don't know if this board would be an appropriate place for this question, but I have been trying to figure out how the divide-by-2 decimal to binary conversion trick works: in which you divide the number by 2, record its remainder and in the end write out the remainders in reverse to the get the final binary string. ... |
In a 2007 article, Russ Cox (at presents, he leads the development of the Go programming language at Google) argues that regex engines in languages like Java, Perl, PHP, Python, Ruby are built on a different theoretical framework from implementations like awk or sed. Cox claims a difference in performance between 60s a... |
I was reading Introduction to the Theory of Computation by Michael Sipser and I found the following paragraph quite interesting:
During the first half of the twentieth century, mathematicians such as Kurt
Godel, Alan Turing, and Alonzo Church discovered that certain basic problems ¨
cannot be solved by computers. One ... |
I am trying to determine how many bits the TI-83 Plus uses to store floating point numbers. I am using the algorithm for approximating the machine epsilon given in "Numerical Mathematics and Computing" by Cheney and Kincaid. In TI-BASIC, it looks like this:
: 1 -> E
: While (1+E) > 1
: E/2 -> E
: End
: Disp 2*E
The p... |
I am interested in proving lower bounds for AM-like languages. The usual techniques for lower bounds in non-probabilistic machines don't work for probabilistic machines.
Intuitively, when I think about showing lower bounds I usually think about showing for any algorithm $A$ some "bad input" that would contradict either... |
Alpha-beta pruning is an optimization for minimax that reduces the number of nodes visited without changing the final result. However, both minimax and alpha-beta only return the optimal node value (not the optimal node itself), which means that in practice, a programmer must implement a method for identifying which of... |
I am new to this forum as I want to explore data structures and algorithms in depth.
I want to know from experts here what books or other resources would be best for someone like me who can be considered just above a beginner as far as data structures and algorithms is concerned.
|
I am working on a load balancer that schedules tasks that communicate over network. I want to test its performance, but I'm struggling to find test data for it. Currently I try to extract relevant data from google-cluster 2019 (https://github.com/google/cluster-data), microsoft azure (https://github.com/Azure/AzurePubl... |
I understand that it's possible to build TM that check all the finite number of cases, so it's definitely in $R$, but I'm not sure why it's in $P$
|
I am working on a branch and bound problem and I was wondering if it is correct to prune the node with z = 21.667 and if so, how do we know that we will not get a better solution if we branch on this node?
|
I am studying about algorithm correctness and have enctountered this problem.
function add(y,z)
comment Return y + z, where y,z are natural numbers
x :=0; c:=0; d:=1;
while(y>0)v(z>0)v(c>0) do
a := y mod 2;
b := z mod 2;
if a XOR b XOR c then x := x+d;
c:= (a AND b) v (b AND c) v (a AND c);
d :=2d; ... |
I had this question in my exam. but my answer is wrong(I didn't receive explanations why...)
$$f(\langle M\rangle,1^n)=\left \{ \texttt{the lexicographically smallest } x\in\left \{ 0,1 \right \}^n \cap L(M) \texttt{ if } n>100\texttt{ and }L(M)\cap \left \{ 0,1 \right \}^n \neq\varnothing \texttt{, otherwise undefined... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.