instruction
stringlengths
35
29.1k
Say that there's a prime number P, And we can easily build an unary regular expression [E0]for every number that is divisible by P: E0::= (aaaa...a)*,with p "a", The question is, how do we build the opposite unary regular expression [E1], for every number that isn't divisible by P? Do I need to build the E1 by listi...
the partition problem (or number partitioning1) is the task of deciding whether a given multiset S of positive integers can be partitioned into two subsets S1 and S2 such that the sum of the numbers in S1 equals the sum of the numbers in S2. There is a greedy algorithm for this problem: One approach to the pro...
Interval Scheduling problems present several intervals that may overlap and the usual goal is to find the greater set of non overlapping intervals. Variations of the problem on wikipedia and such add groups/machines/resources. Groups are sets of intervals, the final result may only have one element of the each group. M...
Is there a decision problem with a time complexity of Ө(n²)? In other words, I'm looking for a decision problem for which the best known solution has been proven to have a lower bound of N². I thought about searching for the biggest number in matrix but the problem is that matrix is an input of O(n²) so the solution is...
There are numerous possibilities to implement a software mutex using only shared memory (e.g. Dekker's algorithm). Recently I've read the following from a paper "Wait-free Synchronization" by M. Herlihy: there exists no two-process consensus protocol using multireader/multiwriter atomic registers. And then the theore...
If I understand correctly, $\mathsf{NC}^0$ reductions are taken as the formalization of the concept of "local" reduction, i.e., a reduction that acts locally on substructures of the instances of the problem to be reduced: they map fixed-size "gadgets" of the source problem to fixed-size structures of the target problem...
I have had comparative algorithm exercise to do about algorithm propoerties such as completeness, time complexity, memory complexity... I discovered Iterative deepening depth-first search algorithm. On Wikipedia, it is said that it visits the nodes in the search tree in the same order as depth-first search, but the cum...
I've learned today that algorithm analysis differs based on computational model. It is something I've never thought about or heard of. An example given to me, that illustrated it further, by User @chi was: E.g. consider the task: given $(i,x_1 ,…,x_n )$ return $x_i$ . In RAM this can be solved in $O(1)$ s...
Assume a functional language and a specialization operation (pulling out sub-expressions): let f x y = (h 23 x) + (g 42 y) becomes (* h and g specialized, results might be mutually recursive *) let rec h_23 = ... g_42 ... and g_42 = ... h_23 ... in let f = (h_23 x) + (g_42 y) for reasons, that do not matter, a synta...
I have multiples arrays. I'd like to enumerate all sets containing exactly one item from each array in a (pseudo-)random order, without explicitly building the array of all sets. Any solution, even with poor pseudo-randomization, is welcome. EDIT: Example for clarity: Say I have arrays A = { a1, a2 }, B = { b1, b2 },...
This is a theoretical question about how gossip protocols work; I am not asking about any specific implementation or piece of software. I've read the wikipedia page https://en.wikipedia.org/wiki/Gossip_protocol on gossip protocols, and the idea seems like an excellent way to avoid having a master node in a cluster (say...
This question is homework based (not using actual problem though)! Say you have a function described as: $$f(n) \in O(2n^2) \, .$$ Can you then go on the treat this as: $$f(n) = 2n^2$$ and performs mathematics on it and keep its asymptotic meaning? In the above case could I conjecture that $f(n) \in O(2n^2)$ implies...
Given a triangulation (without Steiner points) of a simple polygon $P$, one can consider the dual of this triangulation, which is defined as follows. We create a vertex for every triangle in our triangulation, and we connect two vertices if the corresponding triangles share an edge. The dual graph is known to be a tree...
I have a scalar 3D field $f(x, y, z)$ with $x,y,z$ on a regular grid. I would like to know the location of the maxima, minima, saddle points and their relation as a function of a smoothing scale. For that, I'm convolving my field $f$ with a filtering function that is a Gaussian with a variance $\sigma$. I vary $\sigma$...
I am investigating metalogical-frameworks like Isabelle/Pure (very few information), http://twelf.org/wiki/Main_Page, http://abella-prover.org/ for encoding of new logics. And natural question arises - how far those frameworks are from universal logic? I am especially interested their capabilities to encode defeasible ...
I know the range of the $n$ digit numbers in $r$'s complement system is given as $r^{n-1}-1$ to 0 to $-r^{n-1}$. So for 3 bit 2's complement, its: $(2^2-1)$ to $0$ to $-(2^2)$ that is $3$ to $0$ to $-4$ that is $(011)_{\text{2's comp}}$ to $(0)_{\text{2's comp}}$ to $(100)_{\text{2's comp}}$ And for 3 digi...
Let's say that I wanted to build a key to value associative map where the only requirement was that lookup times were fast. Once built, the associative map would not allow inserts, deletes, or modifications, so is a static data structure. What would the best algorithm be for making and using such a thing? I'm intereste...
Let be $b$ the branching factor of the tree. Let be $d$ the depth of the shallowest solution. Let be $l$ the limit given to depth-limited search algorithm Why is depth-limited search algorithm memory complexity $\mathcal O(b)$ times something (which is actually $\mathcal O(bl)$) whereas BFS is $\mathcal O(b)$ power som...
Is there a processor architecture that falls outside the CISC and RISC categories? I'm vaguely familiar with RISC and CISC; my research thus far indicates that either a processor is RISC or CISC, with CISC comprising a large number of architecture types. From the wikipedia article about CISC: The term (CISC) was retro...
Been working on my homework and I've been stuck on a question for over a week now. Not really asking for a solution but if someone could point me towards the right direction that would be great, as I have literally no idea of how to go about this. A previous question asked us to show that for any DFA that accepts A, we...
I heard in a video that it can be proven that quantum circuits not involving entanglement can be efficiently simulated on a classical computer; i.e., that there is no point to building quantum circuits not involving entanglement. I have heard this referenced elsewhere in google searches, but nowhere can I find this pro...
I'm fairly new to heaps and am trying to wrap my head around why min and max heaps are represented as trees when a sorted array appears to both provide min / max properties by default. And a follow up: what is the advantage of dealing with the complexity of inserting into a heap given an algorithm like quick sort handl...
I am wondering what happens if you remove an object in the middle of a treemap. If the treemap would look something like this: So what would happen if you remove the number 30? Because 27 and 34 will disconnect from the tree.
How to decide whether the following statement is correct? O(E log E) and O(E log V) are equivalent regardless whether graph is dense or sparse
So I'm trying to split on an attribute "Color" that has possible values (Blue,Green,Red,Orange,Pink). I'm splitting on entropy values, and the best split can either be Multi-Way 5, Multi-Way 4, Multi-Way 3, or Binary. For example: 5: (Blue, Green,Red,Orange,Pink) 4: (Blue, Green), (Red), (Orange), (Pink) (Green,P...
As part of a college class, I'm asked to improve the performance of a basic DPLL sat solver. I'm already provided a basic, slow working version (essentially the DPLL algorithm; furthermore, to select the next variable, it just loops an array and gets the next unused one). I have been reading papers on ways to improve ...
I am unclear as to why the conditions for optimality for A* search are different for graph search and tree search. When discussing conditions for optimality for A* search in Russell and Norvig's Artificial Intelligence: A Modern Approach they say: The first condition we require for optimality is that $h(n)$ be an admi...
I am trying to understand the problem statement and the approximation algorithm for the Unique Coverage Problem from these notes. I have refined the question based on the comments provided. Thanks to D.W for pointing out Exact Cover problem. Given a universe $U = \{ e_1, e_2, \dots, e_n\}$ of n elements a...
A Dead-lock in an Operating System is Desirable process Undesirable process Definite waiting process All of the above My attempt: As "If a process is unable to change its state indefinitely because the resources requested by it are being used by another waiting process, then the system is said to be in a deadlock." ...
I came across an odd problem when writing an interpreter that (should) hooks to external programs/functions: Functions in 'C' and 'C++' can't hook variadic functions, e.g. I can't make a function that calls 'printf' with the exact same arguments that it got, and instead has to call an alternate version that take a vari...
A friend and I are asking some questions on Big O Notation. We have an operation that requires a sequential scan on insertion of an element O(n). The insertion itself of an element is O(1). We are inserting a whole set of n items. We both agree the time for insertion is O(n+1) or simply O(n) reduced. But, we have tw...
I am completely new to Analysis of Algorithms and I have to draw a Directed Acyclic Graph from the makefile below. (I know what a DAG is). My question is simple: should I do it just by watching the makefile or is there an algorithm I can use? All I want is to be oriented so I have a way to start. An additional question...
Is there a possibility to compute the result of an integer equality comparison by only using arithmetic or bitwise operations? Negative values use the two-complement representation. I am looking for a generic algorithm, which results in two possible values for equality and inequality but not using comparison operation...
I know that given a 2-Coloring instance we can easily convert it into a 2-Sat instance in polynomial time . Is the reverse possible? i.e given a 2-sat instance can we convert it into an 2-Coloring instance in poly time?
The master theorem is used with recurrences of the form T(n) = aT(n/b) + f(n) where a >=1 and b > 1, in which case the value of b can be easily seen from the recurrence, however I have a recurrence of the form T(n) = T((n/4)+3) + f(n) How do I get the value of b in this case? This question Particularly Tricky Recurren...
The following code should have a run time of $O(N)$, int min = INTEGER.MAX_VALUE; int max = INTEGER.MIN_VALUE; for (int x : array) { if (x < min) min = x; if (x > min) max = x; } but what about the following code? int min = INTEGER.MAX_VALUE; int max = INTEGER.MIN_VALUE; for (int x : array) { if (x < min...
I am currently working on a problem that is asking me to write the grammar productions for the try-catch-finally and throw C# statements. It states that "you can assume that there are nonterminals "Type", "Expression", and "Statement", as well as a terminal "Ident". I do not understand how this is possible using so few...
I keep hearing about how one must learn category theory to truly understand programming language theory. So far, I've learned a good deal of PL without ever stepping foot into the realm of categories. However, I figured it was time to take the leap to see what I had been missing. Unfortunately, none of the sources I ca...
I am simulating a system where the clients' unavailability is one big issue to the systems behavior. I gathered the real system logs to analyze the unavailability of the clients in the deployment environments and I computed the values for Mean Time Between Failure (MTBF) and Mean Time To Repair (MTTR). Now I want to si...
Recently I started my studies in type theory/type systems and Lambda Calculus. I have already read about Simple Typed Lambda Calculus in Church and Curry style. The last one is also known as Type Assignment system (TA). I'm thinking about the relations between TA and Hindley-Milner (HM), the system in languages like ML...
I need to implement data strucure such as array, but with the following interface: GetMin() - Returns the minimum from the array IncRight(index) - Increases all values from specified index to the end of the array by 2 DecRight(index) - Decreases all values from specified index to the end of the array by 2 Assuming th...
I have 2 search algorithms and I have derived the following tight bound representations: $$ nlog(n)+mlog(n) $$ $$ m∗n $$ Now i want to find a function $f(n)$ so that when $m$ is an element of tight bound $f(n)$, both algorithms have equal asymptotic run time. Now I'm not sure if its just as simple as setting the two eq...
Given sequence (length $N$) of brackets like $($ and $)$. The task is to implement data structure which supports following operations: Check whether the sequence is correctly bracketed Rotate bracket at position $i$ I dont want a solution, but some feedback if I am on a good way. There is no time complexity constrain...
the first 4 steps of these are my own work - however the following steps are from my book, and I don't understand what it's saying, and I have not found any resources. Could someone clarify this? Show C = {w|w has an equal number of 0s and 1s} is not regular. Show by contradiction. 1) Assume C is regular, and thus the ...
Often, in a lot of texts concerning approximation algorithms I see the following notation (for example, here in page 19 of the PDF or the first page of the introduction): ... and a cost function on vertices $c:V\to \mathbf{Q}^+$ ... Is this just the positive rationals? Or is this something else?
Assume that I have a picture of multiple objects (lets say more than 6). The world coordinate of these objects are known. The intrinsic parameters of the camera are also known. How can I find the position and the pose of the camera? I know some of you will give me an answer like "For each object with image coordinate x...
I'm looking for a way to find the shortest paths from a source to all destinations in isomorphic undirected graphs with different edge weights. The only thing I can think of is using Dijkstra on each graph separately, but I was wondering if there is a way to take advantage of the isomorphism for a faster algorithm.
I am trying to solve the TSP (Travelling Salesman Problem), but not in a traditional way. I am following these steps. 1) First I change the TSP to a true / false problem. The definition of this problem is now: "Is there a route by all the cities with a total distance less or equals than k?" Let's assume I have an alg...
I have recently learned about using powerset construction for conversion of NFA to DFA - however this only seems to be feasible when the number of states we are working with are 3 or less, as $2^k$ seems to grow unmanageable very quickly. I have a problem with 6 states, meaning that if I were to use powerset constructi...
Problem I stumbled over the following job scheduling problem. There are two resources, for simplicity I call them ... CPU_RAM (MAX_CPU_RAM specifies what is available in total) GPU_RAM (MAX_GPU_RAM specifies what is available in total) Each job has ... CPU_RAM requirements GPU_RAM requirements a duration, that is...
K-framework strives to give one (instead of two - operational and denotational) semantics for industrial programming languages. The same unification is done by structural operational semantic as well. Are those two frameworks related somehow? Such relation could be very frutiful, because K-framework has excellent tools...
My think is pretty easy that $10^{\log n} = n$, which is growing slower than $3n^2$. However, many tutorial shows that $3n^2$ ranks before $10^{\log n}$. I'm really confused.
I am trying to solve the following exercise from this book: Show that CLIQUE PROBLEM, parameterized by the solution size $k$, is Fixed-parameter tractable (FTP) on $r$-regular graphs for every fixed integer $r$. Here, the CLIQUE PROBLEM is given a instance $(G, k)$, decide whether $G$ has a clique of size $k$ or ...
I am trying to show whether this language is regular or not: $$L = \{0^m1^n \mid m \neq n\}$$ Since I cannot create or think of an automaton that recognizes $L$, I am suspecting that $L$ is not regular. From the book I am using, it seems I can use the pumping lemma, I have done this: Let $p$ be the pumping lemma const...
I think some of the log properties are flying over my head but I'm trying to understand how the depth of mergesort is... $1 + \log_2 n$ I understand that to get the depth, you would have to divide $n$ by $2^x$ but I don't how this leads to the above. It's probably some simple log principal but I'm not sure.
Problem statement can be found here or down below. The solution which I'm trying to understand can be found here or down below. Problem Statement. Peter wants to generate some prime numbers for his cryptosystem. Help him! Your task is to generate all prime numbers between two given numbers! Input The input begins with ...
Hi i have derived the following SoP (Sum of Products) expression , by analyzing the truth table of a 3 bit , binary to gray code converter. I ask for verification, because i feel as though this answer may not be correct or complete. X = a'bc' + a'bc + ab'c' + ab'c which, using k-maps, was simplified to X = ab' + a'...
I am trying to find Regular expression for a FSM with more than one final state(in my case 2). In this I am getting two different RE for state q4 and q5. So my question is If we get more than one different RE for one FSM with more than one final state, is it correct??
This looks like quite the challenge; given a pattern $P$ (of length $n$) and a string $S$ (of length $m$), how would you check whether the string matches the pattern? For instance: If $P$ = "xyx" and $S$ = "foobarfoo" then $S$ matches $P.$ If $P$ = "acca" and $S$ = "carbuscarbus" then $S$ does not match $P.$ My thou...
I was doing a type checking example in system f sub on paper to understand how it works. according to Pierce's book Types and Programming Languages, numbers and their types are following in system f sub. (see chapter 26.3, page 399) 1)top is universal type, 2)capital letters are type variables, small letters are...
I'm looking for books applying evolutionary theory to the history of programming languages. Researching the topic I have found an interesting paper - Modelling the Evolution of Programming Languages Any hints in this direction appreciated.
I'm trying to understand how to use a contradiction proof via the Pumping Lemma to prove a language is not regular. Everybody always uses examples like $\{ 0^n1^n | n>=0\}$, where it can be broken up into two parts $xy$ and $z$ and where these parts are different. How can I apply it to a language consisting of the conc...
Consider the following grammar: S->A. A->A+A|B++. B->y Check whether grammar is Ambiguous or not? Also ,unambiguate the grammar.Now please tell me what will be the grammar after removing the ambiguity. I have worked over here and i am able to draw two parse trees for the input string w=y+++y+++y++
I have this specification in GCL: $[Ctx C: n\geqslant 0\ \wedge\ b:[0..n-1]\ \text{of int}$ $\{Q:\text{True}\}$ $sum,i:=0,0;$ $\{\text{Invariant}\ P: 0\leqslant i \leqslant n\ \wedge sum=\sum_{j=0}^{i-1} b[j]\}$ $\{T:n-i\}$ $do\ i\neq n \rightarrow\ sum, i:=sum+b[i],i+1;\ od$ $\{R: sum=\sum_{j=0}^{n-1} b[j]\}$ $]$ But ...
Suppose I have a set of images that I will use for training. Just as an example take that I have pics of the same car in many different camera angles. I am required to identify the important features like the mirrors, the logo, may be some body features like curves, dents etc. These features have to be extracted from...
Question: You are given access to a multistory building. You have N eggs and are allowed D maximum drops from their window. Rules: If a egg is dropped from window of floor F and it breaks, it will break for all floors > F. If an egg is dropped from window of floor F and survives, it will survive for all floors < F. ...
I need an efficient algorithm with clear steps to compute $a^n \bmod p$ when $n$ is large enough and $p$ also. I'm looking for something equivalent to the built-in PowerMod function in Mathematica.
Are there any programming languages where algebraic data types can be expressed not only by using intersection and disjoint union but also a standard set union (intersection + disjoint union)? Do such types even make sense? If so, could you provide practical example of use?
I have a large array of mostly random numbers, with a few elements equal to each other. I need to change the array so that any elements that are equal are next to each other. Of course, sorting solves this problem but since I do not require the entire array to be in order I am assuming there are faster algorithms for t...
Consider the following well known flow-shop problem: We are given a set of jobs $J=\{J_1,\ldots,J_n\}$ and a set of resources $R=\{R_1,\ldots,R_m\}$. Each job $J_i$ consists of a set of operations $O^i=\{O_1^i,\ldots,O_p^i\}$. Each operation $O_k^i$ requires exactly one resource $R_k^i \in R$ for a time fixed time $t...
I realized that almost no one explained how to selected the type variable T1 Γ ⊢ e1 : T1 -> T , Γ ⊢ e2 : T1 -------------------------------- T-APP Γ ⊢ e1 e2 : T when doing type checking (from bottom to top). So, the question is how T1 is introduced? Is there any condition about T1?
Design a minimal DFA for the language which contains numbers in the form of binary strings starting with $101_2$ and is divisible by $100_{10}$? I think the numbers will be 700,1400,2100 ... in the form of binary strings which are starting with $101_2$ and are even divisible by $100_{10}$. 100 is divisible by 25 and 4....
Consider a finite state machine as usual, but every transition, it can also update an integer counter by adding or subtracting a number. Say, a transition function of the form $\delta(q,a) = (p,k)$ moves to the new state $p$, and add $k$ to the counter, where $k \in \mathbb{Z}$ (so $k$ can be positive, negative, or zer...
I just found out by luck that Abs(sum of differences of elements in a sorted array) = array.Max()-array.Min() For example, Consider a sorted array, {1 43 65 97 98 99 101} Abs(1-43-55-97-98-99-101)= 101-1 Does anyone know why? Thanks in Advance.
Hastad had in 1985 shown that PARITY(n) if it has to be evaluated by a depth$-d$ $AC^0$ circuit needs a size $\Theta(2^{n^{\frac{1}{d-1}}})$. But PARITY is in $NC^1$ and PARITY is also the negation of the MOD2 and hence this shows that the following inclusions are strict, $AC^0 \subset AC^0[2] \subset NC^1$. If I und...
From Ullman and Hopcroft's Introduction to automata theory, languages, and computation Consider the off-line Turing machine M of Fig. 12.1. M has a read-only input tape with endmarkers and k semi-infinite storage tapes. If for every input word of length n, M scans at most S(n) cells on any storage tape, then M i...
Are there some undecidable problems for which there are efficient heuristic algorithms, that succeed on a sufficiently large subset of inputs to be worth using? The one application that comes to mind is program static analysis: clearly undecidable (assuming infinite memory – I believe that it is PSPACE-complete if memo...
Given the formal language $L_1 = \{wcw | w\in \{a,b\}^+\} $ Does this definition requires $w$ to be exactly the same before and after the terminal character $c$ or can it be different? Example: Are $aabca$ or $abca$ accepted words of $L_1$, or only words like $aabcaab$ or $aca$?
What is induction-induction? The resources I found are: the HoTT book, at the end of chapter 5.7. nLab's article a paper called Inductive-inductive definitions this blog post also mentions inductive-inductive types The first two references are too brief for me, and the latter two are too technical. Can anyone explain...
All the proofs I've seen about the Ω(nlgn) lower-bound for comparison sorts use binary decision tress like this (from CLRS textbook) Now what if each comparison yields strictly 3 outcomes, i.e. <, =, >? (the input array is allowed to contain repeated elements) The bound is probably still Ω(nlgn), but I'm not sure how ...
I just want to make sure I understand what this means. I am new to Formal Languages and this is my first week of courses. Suppose we have two regular languages, $L_1$ and $L_2$, with a common alphabet. The union of $L_1, L_2$ is $\{x:x∈L_1∨x∈L_2\}$ Does this mean that, for any string $s \in L_1$, we also have $s \in ...
I have a list of ranges ai , bi. And I have many queries in the form of a range c, d, which asks how many ranges ( ai, bi‌ ) are completely inside c, d. c <= ai & bi <= d There are so many of these queries. So I want to know if there is an algorithm that answer each query in a time complexity that is better than O(n)....
After i read this question here. All non-trivial examples of lower bounds always mention sorting, but i do not find other non-trivial examples, which do not rely (partly) on the sorting proof. What are other non-trivial examples?
The following is Church-Turing Thesis from two books. Is it correct that The first book seems to say that the Turing machines involved in the thesis may or may not halt on a given input, the second book says that the Turing machines involved in the thesis must halt on all the inputs? Do the two books contradict each ...
I have the below homework question as an assignment of my Computer Science Foundation class. Throwing eggs from a building. Suppose that you have an N story building, and plenty of eggs. Suppose also that an egg is broken if it's thrown off floor F or higher, and intact otherwise. First devise a strategy to determine...
From Ullman and Hopcroft's Introduction to Automata Theory, Language, and Computation 1ed 1979: The assumption that the intuitive notion of "computable function" can be identified with the class of partial recursive functions is known as Church's hypothesis or the Church-Turing thesis. A problem whose language ...
Firstly it is my understanding that the complement of a problem is simply the "reverse" question. So the complement of "Is the sky blue?" would be "Is the sky not blue?". Is my understanding correct? If so, how can a complement ever be more or less complex than the original problem? Please include the simplest example ...
I'm interested in knowing things about the computability of concurrent programs. If you had a Turing complete language that also let you branch off new programs but had no means of communication between them there would be programs that you couldn't write. Namely those that required communication between concurrently r...
From wiki, "a chord graph is one in which all cycles of four or more has a chord." My first question is if a graph is acyclic, i.e., there is no cycle in the graph, can it be called as a chord graph? Another question is about elimination ordering in chordal bipartite graph. It is well known that in a chordal bipartite ...
If the TCP segment does not contain the destination IP in its header, how does the(first) network layer decide the first link to traverse, to get closer to the destination IP. I have learnt that the network layer prepares a header that has the source and destination IP, adds it to the TCP segment to make the IP packet....
Given that $L_1$ is decidable language. That means it has a TM ($M_1$) decider. Now we consider a language, $L_p$; $$L_p = \left \{ \langle M \rangle \mid L(M) \text{ is reducible to } L(M_1) \right \}$$ $L_p$ consists of all the encodings of the Turing machines whose language is reducible to $L_1$. What can we say ...
I'm writting a compiler implementation for a language that you can see defined here. I having problems designing how the do keyword should be handled. You can find the code I'm referring to in here. Let me delve a little bit into the problem. According to the documentation: The do keyword is used to call an expressio...
Most disk-based system's performance heavily depends on its disk access patterns. So maximizing the sequential I/Os while avoiding the random I/Os is a typical goal in performance perspective. I am working on the same problem. I have some difficulties in measuring the degree of randomness of Disk I/Os. I can measure t...
In a recent lecture the professor stated that given two complexity classes A and B, and given the existance of an oracle O such that $$A^o=B^o$$ (As I understand, meaning that a problem in A with can be reduced to a problem in B with the oracle O), It can be shown that classes A and B can not be seperated using a diago...
Is Quantified Boolean Formula (QBF) the same as First-order logic (FOL)?
We are given a system with $n$ nodes which have been arranged into the topology of a hypercube of $m$ dimensions. I would like to derive a tight bound on the maximum number of Byzantine failures that can be tolerated in this system. One upper-bound that I have derived on the number of failures $f$ is from the fact that...
I know that if a language has a regular expression it is regular, is the other way also true?
Background I am currently taking an Algorithm and Analysis course and doing some extra studying on my own from the text book. This is not a homework question or exercise even. I am just trying to understand completely how the authors are doing the combining of terms in the time/cost equation for Insertion-Sort. I under...
I have been studying search problems in AI, and I am having some troubles understanding some points in these concepts: State Space: "represents the environment of the problem, the set of all states reachable from the initial state." Search Graph: "the nodes are states and the arcs between nodes are actions" Search Tr...
Given this sample: $$\begin{array}{|c|c|c|} \hline X1 & X2 (Kg/m^2) & \text{Class} \\ \hline 8 & 4 & A \\ \hline 4 & 5 & B \\ \hline 4 & 6 & B \\ \hline 7 & 7 & A \\ \hline 5 & 6 & B \\ \hline 6 & 5 & A \\ \hline \end{array}$$ we then calculate each of Euclidean distance values to the row: with P = (7, 4) $$\begin{arra...