instruction
stringlengths
35
29.1k
Suppose we want to find a vector $x\in R^n$ that satisfies the constraints $g_i(x)\leq 0$, for $i\in 1,\ldots, m$, where all $g_i$ are convex functions. The functions can be given by an oracle access: there is an oracle that, given x, returns $g_i(x)$. If this helps, we can also have an oracle for their derivative $g_i...
This is an example algorithm of a recursive insertion sort I'm trying to understand. I've have tried understanding this with the help of print statements (which I've commented). def ins_sort_rec(seq, i): if i == 0: return # print(f"{' ' * i} starting at depth {i}") ins_sort_rec(seq, i-1) j ...
I have following language $L:= \{a^n b^n c^m \mid n \neq m; n,m \ge 0 \}$ and would like to use proof by contradiction by applying Pumping Lemma for CFLs to show that $L$ is not a CFL. In any case, i need to choose $w = uv^iwx^iy$ so that $w \in L$. I tried $a^p b^p c^{p+1}$ , $a^p b^p c^{p+p!}$ ($p$ - Pumping Length) ...
I was reading the Book: The Art of Multiprocessor Programming; Section 2.3.2. and I have a doubt regarding their $\texttt{LockTwo}$ algorithm mentioned in Page 26. The snippet of the algorithm is: class LockTwo implements Lock { private volatile int victim; public void lock() { int i = ThreadID.get(); ...
I am reading the book: Digital Design and Computer Architecture: ARM Edition I am on the chapter about virtual memory. I am wondering, when a page fault occurs, is it the processor or the OS that "fixes it". In the text below they first say that the processor fixes it, then they say it is the OS that fixes it. Do you u...
In my reference, Page 26, Algorithms by Sanjoy Dasgupta, Christos H. Papadimitriou, and Umesh V. Vazirani, a division algorithm is give as, \begin{align} &\text{function divide}(x, y)\\\\ &\text{Input: Two n-bit integers x and y, where }y ≥ 1\\\\ &\text{Output: The quotient and remainder of x divided by y}\\\\ \\\\ &\t...
Let me take the set $A = \{1, 2\}$ as the alphabet. By the bijective binary numeral system, $A^*$ has one-to-one correspondence to the set of nonnegative integers $\mathbb{N}$. As such, each language $L \subset A^*$ corresponds to a subset of $\mathbb{N}$. Now consider the power set of $\mathbb{N}$, and treat its eleme...
How do i prove that the regular expression $$a^*(ba^*)^*$$ is the same as $$(a+b)^*$$. Is there a way to prove this using regular expression identities?
Insertion into a heap is an O(logn) operation. Insertion of n elements into a heap one by one is summarised as O(n * logn). I wonder about the math behind this, because I could not reach to the same outcome. Let's say we have an empty heap h = []. The first insertion will be a constant time operation, say O(1) The sec...
Today, I came across the notation 3[arr] in C++, and I was surprised to find out that it's a valid way to access array elements. For example: int arr[] = {10, 20, 30}; int element = 1[arr]; // This compiles and works! Online IDE: https://onlinegdb.com/4o8qnsx8O The assembly of this looks exactly same arr: .lon...
hopefully I'm writing this post in the adequate place if not please move my post I'm reading this paper about L-shaping fitting for vehicles. and ran into this optimization in the photo attached. in the paper it is written that due to the combinatorial complexity of the partition problem it is not easy to solve the opt...
Lets consider a range of "K" binary digit numbers. In that range, we want to take a subset of those values which have (<="n" consecutive 0s) AND (<="n" consecutive 1s). Then, we want to find the order of values in the resulting subset incrementally. Also, we want to do the "un-ordering" of the values. i.e. find the val...
So we know that LBAs have a finite number of configurations, which makes the task of detecting loops much easier. My proposition is that if a given LBA is constructed to recognize a language, it also decides it since if there was a non-halting instance of the problem, we can detect it and terminate the computation. Is ...
Toda's theorem says that the polynomial time hierarchy is contained in $P^{\#P}$, the class of problems solvable by polynomial time oracle Turing machines with access to an oracle in #P, which is the class of functions that return the number of satisfying assignments of nondeterministic machines clocked in polynomial t...
Question Consider a system which has logical address is 7 bits, physical address is 6 bits , page size is 8 words, calculate the number of pages and no.of frames, size of page table. Answer Addressing Scheme in a Paging System Given the following information: Logical Address: 7 bits Physical Address: 6 bits Page Size:...
Given an undirected graph $G$ with non-negative edge weights, how can we prove that the predecessor subgraph $G_{p}$ of $G$ is always connected? Here's how the predecessor subgraph is defined: for a graph $G = (V, E)$ with source $s$, the predecessor subgraph of $G$ is $G_{p} = (V_{p}, E_{p})$, where $V_{p} = \{ v \in ...
I am looking for literature on abstract models on parallel computing. I am mainly referring to models like Alternating Turing Machine, PRAM or NC-uniform equivalence (Boolean circuits) with some parallelism capability. I would like to know if there are any recent advances or literature on the subject. Thank you very mu...
In order to enumerate such a regular expression, it's clear one can break down the language into the set $s =\{00,01,10,11\}$ and it is clear that we need to enumerate some expression that avoids the following combination of strings: 01, 00+10,00+11, 10+11. I'm just having finding trouble enumerating the regular expres...
I wanted to learn Operating System on my own. Although I have learned few basic things from here and there, but wanted to know the suggestions (books, any video lecture, etc.) from this community.
I need to build a schedule that maps 7 people to 4 groups (3 pairs, 1 single) for each week. An ideal schedule would be one where each person swaps pairs and groups in a round-robin style. If such a schedule is not possible, an algorithm that creates a schedule that minimizes repetition while being fair over the long t...
I am looking for a reference on the most optimal output-sensitive algorithm currently available for listing all maximal cliques in a graph. I know the Bron-Kerbosch algorithm is highly utilized, but it is not output sensitive (i.e., the expected running time does not depend on the output). There is also the Tsukiyama e...
This is probably insignificant, but I was messing around with polynomials, and found out that, if we have a number, n = pq that we want to factor, if we expand (k+1)^n -k^n - 1, mod n, the first nonzero term will be a factor of n. This, of course, is just trial division in disguise, since in order to find p, you would ...
Does the following highly down-voted answer not answer the question "Why does Schaefer's theorem not prove that P=NP?"? If not, why not? Marek, V. Wiktor. Introduction to Mathematics of Satisfiability. Boca Raton; London; New-York: CRC Press, 2009, p. 310: THEOREM 13.3 (Schaefer Theorem) Let $Γ$ be a collection of B...
I am a high schooler who has been programming for about 3 years now. My skill level is above what AP Comp Sci and especially what principles can teach me. What should I be doing to improve myself and prepare for future schools/jobs? What should I be adding to my portfolio?
I am a CS undergrad trying to improve my problem-solving skills. I have noticed that I have a problem with theoretical computer science which I've been trying to fix largely unsuccessfully till now. I have noticed these in Undergrad courses such as Theory of Computation, Algorithm Design, Discrete Mathematics, Game The...
For these algorithms, the time complexity of BFS and DFS is O(E). I have gone through many websites and even the algorithm books, but I never got a clear idea of why it is O(E). It just says it's O(E) in the flow graph as it considers only edges. What does this mean?
I don't actually understand the meaning of $w$$x$ + $b$ = 0 when it is defined in support vector machine. In my own understanding, in order for the equation to be true, the hyperplane would always need to pass through the origin. $w$$x$ + $b$ = 0 0 = 0 But when I look at many diagram of SVM hyperplane, it doesn't pass ...
Taking an example, say we have Page size = 4KB, Page Table Entry = 4B, Physical Address Space requires 36 bits In 3-level multi-paging, let's say the number of entries in the level 3 page table is 2^9 (so the size of this page table would be 2^9 * 4B = 2^11 B ) In level 2, there are 2^9 entries as well and finally in l...
If I have 2 version of code 1.) def T(n): if n == 0: return 1 return T(n-1)+T(n-1) 2.) def T(n): if n == 0: return 1 return 2 * T(n-1) Is my understanding correct that the time complexity of the first function is O(2^n) and the second function is O(n)
I was thinking about whether $\{ 0^{a}10^{a}10^{a}|a\in\mathbb{N} \}$ is a context-free language, and I found this post. I am not sure if my understanding is correct or not, but I guess $R = \{ (a,1,a,1,a)|a\in\mathbb{N} \}$ is not a stratified set, so this language is not context-free? Before looking this up, I have b...
If I have an undirected graph with more than one connected component, can I apply the Gomory-Hu algorithm directly on the entire graph or do I have to apply it separately to each component?
I have this language that I have to prove either regular or irregular. $$ L_3 = \{mm^rn | m^r \text{ is the reverse of } m,\ m,n \in \{a,b\}^+\} $$ It's trivial to prove that it is in fact irregular using Myhill-Nerode theorem. We let $$S = \{ab,abab,ababab,\ldots\}$$, and the suffix for two strings $s_1$ and $s_2$, $\...
I was reading a book titled "Essentials of Logic Programming.", most parts of the book are easy to understand. but now having a problem with Theme 45: incremental constructions of the minimal model. The relevant parts are shown below. Some notations: $P$ is a definite program, $B(P)$ is the Herbrand base of $P$, $G(P)$...
From what I understand about the Y2K38 problem, unpatched 32 bit systems with signed UTC times will jump back from 19 January 2038 at 03:14:07 UTC to 13 December 1901, at 20:45:52. Calculating the difference between these date-times gives me 4294197095 seconds. That's not the same as 4294967296 seconds, off by 770201 s...
I am presented with the following code segment and asked to find the growth rate, which can be done by finding the number of times the variable sum is incremented: sum = 0 for i = 1 to 2 * n for j = 1 to i * i for k = 1 to j sum++ I tried making this into a function called run(n) in Python that returns sum an...
Prove P ∨ Q, Q ∨ R, P → ¬R |- Q with natural deduction. P ∨ Q, premiss Q ∨ R, premiss P → ¬R, premiss ... ... Conclusion, Q I dont know how to properly solve this question? I know somewhat how to solve similar questions like below, but on this specific question above I dont know where to start.
I have some problems understanding the following 2 question from an exam last year, which I am preparing for this week in Parallel Programming. Determine the Work -> $W(n) = 7$ (#vertices) Determine the Depth -> $D(n) = 4$ (longest path) Determine average parallelism -> $\frac{W(n)}{D(n)} = 7/4$ Ok, now the 2 question...
I have a function $f(x)$, has been sampled into a sequence $$ y_0, y_1, ..., y_{n - 1} $$ at points $x_k = k \Delta x$. $f(x)$ is neither smooth or monotone. Under this assumption, what is the fastest way of finding $$ \min_{k=0}^{n - 1}|P - (x_k, y_k)| $$ where $P$ is an arbitrary point? I could do a linear search, bu...
Say there is someone claiming to have solved P vs NP, by finding a (computationally feasible, i.e. no huge constants) polynomial solution to a problem in NP: Apart from a formal proof, is there any kind of challenge comparable to the RSA Numbers, which could be used to "prove" (or at least give strong evidence) that yo...
I am searching for a program to convert 3sat to clique problem. I tried following links https://www.geeksforgeeks.org/maximal-clique-problem-recursive-solution/ https://www.geeksforgeeks.org/find-all-cliques-of-size-k-in-an-undirected-graph/ But it is not converting 3sat problem. Is there any algorithm to convert 3sat ...
I have been reading Cormen's chapter 11 and I stumbled upon the following statement on page 260 (3rd Edition): Let xi denote the ith element inserted into the table, for i = 1, 2 ... n, and let ki = xi.key. For keys ki and kj , we define the indicator random variable Xij = I {h(ki) = h(kj)}. Under the assumption of si...
I wonder why can't I allow an exponential-time reduction from all problems in $\textbf{NEXP}$ to a language $L$ and claim $L$ to be $\text{NEXP-complete}$. The computational complexity class $\text{NEXPTIME}$ or $\text{NEXP}$ has been defined here. In the same page, there is a section on $\text{NEXP-complete}$. This s...
In finding a minimum spanning tree, if we use a BFS and at any node instead of deleting the edge to a repeated node, we can find the most expensive node in that cycle instead and delete it. In such a case, will the time complexity remain O(E+V)?
Ask for the name of the employee. If the employee is full time, get his monthly salary rate. Then, display his name and salary. If the employee is part time, get his rate per hour and the total number of hours he worked for the entire month. Then, display his name and wage. Hello guys, I am freshman in college and I'...
Can I say that all languages in the class $\textbf{P}$ are just a padded version of some other problem in $\textbf{EXP}$? I am familiar with the padding argument, which states that if $\textbf{P} = \textbf{NP}$, then $\textbf{EXP} = \textbf{NEXP}$. I describe the languages obtained by padding an exponential-time proble...
Which function grows faster: $$f(n) = 4^{n^2 \log_2 n} \text{ or } g(n) = (n!)^n$$ Which is true? $f(n) = O(g(n))$ $g(n) = O(f(n))$ i.e., $f(n) = \Theta(g(n))$ none of the above? For lower values of $n$, it looks like $f(n)$ is bigger, but I'm not sure for very big values of $n$.
The following a small-scale example meant to illustrate the general problem Suppose we have $n = 60$ marbles that we want to distribute into 3 bowls, $B = \{bowl_1, bowl_2, bowl_3\}$ The marbles can take the distinct colors $C = \{red, yellow, blue, green\}$ where we have: $n_{red} = 15$, $n_{yellow} = 10$, $n_{blue} =...
At our school, we have a schedule that looks like the following (simplified): Remarks: One course can be taught multiple times a week (to different class-groups, like 1A, 1B and 2A) Multiple lessons (even from the same course) can be scheduled on the same time (but of course for different class-groups). Some of our ...
We were given this practice question to do in a lecture and its solution afterwards. I have spent hours upon hours trying to understand the solution but still do not understand. From my knowledge when we are reducing SAT to clique we don't focus on its compliment, so why are we trying to derive the formula from the com...
I came up with this algorithm for finding all prime numbers from 1 to n. This algorithm could already exist, if it does I don't know what it is called. primes = [] n = int(input("Enter number : ")) for j in range(2,n+1): flag = True for i in primes: if i*i>j: break if j%i == 0: ...
Given a network with flow on the nodes. How can we find min s-t cut in a network with flow on the nodes? We know how to find min s-t cut whenever there’s a network with flow on the edges (Ford Fulkerson, Edmonds Karp)
It is mentioned in 22 - 23 Number of Channels which will be 1 if mono, 2 if stereo. So why 22 and 23 (that is 2 bytes) allocated here? With 1 byte, we can put either 1 or 2.
I'm reading Michael Sipser's "Introduction to the Theory of Computation", and it says: THEOREM 1.26 The class of regular languages is closed under the concatenation operation In the video, if we scroll to the last section, he said that we cannot prove this by "concatenating" m1 and m2 together and pointing all accept...
I'm trying to understand de construction of a DFA from the book "Introduction to Automata Theory, Languages, and Computation by John Hopcroft and Jeffrey Ullman 1st ed" It says: Where it says "If the remainder of i/3 is p, then the remainder of 2i/3 is 2p mod 3." its dividing it twice to get the remainder. Shouldn't i...
Given the following theorem and definitions from Introduction to Algorithms 3rd edition by CLRS: Theorem 22.5: (Correctness of breadth-first search) Let $G = (V, E)$ be a directed or undirected graph, and suppose that $BFS$ is run on $G$ from a given source vertex $s \in V$. Then, during its execution, $BFS$ discovers ...
As per the author, ...In this case, we generally need to use a garbage collection scheme to determine when the last reference has been deleted and the disk space can be reallocated. Garbage collection involves traversing the entire file system, marking everything that can be accessed. Then, a second pass collects eve...
So a process have scheduler context and trapframe and both of them are allocated in the kernel stack (kstack). When process wants to transition from user mode to kernel mode, usually due to traps (software interrupts), and while interrupt routines execute, it saves the context of main process in trapframe. But during a...
I think call by value may be pure function or impure function... And pure function can be written through call by value or call by reference.... So according to the facts (c) should be correct ans...
Typically (from what I can tell) reduction operations produce a "number". This makes them easy to deal with since there isn't really any memory overhead. However, I have something that I'm working on where I want to combine instances of a nontrivial data structure. That is, if x and y are instances of some class C, I h...
I'm trying to order some data in real-time (in an API call) where my item count is on the order of a few million. I'm using Go, so my pseudo code may resemble that. My input items look like this: type Item struct { // SetID is the set this item belongs to. This may be in the // 100,000s in unique sets. SetID int ...
Let's say N students S1, S2, ... SN with their respective candies count c1, c2,... cN The ask is to distribute the candies (whole number only) as evenly as possible among the students, with last student can get the extra candy. Hence, average cookie (c1 + c2 + ... + cn)/N E.g student -> number of cookies S1 -> 3 S2 -...
Despite a huge amount of literature regarding table representation and indexing in secondary memory (also including database books), I found no information on how relational databases represent records generated from intermediate results in secondary memory. How are they representing this, thus considering that you mig...
(Context) Given two byte arrays of length 16, say $L$ and $H$, one can define a mapping $M$ from the set of all bytes to itself in the following way. If $0 \le b \lt 256$ is a byte, let $\text{lo}(b)$ denote the lower 4 bits of $b$ and let $\text{hi}(b)$ denote the higher 4 bits of $b$. Let $L_i$ (resp. $H_i$) denote t...
Consider signed integers with common addition and multiplication. Reassociation of expression is another equivalent form. Say expressions: a * b + a * c + c * b a * (b + c) + c * b a * b + c * (a + b) Are all reassociations of each other. Lets call optimal reassociation one with minimal multiplications. It can be hard...
Systems impose semantics to clarify functionality. For example, a system may disallow a mount over a directory that contains files; or it may make the mounted file system available at tha directory and obscure the directory's existing files until the file system is unmounted, terminating the use of the file system and...
I'm trying to convert a x86 assembly language program to binary. I have read a 1979 Intel 8086 manual and so understand the basic architecture, however I am still unsure as to how to convert this. Here's the code: MOV BX, 1300H ; Load the Base Address 1st input Matrix in BX MOV BP, 1400H ...
This problem comes from a competitive programming problem. I'll restate it(feel free to see it here): A balanced bracket sequence is a bracket sequence(including open and close only) of even length such that we can add 1 and + to make it a valid mathematical expression. Given a balanced bracket sequence (BBS), we then...
I know matrix multiplication of matrices with real numbers is bounded by $ \Omega (n^2 log(n))$, but what about if all numbers are natural? Can we use the same methods to get a lower bound for this case and how should I do this? Also, what is the current known bound for this case?
On page 11 in the book Foundation of Machine Learning, 2nd edition MIT press, the authors wrote: Definition 2.3 (PAC-learning) A concept class $C$ is said to be PAC-learnable if there exists an algorithm $A$ and a polynomial function $poly(·,·,·,·)$ such that for any $ε > 0$ and $δ > 0$, for all distributions $D$ on $...
Given are the coordinates of a convex polygonal area ("field"), a moving circle of radius r ("crayon") and a home location for the crayon ("home") well outside the field. Main goal: Get the shortest total end-to-end path of the crayon so the crayon fills most of the area of the field, without painting at all outside it...
For Instance, if I allowed the user to pass in expressions like "35 + 2 * 5" as strings, how would I go about writing such a program? Also, what topics does this question fall under?
For a bit of context, I was going through the previous year questions of my college computer networks course and found this in one of the papers. I don't even know how to go about solving this problem, it would be really helpful if someone could help me with this. The question goes as follows: Justify the validity of f...
Problem: Imagine you are an agent with a knapsack, who travels a known route of cities. All cities are different: $C_1 \rightarrow C_2 \rightarrow \dots \rightarrow C_n$. Each city offers you to buy fixed commodity or to sell it (but only to buy or to sell, never both). Prices are known and available; available volume ...
An induced subgraph $G’$ of a graph $G$ is a subset of its vertices along with all the edges that are present in $G$ among those vertices. For $G’$ to be a tree, all vertices of a cycle in $G$ cannot be in $G’$. The tree composed of bold edges in the illustration given below shows an induced tree $T$. Vertex $u$ cannot...
The pumping lemma is allowed to be used in this assignment, so I have tried to make $|0^{m+b|y|-|y|}| = |xy^b| = a!, a\ge |y|,a\ge n$ so that $gcd(|0^{m+b|y|-|y|}|,n) \neq 1$.
I am trying to solve a problem where I am given a directed graph with $n$ nodes where, from any given node, I can reach one and exactly one node. Nodes contain integers from $1$ to $n$. Starting at node $1$, the problem consists in writing an algorithm which determines on which node we end up after moving along $k$ edg...
I have two questions about the validity of lambda expressions. First, is a variable on it's own a valid lambda expression (ex: λx) Second, take for example these two lambda expressions (λx.fxya and λz.fxya). They're identical besides the fact that the bounded variable is different. Does this affect it's validity? Also...
I need to prove that the binary operator $-_\pm: \mathbb{P}^\pm\times\mathbb{P}^\pm\rightarrow\mathbb{P}^\pm$ is increasing in each of its arguments, where $$ \mathbb{P}^\pm = \{\top_\pm, \leq0,\neq0, \geq0,<0,=0,>0,\bot_\pm\} $$ are the abstract properties it operates on. They represent the "signs" of values in $\ma...
This semester we have a class related to Operating Systems.The class itself is not obligatory but the class is done at the same time with a core class and I will simply not waste a year for 1 class so I have decided to access the resources of the Operating Systems class and study on my own. A process is any program lo...
I am trying to construct an AFA from a NFA, how do I know if a state of NFA becoms existential or universal in the AFA?
Consider the language L given by the regular expression (a + b )*b(a + b) over the alphabet {a, b} . The smallest number of states needed in a deterministic finite-state automaton (DFA) accepting L is : My attempt : I designed the following DFA The answer key says that minimal DFA will have 4 states. I am unable to fi...
I'm trying to figure out an algorithm for this specific problem. The problem: I have N people (say 60 but could be far more) that I want to organize into groups of 4 on a monthly cadence. The constraints: Each month, groups should contain people that haven't been grouped before (until they've been in a group with ever...
How to calculate the time complexity of a algorithm which contains while loops or if statements using summations? I only know how they work with the for loops. And I'm guessing the if loop are calculated as a time complexity of (1)? r=1 for i=6 to n+2 do { j=n−3 while j≥log7(n−1) do { j=j−2 ...
I have a set of points $P = \{p_1, \dots, p_m \}, \; 0 \le m \le 10^4$ on a plane of two colors (red and green). Each point has integer x-coordinate (all x-coordinates are different), and non-negative y-coordinate (y-coordinate can be non-integer). In addition, each point has a weight $w \in \mathbb{R}^+$. I can match ...
What is the subproblem associated with this DP and what are the terms to calculate?
Your task is to count the number of ways numbers $1,2,…,n$ can be divided into two sets of equal sum. For example, if n=$7$, there are four solutions: ${1,3,4,6}$ and ${2,5,7}$, ${1,2,5,6}$ and ${3,4,7}$, ${1,2,4,7}$ and ${3,5,6}$, ${1,6,7}$ and ${2,3,4,5}$ Input The only input line contains an integer n. Output Print...
I am wondering why are read/write operations on I/O devices much faster when we use DMA?I must be that when using DMA we have 1 less clock cycle to access the local buffer of a IO device since it is already part of the main memory.Am I correct?
Let $f(n) = n \cdot \sqrt n$ and $g(n)= \frac{n^2}{\log n}$. Why is $f(n) = o(g(n))$? Could you please explain to me why this is so? I have tried l'Hôpital's rule but it doesn't add any clarification.
I understand that in Dynamic Programming approach the subproblems are solved in a particular order from smallest to largest. In LCS how the subproblems sizes are defined and in which order it is solved.
In Machine Learning: The Basics, Alexander Jung, Spinger, the author states that using the zero-one loss function defined by:$$\mathit{L}((\mathbf{x}, y), h)= \begin{cases} 1, y \ne \hat{y}\\ 0\ otherwise, \end{cases}\\ (with\ \hat{y}=1\ for\ h(\mathbf{x}) \ge 0, and\ \hat{y} = −1 \ for \ h(\mathbf{x})\lt0). $$ results...
If each edge has a distinct weight then there will be only one, unique minimum spanning tree. This is true in many realistic situations, such as the telecommunications company example above, where it's unlikely any two paths have exactly the same cost. This generalizes to spanning forests as well. Proof: Assume the co...
I've been stuck for hours trying to solve the recurrence $T(n) = 7T(n/3) + n^2 + 2n$ by using case 3 of the master theorem. I've done a good chunk of the proof, but currently stuck attempting to solve the regularity property $af(n/b) \leq cf(n)$. I don't think this fits the case 3 requirements, but my best shot has bee...
Question: Let G(V, E) be an undirected connected finite graph with the weight function w : E → R+. Let T be a minimum spanning tree of G. Prove that there exists a run of Kruskal’s algorithm that finds T (for suitable ordering of edges). Answer: We show that the following proposition P is true by induction: If F is the...
Could you please explain me why that's the case?
I am trying to understand the "Structure Theorem" in Arora's TSP slides. In particular, I do not understand the image on slide 13-3 (page 68 of the PDF). The high level idea is to show that (without randomization/derandomization) there is a chance that you will get a "bad" approximation of the Euclidean TSP using the p...
What is the efficient algorithm to find a submatrix (must be rectangle) with a sum that is as close as possible to k? Matrix consists only of nonnegative integers. Iterating through all possible submatricies requires O(n^4). Computing the sum can be done in O(1) time using prefix sums. I've thought about a similar prob...
I had posted earlier a question regarding ranking max "n" consecutive "0"s and "1"s in a "K"-bit string - Order in a subset I got clarification regarding how it can be solved by using DFA (Deterministic Finite Automation) - https://cstheory.stackexchange.com/q/8200/5038 https://cs.stackexchange.com/a/71379/755. Howe...
One of the services of a OS is communication between processes.However how much important is that?I dont think it is that important just for example if we saved a .txt file the file explorer wouldnt give back the name of the file to the text processor .Am I missing something here?
I was reading Type Theory and Formal Proof by Nederpelt and Geuvers and in Chapter 3 about $\lambda2$ at page 81 they show how the self-applicator $\lambda x . xx$ can be typed by observing that $\lambda x : (\Pi \alpha : * . \alpha \rightarrow \alpha) . x(\sigma \rightarrow \sigma)(x\sigma)$ typechecks correctly. They...
I am wondering is usually the OS kernel which provides a link between 2 processes part of the main() of the os or is it a seperate function?In other words do we usually encapsulate the OS kernel in the main or we use a seperate function?