instruction
stringlengths
35
29.1k
It is a joke with the title of a book I am reading: "But how do it Know? - The Basic Principles of Computers to Anyone". The author is explaining a basic unit of memory with NAND gates: I think I get the idea behind this component. 's' is what determines when memory is set, and 'i' is what gets "stored". So if it star...
I would like to find a prove of (a) so that the two E are acyclic and disjoint union and I dont unterstand b Could someone shed light on this problem, preferably spiced with some intuition? Thanks, DarkDragon.
All NP problems can be reduced to NP-Complete problems, can an NP-Complete problem be reduced to a NP problem (non complete)?
There are a couple of function pairs which give the identity when composed, e.g., decrypt(encrypt(value)) == value deserialize(serialize(data, filepath)) == data What is this property called? Suppose one function undoes the property of the other, and it is guaranteed that this is possible for all values (within the d...
Consider main memory of the size 64 kB with each word being 8 bits(one byte) only and a direct mapping Cache memory of size 4 kB also having data word size 8 bits. Find the following : Find the size of tag and index fields of cache? In what location of cache hexadecimal address to main memory (AABB) (if exists i...
I have n nodes, and I want to find the (non duplicate) number of possible ways in which these nodes can be combined in series and parallel, and also enumerate all the solutions. For example, for n=3, there are 19 possible combinations. 0 (0, 1, 2) 1 (0, 2, 1) 2 (1, 2, 0) 3 (1, 0, 2) 4 (2, 0, 1) 5 (2, 1, 0) 6 [0,...
Is there a way to estimate the number of unique monthly visitors to a site based on a limited sample of one week of data? I have information about when a given user visited the site. This isn't as simple as just multiplying the number of unique visitors the first week by 4, due to the hotel problem. If 10 people visit ...
I am considering implementing my own version of Bresenham's line drawing algorithm, found here, my one question is does the algorithm guarantee that both endpoints will be covered/drawn. I am doubting this because of the error accumulation factor (decision variable), but I may be wrong.
Every so often I'll hop on my laptop, open google, and eventually try to download and open some document, only for the document to wind up looking like this: What on earth does all this mean? What language is it, and why does it pop up instead of normally formatted English? Also, if it isn't already obvious, I have ze...
I am having some confusion between address bus size, physical address size and word size however (I do understand that unit of memory access is word and when word size is one byte then it's known as byte-addressable).
Consider the following algorithm: given a graph $G$ with $n$ vertices, set up a linear programming problem LP where there is a variable $x_i$ for each vertex $v_i$ of $G$, each variable can take value $\geq 0$, for each edge $v_av_b$ of $G$ set the constraint $x_a+x_b\geq 1$. The objective function is $\min\sum\limits_...
I was working to derive the Z-Combinator by starting with the factorial function and ended up deriving a different fixed-point combinator. What did I derive? Did I make a subtle mistake? Here are the steps I performed (in JavaScript) 1. Declare factorial function let fact = n => n < 2 ? 1 : n * fact(n - 1) 2. Conv...
Everything needed to know is in the question statement. I believe that the DFA has to be acyclic (meaning its language is finite), which can be checked in polynomial time. However, finding all paths from the start state to an accept state can run in exponential time in worst-case.
Consider the following problem: we want to implement ADT SpecialContainer which stores integer numbers and is similar to a PriorityQueue. This container should support the following operations: init(sc, n) - create a new, empty SpecialContainer sc. n is a positive integer number (will be used later) - $\Theta(1)$ tot...
I'm currently reading the CLRS Linear Programming chapter and there is something i don't understand. The goal is to prove that given a basic set of variables, the associated slack form is unique They first prove a lemma : And then they prove the result : My concern is that to prove the second lemma, they apply the fi...
I have a scatter of 2D elements on a 2D plane. I would like an efficient algorithm to prepare and query the number of points in a quarter plane (inclusive of boundary). The quarter plane is defined by a point $(x,y)$. All elements $(x', y')$ where $x<=x'$ and $y<=y'$ are in the quarter plane. For example I have elemen...
For a list of n 2d points, finding the convex hull vertex takes O(n log(n)) time. And O(n) time if it’s sorted lexicon order. Meanwhile What’s the complexity of finding the histogram bin edges of k bins on both axis ? E.g.: $$ X= ((x_0, a_0), (x_1, a_1), \cdots, (x_n, a_n)), x_i \in \mathbf{R}, a_i \in \mathbf{R} $$ Fi...
I have tried to search the internet to check if the following is correct: If $\sum_{2}$ contains a NP-Complete problem then PH collapses to NP: $PH=NP$ For example if $SAT\epsilon\sum_{2}$ than: $PH=NP$
My solution: let m = lg n. Then n = 2^m. T(2^m) = T(2^(m/2)) + theta(lgm). Let S(m) = T(2^m). Then S(m) = S(m/2) + theta(lgm). Applying master theorem, I get m^(lg1) = 1 which is asymptotically smaller than theta(lgm). So I think case 3 of the master theorem should apply. However, the solution given explains that case...
What is the difference between DeepFake and First Order Motion? Is it the same or not?
Show that the language consisting of all Turing machines whose language consists of strings that can be broken up into two consecutive and equal strings is undecidable. I would prefer if reduction was used and not Rice's theorem.
One property of the Big-O-notation is the sum rule, which states that when I have two functions $f_1$ and $f_2$ and their corresponding complexity functions are $g_1$ and $g_2$, then the combined complexity is $f_1 + f_2 = O(\max(g_1, g_2))$. But what do we pick if both complexity-functions are equal? E.g., if $f_1(n)$...
Let $\mathbb{Z}_2^n$ be the field of bitvectors of length $n$ and define the xor operator $\oplus$ and the addition operator $+$ over this field, with $+$ having the usual overflow semantics (take addition modulo $2^n$). Is it possible to express any mapping $f: \mathbb{Z}_2^n \rightarrow \mathbb{Z}_2^n$ entirely in te...
I am trying to understand this example of converting PDA to CFG but I am not getting the idea quite right. I do have the general understanding of theorem that if $p,q\ \epsilon\ Q $ and $X \varepsilon\ \Gamma$ for $[pXq]$ we have include the sequence of derivations which would pop X from the stack. I partially underst...
What does this expression mean? Normal distribution with condition I am reading a research paper and found the following expression (Eq.28 in the paper below). It means a Gaussian distribution, but the mean component seems conditional probability-like expression $\it{\bf{s}}_t | \it{\bf{m}}_{b, t, m}^{(j)}$. I have ne...
So the wikipedia page gives the following linear programs for max-flow, and the dual program : While it is quite straight forward to see that the max-flow linear program indeed computes a maximum flow (every feasable solution is a flow, and every flow is a feasable solution), i couldn't find convincing proof that the ...
I'm wondering if there is a mathematical or computer science term for a number X such that Y | X = Y? For example: 66536 | 1000 == 66536 In this case, 1000 is the "insert name here" of 66536. Perhaps there is no name for this..? I've tried searching for "bitwise OR returns itself" and other such terms but without luck...
Urzyczyn: Inhabitation in Typed Lambda-Calculi (A syntactic approach) gives a proof that STLC inhabitation problem is in PSPACE (section 2, lemma 1). I don't understand certain aspects of the proof: Lemma: There is an alternating polynomial time algorithm to determine whether a given type A is inhabited in a given bas...
My question is actually a request for papers, articles, texts or books on the problem that I'm trying to solve on my work. I'm working on a program that computes a predicate value (true or false) for a given object in a distributed system in which there is a stream of events that can change the object's attributes and,...
Is there an efficient algorithm to count how many ways there are to decompose a given finite simple undirected connected graph $G = (V, E)$ into the union of two trees $T_1 = (V_1, E_1)$ and $T_2 = (V_2, E_2)$ that are not necessarily edge-disjoint? By union I mean $V = V_1 \cup V_2$ and $E = E_1 \cup E_2$. My initial ...
Imagine there is an area on which you have to put radio towers. Each radio tower sends signal to a circular area of fixed size. How do I determine the optimal number and placements of these towers so the overlapping areas are as small as possible, the whole area is in range of towers, and the number of towers is minima...
I have an algorithm that generates a list of intervals. The algorithm is run m times. Lets mark the intervals as tuples (s1, e1), (s2, e2), .., (sn, en). It is possible to add the run ID to the tuple (though I don't think it helps). The goal is to "clean" spurious ranges (appearing in few runs) and to find groups of at...
Let's say I have a string 0110 and after 011 I reach an accept state (let's call the accept state "q") in an NFA. However, there is no transition mentioned in the diagram from q for the symbol 0. Does this mean the computation dies, or does this mean that the string is accepted?
I was going through the $\text{DFS}$ section of the Introduction to Algorithms by Cormen et. al. and I faced difficulty in understanding the $\Leftarrow$ direction of the proof of the white path theorem. Now the theorem which is the subject of this question depends on two other theorems so I present the dependence befo...
I am an electrical engineer and trying to make a transition into machine learning. I read in multiple articles that I have to learn data structures and algorithms, before this I have to learn about mathematical proofs. I started studying it on my own using the material available on MIT's OCW, while I did grasp the co...
I've come up with a problem which we'll call the Trader's Route Problem (If it's an already understood problem that would be great as well, let me know). Say there exist N cities, with some arbitrary distance d between each city (not all need be the same distance), and as a trader, you want to make the most money poss...
Say I have some data which represents a single line, and I want to determine its approximate slope. This data has a known minimum and maximum on the y-axis. When the line crosses the maximum, it re-emerges at the minimum, or vice versa, so there appear to be many parallel lines in the data. Clearly, the feasibility of ...
What would be a good pseudo code or Python 3 code for the following permutations problem? Let us define a n-permutation as a bijective function $\pi: \{0,...,n-1\}\rightarrow \{0,...,n-1\} $ and represent it using a list, meaning that $\pi(i)=j $ iff list[i]=j. Let us also define a pair permutation as a permutation in ...
The space complexity of the code snippet given below: int *a = malloc(n * sizeof(int)); int sum=0; for (i = 0; i < n; i++) { scanf("%d", &a[i]); for (j = 0; j < n; j++) { int x = a[i]; sum = sum + x; } } free(a); This is question of a test. I answered it $O(n)$, considering space only f...
I am having trouble with coming up for a suitable algorithm for this question. A max-heap is essentially visualized as a binary tree not a binary search tree. Also the runtime of the algorithm must depend only on the number of elements in the output. I was thinking of doing a preorder traversal on the max heap. While d...
I was asked this question in a phone interview recently and I bombed it completely. Zero clue how to approach it. I wasn't able to find any similar patterns on google-ing. Thought maybe folks here might be able to help? Statement: Given m sticks with different lengths. Combine these sticks to form longer sticks with t...
How can you prove that any DFA accepting the language generated by the regular expression $\{0|1\}^*0\{0|1\}^n$ requires at least $2^{n+1}$ states? I first attempted induction on $n$. But I don't even see how to prove the base-case, like if $n=1$. You need the DFA to take any string and, when it encounters a 0, get s...
Assume we have a C-like programming language with no pointer/heap semantics (i.e. there is no concept of memory; everything is on the stack). The only datatype supported is Integer, but suppose the Integer is infinitely large (i.e. without 32-bit, 64-bit, or any size limit). Is it true that this language is Turing-inco...
It is known that there does not exist a regular graph of order $n$ with clique size greater than $\lceil\frac{n}{2}\rceil$. My question pertains to Cayley graphs with large degree, say $\ge \frac{n}{2}$ and not complete. I think the maximum chromatic number is $\lceil\frac{3n}{5}\rceil$. As an example of a graph attain...
Here's the question The content of PC in the basic computer architecture (given below) is 3AF. The content of AC is 7EC3. The content of memory at address 3AF is A32E. The content of memory at address 32E is 09AC. The content of memory at 9AC is 8B9F. The next two contents of PC are 3B0 and 3B1. The content of memory ...
One of the specifications of sort algorithms is stability, which means items with the same value in different indices are not replaced after applying sort algorithm. Why selection sort is unstable and can we make a sort algorithm stable by changing its swap condition?
Given a non-deterministic top-down tree-automata. is there an algorithm, that can determine if there exists any tree that accepted by this automaton? if so, what is the most efficient algorithm known? Thanks.
Given the definition of 'record': "a collection of field values for a given entity", is this a set of field values for ALL the fields of the entity, or only one particular field [so that you get a different set for each field]? Also, is the relationship b/w a field & field value essentially equivalent to a function? NO...
I am new to operating systems and have been wondering about this. Consider a normal text editor, and it's process running in the CPU. Since text editors include IO operations, do the process keep switching it's state from Wait -> Run -> Wait etc. While the user is typing and the same is reflected on the screen or some ...
Given a graph $G(V, E)$, consider the following algorithm: Let $d$ be the minimum vertex degree of the graph (ignore vertices with degree 0, so that $d\geq 1$) Let $v$ be one of the vertices with degree equal to $d$ Remove all vertices adjacent to $v$ and add them to the proposed vertex cover Repeat from step 1. until...
I was going through the edge classification section by $\text{DFS}$ algorithm on an undirected graph from the text Introduction to Algorithms by Cormen et. al. where I came across the following proof. I was having a little difficulty in understanding the steps of the proof and hence I made an attempt to understand it f...
I'm trying to implement my own version of a deep neural network with differential privacy to preserve the privacy of the parties involved in the training dataset. I'm using the method by Abadi et al. proposed in their seminal paper Deep Learning with Differential Privacy as the basis of my implementation. Now I have tr...
My task is to solve the 2SAT problem. I have read online that a good method to solve this problem would be to construct an implication graph, where each statement of the form A || B implies two edges ~A -> B and ~B -> A. Then, we can set values to each variable by finding all the strongly connected components of the gr...
Given a Turing machine M on alphabet {m,e,b,r} we're asked to determine if member $\in$ L(M). You must realize that M is not one specific machine and can be any turing Machine with the same alphabet. My goal is to determine whenever this problem is decidable or not. My idea was to use mapping reducibility. The goal was...
I have a basic understanding of the Fourier Transform, though I'm trying to use it in a program and I'm confused on the specifics. Based on source code I can find online, the DFT takes a set of samples/numbers, performs a summation for each term, and returns a set of these summations which is the same size as the input...
How can I take a Haskell data type or function (eg fold, list, String, zip) and convert or translate it to a lambda calculus abstraction? Example: If sum computes a sum of all elements in a list, and :type sum = Num a => [a] -> a. sum [] = 0 sum (x:xs) = x + sum xs How do I take this information to transla...
(Motivated by this question. Also I suspect that my question is a bit too broad) We know $\Omega(n \log n)$ lower bound for sorting: we can build a decision tree where each inner node is a comparison and each leaf is a permutation. Since there are $n!$ leaves, the minimum tree height is $\Omega(\log (n!)) = \Omega (n \...
We are currently working on a variant of domination parameter and we have shown that it is in W[3] with regard to parameterized complexity. To show it is W[3]-complete, we must show the problem is W[3] hard i.e, reduce an already known W[3] hard problem to ours. But unlike W[1] and W[2], where many famous problems are ...
Please assume for the sake of this session that humans can fluently read and understand machine languages and time isn't a problem in that regard. I, not a computer scientist, would at least theorize that a unary machine language is possible but might just be much "less comfortable" than binary machine language. Is una...
Define $\{\sigma(n,k,m,i)\}_{i=1}^{l_m}$ an ordered set of all TMs with $n$ states and $k$ symbols that halt after $m$ steps on $\epsilon$ There are $(2kn)^{kn}$ TMs with $n$ states and $k$ symbols, so $l_m$ is always finite and so is the range of $m$. If we could iterate over $\sigma$ given $n,k$ for all $m,i$, then w...
I noticed that FM-indexing is a preferred way to match strings in large data sets, and in particular DNA sequencing wiki-article. I know that with this method, it can eliminate space dependencies thanks to compression methods. However, alternatives like Knuth-Morris-Pratt Algorithm or Rabin-karp are highly effective in...
Disclaimer: I'm not a compiler expert. I'm simply curious and come seeking enlightenment. I've seen people claim that -- for efficiency -- for loops should generally use a zero comparison for termination. So rather than: void blink1(int n) { for (int i=0; i<n; i++) { blink_led(); } } you should write...
I have the following messy chart; As you can see some features are very stable through the time series (post-2011) like Extraversion. Is there an algorithm to remove features that do not have much variation compared to the other features?
I'm already know that there is an algorithm that can solve A[i]=i in O(log(n)) in a sorted array. But I want to know if there is any kind of algorithm that also can solve A[i] = C1 * i + C2 (witch C1 and C2 are constant values) in O(log(n)) or not
It is easy to show that there exists a grammar that can be parsed by a recursive-descent parser with backtracking but is not an $\text{LL}(k)$ grammar (consider any grammar with a production featuring two alternatives starting with $k$ occurrences of the same terminal). My question is the following: Is there an identif...
Description Suppose we have a string containing letters 'A', 'B', 'C', 'D', and the characters are placed in a stack. We also have an empty stack. Ultimately, we want all of the same letters to be together (continuous order) in the 2nd stack, using only 3 operations: push("p"): Removes an items from the bottom of the...
Assuming I have firewall set to block an application from accessing the Internet, would I DNS request go through? I tried using C (gethostbyname) on Windows and the answer is no. It seems that the application sends the DNS request to the public DNS server, but I wonder if this is the same under Linux. In particular, co...
The unicode characters under the "Basic Latin" unicode block from U+0020 to U+007F are the characters that characters we use in English. However, the "Latin-1 Supplement" block from U+00A0 to U+00FF is an extension of the "Basic Latin" block and includes characters that are used in some languages. For example, the Span...
$\{a^p; p$ is a prime number, $m$ is a fixed number and $m\geq p \geq 0 \}$ I know this is regular since it is finite, but I don't understand how to build an NFA for this if we do not know what $m$ is. Is there a way to draw the NFA regardless?
Is there any variant of the Boolean SAT or Max-SAT problem that has a flavor of maximizing or minimizing the average of the weights of the satisfied clauses of a WCNF formula? Any literature on an optimization problem of similar flavor would be appreciated. Thanks.
I'm fairly new to type systems and theory, so I would appreciate some guidance in a problem that sparked my interest. I would like to understand what type system features are required so a compiler can enforce that a given key will return a value of the same type as the one the key was associated with in the first plac...
I'm trying to write an algorithm to calculate the area created by multiple paths that can be overlapping or not. Here is an example: Basics 4 separate paths (A,B,C,D) which are a collection of vertices (A1,A2,...) Area desired is represented by green Edge Cases As shown with B, a path might have segments that don't...
Is it known if complexity class of all sparse languages is contained within e.g. $\mathsf{EXP}$ or $\mathsf{EXPSPACE}$? Or what is the smallest time or space complexity class that contains complexity class $\mathsf{SPARSE}$?
This is a question $9.1$ from Understanding Machine Learning Chapter 3. It goes like this: Consider a variant of the PAC model in which there are two example oracles: one that generates positive examples and one that generates negative examples, both according to the underlying distribution $\mathcal{D}$ on $\mathcal{...
Two phase commit is used in distributed transaction. For example, a client sends a transaction to two databases with a coordinator. step1: client get a global transaction id from coordinator step2: client send the transaction to two databases respectively step3: client send the commit flag to coordinator step4: coordi...
I asked this question on datascience.stackexchange but they directed me here. I have a social network represented as a set of people S and individual weights for each of person (weight is the cost of person). I also have defined relationships between these people (whether people know each other or not). I must find suc...
Without assuming ASLR... Processes have virtual addresses, and they manage stacks & heaps of their own. However, these all get mapped to physical addresses somewhere on the memory. Let's say we have Process A and Process B. Process A starts before Process B. Process A puts some stuff on the stack. We switch to Process ...
I'm currently learning for my exams this semester and tried to solve some old exams from the last years. The question is to show, that L ist undecidable. $L=\{w|T(M_w)\neq\emptyset \land \forall x \in T(M_w): xx\in T(M_w)\land xxx\notin T(M_w)\}$ I showed that the language $L'=\{w | T(M_w)\neq \emptyset\}$ is undecidab...
Starting from a random node, which of these series can be a BFS traversal (L to R)? 1 MNOPQR 2 NQMPOR 3 QMNPRO 4 QMNPOR Now, I understand that my answer (1- MNOPQR) is wrong because I got confused with DFS.. and the answer is 3. but why isn't 4 right as well? I mean, it defines BFS... no? Thanks!
I came across this problem online which is a Leetcode premium problem. Most of the people are solving this using Minheap. To me using minHeap for this seems like repetitive way to solve a problem if we can achieve the same thing just by sorting the array based on startTimes & than checking if meeting(i).endTime > meeti...
I know that MAX2SAT is NP-complete in general but I'm wondering about if certain restricted cases are known to be in P. Certainly the languages $L_k:=\{ \phi \,|\, \phi\,\text{is an instance of 2SAT which has an assignment satisfying at least k clauses.}\}$ can be solved in $O(n^k)$ through brute force search since for...
I am studying hashing and reading the part of universal hashing. I have read that I want to draw a hash function from universal hash families when I rehash. When and why do I rehash? One reason to rehash seems to be load factor or hash table size. When I want to lower the load factor and increase hash table size, then ...
For an NFA, can we always find a RAM, which recognises the same language?
$L = {a^n + b^m + a^{n+m}}$ This is the language I want to show is not regular. Now my problem is to choose p correctly. Can I just set it as p=2*(n+m) ? That's the problem I am facing now. Thanks for any help I am starting to learn it to use the pumping lemma. Edit: In the meantime I have done this: $w=a^nb^ma^{n+m}$ ...
I have already read PAC learning of axis-aligned rectangles and understand every other part of the example. From Foundations of Machine Learning by Mohri, 2nd ed., p. 13 (book) or p. 30 (PDF), I am struggling to understand the following sentence of Example 2.4, which is apparently the result of a contrapositive argumen...
I'm creating a webapplication in which I render multiple objects using Three.js. These objects are saved in a list and can be connected to each other (but don't have to be), and when they are, they are rendered next to each other. The user can select an object in this list using the UI that I made. An example of how th...
I'm a newbie and a paper I'm reading specifies the following grammar: ChangeDomain ≔ Domain ∣ Domain [{Changeable}] ({NewDomain}) Changeable ≔ ChangeDomain ∣ CP∣ Domain∣ Domain ⊳ NewDomain Domain; NewDomain; Need ≔ Name I'm new to grammars and wondered whether an experienced re...
So I was trying to solve following exercise: Let $(L_{i})_{i \in \mathbb{N}}$ be a family of decidable languages - this means that every $L_{i}$ is decidable. Then $\cup_{i \in \mathbb{N}}L_{i} $ is also decidable. Right or wrong? The solution states, that this statement is wrong because we can set $L_{i}:=\{f(i)\}$ wi...
How can we convert a given Turing Machine into a Random Access Machine? I understand that we can use the transition function to come up with a sort of algorithm but how can we translate all of it into a set of instructions (load/add etc). For example, here's a TM: M = ({q 0 , q 1 , q accept , q reject }, {0, 1}, {0, 1,...
language = arbitrary word followed by exact same arbitrary word = u * u (with u being out of non-empty words of alphabet {0, 1} ) (sorry for the formatting, see screenshot-link for conventional/clear expression) The purpose is to prove that the given language is not a context-free-language (using the pumping lemma). S...
I want to ask if $\{w|\forall x\in T(M_v):|w|>|x|\}$ is decidable if v is a Index of a random but fixed Turing Machine with $|T(M_v)|<\infty$. My idea: It is co-semi-decidable since as soon as i find an $x\in T(M_v)$ with $|x|\geq |w|$ I have shown that this sepcific w is not in the set. I think it aint semi-decidable,...
I understand how RAM commands work but I am unable to understand how we use a given input string and find the output. For instance, there's a Random Access Machine which has an input {0,1}*. The program logic is as follows: 1: read 2: store 1 3: read 4: add 1 5: read 6: add 1 7: load 1 8: if a=2 go to 11 9: print 0 10:...
The title of the paper that introduced type classes is "How to make ad-hoc polymorphism less ad hoc". It seems the type classes approach is being compared to how OOP does ad-hoc polymorphism. As far as I can tell, the paper never explains how type classes are less ad hoc than OOP techniques like V-tables or prototype c...
I am working out step by step and I am stuck on vertex 7. I got that it was a regular vertex and helper(e_i-1) is not a merge vertex so I look for the leftmost edge in the sweep line. My question is, would e6 be considered to the left of it, or is it none? Any already completed examples that I could see would help me ...
Suppose the strings are of the form x#y#z , where x,y,z are strings formed from the alphabet $\Sigma=(0,1,2,3,4,5,6,7,8,9)$ . The language is accepted if x+y=z is satisfied, for example : 56#65#121 is accepted, but 2#97#104 is not. Is it possible to find a finite automata for such a language ? I cannot fathom how deci...
As far as I read in a OS text book (Operating Systems by Silberschatz) Kernel mode is for privileged task, so it it true to claim that "User Level Thread can read/write Kernel threads" ? Generally speaking, Is there any kind of protection between user and kernel level threads?
Let $X_1,...X_n$ denote some bins, and $w_1,...w_m$ some positive real numbers, where $m \in \mathbb{N}$, and the order matters, so e.g. we can't switch the position of $w_n$ and $w_1$. The goal is to take a subset of $\{w_1,...w_m\}$ and assign it for each bin, i.e. $\{w_1,...w_{i1}\}$ would go to bin 1, $\{w_{i_1+1},...
Suppose we have a graph $G$. Consider the minimum vertex cover problem of $G$ formulated as a linear programming problem, that is for each vertex $v_{i}$ we have the variable $x_{i}$, for each edge $v_{i}v_{j}$ we have the constraint $x_{i}+x_{j}\geq 1$, for each variable we have $0\leq x_{i}\leq 1$ and we have the obj...
I computed the PageRank vector for the example given in https://en.wikipedia.org/wiki/PageRank (where the picture shows that node B ends up with a score of 38.4, node C with 34.3, node D with 3.9). I implemented the PageRank algorithm, but my numbers are slightly different: 39.8 for node B, and 36.1 for node C, 3.5 fo...
In a noiseless channel can frames in the 2 layer of OSI model(Data link layer) reach to the destination out of order? *I am studying from Computer networks 5 Edition of Andrew S. Tanenbaum