instruction
stringlengths
35
29.1k
If Q1 and Q2 are countably enumerable, then is Q1\Q2 countably enumerable? I am reading a text where they claim that this is not the case and ask the reader to come up with a counter example. Can someone give a counter example to the claim that if both Q1 and Q2 are c.e. then so is Q1\Q2? Since H is semi-decidable and ...
I came across this question while solving past papers and I'm not very sure as to how to construct my proof for the second and third question. I understand the concept that can be applied here would be that the lower bound for any sorting via comparisons based algorithm is always $n\log n$. It would be impractical to ...
I am having much trouble understanding the following definition (of certificate complexity - for decision trees) from Arora and Barak's book Computational Complexity: A Modern Approach. Perhaps there is a typo in it: Definition 12.3 (page 262). Let $f : \{0,1\}^n \to \{0, 1\}$, and $x \in \{0,1\}^n$. A 0-certificate f...
I have some sources of data, and each one of this sources have a cost per request. I know wich data attributes each one of these sources have, and what are the best sources for each attribute. Given a list of attributes, I have to decide the best group of datasources to consume, thinking about Quality of the data first...
The following problem is from my algorithms class: Given a graph $G=(V, E)$, decide whether a partition of $V=(V_1, V_2)$ exists such that $\delta(G(V_1))\ge 2 $ and $\delta(G(V_2))\ge 3 $, where $G(V_1)$ denotes the subgraph induced by $V_1$ and $\delta(G(V_1))$ denotes the minimum degree of graph $G(V_1)$. Prove thi...
The following problem is from my algorithms class: Given a graph $G(V, E)$, a set $C \subseteq V$ is called a biclique iff $G[C]$ is a complete bipartite graph, where $G(C)$ is the subgraph induced by $C$. A biclique is called maximal if it is not a subset of a larger biclique. Then our problem asks whether there exi...
A directed acyclic graph $G$ is confluent, if any two vertices ${v_1},{v_2}$ in $G$ which have a common ancestor $u$ also have a common successor $w$. (I.e. if there are paths from some $u$ to both ${v_1}$ and ${v_2}$, then there are also paths from ${v_1}$ and ${v_2}$ to some $w$. Vertices $u,{v_1},{v_2}$ and...
So, while trying to dive into "recursion" and the like, I came across an epigram about recursion by Alan Perlis: Recursion is the root of computation since it trades description for time. -- Alan Perlis Common to epigrams, this sounds like a deep insight. But I've already got stuck on "root of computation" and in wh...
I was reading an article on fleury's algorithm GeeksforGeeks. In fleury's algorithm, Once an edge is processed (included in Euler tour), we remove it from the graph. To remove the edge, we replace the vertex entry with -1 in adjacency list. Note that simply deleting the node may not work as the code is recursive and a...
I was trying to implement a Binary Search Tree using this article as a reference: Binary Search Tree in JavaScript. I was thinking especially about the node insertion method. Here's my implementation: class BinaryTree { // ... initialization add(val) { if(this.root === null) { this.root = new Node(val); ...
Let $M$ be a Turing machine, $\Sigma$ an alphabet, $t \in \mathbb{N}$ $L = \{ w \in \Sigma^* : w$ is accepted by $M$ by at most $t$ steps$\}$ I want to show that $L$ is regular. My attempt: I'm trying to do this directly by constructing a DFA for $L$. Let $M = (Q, \Sigma, \Gamma, \delta, q_0, q_{accept}, q_{reject})$ D...
Let $L = \{ a^{2^n} \mid n \ge 0 \}$, which is a non-regular language (no proof here). Let $M = (\Sigma,Q,\delta,z_0,F)$ be a DFA with $\Sigma = \{a\}$, $Q = \{z_0\}$, $\delta(z_0, a) = z_0$ and $F = \{z_0\}$. Then the DFA should accept $L$ and $L$ is therefore regular. Why is my approach wrong?
How would a priority queue be coded efficiently in a functional programming language? I'm new to functional programming, but I'm having difficulty understanding how a data structure that seems to require mutability would be coded in a functional programming language, or how to take advantage of lazy evaluation to pull ...
This is graph G: I am required to find as much as 15 induced subgraphs, but so far I only found 3. Which are: a-b-d-e, b-c-e-f and a-b-c-e. I was wondering if a-d-e-f would also be counted as an induced subgraph and other of this similar arrangement.
i have read about SYN cookies and i understood that they help to avoid DOS .. BUt my prof wants an answer as how SYN cookies can be used to cause DOS and how can it be avoided ? any help woul dbe really appreciated.. thanks in advance
Given a directed graph $G=(V,E)$, we know that there are efficient algorithms (i.e., linear in the number of nodes and edges) for detecting cycles in it. But this uses the fact that a basic task such as determining whether there is a vertex from $v_1$ to $v_2$ is easy. Suppose, however, that the size of $G$ (i.e., the ...
There are various methods to detect hamiltonian path in a graph. Brute force approach. i.e. considering all permutations T(n)=O(n*n!) Backtracking T(n)=O(n!) Using Dynamic programming T(n)=O(2^n * n^2) Now, there is one another method using topological sort. Topological sort has an interesting property: that if all p...
I am curios how simon's algorithm works and I have read this post Simple explanation of Simon's Problem but still is not clear for me. I have found on th internet this example https://www.cs.vu.nl/~tcs/ac/ac-11_simon_algorithm.pdf. Can somebody explain how are calculated the value of Simon's algorithm? If we take the a...
Suppose that $L$ is a language. What does $\overline{L}^*$ signify? Is $\overline{L^*}$ the same as $(\overline{L})^*$?
Having the current news about Google Assistant in mind, I thought that robots might use interfaces designed for humans to send data. Like a telephone interface. Then I wondered: What is the maximum amount of data you can send in 1 minute when you have to use a "normal" voice setup? Setting 1 One machine encodes the da...
I'm wondering what the correct term for an algorithm that is probabilistically complete is. An algorithm is probabilistically complete if the probability of finding a solution, should a solution exist, approaches one as the runtime goes to infinity. A motion planner such as PRM will eventually find a solution if one ex...
I've been trying to understand computer concepts and such recently and I've been curious to know how the process works of a processor asking for an address and sending the bits to the hard drive, as well as how the hard drive index works when it's just a bunch of magnetic specs that cooperate with a mechanical arm. Wha...
I think that it implies that B can be solved by a non-deterministic polynomial time or worse Turing machine, but I realise that there is possibly some greater result that I'm missing. Thanks in advance.
Define a regular expression such that there is a string of 1 or more a's continuous followed by a continuous string of b's so that the number of a's and b's are the same. I have ideas on how i would do this with a context-free grammar but i don't know how to so this under the restriction of a regular grammar.
The question is based on if we have the same Priority value when we are given: Arrival Time = AT, Priority and Burst Time=BT. 1.Say if we a table with AT, Priority and BT. To dispatch a process it is obvious that we check the AT first since we cannot predict the future. 2.If AT= 0 for all processes, we have to chec...
Version 1 of the question: I am looking for any correct $O(n)$ algorithm in the literature which will solve the DFA minimization problem referred to in the quote below from [Almeida & Zeitoun 2008]. Whether the algorithm works on strings or automata doesn't matter. Version 2 of the question: What is the classical algor...
When doing variable elimination on a formula in cnf form, there is created a lot of new clauses. Is there any efficient way to check if these are subsumed by other, already existing clauses?
I'm reading this article on a GCD algorithm described by Dijkstra: https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EWD316.4.html I'm looking at program 1. In particular I'm trying to understand the proof that the loop terminates. Here is program 1 (my notation is slightly different than the one in the arti...
I'm studying computer science and I want to show that a language which is accepted by a pushdown automaton with a bounded stack height is regular, but I'm totally lost... Can someone try to explain how we can prove it ? Thank you in advance!
I understand than function decreases exponentially, then order of growth of this function is exponential with negative exponent. But what does it mean that order of growth decreases exponentially? I don't understand what should i look for in this exercise: Exercise 2.33 Find a recurrence describing a sequence for whic...
So far, i've only made recursive formulas for finding simple patterns such as fibonacci, however i can't seem to get my head around this. The information available is that there are $n$ different beers with different prices, the $i$th beer has a price $p_i$. Students have $C$ amount of money How would you make a recur...
I want to create a function which allows me to input a list, and then add all of the positive numbers from the list together, leaving any that are negative. ([3,1,-1]) For example only 3 and 1 would be added from this list. Would I right in thinking the function should be recursive and have a guard?
I want to produce a value from a set, where each value has an associated weight. Eg: [(1, 4), (2, 3), (3, 3)] should give me a 40% chance of picking 1, and a 30% chance of picking 2 or 3 respectively. Using a cumulative sum table and binary searching on it yields the value I want in O(logN) where N is the number of v...
I'm searching to devise an algorithm that finds a set of n time intervals with a random duration between min and max. On top of that, the total duration is also given (tot). For example: n = 15 min = 30 s max = 90 s tot = 15 minutes means: "Find 15 time intervals, each of a duration between 30 and 90 seconds, which, ...
There is a grammar G given: S->XaX X->aX|bX|eps I just replied to the first question that was about showing that this grammar is ambiguous. The second question is to find an unambiguous equivalent grammar of this grammar given. I don't really know how to do ...
Here's a nice property about unit-disk-graphs : Suppose $V\subseteq\mathbb{R}^2$ is a finite set of points in the plane. Build the graph $G_V=(V,E)$ such that $(v,v')\in E$ iff $d(v,v')\le2$, where $d$ denotes the euclidian distance. $G_V$ is the unit-disk-graph associated to $V$. Unit-disk-graphs and planar graphs ...
Give an algorithm that, given an NFA over a one-letter alphabet, determines whether the language it generates has the property that for some $n$, $$ L^* = \bigcup_{k=0}^n L^k. $$ I need some tips how to solve that.
I got a little confused with these 3 concepts. Is there a difference between bisimulation and bisimulation equivalence and if yes, then what is it? Also, if we say that the LTS's X and Y are bisimilar, this implies they are simulation equivalent, right? Please, someone, clarify.
I have some signals that look like following: I would like to remove the two peaks by doing linear interpolation, so I can get something like this: where the orange line segment should replace the two peaks after the interpolation. I understand this very difficult because even for human being you can do it different...
A system consists of two separate algorithms (operated in pipeline). Algorithm#1 is iterated m times and has a time complexity of O(m). Algorithm#2 is iterated N times with time complexity O(N). The output of Algorithm#1 is the input of Algorithm#2. Hence, when Algorithm#1 is fully run (m times), Algorithm#2 is started...
I'm currently studying the time complexity of the solution provided by my teacher to this problem, and I can't understand the logic: Let A be an unordered array of positive natural numbers. Write an algorithm that checks if it's possible to divide A into pairs (subsets of two elements) of equal sum. Example [1 7 4 2 4...
I am trying to understand a Haskell class declaration and instance from a paper. I am trying to understand the class declaration: class (Surfaces v o, Paths a b (v o)) => Vehicles v o a b My current understanding is that the first occurance of types "v o" in the Vehicles context seems to refer to two distinct data typ...
A partial computable function $\varphi_e$, defined on a c.e. set $W_e$, is called extendible if there exists some computable function $f$ which extends $\varphi_e$, i.e. $\varphi_e(W_e) = f(W_e)$. My question is what are the conditions for a p.c. function $\varphi_e$ to have an injective extension. So far I have found ...
A problem in $P$ is one that can be solved in polynomial time (or faster) on a deterministic Turing machine. Now if I am correct, there is nothing here referring to the algorithms - which can themselves can be given a complexity class (necessarily greater or equal to that or the problem). My question is: Are there any ...
I am trying to solve a variant of the Exact cover problem where every element has to be covered exactly twice instead of once ( i.e. has to be in exactly two sets that are part of the cover). Now, it is clear to me that this is an NP-complete problem, but I wish to know if there is any hope for some pseudo-polynomial t...
I am studying various multi-threading models. Here the user threads are mapped to Kernel Threads. They are - Many to one model. Many to many model. one to one model.` What kept me wondering was why there is no one to many model ?
The definitions of 2NF, 3NF and BCNF goes like this: 2 Normal Form (NF) definition A relation is in second normal form if and only if it is in first normal form and all the non-key attributes are fully functionally dependent on the candidate key. 3 NF - definition A relation schema $R$ is in third normal form...
I am working on this exercise with the purpose of learning how to provide proper proofs and I would like to know if my proof for the following problem is correct. Given a sorted array $A$ (of $n$ distinct elements) and three elements $x$, $y$, and $z$, where $x < y < z$. The problem is to determine whether $x$, $y$, a...
E -> E + E | E * E | (E) | a Derivation for ( (a+a) * a) Question : Show that the grammar is ambiguous by sparse tree method Now, I have derived two derivation using left most derivation but it results in like this 1st : ((a+a) * a) 2nd : (a * (a+a)) is this correct or the order should also be same?
The title might be hard to understand, here's a picture of what I don't understand: And further, why can we conclude this? I thought about posting to theoretical CS stackexchange but it asks for research level and I don't think this will be accepted
Consider the setting of finite MDPs. I will be using the notation in Chapter 2 of http://rll.berkeley.edu/deeprlcourse/docs/ng-thesis.pdf. Say we have already computed values for the optimal $Q$-function: $Q^*(s, a) = \max\limits_{\pi} Q^\pi(s, a)$. Why exactly does $\pi(s) = \arg\max\limits_{a \in A} Q^*(s, a)$ consti...
Suppose a computer using direct mapped cache has 512KB of main memory and a cache of 4 Bytes, where each cache size is 64KB. 1)Find Number of blocks in cache.
Func5(n) 1 s=0; 2 i=6; 3 while (i < n^(5/2)) do 4 j=4; 5 while (j < 5i) do 6 s=s + i - j; 7 j=j + 9 ; 8 end 9 i=4 * i ; 10 end 11 return (s); So far I got the upper bound for this function is O(n^(5/2)log(n)) and I am not sure if or not this is the closest upper bound we can get. And I have ...
T (n) = T (n/2) + 2^n I am solving this using master theorem and I calculated it to be big theta(log2 n) (log n to the base 2). But answer state it to be 2^n. Any help would be appreciated.
As reading the textbook of Introduction to the theory of computation_third edition - Michael Sipser, which have the concept that we call a context-free language L inherently unambiguous if there does not exist an ambiguous CFG that generates L. Do we have any CFLs are inherently unambiguous? if so, can you please give...
We have regular expression for DFA and NFA, at the same time, we have CFG for PDAs, What do we have for Turing Machine? If this questions is too obvious, please points me some reading, I am just learning Introduction to the theory of computation_third edition - Michael Sipser myself.
I've searched this and was not able to understand the answer. What's the idea/intuition behind this? What's the purpose and why is it important? And considering the wikipedia explaination, specifically this part: outputs the binary (or unary) representation of f(n), while using only O(f(n)) space Why does it matter ...
I have this assignment for a class and we're beginning to learn time complexity. I have to find create a Java program that finds the stability indices of an array. Stability index being defined as a[0] + a[1] + ... a[i-1] = a[i+1] + a[i+2]+ ... a[n-1]. Essentially if you sum every element left of the index and every el...
I am interested in the applications for set covering. On Wikipedia and this thread, I read that it is used in antivirus programs, random testing in software, and personnel scheduling. Does anyone know where to find or access set covering benchmarks that represent those problems (or any other problem for that matter)? M...
I have this algorithm, which is exactly like merge-sort, but instead of halving the array each recursion, it actually splits it into $1/4$ and $3/4$ parts. Other then that, it does exactly the same operation as merge-sort. The thing is, I can't understand the exact way to calculate a closed form solution to my recursiv...
Lets say I have two type expressions: Maybe a (X) and Maybe Integer (Y), where Maybe is a type constructor, Integer is a Type and a is a type variable. What language should I use to describe the relationship between these expressions, and type expressions in general? I've been using the language of sets: X describes a...
We are solving a system of equations $f(x)=0$, including non-linear equations and piecewise linear equations. The space is subdivided to polyhedral pieces (cells), in every of them the equations from the second group are simply linear and there is $C^0$-continuous connection of the equations between the cells. From the...
My motivations for asking this question are philosophical in nature. I'm by no means a computer scientist though, and I feel as though this question should be answered by someone who is since it's one thing to read about a subject second hand and another to understand it first hand. I'm an A-level student of philosophy...
In learning about proof theory, I am interested to know how to go about "proving properties of a program". I don't exactly see yet what needs to be proven, nor how to prove it, which leads to this brief discussion followed by some questions. In some languages (such as TLA+), the program is the specification (I think). ...
Consider a DB with a large set of numbers, like hashcash tokens, where new numbers are constantly added(spent). Only numbers that has not been already added can be accepted. Is there a functional way to do this by some sequential operation on the numbers, so that only a single number X is needed to verify that a new n...
I'm currently studying some of the history of computation / computability, in the early days known as recursion theory. I see Goedel's definition of recursive functions seems significant in his paper, and Church uses his own definition of recursive functions (in particular, primitive recursive functions). Wikipedia tal...
An four-bit carry-look-ahead adder for computing the sum of 2 numbers , where A and B are integers represented in 2's complement form. If the decimal value of A is 3, the decimal value of B that leads to the longest value for the sum to stabilize is __________________ I know adder is used for adding two numbers and car...
I'm assisting with the design of an algorithm over the next week to fit the following use case: A person walking in a store has a tablet and approaches possible customers to notify them of a competition. When a customer enters their details, upon completion of the form - a request is sent to the server, and the custome...
Kindly suggest what would be the loop invariant in the following algorithm ( I need it for the purpose of proving the partial correctness of the algorithm). MinDistance(A[0...n-1]) dmin <- ∞ for i = 0 to n-1 do for j= 0 to n-1 do if i ≠ j and |A[i] - A[j]| < dmin dmin <-|A[i] - A[j]| return dmin another...
first post on this amazing community, always been a lurker, so I'm sry if my formatting sucks. I'm having a really hard time trying to solve this problem: Given m graphs each composed of the same n vertexes, find all the pairs of equal graphs(not isomorphic). OBLIGATION: it is possible to elaborate an algorith that do...
In Union-Find with link-by-rank but no path compression find a sequence of operations Make-Set, Find, Union of length $m$, containing $n$ Make-Set operations, and with time complexity in $\Omega(m\log n)$. My idea was to spawn $n$ nodes with $n$ Make-Set operations and then create a "tree" with $\log n$ height out of t...
The condition of the problem and the statement of the problem: Alice pays Bob for the fact that he, at the request of users, gives out files of interest to users. For example, the user is interested in the file #hash1. The user learns from Alice that this file is stored by Bob. The user connects to Bob and asks to star...
The question is in title. Let me repeat: What are the number of states in NFA and DFA accepting strings from length 0 to n with alphabet $\Sigma = {0,1}$ I feel both NFA and DFA will take following form: and thus both have $n+1$ states. Am I correct with this? Or the DFA needs to take following form? I feel its not...
Well, this sounds somewhat basic definitions, but I feel they needs to be clearly defined. In book by Hopcroft et. al., there is an excerpt: ...a dead state, that is, a nonaccepting state that goes to itself on every possible input symbol... In book by Peter Linz, there is an excerpt: ...the automaton finds itself i...
I can access some information about the files ("created" or "last edited") on my PC. But where are those information actually stored? Are they stored by the operation system? Could be possible as if I transfer a file with FTP to an other PC, it has new timestamps for those information. Or are they stored in the beginni...
I'm having a tough time convincing myself right when coming up for some solutions to medium/hard leetcode.com problems. Take the following question for example. Given a string S, check if the letters can be rearranged so that two characters that are adjacent to each other are not the same. If possible, output any poss...
I'm studying about time complexity of Kruskal's algorithm. But there are two opinions to express time complexity as $O(|E|\lg|E|), O(|E|\lg|V|)$. I know $O(|E|\lg|E|)$ is occurred from sorting by non-decreasing order of vertices. But I don't understand of $O(|E|\lg|V|)$. This answer explains by $|E|\le|V|^2$, however f...
I have an online homework assignment that is asking me for the tag and index in a direct-mapped cache, for a series of memory addresses. The cache is specified to have 16 one word blocks. One of the first memory addresses given is 134. My attempt goes as follows: 134 = 10000110 16 = 2^4 so, I get that: index = 1000011...
Let's say that there is a tower of blocks labelled from top to bottom $1$ to $n$. Somebody comes along and removes a block and reinserts it somewhere in the tower (making space as needed). As they move these blocks one at a time, they write down in order which index they moved a block to (index starting at 1). For exam...
Certain idealizations of a Turing machine yield an increase in computational power, such as an inductive Turing machine, which can (trivially) solve the halting problem if it has an infinite amount of time to run. A related variation is the "type-2 Turing machine" defined by Weihrauch, which (if I understand correctly)...
We know about calculability of a function or computability. We looks for the ability to solve a specific problem / compute a function with calculus method. But if we define a calculus method, is there a way to find generals limits of the method ? Can we say that if the method can give same results as logical connec...
I'm just getting started with STLC (Simply Typed Lambda Calculus) and I'm trying to understand an evaluation rule I've been given in some lecture notes by my professor. What it says is the following: (λx. x(λx. x)) (u r) evaluates to (u r) (λx. x) I don't really get this at all. Can someone point out which step I'm mi...
I'm referring to the decision version of both $TSP$ and $HamCycle$. The first is, given a graph $G=(V,E)$, a weight function $w:E\rightarrow \mathbb R^+$ and an integer $k$, is there a simple cycle with weight $\leq k$ which passes, once, through every vertex? (The weight of the cycle is the sum of the weights of the ...
I am reverse-engineering a file format that contains in some places in the binary file what should be a representation of integer numbers. However, I cannot make sense of the relation between the bytes values and the numbers. The sample data I have is the following. Only two bytes seem to be relevant. I have also inclu...
I need a data structure to store priority $p$ for each key $k$ (unique). It must also support the following operations in $O(\log n)$ time: $\text{Insert}(k,p)$ Inserts a key $k$ with priority $p$ into the structure. If there already is an element with key $k$, it changes its priority instead. $\text{Delete}(k)$ Delete...
In the CLRS, time complexity of Prim's algorithm is $O(|V|lg|V|+|E|lg|V|)=O(|E|lg|V|)$. But, for my understanding, Prim's algorithm iterates $|E|$ times for DECREASE-KEY operation which takes $O(lg|V|)$ times and it leads to $O(|E|lg|V|)$. So, it iterates $|V|$ times then, I think $O(|E||V|lg|V|)$ is right because whol...
So theres the classic problem of finding the median in an AVL BST in O(log(n))* However given two AVLs, each having N different values (all values in both trees combined would be 2N different values) how would one find the median** in O(log(n))? edit: Nodes can have the size of the subtree in each node like in * I've ...
For traditional algorithms compressed data may vary, while decompression algorithm is always the same. Are there any approaches, when (de)compression algorithm is also changing to provide best compression level? One can think about splitting data as small chunks and for each small chunk iterate all possible (de)compres...
I read the term "non-deterministic algorithm" in many places but I don't see how an algorithm can be truly non-deterministic. Typically, there is some source of randomness in these algorithms. If the output of the randomness source is considered an input, the algorithm reduces to a deterministic algorithm. So the only ...
I am trying to find shortest path between 2 nodes in a graph similar to below: Each edge has a weight assigned to it. Also, the graph is directional with each edge directing from left to right. I am trying to find shortest path from Start to Stop, subject to a constraint (based on already visited nodes). If a node I1...
I'm interested in the following problem : Input : an integer $n$, and $k$ increasing functions $f_i:\mathbb{N}\rightarrow\mathbb{R}$, such that $f_i(0)=0$ for all $1\le i \le k$ Output : $k$ integers $n_1,\dots,n_k$, such that $n_1+\dots+n_k=n$, with $0\le n_i\le n$ Goal : Maximize $\sum_{i}f_i(n_i)$ My question is : I...
I have such a task at university: we have $n$ tasks, the $i$-th of them can be done between moment $b(i)$ and $e(i)$. If we decide to perform a task in moment $x$, we finish performing it in moment $x+1$. We can perform at most 1 task at a time and we cannot interrupt performing it. Create an algorithm to check if it i...
I generate crc 16 bits with hex Workshop. Polynomial :1234(hex) Initial Value :5678 (hex) . making it on 010 (ascii) and get 3744. I looking for this algorithm , I prefer it on c#. but I not find it. Can you please help me? thank you a lot!
While trying to implement LPA* (mostly based on its description in the same authors’ paper on its derivative D*Lite), I noticed it mentions predecessors and successors of a vertex without giving a full explanation. I understand that $Pred(u)$ is the set of all vertices from which an edge leads towards $u$, and $Succ(u)...
In his "Notes on Structured Programming" essay, E. W. Dijkstra gives an example of a program that computes the first 1000 primes (Section 9. "A First Example of Step-Wise Program Composition"). The idea is to iterate all the numbers from 1 to 1000 in increasing order, to test each one and if found to be prime save it i...
I'm reading through a short paper about hitting the memory wall and I'm struggling to understand how exactly said wall will be hit. The equation for average access time is fairly simple Tavg = p x Tc + (1-p) x Tm. (Tc = time for cache, Tm = time for DRAM mem, P = probability of cache hit) What I don't understand is how...
Let $S$ is a triangulated surface, representing a graph of a function z(x,y) in 3D space. According to https://en.m.wikipedia.org/wiki/Piecewise_linear_function every continuous piecewise linear function can be represented in min-max form $$f(\vec x)=\min_{\Sigma\in\Pi} \max_{(\vec a,b)\in\Sigma} \vec a \vec x+b$$ If a...
after shutting down the computer do the ram loses what it remember ? if yes is there some technics that are used to get what is stocked into the ram after shutting down the computer ?
If $X \sim \mathcal{O}(\log n)$, then $e^{-X} \sim \mathcal{O} (?)$ Is this a valid question to ask?
I saw this post, and it explains about why kosaraju's algorithm includes transpose graph $G^T$. But, I totally didn't understand why cannot use increasing order of original graph. Kosaraju's algorithm uses decreasing order of transpose graph. Is there an any counter example about this? I'm really confusing.