instruction
stringlengths
35
29.1k
I've been going back and forth with this for a dew days, can't quite be sure. When I look at the pumping lemma method, I think a context-free language could possibly be reduced to a regular language.
I'm not sure if it's the right place for this question. Sorry if going a bit off-topic. Choosing a suitable Language for the first programming course is one of the most important things that every related teacher/lecturer should bear in mind; especially if the students are young or having a limited math knowledge. I'm ...
From time to time I am trying to implement automatic programming system. We already have the formalization of norms (laws/legislation, business policies and rules) as some kind of deontic logic (there have been endeavours to convert deontic logic formulae into executable rules). We have ontology of GUI elements. So - w...
I am confused about a statement in The Art of Multiprocessor Programming: Theorem 3.6.2: Let inv(m) be an invocation of a total method. If <x inv P> is a pending invocation in a linearizable history H, then there exists a response <x res P> such that H · <x res P> is linearizable. ... This theorem implies that lineari...
I am a CS student learning about neural nets. Currently I am confused about how to train a neural net in batches. If I calculate error in a batch, I will get a vector of errors e.g. real1 - predicted1, real2 - predicted2, etc... How do I then calculate a single gradient value to adjust the weights with?
Variabled $x_1, \dots, x_6$ have hidden, distinct integer values from [$1,\dots,6$]. How to identify each variable's value with minimum number of comparison operations?
I am working on a project that requires the creation of a database. Of course we have used ERwin, which seems to be a well known tool for data modeling. My team member just completed the implementation of our database in ERwin. However, the relationships between tables do not remind of how they looked in Microsoft Acce...
What image properties are given by similitude moments? These are image moments of the form shown below: $$\eta_{pq}=\frac{\sum_x\sum_y(x-\mu_x)^p(y-\mu_y)^qI(x,y)}{(\sum_x\sum_yI(x,y))^{\frac{p+q}{2}+1}}$$ Specifically, I'm looking for the properties given by this set of similitude moments: [$\eta_{02}$, $\eta_{03}$, $...
• Given the above virtual to physical address mapping, 1 What is the page size? 2 How many virtual pages can we have in maximum? 3 How many physical pages can we have in maximum? Approach: 1 For the page size I would say I don't know because we have no information that gives us a clue about page size. 2 I think that w...
I entered into a discussion with a friend on the following question, which asks if mutual exclusion holds: Consider two processes: $s_1$ and $s_2$ are two variables, set equal initially. P1: while $s_1 = s_2$: wait. /execute critical section/ $s_1$ is set such that it is not equal to $s_2$ P2: while $s_1 = s_2$:...
Please can any one describe this picture? I am not getting that 4 entries to 001.
"The Little Book of Semaphores" (2nd Ed. by Allen B. Downey, section 4.5.1) as well as Wiki (link) mentioned that a trivial solution (as shown below) to the 'Cigarette smokers problem' will cause a deadlock. Somehow I couldn't wrap my head around it. Pls help me undersatnd how deadlock can occur for the below solution....
I want to know if for any base the most significant digit is 1 or not. Here is the code: for(int i=3;i<=a;i++) { int x = i; int r = a; while(r/x) { r = r/x; } int rem = r%x; if(r==1) { count++; } } is there any optimal way to replace the while loop nested in the for ...
Consider the following grammar: $$ A\to Ba|Aa|c \\ B\to Bb|Ab|d $$ How do I convert this grammar to be LL(1) by eliminating direct and indirect left recursion? I have tried applying the rule which converts $A \to A\alpha|\beta$ to $A \to \beta A'$ and $A' \to \alpha A'$: For $A \to Ba|Aa|c$, $\beta = Ba|c$ and...
I have read that $L^* = L^+ - \epsilon$, but if we write $(\epsilon + a + b)^+$, is it equivalent to $(a+b)^*$?
Imagine you have a vector of pairs $(id, x)$ where $id \in I$, some set of opaque identifiers (hereafter, ids), and $x \in \mathbb{N}$ some value. Assume that every $id$ value is unique in your list. You can sort such a list on the $x$ values - below we will generally refer to this as a sorted list. Given two such sort...
I had an idea for a theoretical super computer. Supposing, one was able to optimise(or significantly increase efficiency) all algorithms used in most computing tasks(An open source project on algorithm optimisation maybe? The system design is being optimised from the barest tools, the "axioms" of the RAM model(algorith...
I am interested in the precise relation between $P$, $NP$ and $EXPTIME$ classes. What I know so far: $P \subseteq EXP$ (from Time Hierarchy Theorem [1]) We don't know an exact relation between $P$ and $NP$, and between $NP$ and $EXPTIME$. What do we know: 2.1 $\forall problem \in P \Rightarrow problem \in NP$ (Any pr...
I've looked around and can't find my answer. I have a set of $n$ numbers. In each iteration I would like to find an arbitrary number and change it. Is it possible to perform each iteration in $\log n$ time? There are data structures like a min-max heap which allow insertion and deletion in $\log n$ time, but that only ...
We have the word "w = aabceefgeebdaabbceeffghdcbbeefbbbbghhie ". I have created a Huffman tree for the string w. We get the following table: Now I want to create a Huffman tree for a Block-Code with length of block $4$. Do we maybe take each consecutive 4 letters, i.e., {aabc, eefg, eebd, aabb, ceef, fghd, cbbe, ...
Given a digraph, determine if the graph has any vertex-disjoint cycle cover. I understand that the permanent of the adjacency matrix will give me the number of cycle covers for the graph, which is 0 if there are no cycle covers. But is it possible to check the above condition directly?
My intuition says yes. I think so because if we could find arbitrary length cycles, couldn't we just look for an n length cycle and then solve HAM-CYCLE? But I saw a post that seems to suggest a polynomial time method for finding cycles! I feel as if perhaps I do not understand something here.
I have a translation function which translates $\lambda$-terms to another representation let me call it $G_\lambda$, as follows. $\chi(x)$ $=$ $ X^2$ if $ x \notin \Gamma$ $\chi(x)$ $=$ $X$ if $ x:X \in \Gamma $ $\chi(\lambda x.t_1)$ $=$ $abs(X^1,\chi(t_1))$ and ...
I am designing a graph algorithm. Some steps of the algorithm, are set operations (union, difference, intersection, set-membership). Can I assume them as $~ \mathcal{O}(1)$ operations? Have someone used them as $~\mathcal{O}(1)$ in his paper? What minimum complexity should I assume for these operations? References are ...
A colleague of mine and I have just hit some notes of one of our professors. The notes state that there are tasks that are possible to solve in polynomial time (are in the class of PF) but that are NOT verifiable in polynomial time (are NOT in the class of NPF). To elaborate about these classes: We get some input X and...
Say I'd like to transmit a 100-bit packet which has a field containing a continuous value. I'd like to protect this value with an error correction code but an error in the MSB of this value is much more catastrophic than an error in the LSB, so how do I have to design the code so that it will be optimal by means of pro...
The problem is the following. Suppose we have a sequence of n non-negative numbers, each element with index i having its own value, value[i]. We want to put some cells in a subsequence Plus, and some cells in the subsequence Minus. Not all the elements have to be in one of these subsequences, one might not be in an...
One of the inputs to my neural network is a set. I have a set $S = \{s_0, s_1, ..., s_n\}$ in which all values $s_i$ are constant. An example of such a set could be the set of French wines (Beaujolais, Languedoc-Rousillon, Champagne) or the set of players in a sports event (Player A, Player B, ...). The input to the n...
I have a very large graph of ~7 million vertices and ~100 million edges. One dfs run in my current implementation runs in 30 seconds. The graph is an unweighted directed strongly connected graph. I need to find the mean and median distances of the graph (median and mean distances over all shortest-path distances of t...
MAX-3-CUT gets a graph and a number $k$, and determines whether three sets of vertices can be found within that graph, where at least $k$ edges are in the cut. We define the cut as all edges $(u,v)$ where $u$ and $v$ are in a different set. MAX-CUT also gets a graph and a number $k$, and does the same but by dividing i...
System is in safe state if there exists a safe sequence of all processes. Sequence $[P_1, P_2 …P_n]$ is safe, if for each $P_i$ the resources that can still request can be satisfied by $P_i$ currently available resources + resources held by $P_j$ with $j \lt i$ The above is from a presentation distributed by my OS I...
This problem is from codechef.Can anyone please help me out with this one as I am unable to find out the subproblem.Thanks in advance! Problem -: In IPL 2025, the amount that each player is paid varies from match to match. The match fee depends on the quality of opposition, the venue etc. The match fees for each match...
It is possible to prove the correctness of algorithms, and two algorithms can be compared to see which has better performance using $O$ and $o$ notation. Is it possible to prove the efficiency of an algorithm? I.e. That that algorithm is the most efficient possible algorithm for a problem. Let $K_i$ be the set of all ...
What does the symbol "$\triangleright$" mean programming language semantics? I've seen it in the context of datatypes in and the evaluation of expressions in environments. For example : $$tenv \triangleright erht \implies tval $$ or $$tenv[tval/x]\triangleright ebody\implies t\,.$$ Here, $tenv$ is an environment and $...
In the context of disjunctive normal forms, which terminology do you use for the conjunction of atoms? E.g., for the disjunctive normal form $(x₁ ∧ ¬x₂ ∧ x₃) ∨ (¬x₁ ∧ x₂ ∧ x₃)$, how are the constituents "$x₁ ∧ ¬x₂ ∧ x₃$" and "$¬x₁ ∧ x₂ ∧ x₃$" called? Terms or clauses? I saw boths variants as well as "disjunctive clause...
I can't figure out a recurrence equation for a dynamic programming assignment. Formally, we aim to minimize the total sum of distances between matched points with the following constraints: Every point from both vectors has to be matched at least once, but can be matched multiple times. A point i can only be matched w...
Two algorithms to solve a particular problem can have theur efficiency compared using the $O$ and $o$ notation. However, this is very crude method, and tells us no information on how more effective one is than the other. Is there a yard stick that can be applied to ALL algorithms, with ALL time complexities, that can b...
I’ll define my question more specifically: Lets suppose we have an $n$ bit quantum computer, with qubits labelled $q_{1},…,q_{n}$, and let $b$ be any bit string of length $n$ (let’s assume we’ve labelled each qubits’ states $0$ and $1$ so that we obtain an $n$ bit bit string when we measure the qubits). The question i...
Lets say I have 1000 bytes that are supposedly random. I want to verify to a certain certainty that they are indeed random and evenly distributed across all byte values. Aside from calculating the standard deviation and mean value, what are my options for a robust verification process?
When I was trying to prove a problem at hand to be NP-complete, I coined the following problem: Given two integer sets $A = \{ a_1, \cdots, a_n \}$ and $B = \{ b_1, \cdots, b_n \}$. We know that there are $n!$ bijections between $A$ and $B$. For a bijection $f\colon A \to B$, define $$\max f = \max_{a \in A} \...
This is my third installation of my "Reasoning on Efficiency" series. This question builds on my first question in the series: "Reasoning on Efficiency (1)" The question in this installment builds on the ideas developed in the first question. Advertising out of the way, let's proceed. My question is this: Giving a par...
I want to know the theoretical representation of a double push or a double pop in pda
GraphQL is a query language for your API, and a server-side runtime for executing queries by using a type system you define for your data. Source: http://graphql.org/learn/ So GraphQL allows a server to implement a HTTP-endpoint that accepts queries which are only constrained by the type system defined by the server....
I know $P$ vs $NP$ is an open problem in Computer Science. However the people concerned (at least according to Wikipedia) believe $P \neq NP$. I have two questions: $(1.)$ Given that it is possible to prove lower bounds for problems. Does there exist any problem(s) for which the solution can be verified in polynomial ...
The most recent challenge on Advent of Code involves constructing an image in a binary pixel array from a sequence of instructions: rect AxB, which sets all of the pixels in a rectangle A pixels wide by B tall at the top left corner of the array. rotate row y=A by B, which performs a circular rotation of row A by B pi...
Algebraic normal form (ANF) is a way of describing digital circuits made up of AND and XOR gates. The below is an example of an ANF expression which evaluates to true if two or more of it's three inputs are true ($\oplus$ being XOR, implicit multiplication being AND) $x_0x_1 \oplus x_0x_2 \oplus x_1x_2$ When a digital ...
The following statement is considered true: In a DAG, for every vertex $v$, there exists a sink $s$ such that there is a path from $v$ to $s$. However, my counter example to this is a binary search tree. The leaf nodes in a binary tree do not have a path from themselves to a sink. Hence, am I interpreting this sta...
Both Logic in Computer Science (Huth and Ryan, 2004) and Branching vs. Linear Time: Final Showdown (Vardi, 2002), state something to this effect (paraphrased): In LTL, X F p and F X p are equivalent, meaning "p is eventually true in some state that is not the current state". In CTL, AX AF p and AF AX p are not equival...
A 1 is an "on" signal, and a 0 is an "off" signal. How does a computer know 01110 is different from 010? Does the computer wait between signals?
In Practical Foundations for Programming Languages, Robert Harper says If for a proposition to be true means to have a proof of it, what does it mean for a proposition to be false? It means that we have a refutation of it, showing that it cannot be proved. That is, a proposition is false if we can show that the assump...
I need to store two distinct variables of 1 byte size in memory. My memory system stores 4 bytes at one address; therefore, you cannot address byte 3 directly, and you have to logically access it after all 4 bytes are fetched of that address (correct me if I'm wrong please). So, if I assign the following two variables...
Say I have total 4 bytes on 1 byte addressable memory, with a 32 bit bus. If I move value at 0'th address to one of the registers will system grab all 32 bits (all 4 bytes) through bus from memory, reprocess it to extract 0'th address value behind the scenes? Or will it get exactly one byte through bus?
I have a system with some factors, say A, B, C, and D. There can be different values of all these factors. Let us consider few values to have a better understanding. Let's say A has 4 different values, A1, A2, A3, A4. B may have 3 or 5(anything, no order or logic here), similarly C and D may also have many different va...
Is it possible to create a Determinist Finite Automaton that is equivalent to a Nondeterminist Finite Automaton, whatever that NFA is ? Is there an algorithm to create such a DFA if we have a NFA ?
I've been stuck on this for a while now, I've tried reading the related topics on cs.stackexchange as well as the textbook and youtube videos. Suppose we have a 8KB direct-mapped data cache with 64-byte blocks. Offset $= log_2(64) = 6$ bits number of blocks $= 8k / 64 = 125$ $Index = 7$ bits $Tag = 32 – 13 = 19$ bits...
Let $M$ be a DFA. I would like to prove that $L(M)$ is infinite if and only if there exists a string $w \in L$ such that $|Q| \leq |w| \leq 2 \cdot |Q| $. My idea was to use the fact that the shortest string in $L(M)$ is of size at most $|Q|$, but I am not sure precisely how I should use this. Or is there a different a...
Sam is a teacher. He teaches exotic materials (he's not a very computer fluent person and knows no programming). In his course he has several topics he teaches, say $a$, and each topic has a variable number of subtopics. The total number of subtopics in his course is $b$. In his exam (which is in essay form), the dean ...
Given a directed graph with number of nodes not exceeding 3*10^4. Each node has indegree ranging from 1 to 5 and outdegree from 1 to 5. We need to partition the graph into vertex-disjoint simple cycles. It is necessary to use all the nodes but it is not necessary to use all the edges.
I have a directed graph, and some algorithms in networkx I want to apply to it. Unfortunately when I try to use the algorithms, python tells me that they're only implemented for undirected graphs so far, not directed graphs yet. I don't really want to reimplement these algorithms myself, is there a way to model my dire...
Assuming $y$ is a boolean variable in an ILP program (that is $y \in Z$, s.t. $0 <= y <= 1$) and $x_1$, $x_2$ are bounded integer variables between $0$ and $M$. I want to encode the following high level constraint: $$y = 1 \iff x_1 \le x_2$$ So far I've got this: $$x_1 \le x_2 + (M+1)y$$ This enforces that whenever $x_...
I am working on a question answering system. I've learned that informer spans are valuable features for question classification. However from what I've read I wasn't able to find any publicly available dataset for this task, or a trained tagger. Is there any? People seem to just hand-label their dataset. If there aren'...
Suppose I am looking at an optimization problem with a large number of interconnected constraints, but the solution is - in some regions - extremely volatile (With volatile I mean: small mutations might drastically change the evaluation of the proposed solution. Also note that not all changes are volatile in this way, ...
I know $\overline{A_{TM}}$ is not Turing Recognizable (to prove it, infact, I proved its complement to be both Turing-recognizable and not decidable). My question is, if $\overline{A_{TM}}$ is not Turing Recognizable, can I reduce $\overline{A_{TM}}$ to some language A (say $E_{TM}$) to show it is not Turing Recogniza...
The CS188 course from Berkeley goes to great length in explaining why the optimality of $A^*$ algorithm is conditioned by the admissibility of heuristic. Note: admissibility of heuristic means that: $$\forall n, 0 \leq h(n) \leq h^*(n) $$ With $h^*(n)$ being the true optimal distance of $n$ to the goal. The course's pr...
I'm trying to implement an rbfs search algorithm for the 15 puzzle (pseudo code below). link to the paper where i found the pseudo code: https://www.aaai.org/ocs/index.php/SOCS/SOCS15/paper/viewFile/10911/10632 I do not understand what line 11 is suppose to do. Any clue appreciated Also, it start with a bound, and in ...
I have been reading some material about undecidability of a language, and I am not quite sure of one part. For what I see: I start with a decider H, that has an input <M,w> where M is a Turing Machine and w is a string, so I have the following: H(<M,w>)=accept if M accepts w rejects if M rejects w all fine un...
Edit: Maybe this is not the best title, so few free to change it. So I'm trying to prove the following statement: A finitely branching tree $T$ with infinitely many vertices must have an infinite path. My proof is loosely like this: $P = \emptyset$ Start at the root $v_0$ Since there are infinitely many vertices, th...
Give a question: Language L= {a^n b^(n+m) a^m}, where both n and m are >=0. Is L context-free or not. If the answer is yes, can I use the following PDA to prove it? Since {a^n b^(n+m) a^m}={a^n b^n b^m a^m}, in the PDA, we first push n a's onto the stack. Then, we pop n a's from the stack by reading n b's. Next, we pus...
In physical layer, we already have methods to share a common link by dividing into channels using FDM etc. Then why do we need to think about multiple access at data link layer? I.e why csma, csma/cd are needed? We shouldn't be seeing any collision at all when I'm using a different channel for communication right? Do...
I'm having a little problem with the abstraction layers in linear types. If every variable is used exactly once, there is no way to copy data, since you have to read each datum twice in order to write it twice to two different locations. However, you could argue that once a variable is loaded into a register, you may ...
I have the following model: Let's say two indepentent weighted six-sided dice $X$ and $Y$ with unknown probabilities (i.e. probability of 1 is unkown etc) and they have not necessarily the same probability distribution. However, these are hidden variables and we only observed the outcome $S = X + Y$. I now want to use ...
I'm working on a problem to find the camera position in the world system when each picture was shot. I currently have several pictures taken from different angles, and for each picture there is only a black square on a white paper. I have the actual size of the black square on the paper and the intrinsic matrix of th...
I'm aware of the two questions prioritizing inserts and extracts individually, each in $O(1)$ time, but does there exist a unique integer priority queue algorithm for the range $[0, n)$ that can do both insert and extract-min in $O(1)$? The closest one I've found so far is this one, with the following qualities: Inser...
Background I have a setup where I need to make an API call to a partner to initiate a financial transaction. I have multiple partners, and I need to choose which one to use each time a transaction needs to happen. The characteristics differentiating two partners are: if the transaction is accepted or not (acceptance)...
I'm reading The Rust Programming Language and found the following passage: Remember that writing to a struct is not an atomic operation, and many functions like vec.push() can reallocate internally and cause unsafe behavior, so even monotonicity may not be enough to justify UnsafeCell It just popped out of nowh...
I'm wondering if there are any universally accepted "best" algorithms for syncing data sets. I imagine there would be different solutions depending on circumstances: Are all peers online all the time or not? Are we more limited by bandwidth or processing power? Are data items large or small? Does data get modified and...
I was reading Robert Kelinberg's paper on Nearly Tight Bounds for the Continuum-Armed Bandit Problem There is a section where he says: "For a d-dimensional strategy space, any multi-armed bandit algorithm must suffer regret depending exponentially on $d$ unless the cost functions are further constrained. (This is demo...
I've been searching for a specific case of the four color map theorem all over the internet, but can't seem to find a reliable explanation. Does anyone know one or two "cases" of maps as applied to the four color map theorem, including how it could be proved by hand? The only explanation given on the web is Appel & H...
Kind of what it says on the tin. Let's say I have a countably infinite alphabet $A$ and a "language" $L = \{s_1s_2 | s_1,s_2 \in A\}$ (i.e. all possible strings of length 2). Now, my question is this: does it even make sense to think of this in terms of formal languages? Is there some construct akin to a state machine ...
Problem: given a set of n tasks with execution time Ti, due date Di, and a profit Vi (given only if is enden before due date), is there a task schedule that returns a total profit greater or equal than k knowing that tasks must be executed one at a time? I am asked to proof that this problem is NP-Complete, can anyone ...
Let's say I have a function that runs in $O(n \lg n)$. Let's say instead of running this function with a $n$-sized input, I run it $k$ times with an $(n/k)$-sized input, so I want to check if $$ O(n \lg n) = k \left( O \left( \frac{n}{k} \lg \frac{n}{k} \right) \right)$$ I think it is, because of: $$ O(n \lg n) = O \...
search problem: find the assignment that maximize the number of satisfied clauses For decision problem: determine whether there is an assignment that satisfies k of clauses. optimization problem : determine the number of clauses that maximize the number of satisfied clauses ( is this correct?) If I want to reduce searc...
Given a set $\cal D$ of unit disks in the plane and a set $C$ of colors. Every disk in $\cal D$ is colored with one of the colors in $C$. Note that multiple disks may be colored with the same color. Every color $c_i \in C$ is associated with a weight $w_i$. for every path $p$ in the plane, we define the weight of $p$ ...
I want to show correctness of "Algorithm to find maximum element in array" using induction and contradiction. ans=-infinity for (i=0; i<n; i++) ans= max(ans, A[i]) where A[0:n-1] is array and max is the function to return maximum of its two arguments. What I am doing: Base case: i=0, ans= max(-infinity,A[0])=A[0],...
Suppose, There are $2$ processes $P1$ and $P2$. It is given that Mutual Exclusion and Progress are satisfied by these $2$ processes. Suppose, Programming protocol is designed such that CPU only executes $P1$ and $P2$ is never alloted the CPU, So, here $P2$ starves. My Question :- Is Bounded Waiting satisfied here ? ...
While studying arrays a question came to my mind. If only 1D and 2D arrays can be used, then why multi-dimensional arrays exist? Is there any use of multi-dimensional arrays?
I am not sure if I should ask this question here or somewhere else. In fact, I initially asked my question here at mathoverflow.net but it was marked as off-topic Background: I was searching through random mathematics paper that are related to cryptography and I came across this paper (page 3). I just read the abstract...
I have this problem, and I don't really understand how am I supposed to do this. Could someone please help me with this? I know what left quotient is. I also know about regular, irregular languages. But still I don't know how to show this... Any help would be appreciated, thanks in advance! Also sorry if something is n...
Is $L=\{\langle M,w \rangle|M\text{ does not modify the tape on input w}\}$ decidable? We could tell if a TM does not modify the tape on any input by checking if there are no transitions in $M$ that write on the tape, but can it be decided for a given $w$?
As a follow-up to this question , I've found a recursive algorithm that solves the given problem, but it runs too slow to pass all given tests. int solve(int i, int crane1_pos, int crane2_pos, int dist) { if(i == n) { return dist; } int dist1 = dist + get_dist(crane1_pos, t[i].first); int...
For a given language $L$ and $w \in X^{\ast}$ denote by $w^{-1} L := \{ u \in X^{\ast} : wu \in L \}$ the (left) quotients of $L$. The left quotients are closely related to the minimal automaton of $L$ in case $L$ is regular, i.e. in that case $(X, Q, \delta, q_0, F)$ with $Q := \{ w^{-1} L : w \in X^{\ast} \}$, $\delt...
Suppose an enumerator E can enumerate some language L in a finite amount of time (3 days, 3 hours, etc.). What properties does this language have? My guess: L is finite, so L is a context-free language. Since L is a context-free language, L is also decidable Since L is decidable, L is also Turing-recognizable and co...
Given this language: $$L_{s_1,s_2} = \{ \langle M_1 \rangle \langle M_2 \rangle | L(M_1) \in S_1 \text{ and } L(M_2) \in S_2 \}$$ I want to prove that for $S_1=RE$ and $S_2=RE$, then $L_{S_1,S_2} \in R$. The way I started was by trying to build a Turing Machine that decides $L_{S_1,S_2}$: Let $M_{12}$ be that Turing m...
So let's say 2 relations, B(R) = 200,000 and B(S) = 300,000. The memory buffer is M = 400 blocks. How many passes would this take to join? Notation:
Are there programs that can 'translate' source code between any two languages (assuming the translator has access to the requisite libraries)? If there are, how do they work (techniques used, knowledge required, etc)? How would they feasibly be constructed? If they aren't, what are the restrictions preventing their dev...
I want to try and use a succinct type data structure in order to find the amount of occurences of a letter $C$ in a string $S$ until a given index $I$. Assume we have a string $S$ of length $n$ over the alphabet $\Sigma = \{1,2,3,\ldots,n\}$. I want to build a data structure whose space usage is at most $O(n)$ machine-...
There are two classes of binary functions, $F_1,F_2$. The VC-dimension of $F_i$ is $d_i$. Is there any simple formula for the VC-dimension of the following classes? $F_\lor := \{ f_1(x) \lor f_2(x) | f_1\in F_1 \text{ and } f_2\in F_2\} $ $F_\land := \{ f_1(x) \land f_2(x) | f_1\in F_1 \text{ and } f_2\in F_2\} $
The following language is NP-complete: $$\{ (\alpha, x, 1^n, 1^t): \exists u \in \{0,1\}^n s.t. M_\alpha \text{ outputs 1 on input } (x,u) \text{ within t steps}\}$$ I would like to have a stronger understanding of the $1^n$ and $1^t$ inputs that are provided as auxiliary inputs. Is the above language equivalent to the...
Flynn's Taxonomy was a classification of computer architectures published in 1966. Computing has changed a lot since then. Is this taxonomy still useful? What are some of its shortcomings for evaluating modern computing systems?
Design a linear time algorithm for finding the least positive integer missing from an unsorted array. Changes in the array are allowed. For example, for the array -10,-1,2,3,6,30, the answer is 1. I thought about finding the maximum and minimum numbers in the array (this is $\Theta(n)$), then a loop from the minimum ...