instruction
stringlengths
35
29.1k
Given the context-free grammar \begin{align*} & S \rightarrow AA \\ & A \rightarrow xA \\ & A \rightarrow B \\ & B \rightarrow yB \\ & B \rightarrow \lambda \end{align*} What is the meaning of $\lambda$? $\lambda$ itself means the empty string and will match anything without consuming it, but in terms of the production...
I have an exercise and I don't understand the solution. Given memory data ranging from 1A0040h: 000102070405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F Given memory data ranging from 1A0090h: 202122272425262728292A2B2C2D2E2F303132333435363738393A3B3C3D3E3F Given memory data ranging from 7B0040h: 404142474445...
Given a set with n inserted elements and a desired false positive probability p, we can find the minimum number of bits in the bloom filter m by computing -n*ln(p)/(ln2)2 Suppose we have two sets of different sizes and we want to compute their intersection using the bitwise-AND operator on their bloom filters - this m...
This is one of the example lemma that has been proved in TAPL book which I'm unable to grasp. The objective is to prove |Consts(t)| <= size(t) where t is a term. Now, Consts is a function defined like this: Consts(true) = {true} Consts(false) = {false} ... and so on Similarly size(true) = 1 size(false) = 1 ... and so ...
I'm looking for an algorithm that will help me determine substring matches at scale. I have a pool of 100+ million "needles" (strings). I can do as much pre-processing on them as I want, and storage is cheap. On detection side, I have both a very large pool (hundreds of TB) of strings to search for needles in, and also...
I started with this sum of products: abc’d’ + abc’d + ab’cd’ + a’b’cd’ + a’bc’d + a’bcd + ab’c’d + a’b’c’d I have been able to simplify to this: b'c'd + abc' + a'bc + b'cd' I can't seem to find a way to simplify it anymore. I have tried reading and watching a ton of tutorials but nothing is clicking. Some things I ha...
I was given the following algorithms problem: Suppose you have $n$ cities. Each city $c_i$ has population $p_i$. You want to construct $m \geq n$ schools, where each school can only serve students of its city, and fulfill two objectives: Every city must have at least $1$ school. You want to allocate schools to citi...
Suppose there is a tutorial session at a university. We have a set of $k$ questions $Q = \{ q_1 \ldots q_k \}$ and a set of $n$ students $S = \{ s_1 \ldots s_n \}$. Each student has a doubt in a certain subset of questions, i.e. for each student $s_j$, let $Q_j \subseteq Q$ be the set of questions that a student has a ...
I would like a way to hide a piece of information from Alice and Bob. Let's say this piece of information lets Alice and Bob vote me off the island. If Alice had this information she could vote me off even if Bob did not want that. Likewise if Bob had this information he could vote me off the island even if Alice did n...
Player $A$ thinks of number between 1 and $n$ and ask $B$ to guess the number with minimum number of decision queries (yes or no type ). Game : $A$ chooses an element in {1,2....,n} $B$ tries to guess this number by asking Yes/No questions. Binary search is a way to solve the problem, so with $\log n$ many queries w...
An integer addition can be represented as following: $A + B = A \oplus B \oplus carry_{vector}$ My question is how to determine the carry vector from $A$ and $B$ (not from the result)?
If I have an algorithm that fills out an $|V| \times |V|$ table with for loops and an $O(1)$ sub-problem after running Dijkstra twice (outside the loop), I think I get the following runtime complexity statement: $$ O(\text{my algorithm}) = O(|V|\mathop{log}|V| + |E|\mathop{log}|V|) + O(|V|^2) $$ Assuming Dijkstra's is...
Algorithmic (aka Automatic) Differentiation is a wonderful technique for numerical computation of derivatives. I understand how it relates to the fact that we know how to deal with every elementary operation in a computer program, but I am not sure to get how this applies to every computer program. To quote from this w...
There are two problems I see with negotiating the next block chain: which transactions to include in the chain (because consider transaction T which has propagated through exactly 49% of the network at the time the next block is negotiated) which proposed block to consider the next legitimate block in the chain, becau...
I'm trying to understand how instance variables for a given object are stored for easy access later on. For some background, I understand that if you have a reference to an array it is very easy for a computer to access any particular item in the array with an efficiency of $O(1)$ by just multiplying the index provided...
In this paper -> https://www.cs.ucsb.edu/~mturk/Papers/jcn.pdf by Turk and Pentland, 1991, pg 76, formula (8) quote "... The simplest method for determining which face class provides the best description of an input face image is to find the face class k that minimizes the euclidean distance. (epsilon_k)^2 = || omega -...
Background and main question I am studying algorithm analysis and design, and have been going through "Algorithm Design and Applications" by Goodrich and Tamassia. One of the applications problems (A-11.2) poses the following: Given a set, P, of n teams in some sport, a round-robin tournament is a collection of games ...
Question: Let $A$ and $B$ be finite alphabets and let $\#$ be a symbol outside both $A$ and $B$. Let $f$ be a total function from $A^{*}$ to $B^{*}$. We say $f$ is computable if there exists a Turing machine $M$ which given an input $x \in A^{*}$, always halts with $f(x)$ on its tape. Let $L_{f}$ denote the language $\...
I have a matrix $C \in \mathbb{N}^{n \times n}$. Semantically, it is a confusion matrix where the element $c_{ij}$ denotes how often members of class $i$ are predicted by a given classifier as members of class $j$. The order of elements does not matter, but $c_{ii}$ has to be the correct predction of class $i$. So for ...
First post here, glad I found this exchange. I am in my Operating Systems course at university learning process scheduling. In my homework assignment we have to fill out a simulated scheduling chart along with the corresponding Gant chart. The arrival time of the first process is at time 0, and it's service time is 5 s...
I have a dataset of events with timestamps spanning several months. The event rate is "bursty", i.e. there are periods of much higher and lower rate than the average. I would like to randomly select a subset of these events having approximately uniform time distribution. What weight should be applied to the random sam...
I'd like to devise an algorithm which, given n non-intersecting line segments in the plane and a point p that does not lie on any of these segments, determines the region of the plane that is “visible” to p (see the image I've provided below). Ideally, this algorithm should run in O(n log n) time.
Suppose we are tasked with expressing a randomized list of all numbers up to but excluding $2^n$ (ie. a random list of all n-bit numbers). What are some efficient ways to do such a listing using as few bits as possible? Attempt: My thought is that the verbose listing of all $n$-bit numbers has a lot of redundancy, so ...
When running a data center, one of the cost metrics you might care about is "ram seconds". For example, an algorithm that holds 1 MB of memory for five minutes consumes 300 million ram seconds. A datacenter only has so many ram seconds in a day. The spacetime complexity of most algorithms, i.e. their cost in ram-second...
I've been playing around with converting regular languages to regular expressions and was wondering if my thinking is correct for this one. Question: The set of all strings that begin or end with a doubled digit, either 11 or 00. (In all cases assume the alphabet is {0,1}). So far, I have: $((11+00) + (1 + 0)^*) + ...
I've run into a problem concerning epsilon transitions and removing them. Specifically, it is to do with the picture seen in this post. My problem is that I am unsure of what to do with q1. I've already attempted to solve it but I don't know if it's correct. Should it just sit there still with no inputs going to it ess...
How would I go about predicting the next word in a sentence if I have a n-gram model available? A intuitive solution would be to just ask the probability of all the words that can come next and see which has the highest. But this would be dreadfully slow if I have a very large set of n-grams wouldn't it? If anyone coul...
Suppose a leauge of tic-tac-toe playing agents. As the league proceeds, the bad players are kicked out, and better players come in. The problem resides on how to at least approximate the better player. One way to think of is an evolutionary approach. By random mutation possibly followed by crossovers, you may expect th...
For error detection purpose I am looking for separate arithmetic codes which are closed under integer addition. By separate, I mean the code word $C$ for message $x$ is a tuple $(x,f(x))$ where $f(x)$ is the redundancy part. In contrast to that, a non-separate code word $C$ would be $f_2(x)$ where $f_2$ encodes the wor...
Motivated by Hardness proof of EVEN-ODD PARTITION post I came up with a string version. String even-odd partition INPUT: $(x_{1,0},x_{1,1}),\dots,(x_{n,0},x_{n,1})$, i.e., $n$ pairs of strings over $\{0,1\}^*$ QUESTION: Does there exist $(b_1,\dots,b_n) \in \{0,1\}^n$ such that $x_{1,b_1} \cdots x_{n,b_n} = x_{1,1-b_...
Control Unit has MAR and MBR registers. so MAR emits instruction to address bus so that the specific cell in the memory is activated. MAR also emits READ or WRITE command to control bus. MBR emit data for WRITE actions to data bus. Question is how does the control bus communicate between MAR and MBR to know whether it ...
Is there any specific architecture to pipelining that we must follow to perform "operand-forwarding" inorder to avoid its harzards? My tutor seem to have, there are different architecture. And he taught us 3 different, and i am not even sure how to know which one to use.
2QBF is the following problem: given a CNF formula $\psi$ on $2n$ variables, determine the truth value of $$\forall x \in \{0,1\}^n . \exists y \in \{0,1\}^n . \psi(x,y).$$ Question: Is 2QBF in $P^{NP}$ (or, expected to be in $P^{NP}$, under standard conjectures)? Motivation: If the answer were yes, it would suggest a ...
I want to find all possible train routes from the user's chosen city A to city Z, given that for any combination of cities there is defined one or more combinations of one or more graphs that can be traversed. The graphs are defined in KML files, and the valid combinations are also pre-defined. The number of valid comb...
I've recently been working on a problem that I believe can be expressed as a vertex cover problem over a directed graph. Formally, I have a graph $G = (V,E)$ where $V$ is a vertex set and $E$ is a set of edges between vertices. The edges are directed so we can have $e_{ij} = 1$ but $e_{ji} = 0$ where $i,j \in V$. Here...
I asked this question on DB.SE but it didn't get any traction, so I'll ask it here... The following statement is in the Ramakrishnan text (2nd ed. page 252): (emphasis in bold is mine) The non-leaf pages direct a search to the correct leaf page. The number of disk I/Os is equal to the number of levels of the tree an...
I have a hypothetical question: suppose there exists an algorithm that solves an NP-Complete problem polynomial time, but requires the computation of values that grow exponentially big (or small). For example, suppose POLY-3SAT solves 3-SAT in N^17, however to do so it must compute/evaluate the value of a number C wh...
Suppose I have an algorithm that runs in $O(n)$ for every input of size $n$, but only after a pre-computation step of $O(n^2)$ for that given size $n.$ Is the algorithm considered $O(n)$ still, with $O(n^2)$ amortized? Or does big O only consider one "run" of the algorithm at size $n$, and so the pre-computation step i...
Randal Bryant developed an exponential size lower bound for any BDD encoding the middle bit output of the multiplication function, regardless of variable permutation. But at the same time the multiplication function is decidable in logarithmic space. Of course related to P versus NP, the lower bounds complexity of its ...
Suppose that we are given a pattern $p$, which is a set of characters (order doesn't matter). We are also given a set of strings $A$. I want to find all of the strings in $A$ whose characters are all contained in $p$ (without taking the order of these characters into consideration), i.e., to find all $s \in A$ such th...
Parsing expression grammars (PEGs) are unambiguous and have a superficially similar syntax to BNF, but include three important differences: The ordered choice operator e1 / e2 / e3. The and predicate &. The not operator !. I have a few questions: Are the languages recognized by PEGs all context-free? If the answer ...
I recently discovered the idea of a total transition function in Automata Theory. To my understanding this means that every state has at least one outgoing state. My question is whether this restriction applies to accepting states, since my initial intuition tells me that this would be an overly strict enforcement of t...
float myTotalAmount=0; void update(float amt){ myTotalAmount+= amt; } Task A called update(10); Calculated myTotalAmount+= amt; Didn't store the value for myTotalAmount; -------X Task B called update(5); Can we say X didn't happen due to context switch? or is Task B able to call update method because context switc...
I have a hole in my understanding of what makes a problem NP. I understand that Mario, for example, is NP-hard - it can be reduced to the NP-complete problem of 3SAT (see https://www.youtube.com/watch?v=mr1FMrwi6Ew) Therefore if these games were also in NP, they would be NP-complete (by definition). My understanding is...
The Wikipedia article on the pumping lemma states: We now pump $y$ up: $xy^2z$ has more instances of the letter $a$ than the letter $b$, since we have added some instances of $a$ without adding instances of $b$. Therefore, $xy^2z$ is not in $L$. We have reached a contradiction. Therefore, the assumption that $L$ is re...
So I am trying to work on a problem and honestly... I am so lost with this one. I will try to ask it the best I can. Exact text of the problem: "Prove the following directly from the definition of Big Theta; 100,000,000 is a member of the set of functions defined by Big Theta of g(n), where g(n) = 1" Additionally, the ...
I have an assignment in which the problem, $D$, is simple but, once found, easy to check. Is it enough to prove that a solution $x$ can be checked in polynomial time to prove that $D \in NP$? (The problem $D$ is a decision problem) Edit: Changed $P$ to $D$
Suppose the alphabet is {a,b}. I have tried coming up with NFA1: third symbol is a, and NFA2: third from last symbol is a. Then NFA3 and NFA4 similar but with symbol of b. Then I use intersection of NFA1, NFA2, and intersection of NFA3, NFA4, and add $\epsilon$ transition. But things seem to go wrong here. When doing t...
Can someone explain to me in a plain English what call by Reference mean ? I am having trouble to recognize a difference between "call by value" and "call by reference" Thank you.
Proving the language $L=\{ a^i b a^j |\ i<j,\text{ or }i>j;\ i,j>0 \} $ is not regular, I am trying to use the pumping lemma for regular languages: pumping length $:= m$ case 1: $i<j; j=m$ $w_1 = a^i b a^m = xyz$ $|xy| < m$ $|y| > 0$ $\Rightarrow$ $y$ can be: $a$s only $a$s + $b$ just $b$ However, this leads to...
I am with the phone so I would be more verbose when I will have a pc on hand, if you desire. The first fit algorithm for approximating the bin packing problem (NP-hard) is a $2$-approximation for the optimum. Can you show me a concrete worst case showing that $2$ is a good (or bad) extimate for the bound?
I'm not sure if this is the right place, but I have an idea for a database kind of like a wiki, that would NOT have editors, and would have the following requirements: Any user can start with using their real name or a pseudonym Anyone can later switch to using their real name (no reversals to a pseudonym or changing ...
In the book "Constraint Handling Rules", Thom Frühwirth explains (on p. 50) "Substitutions, variants and equality" over a usual first-order logic language composed of variables, function symbols and predicate symbols. It's the usual foundation in preparation for introducing unification. However, one then meets the fol...
I was attempting to write a computer algorithm to determine if a particular number breaks the Collatz conjecture. It is very easy to determine if a particular number falls into a loop, however I cannot think of any way to determine if a particular number is on an infinite divergent trajectory. Assuming the Collatz con...
Is the following language decidable? L = {(M) : M performs at least 100 steps on every accepted input.} I tried to use reduction from the halting problem, but still no dice.
How to design Hashing function when the distribution for the bits that will be set are known before hand? Given that the number of bits to be set is constant. The intention is to minimize the hash collisions and resizing of the hash table. Mentioned query is more of an open-ended question. What I am interested is in th...
I want to use Vertex Cover as a known $NP$-complete Problem for the reduction. The claim is that if a have a vertex cover in graph $G$ with size $\le k$, I will have a clique cover in $G^\prime$ with total number of cliques $\le k$ I want to reduce vertex cover problem to clique cover problem in the following way: ...
Given a undirected graph $G=(V,E)$. Imagine traversing the Graph was restricted; following an edge $a$ over a node $v$ to an edge $b$ is allowed if and only if a function $w: ( a, v, b ) \rightarrow \{0,1\}$ returns $1$. Is there a effective solution to find the shortest path between two nodes without trying every poss...
I've recently viewed the paper of AlphaGo, which has done gradient-based reinforcement learning to get stronger. The learning was successful enough to beat a human master, but in this case, supervised learning with a large database of master level human games was preceded the reinforcement learning. For a complex enoug...
I'm trying to find whether a property $\mathcal{P}$ is true for all points of the unit square (in 2D). At each step I can query for a point of my choice. An oracle then answers me by either: telling me $\mathcal{P}$ doesn't hold for this point and thus the problem is solved: the property doesn't hold for all points in...
For stack-oriented programming language, how many top-most items of the stack are needed to be accessible in order to be Turing complete? Is it enough to be able to access just the top-most item? Two items? Three? Any item? In the case of Forth, is it necessary to have rot, pick, roll? Why does rot operates with exactl...
I think they are because, SLR and LALR have same number of states and, since there are no conflicts in SLR table this means all the SLR information is needed and correctly used for parsing, so all that has to be in LALR.
Is it possible for a DFA to have less states than its equivalent NFA? Number of transitions does not matter. If possible also give an example.
I am implementing machine learning software and in my case, I am using K-nearest neighbour classifier to get the task done. So far, I am trying to understand how Dijkstra's algorithm that has been used to solve salesman travel problem is different from K-nearest neighbour algorithm?
1M = 2^20, while the max number of memory locations for 16 bits is 2^16. How could there be a memory size of 1M x 16? Or can there? Wondering about this for a question we were given..
I don't know if this question should have better been on math.Stackexchange Let be the operation $Double$ on the words on an $\Sigma$ alphabet which inserts after each character a copy of this character. Thus, $D(ab) = aabb$, $D(abaab) = aabbaaaabb$, etc... We had to prove that these regular expressions are closed by t...
Can't seem to answer these questions, I'm sure the answers are out there somewhere but I don't really know what keywords to use to find them. Any answers or good sites/ documentation would be much appreciated. And please don't say wikipedia, the language used is a bit out of my comprehension at this moment. Is it cor...
Let's say I have to do n jobs, and each job can be done at or after a time T(i) (1<=i<=n). And we have 1 machine and the machine takes a time M to do any job whatsoever. The machine once started can be used again only after it's job is done. What's the optimal way to schedule these jobs on the machines?
I was reading Minsky's and Papert's book on perceptrons and it had the definition of conjunctively local as follow (look at the last images if its still unclear): A predicate $\psi$ is conjunctively local of order k if it can be computed by independently computing a set of functions $\varphi_1(X)$...$\varphi_n(X)$ and ...
Let us take a hypothetical machine i which halts on the ith day of the month if it rains on the ith day of the month. Basically it describes the present. If we put this machine in a Halting Machine it should say whether the machine would halt. i.e. whether it would rain on the ith day of the month. Since the Halting Ma...
I have just started learning Analysis of Algorithms and I came across these set of questions: Find witnesses c and m such that rn+1 = O(rn) for r>1 Show that there are no witnesses for n2 = O(n) From 2, deduce no witnesses for 22n = O(2n) So, I have tackled some as: rn+1 ≤ rn+1 rn+1 ≤ r.rn rn+1 ≤ (r+1).rn Therefore...
Please tell me is their deterministic linear bound automaton same power as non-deterministic linear bound automaton to recognize any language?
You have a Black-Red Tree of height h that has two childs: Left child is a full binary tree of height h-1 Right child is a full binary tree of height h-3 Balance the tree so both childs of root are of the same height (you don't have to keep the other nodes balanced, just the root). From Wikipedia I understood that...
Without sound synthesis, what is a good way of making a program that plays guitar notes from an array of stored sounds? What I have in mind is to make note as a function of vibration speed such as N (V) which returns an int index of the sound to be played and the vibration speed itself as a multivariate function of 3 ...
I am currently studying turing computability and related problems such as the halting problem with a background in formal languages. I know that the class of recursive (decidable) languages is a closure under union, intersection and complement, and that recursively enumerable languages (semi-decidable) are a closure un...
My question is that if P = NP, then we can solve any NP-hard problems (the one which is NP-complete and the one which is not-NP-complete) by saying that since we have a polynomial time algorithm to solve the NP problems and since the reduction works in polynomial time. Therefore, polynomial to polynomial is polynomial,...
I am trying to prove problem 1.59 in Sipser's book: Introduction to the theory of computation , 2nd Edition. Let $M=(Q,\Sigma,\delta,q_0,A)$ be a DFA and let $q'$ be a state of $M$ called its "home". A Synchronizing sequence for $M$ and $q'$ is a string $s\in \Sigma^*$ where $\delta (q,s)=q'$ for every $q\in Q$. (We a...
It is well known that all computable functions can be expressed as terms of the lambda calculus and computed according to its rules. It is also more or less obvious that many classical formal languages (i.e. languages with formalized semantics) can be translated into the lambda calculus (e.g. using a Church encoding). ...
I'm new to linear programming and can't wrap my head around something. Let P be a LP in standard form $$\begin{array}{ll} \text{maximize} & t x\\ \text{subject to} & r x \leq s\\ & x \geq 0\end{array}$$ I figured that the dual program is $$\begin{array}{ll} \text{minimize} & s y\\ \text{subject to} & r y \geq t\\ & y \...
Baker, Gill and Solovay [1] gave an oracle $A$ relative to which $P^A=PSPACE^A$. The oracle is the very simple $PSPACE^A$-Complete language $$A = \{\langle M, x, 1^n \rangle | M^A \text{ accepts } x \text{ using }<n\text{ tape slots} \}.$$ (This inductive definition of $A$ is sound because no machine can query "beyond ...
Question: Is true that $L_1 = \{01^*0\}$ is $m$-complete in the class of decidable languages? $L_1$ is defined as: $$L_1 = \{01^*0\} := \{01^n0: n \in \mathbb{N}\}$$ Definition of a $m$-complete language: A language $L^*$ is $m$-complete in the class of decidable language, if for any decidable language $L$ we ...
The sheet of equivalences given to us in class provides the two equivalences \begin{array}{|c|c|c|} \hline \text{Universal Instantiation} & \forall x ~ P(x) \implies {S_t}^x P & \exists y ~ \forall x ~ P(x) \implies \exists y ~{S_t}^x P \\ \hline \text{Existential Instantiation} & \exists x ~ P \implies {S_t}^x P & \fo...
I am studying the bakery algorithm, and I am unsure of what the variable i represents in it. I understand that Entering represents a bool value to protect Nummber while it is updating, but I'm having a hard time finding clear explanations as to what variable is doing what. Is Number an array of threads? Is i a particul...
The sheet of equivalences given to us in class provides the the equivalences \begin{array}{|c|c|c|} \hline \text{Resolution} & A \vee B, \neg B \vee C \models A \vee C & \neg A \implies B, B \implies C \models \neg A \implies C \\ \hline \end{array} I noticed that the $A$ is negated. Is this necessary for proper Reso...
Suppose I randomly generate $n$ points from the unit square $[0,1]^2$, form a complete graph in which the weight of each edge is just the Euclidean distance between its endpoints, and compute the minimum spanning tree. I noticed empirically that the expected weight scales like $\sqrt{n}$. Using only back of the envelop...
How would a CPU know if a piece of data is in cache or RAM or on disk? This would imply there's some sort of meta addressing scheme on where everything is.
Hello I'm trying to solve this recurrence with the method that says the teacher that when you get to \begin{align*} T\bigg(\frac{n}{2^{k}} \bigg) \end{align*} you do \begin{align*} \frac{n}{2^{k}} &= 1 \qquad (\text{by definition})\\ k &= \log_{2}(n) \end{align*} \begin{align*} T(n) &= 7T(n/2) + n^2 \\ &= 7^2T(n/2^2...
I was reading Minsky's and Papert's book on perceptrons and I was reading theorem 0.6.1 and I was having a hard time understanding it. The theorem was about proving that the property "connected" was not a local property i.e. that you somehow had to see the whole picture to know if something was connected or not. In par...
AB + C is not the answer. The correct answer is AB + BC. HOW?
I'm currently studying formal languages. My lecture states that, while the words of a language are finite, the sentences build with the underlying grammar are not. But I don't get why this should be generally true. I can imagine grammar which leaves me with a finite amount of sentences. I agree that one could create a ...
Let's say I want to describe some new grammar formalism, which doesn't coincide with known grammar sets. Should I always previously describe corresponding equivalent automata and why?
A discrete memoryless source W has words $w_1,w_2,w_3,w_4,w_5,w_6$ that occur with probablilities $0.05,0.05,0.15,0.2,0.25,0.3$ respectivley. Does there exist a compact instantaneous binary encoding for this source with word lengths $2, 2, 4, 4, 5$ and $5$? Shannon's Noiseless coding theroem that says a compact encodin...
I was reading a paper here, and it mentioned "quotient structure" in the following sentence (third page, second paragraph of the paper) In order to obtain a representation of terms truly isomorphic to λ-terms, we need to build a quotient structure, quotient the set of raw terms with respect to alpha-equivalence. T...
This may be sound like a stupid question, because, of course, it can be negative and, as Wikipedia states: A numeric variable is signed if it can represent both positive and negative numbers, and unsigned if it can only represent non-negative numbers (zero or positive numbers). But is it really? Because it doesn't wo...
I want to understand how the backpropagation algorithm would work on a neural network with multiple outputs. More specifically, I have a network with 21 binary (0/1) outputs and I want to minimize the number of outputs that I get correctly; in other words, I want to minimize the hamming distance between the output vec...
Let $C$ be the binary linear code with the following generator matrix $G= \begin{bmatrix} 1 & 1 & 0 & 1 & 0 & 0 & 0 \\ 0 & 1 & 1 & 0 & 1 & 0 & 0 \\ 0 & 0 & 1 & 1 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 & 1 & 0 & 1 \end{bmatrix}$ The support of a codeword is the set of coordinate positions in which the code word has ...
Given a language $L = \left\{ a^{nk+1} | n > 0 \right\}$ and $k$ is an integer constant. How to show that a DFA for this language must have $k+2$ states or more states using minimum state lemma. By minimum state lemma I mean the number of minimum state a DFA has is the number of pairewise distinguishable states. I hav...
I'm trying to find whether $$L = \{\langle M, w \rangle: \exists q.\ \text{on input}\ w\ M\ \text{doesn't pass through a state}\ q\}$$ is decidable or not. I don't know how to proceed here. I mean, I have the feeling that I have to know which state $q$ the machine $M$ 'skipped' in order to go ahead. For instance if $q ...
Consider the following problem, which I have called '$\mathsf{\text{double max $k$-vertex-cover}}$': Given an undirected graph $G=(V,E)$ and integers $k$ and $t$, does there exist a set of vertices $V'\subseteq V$ of size at most $k$ such that the set $\{(u,v)\in E\mid u\in V' \wedge v \in V' \}$ has a size of at leas...
I am currently writing a program where a lot of adding 0 to numbers and multiplying by 1 and 0 occurs and it got me to wondering if the CPU 'shortcuts' (drops), these operations. I'm a CS student and this hasn't been brought up ever. Can a CPU do this? What are the trade-offs in designing a CPU that detects +1, *1 and ...