instruction stringlengths 35 29.1k |
|---|
In my book it is written:
$$[[\text{while b do S}]] = \text{FIX F}$$, where $Fg = cond (\beta[[b]], g\circ [[S]], id). $
What is cond ?
$[[\text{if b then S1 else S2}]] = cond (\beta[[b]], [[S1]], [[S2]])$.
I don't understand why we should use $FIX$. What it is FIX ?
For me it is sufficient:
$S[[\text{while b do S}]... |
Here is a recent homework problem of mine:
Call graphs G and H isomorphic if the nodes of G may be reordered so
that it is identical to H. Let ISO = {⟨G,H⟩| G and H are isomorphic
graphs}. Show that ISO ∈ NP.
In order to solve this problem, I created a non-deterministic Turing machine that did the following:
Che... |
If you want to make good predictions with machine learning (supervised learning in particular), you need a good training set. And relevant predictors in your feature set can be overshadowed by irrelevant training data. Validation can help you to figure out what training data is good - you can then remove irrelevant inp... |
There's a famous theorem that every infinite Turing-recognizable language has an infinite decidable subset. The standard proof of this result works by constructing an enumerator for the Turing-recognizable language, then including the first enumerated string in the decidable language, then the first string that comes a... |
$B=\{\left<M_1,M_2,...,M_k\right>\text{ : Each $M_i$ is a DFA and
all of the $M_i$ accept some common string.} \}$
I'm trying to show that B is NP-complete. I know I have to reduce it to another NP-complete problem, but I'm having a lot of trouble coming up with the algorithm that decides B.
I was thinking I could kee... |
What does the following mean exactly for the potential method? Is this applicable to all situations?
If the potential is positive, then we overcharged for some operations.
If it is negative, we are undercharged.
|
$L = \left \{ \epsilon \right \}$
Clearly this language is finite so this must be a regular language.
Now since every regular language is Context Sensitive, $L$ is a CSL.
We can define the grammar for $L$ as :
$S\rightarrow \epsilon$
Now since $L$ is a CSL, this grammar must be a Context Sensitive Grammar.
But from th... |
I'm studying Bayesian networks and want to clarify a couple of things with people who are more knowledgable in the area than me.
As far as I understand it, a Bayesian network (BN) is a directed acyclic graph (DAG) that encodes conditional dependencies between random variables. The graph is drawn in such a way that the ... |
If $L_1$$\subseteq$ $\Sigma^*$, $L_2$$\subseteq$ $\Sigma^*$ , $L_1$ is regular and $L_1$$\cup$ $L_2$ = $\Sigma^*$ then is $L_2$ necessarily regular?
I think that the answer is yes, but I'm not sure on my proof.
The reason that I think that $L_2$ is regular is because surely $L_2$ just accepts all the words in the langu... |
Speaking about multiagent systems (MAS) is about as fuzzy as talking about artificial intelligence systems (AI). They are in essence the distributed counterpart of AI.
While there are no so-called "AI theorem", AI research had given rise to many subfields, algorithms and scores of theorems (e.g. game solving, fuzzy log... |
A yes answer to an NP problem must be deterministically verifiable in polynomial time. The complement is that the no answer must be similarly verifiable. If the problem is NP-complete, there will generally be an intractable number of possibilities. How can it be possible to deterministically verify the no answer for a... |
I was reading about deadlocks in Operating Systems. Where I came across two examples below.
Circles with label $P_x$ are processes. Squares with label $R_x$ are resources. Each dot in the square represents single instance of resource type $R_x$. An edge from $R_x$ to $P_x$ means an instance of resource $R_x$ is alloc... |
Here is a note about online set cover problem:
we are initially given the $m$ sets, but we do not know which elements they contain. At any time $t$, we get a new element $e_t$ and learn which sets contain $e_t$. We then have to irrevocably pick a set that will cover $e_t$ if it is not already covered. The goal is agai... |
Okay so I was reading about the Patriot Missile Software Bug, where to calculate the predicted range gate the missile system relied on the time keeping, however it would convert the whole/integer time number it stored (say 3600000) to 24 bit multiplying it by 1/10 (0.00011001100110011001100) to produce the time in real... |
Suppose we have a graph $G=(V,E)$ connected and $K_{1,3}$-free.
Sumner proved that every claw-free connected graph with an even number of vertices has a perfect matching (so, it is maximum matching).
Describe an algorithm to construct one matching of cardinality $|V|/2$ in $G$ in time compelxity $O(|V|+|E|)$.
I thought... |
I came across the following example that proves that the blank tape halting problem is not decidable.
I understand the proof technique, but I just don't see how the blank tape problem is shown to be undecidable in the proof.
It says $M_{w}$ starts with a blank tape but then writes $w$ onto the tape, so there is no dif... |
In Ladner's theorem, can we take $\mathsf{NPI}$ problems to be problems in $\mathsf{SUBEXP}\cap\mathsf{NP}$? Is this a proper subset?
Can we extend Ladner's theorem to interpret $\mathsf{SUBEXP/poly}\cap\mathsf{NP/poly}\neq\emptyset$ hold? Does proper extension of Ladner's theorem indicate an analogous proper subset in... |
I'm struggling with a problem in my theory of computation course that asks us to prove "QUESTION" is NP-complete by reduction from n-variable 3SAT. I've done a number of other similar reductions but I keep getting stumped on this particular problem.
We define a question as a string over the alphabet $\{0,1, ?\}$ and sa... |
Consider a complete bidirectional weighted graph. Weight of each edge (a,b) is the probability of getting from a to b. So all weights are in range (0,1]. Probability of going from a to b through the pass a-c-b is w(a,c)*w(c,b). So if I want to find the probability of getting to all the other nodes from a can I use mult... |
Does every pure function have a branchless equivalent?
By pure function I understand a function that uses only its input values and no global state to produce the output.
By branchless function I understand a function that does not use if/else during its execution. A loop contains a branch with and unconditional jump. ... |
I was going through the Ford-Fulkerson(FF) algorithm. The given graph is directed and there is an edge from A to B with capacity y. Now sending a flow of x units (x < y) from A to B is equivalent to sending -x units from B to A, so we add a back edge from B to A of capacity x units. And the FF algorithm can send a flow... |
Consider a $10^7$ bps link that is $400$ km long, with a queue large
enough to hold $2000$ packets.Assume that the packets arrive at the
queue with an average rate of $4000$ packets per second and that the
average packet length is $2000$ bits.Find the average number of
packets in the queue.
I am getting Avera... |
Let $s$ and $t$ be 2 vertices (not adjacent) in graph $G$.
Let $p_l(s,t;G)$ be the $maximum$ number of vertex-independent paths from $s$ to $t$ in graph $G$, of length $\le$ $l$ ($l \in \{1,...,|G|\}$). Also, let $k_l(s,t;G)$ be the $minimum$ cardinal of a set of vertices (different from $s$ and $t$), that if we remov... |
I came across the following theorem in Sipser's about incompressible strings.
Let $\;f$ be some computable function which holds for almost all strings. The for any $b > 0 $, the property $\;f$ is false only on finitely many strings that are incompressible by $b\;$.
where "almost all strings" means that as $n$ grows t... |
In this question, we see how to model boolean logic in $0 - 1$ ILPs. Moving to a relaxation, modelling $(x > 0 \vee y > 0) \Leftrightarrow z > 0$ with $x,y,z \in [0,1]$ with linear constraints is quite simple:
$$z \geq x\\
z \geq y\\
x+y \geq z$$
However, if I want to replace $\vee$ with $\wedge$ in that statement, I'm... |
I know this question is a bit redundant but I am trying to understand a subtle difference between Dijkstra Algorithm and Floyd-Warshall Algorithm. Can I say running Floyd-Warshall is equivalent to running Dijkstra on every vertex in the graph? In other word, Dijkstra will output the optimal path from a single source to... |
I was reading Structure and Interpretation of Computer Programs (SICP), MIT. What I have understood is that in pure functional programming language, there is no such thing as a local state. SICP, pg 230 says:
"Programming without any use of assignments, as we did throughout the last two chapters of this book, is accord... |
The other day someone mentioned to me that you could take an arbitrary digital circuit which mapped N input bits to M output bits, and replace it with a layer of OR gates and a layer of AND gates. I believe he said there would be 2^N ANDs and ORs each. I haven't been able to find any more information about this thoug... |
Carla. D. Savage formulated the following approximation algorithm for the vertex cover problem.
Given graph $G$, start at arbitrary node and traverse $G$ depth-first
Obtain DFS tree $T$
return $V_C =$ internal nodes of $T$.
Now I read everywhere that this algorithm is supposed to yield a 2-approximation, but the only... |
Consider the following problem: Given positive integers $a_1,\ldots,a_n,b_1,\ldots,b_n,A,B$, does there exist a subset $S$ of $\{1,\ldots,n\}$ such that $\sum_{i\in S}a_i\geq A$ and $\sum_{i \in S}b_i\leq B$?
Is this problem NP-hard? I'm thinking there is possibly a reduction from the subset-sum problem, but here there... |
Define an NFA with 4 states that is equivalant to the following Regular Expression. $(01 + 011 + 0111)^*$.
My main problem is that to check for a string of length 4 (0111) I need at least 5 states to begin with. So to my (novice) little brain the question seems wrong.
|
Assume there is a set {1,...,n} of person. For each person i, a set $A_i$ of items are available for exchange. A is the set of all items. The value of item j to person i is $v_{ij}$ and assume all values are positive integers. The question is, does there exist a pair of person who can both make profit by exchanging som... |
I came across this on Art of Computer Programming long time ago
Computer manufacturers of the 1960s estimated that more than 25 percent
of the running time on their computers was spent on sorting, when all their
customers were taken into account.
Is there any recent study about the estimated percentage that co... |
I have the following points, shapes, and paths. I would like to find a path that goes through all of them:
I want a path that first traverses the circle, then traverses the square, then traverses the star in the middle, in that order.
It's simple to go to the circle from the bottom left and around it, hitting each po... |
I have implemented in C++ the Needleman-Wunsch algorithm for pairwise sequence alignment using the following scores:
+1 for match (regardless of base)
-1 gap penalty
-1 for a mismatch.
Given two sequences of length $m$ and $n$ the algorithm then generates the $mn$ search space row by row as per the algorithm's specif... |
I am studying the algorithm of Sollin and we recently studied a lemma:
Let be G a graph which values are diffferent on the edges.
We sort the edges $e_1,e_2,...e_m$ such as $v(e_i)<v(e_j)$
Every tree of minimal value has at least $e_1$ et $e_2$
Proof
let be A a spanning tree which doesn't have $e_1$
$A\bigcup\{e_1\... |
Theorem:
Let be $G$ a weighted graph in which every edge has a different weight.
Suppose that $G$ has two spanning trees $A$ and $A'$.
Let be $i$ the first index such that $e_i\ne e'_i$ and $i\ge 3$.
Suppose that $w(e_i)<w(e'_i)$ and consider that $A' \cup \{e_i\}$ has a unique cycle.
For each edge of this cycle the... |
Hopefully this question makes sense. Basically, given a DAG, a set of nodes A, and another node b, I'd like to know if node b is an ancestor of any of the nodes in A in that graph.
This is my current implementation:
def is_ancestor(graph, A, b):
nodes_visited = set()
frontier = list(A)
while frontier:
... |
Considering a network of $n$ IT centers $1,...,n$ we can connect by lines which heve different characteristics. Among these charateristics, we take an interrest in the reliability of a line. Thus, let be the error rate $p_{ij}$ which represents the probability for a message channeled by a line tio be corrupted. We adm... |
We all know Random Access Machine (RAM) models are programmable machines. We can program a same machine for different problems with the help available instruction set. But in the case of Turing machines,we give full description of TM including transition table (which is equivalent to stored program in RAM model). So sh... |
A long time ago I read a newspaper article where a professor of some sort said that in the future we will be able to compress data to just two bits (or something like that).
This is of course not correct (and it could be that my memory of what he exactly stated is not correct). Understandably it would not be practical ... |
To give some perspective, first consider the following diagram comparing Markov Chains, HMMs, MDPs, and POMDPs (I'm not sure who to credit for it).
Fully observable Partially observable
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
| ... |
The Mersenne Twister is widely regarded as good. Heck, the CPython source says that it "is one of the most extensively tested generators in existence." But what does this mean? When asked to list properties of this generator, most of what I can offer is bad:
It's massive and inflexible (eg. no seeking or multiple stre... |
We're given a set of items $A=\{1,\dots,m\}$ and a set of people $B=\{1,\dots,n\}$. Each person has a preference ordering for the items in $A$. Each item in $A$ has a specific positive cost for each specific person in $B$: item $i$'s cost to person $j$ is $c_{ij}$.
For any non-empty subset $T \subseteq A$ of items, w... |
I know that a polynomial-time constant factor approximation algorithm for the general Traveling Salesman Problem does not exist unless P=NP. However, I want to prove that the TSP decision problem (is there a Hamiltonian cycle of graph with weight sum <= k?) is in P if we assume that there is an approximation algorithm ... |
I just wonder where the ROB is in.
Is ROB in the memory or cache or where??
|
I have found a algorithm to check whether a Hamiltonian Cycle Exists in the graph or not, but not able to compute/analyse it's time complexity.
The algorithm is as follows :
Label all the vertices with distinct prime numbers.
Label all edges with weight equal to 1.
Now remove one vertex at a time, while removing a ver... |
I am trying to understand static vs dynamic typing, but am really struggling to see how everything fits together.
It all starts with data types. As far as I understand, data types are quite abstract notions, which exist 'in' compilers in order to categorise data so that the operations on various types of data can be va... |
This is a question involving regular expressions for regular languages.
I am currently stuck trying to prove that the operand ∅ is not necessary unless the language is the empty set. That is, a regular expression is either equivalent to ∅ or is a ∅-free regular language. (A language is ∅ free if it contains no occurenc... |
As much I know about a memory and storing data there would always be a managing type feature in every memory which manages all the data and its location. So, what is the file system of a RAM. I also like to know the format or type (mp3, pdf, png, txt, jpg or binary) of data stored in.
|
The isomorphic induced subgraph problem, is the problem of deciding whether, given two graphs $G$ and $H$, $G$ contains an induced subgraph isomorphic to $H$.
Is there a proof using Courcelle's theorem, that this problem is fixed-parameter tractable when parameterized by $|H|$ and $\mathrm{tw}(G)$ (treewidth)?
|
when I write a program, in a Von Neumann architecture, how the ram will be divided to receive data and instructions? For example if I have 1 MB of ram, the addresses from 0 to 499.999 for data and from 500.000 to 999.999 for instructions? Or I could find instructions mixed with data? Is divided the entire memory for ex... |
I am wondering why data fragmentation is a problem on main memory.
On a software level, virtual addresses are used anyway. So why can one address space not be split up into multiple segments, like a hard disk might do? I don't see how the performance would be affected, as the time needed to access memory addresses does... |
Let the input be an array of $n$ elements, with $k$ sets $S_1,...,S_k$ such that each set has $\frac n k$ elements. The elements in each $S_i$ are larger than the elements in $S_{i-1}$.
Find an algorithm that sorts the input in $O(n\log (\frac n k ))$ runtime.
Find a lower bound for the minimal amount of comparisons ... |
Olin Shivers, ‘History of T’:
Maclisp on the [PDP]-10 had used a mark&sweep GC (one version of which famously "ran in the register set," though that is another story)
This implies, in my interpretation, that the garbage collector used no storage other than the registers of the machine. Is my understanding of this cor... |
I had an exercise: Describe the language generated by the following given context free grammar and prove it by induction.
$$\begin{align}
S &\to SA \mid \epsilon \\
A &\to aS \mid bA \mid b \\
\end{align}$$
I got this wrong on my test and my professor isn't explaining why. Just references the pdf notes he gave... |
I want to make this program below but I'm not sure how i would start them. Would i use methods with or without return? I have this due tomorrow and cannot figure it out. I've wrote the code multiple times but ended up deleteing it all.
Part 1:
Allow user to enter one character (L or S) and three integers betwee... |
I'm trying to find out what strings this NFA would accept. From what I understand, an empty string would work, as well as any string that has nothing but 0's. But for strings containing 1's, I'm a little unsure. It would seem that as long as any 1 in the string has a 0 on either side of it (ex. 0100 or 01010), it would... |
Give a finite state diagram for a DFA that accepts any word in the language $L = \{w \mid w \in \{a, b\}^* \text{ and }w \text{ alternates } a\text{'s and }b\text{’s and has an even number of }b\text{’s}\}$.
My attempt: I am having problem on how to deal with the even part of b.
|
If $f:\mathbb{N}\rightarrow\mathbb{N}$ is computable and has an inverse, under what conditions is $f^{-1}$ also computable? I couldn't find that in a textbook, and googling gets some vague suggestions about bijective, but I couldn't find a clearly stated theorem to that effect. Offhand, bijective seems sufficient but n... |
I know HAMPATH is NP complete problem. But is there a way to tell if it is either a NL or L problem? I tried searching a lot of places online but it feels like I am going nowhere.
Thanks in advance for any leads
|
Is there an NP complete language having no polytime decidable superset (apart from the set of all strings)?
|
I show from Wikipedia that the optimal number of hash functions is:
$k =\frac{m}{n}\ln{2}$.
However it's not obvious for me why, even after reading the Wikipedia article (such as the one on false positives). Anyone interested in explaining with simple words? :)
|
I saw here: http://www.cs.cmu.edu/~ninamf/ML11/lect0906.pdf
Intuitively, if “n” is large but most features are irrelevant (i.e. target is sparse but examples are dense), then Winnow is better because adding irrelevant features increases L2(X) but not L∞(X). On the other hand, if the target is dense and examples are spa... |
How does one prove L(G)=L if the language is not given and only the grammar G is given? If there is no pattern to be seen in the grammar that would create the strings w of a language L, how would you go about doing this?
|
The Naive way to reduce space complexity of Floyd-Warshall algorithm is consider only $d_{ij}^{(k)}$ and $d_{ij}^{(k-1)}$ in each time.
But in this case, we can't track actual shortest path with knowledge only two $d$ tables. It requires whole table.
There is a nice solution: Johnson's algorithm reduce both time and sp... |
I have already posted this question on the other page, but I was suggested to post it here as it might be more relevant.
I am currently following a course in concurrency theory and I am currently trying to prove that the Weak Bisimulation relation ≈ is an equivalence relation.
I have managed to prove cases for reflexi... |
Are there examples of regular languages $L_1$ and $L_2$, where $L_1$ and $L_2$ is not a subset of each other but that $(L_1 \cup L_2)^* = L_1^* \cup L_2^*$ ?
|
I have seen in many text when the author says "reasonable model of computation". What does it really mean?
|
I understand the concept that the CPU's machine code is what translates the binary input into commands, and then executes these commands, many billion times per second. I can understand how, given this concept, everything works -- breakneck calculations and a fantastically comprehensive codebook allow for advanced proc... |
How I would show: ∀x.(P (x) → Q(x)), ∃x.P (x) ⊢N ∃x.Q(x) using Natural Deduction?
Would I not need to know what P(x) and Q(x) are to prove soundness and completeness?
|
I have a real vector $v$. From this vector, I want to extract a sequence of integers, $ix$. The first integer is found by, $ix_0=argmax(v)$. 1 is then subtracted from $v_{ix_0}$, and the process is repeated until all elements of v are less than 0.
The following pseudo-Python function does this.
def countdown(v):
... |
The puzzle is made up of (n x n) squares so when taking the problem the input size would be n.
Rules of Masyu:
The goal is to draw a single continuous non-intersecting loop that properly passes through all circled cells. The loop must "enter" each cell it passes through from the center of one of its four sides and "e... |
I've been reading: https://en.wikipedia.org/wiki/Adjacency_list
It says that that graph can be constructed with the list $\{b, c\}, \{a, c\}, \{a, b\}$.
However, what if I wanted to construct a directional list? Does $\{b, c\}$ point to $b$ or $c$?
How can you use a list to represent a directional graph?
|
Sorry for long title - the question is a bit unwieldy. To state the question precisely, I'm wondering about the following proposition:
Let $\Sigma = \{0,1\}$. If $A$ and $B$ are Turing-recognizable and $A \cup B = \Sigma^*$, then there exists a Turing-decidable language $C$ such that $A \cap \overline{B} \subseteq C$ ... |
Graph $G$ is 2-connected. It means that for each two edges there are exists at least to disjont (in terms of edges) paths.
Graph $G$ is not directed.
Our task is to find spanning subgraph $H$ of graph $G=(V,E)$ such that $H = (V, F)$ such that $F=O(|V|)$ and $H$ is 2-connected.
So far I have came up with some idea... |
I'm studying the Approximation For Restricted Shortest Path Problem paper and don't understand what he is doing. In particular, I wonder why it is important that one computes upper and lower bounds $UB$ and $LB$ on $OPT$, so that their ratio is below some constant.
The problem is to find the least-cost path from nodes ... |
I am attempting to find the maximum value in a matrix (or 2d array) and want to find it in less than O(n) time. The easiest way, which results in O(n) run time, is an element wise search. If a better run time is possible, I would also like to find any values over a specific threshold in less than O(n) time. Is any of t... |
Connect 4 is a classical game in computer science. Recently I found a web game where one could play the game on a 3d board. One version can be found here
https://www.mathsisfun.com/games/connect3d.html
I know Connect 4 has been completed, and developed algorothms for solving it. Like the minmax strategy.
Algorithms f... |
I have an introductory class in computability theory and I'm currently working on my first exercises. I'm wondering if I'm on the right track with proving undecidable languages. Could you please have a look and give me some feedback?
I have the following decision problem and I want to show that it is not semi-decidable... |
We know that how much time a program needs is not computable.
Do we know how much memory a program needs is decidable?
|
Just a question for personal comprehension. Consider the following statement:
It is NP-hard to approximate Set-Cover within a $(1 - \epsilon) \log n$ factor for any $0 < \epsilon < 1$.
Now, NP-hardness refers to decision problems.So what is NP-Hard exactly here ?
My guess is that the statement is equivalent to sayin... |
In this paper,
http://www.vision.caltech.edu/malaa/publications/aly08realtime.pdf
the author mentioned "the vertical and horizontal focal lengths" but didn't have any clear definition.
My understanding about "focal length" is the distance between the lens and the image plane.
Does anyone have the idea about these focal... |
If $c\in \Sigma$ denotes terminals, then is $Y=\Sigma \setminus \{c\}$ the set of non-terminals?
These notations are used here, p. 379. But I cannot find their definitions.
So what I'm asking is, is the above a reasonable interpretation?
|
I have a faint notion of what NP hard is (that a problem is legit difficult 3 SAT for example).
I have forgotten what coNP hard, and Wikipedia tells me that the complement of coNP hard is NP hard...not really helping there
Can someone please clarify for me on an intuitive level what does it mean for a problem to be co... |
Why are multi-threading programs more prone to errors than single threaded programs ? or why is multi-threading programming one of the areas where developers are (more) prone to errors? Is this in general or is it valid only for scenarios where there are shared resources being used by multiple threads ? Are the difficu... |
The set packing problem is :
Given a universe $U$ and a family $S$ of subsets of $U$, a packing is a subfamily $C\subseteq S$ of sets such that all sets in $C$ are pairwise disjoint, and the size of the packing is $|C|$. The goal is to find the $C$ where $|C|$ is maximum.
According to Wikipedia, there exists a $\sqrt{|... |
I've seen the production rule $\stackrel{*}{\rightarrow}$ in some papers concerning regular languages.
What's the meaning of $\stackrel{*}{\rightarrow}$ production rule?
|
Given a word composed of opening and closing parentheses and brackets, we can do two operations:
Rotate a parentheses or bracket. That is, you can replace ( for ), ) for (, [ for ] and ] for [. This operation has cost 1
Replace a parentheses for a bracked and viceversa without changing its orientation. That is, change... |
Can you recommend an introduction to the topic of cut generating functions? I am looking for introductory or review-like material.
I did find the following survey paper, but it seems to be addressed to experts, so not what I'm looking for:
A geometric approach to cut-generating functions. Amitabh Basu, Michele Confor... |
What are some real world application for 2 stack pushdown automata, as i can only find pushdown automata applications in the internet
|
The following question appears in Section 4.9 of "Computational Geometry: Algorithms and Applications" By Mark de Berg, Marc van Kreveld, Mark Overmars, and Otfried Schwarzkopf:
Show that the problem of finding a center of rotation that allows us
to remove $P$ with a single rotation from its mold can be reduced to t... |
I have a band matrix -- a sparse, square, symmetric $N \times N$ matrix whose structure looks like the following:
Here, the area under the blue stripes is the non-zero elements; everything else is zero
Is there an algorithm to invert this kind of matrix that is simple yet more efficient than Gaussian elimination and L... |
I work in computational fluid dynamics. And I spend most of my time waiting for simulation to complete.
The common way to improve simulation performance is to use a suitable distributed linear algebra library, a big computer with Infiniband, tweek some parameters and hope for the best.
Most of my simulations can be s... |
I know that Big $O$ notation is used to describe the upper bound of running time of an algorithm, if we consider time complexity of that algorithm. However, I'm not sure why the following is not stated everytime anyone attempts to explain time complexity or Big $O$ - the fact we're looking for the least upper bound of ... |
Would much appreciate someone explaining how they managed to get to the upper bound of this algorithm.
$$T(n) = 2T(\lfloor \sqrt n\rfloor) + ln (n)$$
$$T(1) = 0$$
Solution is given as:
$$T(n) = O(logn*log(log(n)))$$
|
I use Moore's algorithm to minimize DFA as concluded below.
We start with the complete graph with vertices Q and edges E = { {p, q} | p = q ∈ Q }
We mark all edges {p, q} ∈ E with p ∈ F and q ∈ F
As long as there exist marked edges in E, we repeat the following procedure. We choose some marked edge {p , q } ∈ E. Then ... |
I have two questions regarding nullable nonterminals in a grammar. Often a simple algorithm is described to find nullable nonterminals:
Basis: if $A \rightarrow \epsilon$ is a production, $A$ is nullable.
Induction: if $A \rightarrow X_1X_2\ldots X_n$ is a production, and $X_1, X_2, \ldots, X_n$ are all nullable, the... |
Suppose I have a finite automaton to match a simple string "abc" and I built some software around it to not only match the start of a string or a full incoming string, but rather to search through a string and find the first match. As an example consider the string to be "12abcxxx".
The naive approach is to start with ... |
I am trying to teach myself how to write Context-free Grammar for different languages. I have an example language I am trying to work out and this is the answer I came up with, does it make sense?
the language is (i used an image because i don't know how to write out the powers on a mac):
This is my answer:
S --> rSjZ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.