instruction
stringlengths
35
29.1k
I have two DFAs one for language A and one for language B. I'm asked to make an FDA that is the zig-zag concatenation of letters of A and letters of B. This is described by the following: {w: w = $a_1 b_1$...$a_k b_k$ and $a_1...a_k \in A$ and $b_1 ... b_k \in B$}. With $1 \leq i \leq k$ and $a_i \in \Sigma$ and $b_i \...
I have simple graph G on 10 vertices the degree of each vertex is 8. I need to determine the chromatic number of G. I tried drawing and all but it seems there is a trick needs to be used.
While trying to analyse the runtime of an algorithm, I arrive to a recurrence of the following type : $$\begin{cases} T(n) = \Theta(1), & \text{for small enough $n$;}\\ T(n) \leq T(a_n n + h(n)) + T((1-a_n)n+h(n)) + f(n), & \text{for larger $n$.} \end{cases}$$ Where: $a_n$ is unknown and can depend on $n$ but is b...
Let us consider the following Context-Free Grammar G = ({S,A,B,C,D},{a, b}, S, P) with production rules P: S → SSA | Bb A → BSA B → A | Cb C → AD | Cb | ɛ D → a | b | ɛ Let L be the language produced by G. Design a single state Pushdown Automaton that accepts L. Indicate the relevant functions of transitions and draw t...
Here is an excerpt from Andrew S. Tanenbaum, Computer Networks, 5th edition, Chapter 3 (The data link layer), Page 213: When the polynomial code method is employed, the sender and receiver must agree upon a generator polynomial, $G(x)$, in advance. Both the high- and low-order bits of the generator must be $1$. To com...
I need to implement a system that can schedule and dispatch periodic jobs and needs to support a very high load (millions of jobs per second). Each job in the system has a period that is some multiple of 15 seconds, with the maximum allowed period being 1 day. The system needs to support adding new jobs and removing /...
I have a problem that I need to solve, and I'm looking for which area of computer science (algorithms. etc) would be appropriate to solve this problem. In the system we have a list of actions that a user has previously taken. The possible actions are: User creates item of type A. User creates item of type B. User crea...
I'm trying to understand arithmetic using stacks. Specifically converting infix notation to postfix notation. My question is how you convert an expression like: 1 + (2 + 3) + (4 + 5) that computes in the exact order that the order of operations says. Meaning: 1 + (2 + 3) + (4 + 5) becomes 1 + 5 + (4 + 5) then 1 + 5 + 9...
The question is inspired by the following UVa problem: https://onlinejudge.org/index.php?option=onlinejudge&Itemid=99999999&category=18&page=show_problem&problem=1628. A network of autonomous, battery-powered, data acquisition stations has been installed to monitor the climate in the region of Amazon. An order-dispatc...
I am trying to understand the difference of assignment, binding, and substitution. I know the three things are related, but to me it's not exactly clear what word refers to what. Example, illustration, and citations from computer science wiki/articles/textbooks are welcome.
Assume we have a number of transducers with limited information processing capabilities. Are there theoretical results (proofs) on how these transducers can be combined by some sort of communication into one joint transducer to reach a maximum of information processing capabilities? Does this work for universal transdu...
I would like to try some different proofs, specifically in proving equivalence of the implementation of some feature in two different programming languages (C and JS in this question). This is about proving that replacing one character in a string is equivalent in C and JS. In JS, for example, strings are immutable, wh...
I need to determine all the trees on 25 vertices for which there exists an integer m ≥ 2, such that the degree of each vertex gives the same remainder when divided by m. Can somebody help ?
For a given graph $G=(V,E)$ and a given weight function $W$ lets say we define the new weight for path p to be the regular weight minus the heaviest edge in that path, i.e: $w^*(p)=\varSigma(w(v_i,v_{i+1}) -max\{w(v_i,v_{i+1})) | 1\leq i \leq k$} The complexity needs to be $O(V+E\log V)$. Obviously i thought about dijk...
A Bloom filter is a probabilistic data structure that allows encoding sets with false positives. Parameterized by the number of bits $m$ in the array $A$ (initialized to zeros), and number of hash functions $k$, an insertion of an item $x$ corresponds to setting $A[h_i(x)]=1$ for $i=1,\ldots,k$. Similarly, for testing...
I have an image with gray-scale anti-aliased text produced by Chromium and need to convert this into pure binary black and white text. Applying a simple binary threshold pass over the image causes artifacts, either missing edges or weird protrusions and text being too bold depending on the chosen threshold. Below an e...
I just started reading a book on theoretical computer science and here are a couple of beginner questions about graphs, which I am struggling to answer: Given the graph with the matrix representation \begin{bmatrix}0&0&1&1\\0&0&1&1\\0&1&0&1\\0&0&0&0\\\end{bmatrix} what is its shortest possible unambiguous represe...
I was going through "Discrete Mathematics and its Application" by Kenneth Rosen where I came across the following algorithm of the Insertion Sort and also its analysis. The algorithm is quite different from the one dealt with in the CLRS so I have shared the entire algorithm below. Note that they have considered a mach...
I have a large set of half-planes $a_ix+b_iy + c_i \geq 0$. What I need is is the fastest way to determine if they have at least one common point. Currently I build a convex polygon by adding half-planes sequentially, there are $O(n^2)$ checks if a point belongs to a half-plane. I need an algorithm that does $O(n \log ...
It's sort of similar to bin packing, but instead of the minimum amount of bins,I was interested in just one infinite bin and finding out what's the smallest height you could get when you start packing items there. I was thinking about this because of RCPSP, in case anyone's interested. I already have an algorithm to so...
In Dexter C. Kozen - Theory of Computation (2006, Springer) page 319 exercise 127 he says : "A set of total recursive functions is recursively enumerable (r.e.) if there exists an r.e. set of indices representing all and only functions in the set. For example, the complexity class P is r.e., because we can represent it...
I have the following question: Let $G = (V,E)$ be a directed graph with a weight function $w:E\rightarrow \mathbb{R}^+$, and let $s \in V$ be a vertex such that there is a path from $v$ to every other vertex, i.e $0\leq dist(s,v) < \infty$. Let $f\colon V \to \mathbb R$ a given function. Describe an algorithm that run...
Disclaimer: I'm not a compiler expert, but some of my best friends are! :) I do a lot of embedded systems programming where stack (and other memory) is limited. Most of my code is written in gcc, so I thought nested functions could be useful for reducing stack usage. Here's an example of what I had in mind: (Though ...
Classical DFS: A set of tasks with precedence constraints (saying “u must be done before v”) are given. This problem can be represented by a directed graph. We assume that the graph is acyclic. A DFS is usually used to find an ordering of the tasks that satisfies all of the precedence constraints, classical DFS algorit...
Show by induction that any solution to a recurrence of the form $ T(n) \le 2T(n/3) + c\log_3 n $ is $O(n\log_3 n)$. Hoping someone can help me with the correct solution. I attempted two ways to get the solution (but I think that they're both incorrect): SOLUTION A \begin{align} T(n) &\le 2T(n/3) + c \log_3 n \\ &\...
I'm studying about UFLP using the book The Design of Approximation Algorithms Ch 9 starting page 233 (there is an electronic free edition), I ran into some unclear steps in the book and need some help with it. In few words the UFLF deals with finding a subset of facilities from a given set of potential facility locatio...
I have this assignement that asks to say if the following statement is true or false, and possibly justifying the answer: "Let L₁, L₂ be decidable languages. For every language L s.t. L₁ ⊆ L ⊆ L₂, L is decidable too My first idea was to use the Halting Problem Language as L and show that is not decidable to prove the ...
This is not a technical question, I hope this community has a room for such questions, but I will delete it in case this is inappropriate. It has been experimentally observed (e.g. here) that when choosing a $3$-SAT formula by the following process: On input $(n, \alpha n)$: choose $\alpha n$ clauses uniformly at rand...
E.g. when proving $L = \{w \in \{a,b\}^*:$ the first, the middle, and the last characters of w are identical$\}$, can i just prove $ab^{p}ab^{p}a$ is not regular? Where $p$ is the pumping length?
I have a task to determine the upper bound of states in the Minimal Deterministic Finite Automata that recognizes the language: $ L(A_1) \backslash L(A_2) $, where $ A_1 $ is a Deterministic Finite Automata (DFA) with $n$ states and $A_2$ is Non-deterministic Finite Automata (NFA) with $m$ states. The way I am trying t...
Fix some finite graph $G = (V, E)$, and some vertex $x$. Suppose I generate a random sub-tree of $G$ of size $N$, containing $x$, as follows: Let $T_0 = \{ x \}$. For $0 < n \leqslant N$ i. Let $B_n$ be the set of neighbors of $T_{n-1}$ outside of $T_{n-1}$. ii. Form $T_n$ by Sample a pair $(x_n, y_n) \in E(G) \cap...
We can always convert our GNF-CFG/CNF-CFG to a two-state PDA but i'm wondering when our PDA is non-deterministic? i'm sure we can not make DPDA for non-Deterministic-CFL , and i suspect that same rule which applied for differing between DCFG and non-Deterministic-CFG also applied here. i mean when we have non-Determini...
Suppose i have the following resource allocation graph with a deadlock cycle, i see why it is a deadlock cycle, what i don't get is how to recover from this cycle i'm thinking about aborting a process, any process here will lead to non-deadlock situation, but doesn't that cause the other process to not execute and hen...
Let us -- using parameters $M, N$ and $L$ -- create an ordered set of size $M$ of $N$-bit long vectors $V$ and initialize them randomly: $V_k[i] = b \sim Bin(n=1, p=0.5)\ \forall i \in \{0\ ..\ N-1\}, \forall k \in \{0\ ..\ M-1\}$. create an N-bit long vector $A_0$ and initialize it to ones. create an $M$-bit long ...
$L = \{w \in \{a,b\}^*\mid \text{the first, the middle, and the last characters of $w$ are identical}\}$. I have my answers, but I need confirmation: Is the empty string $\epsilon \in L$? Yes. Reason: there is no first, middle, or last character to break the rule. A word of even length, assuming the first and last char...
How would you choose the second hash function with for double hashing with string as key? My first hash function is the scalar product of a random int array with the 16 bit number of each character. Is that a good first hash function? And what should I do for the second function now?
Given a set of students $H$ of size $n$, and a set $E \subseteq H \times H $ of pairs of students that dislike each other, we want to determine whether it's possible to divide them into $4$ groups such that: no two students that dislike each other end up in the same group, the size of each group must be at least $\fr...
I am trying to design a CFG that generates the language $\{a^k b^m a^n a^k \mid m \leq n\}$. However, I am having trouble with the $b^m a^n$ where $m \leq n$. How do I solve this?
Am reading a text about computability theory, and according to the text, at each level $k$ of the arithmetical hierarchy, we have two sets, $\Sigma_k$ and $\Pi_k$, where $\Pi_k$ is defined as: $$ \Pi_k=co-\Sigma_k $$ So that for $k=0$, we have the class of decidable sets and $\Sigma_0=\Pi_0$, and for $k=1$, we have $\S...
We are given $2n - 1$ boxes with a total of $B$ black and $W$ white balls. In the $i$-th, box there are $w_i$ white and $b_i$ black balls. It is required to choose $n$ boxes so that, the sum of the white balls is at least $W/2$, and the sum of black balls is at least $B/2$. Solve for $O(n\log{n})$. What I am curre...
I am working on an algorithm that has multiple fixed parameters. The algorithm analyzes time series data and spits out a number. The fixed parameters need to be such that this number is as small as possible. What I found, is that when optimizing the parameters for a specific time period, these parameters don't necessar...
Consider binary integer programming problem with n variables. I think the branch and cut algorithm takes exponential memory. What are existing algorithms without much memory? Please suggest.
Just to understand the topic a little bit better, I would like to know if there is a difference between real-time systems and real-time operating systems. I know that a real-time system is a system for processes that have to meet deadlines and fulfill real-time requirements. If a deadline isn't met, it can lead to dras...
I am trying to calculate the number of iterations of a sequence of nested loops of the form: \begin{equation} N = \sum_{j=0}^{j_T} \sum_{k=0}^{j} \sum_{l=0}^{k} \sum_{n=n_0}^{n_T} 1 \end{equation} where $j_T\ge 0$ and $n_T\ge 0$ are known constants. For $n_0 = 0$ the case is trivial and can be calculated using the stan...
Why is this true: “There are countably many Turing Machines” In the top answer for this question a description of how to enumerate all Turing machines is given. It all is clear except for one part: how do you know if a string is a valid encoding of a Turing machine? In step 3 the algorithm needs to check if a string i...
I have this Fortran code which generates a flat distribution as it produces a single random number centered on 0. The function GRNDM (Geant 4 random number generator) produces equally distributed random numbers between the values of 0 and 1. RDUMMY is the name of the vector filled with the random number and the argume...
I am unable to reason if we can construct a complete binary tree if only one of the following 3 traversals is given: pre-order, post-order, in-order. The following is the definition of a complete binary tree: A complete binary tree is a binary tree in which every level, except possibly the last, is completely filled, ...
Given be a binary tree whose elements printed in-order results in [1,2,3,4]. Q1: How many different binary-trees do exist? Q2: How many different complete binary-trees do exist? Q3: How many different full binary-trees do exist? For Q1 I was able to find a solution, by using the catalan number formula: c(n) = (2n)! /...
Pt 1. Given as input the tuple: (word (from an r.e. language we fix), natural number)--does there exist a verifier, that runs faster than simply enumerating that language, that can accept if the word is in the position of the natural number in an enumeration by an enumerator, and reject if it is not (choosing any enume...
I have learned the Master's Theorem from the CLRS textbook (2nd Edition), the form of the Master Theorem given in the above text is associated with the proof of each and every case. So at the end I know how it works and it also explains the intuition behind the same. The form of Master Theorem given in CLRS is as follo...
I have N (~100M) points in 2D and M (~10k) non-overlapping axis-parallel rectangles. I'm looking for an algorithm to assign each point to a rectangle it is contained in (or say that it is outside of any rectangle). I'm looking for a solution that works faster than bruteforce. In 1D, it is achievable in N * log(M) usin...
Let's say I have a directed graph represented as an adjacency matrix, and I'm given two nodes $u,v$ and a parameter $k$. Let's also say that the maximal degree of a node in the graph is $d$. What is the most efficient algorithm to find all paths of length $<=k$ from $u$ to $v$? I know the number of such paths can be ca...
There is a question in my exam that said: Consider the following three processors (x, y, and z) that are all of varying areas. Assume that the single-thread performance of a core increases with the square root of its area. Processor X, core area = A Processor Y, core area = 4A Processor Z, core area = 16A You are...
I was trying to develop an algorithm for maximum capacity problem with constraints but couldn't figure out the necessary changes required for correct output. The problem is: Given an undirected graph with two parameters (weight,cost). We need to find the Maximum Capacity path problem from source to destination such tha...
I am trying to design a context-free grammar that generates the language { x in {a,b}* | the length of x is odd and its middle symbol is a b }. This is really confusing me, I'm having trouble with making sure that b is always in the middle. Any help?
I have to determine the time complexity of a recursive enumeration in the problem of finding n-tuples $(k_i, ..., k_n)$ of naturals greater than 1 with product less or equal to $K$. Problem can be formally expressed as: $$\begin{align}0<\prod_{i=1}^nk_i\leqslant K\in\Bbb N,\ k_i \in \Bbb N^{+}\setminus\{1\}&\ \forall ...
I have a graph G=(V,E). A list of nodes NODE subset of V. I want to find out all the neighbor nodes of each node in NODE and add edge if those neighbors have distance greater than 2. Can anyone here please help me to reduce the time complexity of this code to quadratic time or less. import networkx as nx import random ...
Please help prove the following statement: There exists a single-valued computable enumeration of the family of computably enumerable sets. Definitions: 1) Let $S$ be nonempty countable set (possibly finite). Any surjective map $\nu\colon \omega \twoheadrightarrow S$ from the set $\omega$ of natural numbers onto the...
For the multiplication of two $n$ digit numbers, the best known algorithm has complexity $O(n \log n)$. Has it been proven that this is the best possible, or that an algorithm $O(n)$ is not possible?
I was wondering if it were possible to modify the linux assembler in order to change the function of "-" to "+" and vice versa. I was also wondering if this would affect the whole system making it collapse. I apologize if this question is not appropriate here. Please explain why if it is the case. E.g: 2+2 = 0 2-2 = 4 ...
A parameterized problem is a subset $L \subseteq \Sigma^* \times \mathbb N$, where $\Sigma$ is a finite alphabet. A parameterized problem is fixed parameter tractable, if it could be decided in time $f(k)|x|^{O(1)}$ for some $(x,k) \in L$. In terms of the problem definition, a Turing machine for $L$ has access to the p...
I'm trying to understand how the number of intersected areas by a vertical line in a KD-tree is equivalent to sqrt(n) If you draw a balanced KD-tree with 7 nodes. And then draw a vertical line l. The number of areas this line intersects should be equivalent to sqrt(N) where N is amount of nodes. (7) When I count th...
So I'm learning coq. And I came across the proof for associativity in addition forall (a b c : nat) Appearntly when we do induction a. after intros a b c., it creates 2 subgoals and afterwards we simply need to show that the two sides in both subgoals are equivalent, and the proof is completed. So I'm just wondering...
Assume I have a graph representing the control flow and the call graph of a given program. I also have a first and a second statement. I now want to figure out if it is possible to execute both statements (in order) within the same program execution. Control Flow Graph: I have a graph with all the statements of the pro...
How to solve recursion $T(n)=T(n/2)+T(n/3)+n$? I do not really know how to approach this kind of recurrence.
I came across the following interview question There are 2N people a company is planning to interview. The cost of flying the i-th person to city A is costs[i][0], and the cost of flying the i-th person to city B is costs[i][1]. Return the minimum cost to fly every person to a city such that exactly N people arr...
I faced a problem. What is the proof to say that if yx is in a Context-Free Language we can say that xy is also in a context-free language. C is a Context-Free Language. I think we can use the PDA defining C and edit final states. Any ideas? thank you.
This is indeed a Computer Science Question. As far as I am concerned casting down (up) does not require any mathematical operation. It is just shrinking down (leveraging) the significant bits. e.g Long: 0x00000000ffffffff casts down to Int: 0xffffffff However, this does not work with the representation of double and ...
I have a question of understanding about the Delta Rule: $\Delta w_i = (y - \hat{y}) \times x_i$ Why does $x$ have to be multiplied again after the difference? If the input is $0$, the product of $w$ and $x$ remains $0$ anyway. Then, it should not matter if the weight changes with an input of $0$. Let us take the follo...
The student project allocation problem I am trying to solve goes as follows. There is a set $S$ of students and $P$ of projects such that $|S| \leq |P|$. Each student makes a top $3$ of their preferred projects. Each student should be allocated to exactly one project. Each project has a maximum number of students whic...
Given: A list of slots (A, B, C, ...) Every slots supports a list of choices (C0, C1, C2, C3...) Every choice has a value All slots must be filled with at most n different choices. The sum of the values should be maximized. Example: Choice-Values: C0 = 4 C1 = 3 C2 = 2 C3 = 1 Slots: A: C1, C3 B: C0, C1, C3 C: C...
If we have the language $nHALT=\{<M,w,n>;$ $M$ halts on input $w$ in less than $n$ steps$\}$ Is this language also undecidable in the same way that $HALT$ is undecidable? And if so, $nHALT\notin P$, right?
Consider the language $L$ of rectangular matrices written down as a comma separated list of integers where each list represents a row of the matrix and rows are separated by a semicolon. There may be an arbitrary number of rows, but each row must contain the same number of integers. For example: $[3, 5, 6; 8, 9, 10; 7,...
I am trying to find in the literature how to solve the following problem: Suppose we have a list of $n$ jobs. Some of the jobs should be scheduled after other jobs (i.e., job a should be done after job b), other jobs need to be mutually exclusive (i.e., job c cannot be done concurrently with job e). Each job $i$ has a ...
Does there exist a coding language where 1. It is always possible to determine whether a computer program will halt or run forever. And 2. The answer is not always yes. (or always no) So languages that don't allow loops, even if finite are right out.
I wonder if all the linear languages are in NL? I was thinking that we can take an input-language $L$ and convert it to linear normal form. If this is not possible, the machine rejects. If the language can be written in linear normal form, the machine accepts. The work tape only needs to store the current production, ...
I am struggling to answer these two questions: Prove or wrong: Both are given the assumption that NP != coNP. For any 2 decision problems S, S', if there is a Cook reduction from S' to S then there exists a Cook reduction from S' complement to S complement. The class NP intersection coNP is closed under Cook reduction...
There is $n$ lists (of integers) of the same length. I want to find the zeros global intersections of those lists. Example: $A = [4,6,3,0,7,0,0,0,1,0,0]$ $B = [6,6,7,1,7,0,0,0,4,0,0]$ $C = [2,4,7,0,7,0,0,0,3,0,0]$ The output are the position of those intersections: The positions are $5, 6, 7, 9$ and $10$ Other...
We all know this classic problem, "there is some hidden number and you have to interactively guess it.", which could be solved using binary search when we know that maximum number that we can guess. But what if the interactor may lie to us in one case? For example, the number is $3$ and the maximum number we can guess...
I have implemented genetic algorithm for a problem where I have an objective function which I need to minimize: Cost = ax + by + cz -> min The genetic algorithm should have found the optimal solution if objective function is satisfied. The function will never reach 0 or below, so I just need to minimize it. Now, since...
I am interested in finding the rows of a matrix where all entries are equal to zeros except for one. Example: Given the following matrix: \begin{bmatrix}0 &0 &3 & 8\\ 0 & 4 & 0 & 0 \\ 0 &1 & 0 & 1\end{bmatrix} Only the second line has this property. Of course, the brute force way is to go over the entries and check ...
We are given the following letters with the respective frequencies: \begin{equation*}\begin{matrix}a/2 & b/4 & c/7 & d/6 & e/4 & f/5 & g/8 & h/10 & i/3 & j/11\end{matrix}\end{equation*} For that I have applied the Huffman code and I got the following tree: Now it is asked for the total weight of the code. How do we ca...
knowing that Moore's law states that is the observation that the number of transistors in a dense integrated circuit (IC) doubles about every two years. is it worth looking for more algorithms?
I have a set path of $N$ destinations to be visited in order, knowing the distance $D_i$ between each one of them. I can traverse one node $i$ with the cost of $D_i \times r$ or traverse any $5$ nodes in order with a set cost of $B$. How can I find the most cost effective way to visit all the destinations using dynamic...
I want to know if there is some optimized method (constant complexity preferred) to obtain the quotient when the dividend and the divisor contain the same number of digits. I know about algorithm D of "The Art of Computer Programming" but there Knuth describes how to find quotient digit when the dividend is $n+1$ in le...
For instance, consider L = {k : the binary expansion of sqrt(2) contains k consecutive 1s}. Obviously Rice Theorem would not work. I also tried the method of how it is to PCP undecidable but still no luck. How to prove that this is undecidable?
there's this small part of my homework that I just can't figure out. Let us denote $p(L)$ as the minimum pumping length of some language $L$. I'm supposed to find two regular languages $A,B$ so that $$ p(AB)=p(A)+p(B) $$ But whatever I try, I can only find languages so that $$ p(AB) < p(A)+p(B) $$ I've been sitting at ...
Normally I put the question before the context, but in this case I want to admit the possibility that the context and my understanding nullify the question. Plus it helps me think through my question. I recently started reading Category Theory for Programmers (Bartosz Milewski), and this is my understanding of categori...
Suppose a new, more complicated, instruction is desired for this simple pipelined MIPS processor. Suppose, also, it could be implemented by either (a) adding new logic to the execute stage of the pipeline, or (b) adding a new stage (i.e a 6th stage) altogether. Assume that choice (a) would slow the execute sta...
Given a sorted array of integers and a target integer, find the number of occurrences of the target integer. It is well-known that a binary search has time complexity $O(\lg n) $ where $n$ is the size of the array. For example, given an array $[1,2,3,3,4,5]$ and a target $3,$ the algorithm should return $2$ since t...
How to trigger a thread to start working using semaphore? I have find a lot of explanation about thread and semaphore but i still don't understand, any help please
I am a new graduate student in Computer Science who would like to be able to read and understand modern and new distributed systems research papers. My current background / courses and understanding is in the level of undergraduate and beginner graduate level courses in: Networks (TCP/IP stack and applications) Distri...
I am interested in how computers work but I have no idea how the concept of 0's and 1's converts to making possible for people to control a computer by programming. I would like to understand from very fundamental levels of computer and continue studying more in depth until I am satisfied. Where should I start? Is ther...
If we start with the definition of L being in NP if "there exists a polynomial NTM that decides L" (where polynomial for an NTM means the length of the worst run as a function of the size/length of the input / the maximal tree depth) There is a proof that L is in NP iff there exists a polynomial TM verifier for L. Rega...
I am solving a discrete Markov chain problem. For this I need a Markov chain whose stationary distribution is uniform(or near to uniform distribution) and transition probability matrix is asymmetric. [ Markov chains like Metropolis hasting has uniform stationary distribution but transition probability matrix is symmet...
Question There are plenty of algorithms for solving the #SAT problem, with one being the DPLL algorithm and is implemented for all kinds of programming languages. As far as I've seen, they all take a boolean formula on CNF as input and outputs the number of satisfied interpretations. Mathematical constraints, on the ot...
I recently read about the process address space and PCB and trying to link them together. I don't find much literature on their relation. Is the process address space a part of the PCB data structure?
I have this question: I have an undirected graph G(V, E) (where V = set of vertices, E = set of edges). Consider the maximum path between two vertices s and t: LPATH = {⟨G,s,t,k⟩|There is in G a simple path as long as at least k from s to t} A simple path is a path without any repeated vertice, i.e. every vertice can ...
What would be the practical consequences of ZPP=exptime. It would be pretty ridiculous if the was true but what if it was?
i need to prove that and i find it struggle: given: for deciding problem S: a non deterministic algorithm $A(x)$ is strong deciding algorithm if: $x \in S =>$ fo every run of $A(x)$ returns "Yes" or "Maybe", and there exist run which $A(x)$ returns "Yes" $x \notin S =>$ for every run of $A(x)$ returns "No" or "Maybe",...