instruction
stringlengths
35
29.1k
It is known that $\{ SUM, MULT \}$ is Turing-complete, i.e. every Turing machine has an equivalent circuit made up of $SUM$ and $MULT$ gates. By the way, I could not come up with designing $MOD$ function with $SUM$- and $MULT$-only circuit. How can one construct such a circuit? P.S. The Turing machine is simple. Assumi...
When we train a network, we usually have an error function which usually looks like this: $$Error = (output - target)^2$$ When we add a regularization term, it looks something like this: $$Error = (output - target)^2 + reg term$$ I understand that there are many different ways of defining the reg term, but in this exam...
It seems a lot of courses (like this and this) on theory/models of computation (and even formal languages) cover DFA, NDFA, PDA, and TM in the order of increasing computational power. This of course makes sense, but why aren't various other computation models included in general? For example, we could take the route fr...
Consider these matrices: $A=\begin{bmatrix}1 & 2\\3 & 4\end{bmatrix}$ $B=\begin{bmatrix}-1 & -2\\-3 & -4\end{bmatrix}$ Using standard algorithm: $C=\begin{bmatrix}1*-1+2*-3 & 1*-2+2*-4\\3*-1+4*-3 & 3*-2+4*-4\end{bmatrix}=\begin{bmatrix}-7 & -10\\-15 & -22\end{bmatrix}$ Transpose B and do dot product row wise for A and ...
I'm revising for a test and having problems with a past question. It states that $f(x)=5x^2+4x+3$ is $O(x^2)$ and has a series of sub-parts asking if particular values of $C$ and $k$ (e.g., $C=12$, $k=0$) are witnesses of this fact (i.e., $f(x)\leq Cx^2$ for all $x>k$). My method so far has been to establish some "test...
Reading the Wikipedia page was a little dense for me. Can anyone offer a friendly explanation of what this means? It sounds like it saying that if you have two ordered collections, if they are "ordered by containment" then they will be in roughly the same order with each other?
I have checked many discussions for understanding this problem. I understand the reasoning , unfortunately there are some drawback in my understanding. The Blank-tape halting Problem Input: Turing Machine M Question : Does M halt when started with a blank tape? So this is the reduction : The construction of Mw is as f...
What are some examples of context-free grammars that necessarily trigger cubic worst-case complexity for GLR parsers? I have seen a mention of the example S $\rightarrow$ SSS | SS | "a" but I would be interested to find more information on this and also find proofs of their worst-case complexity. Can anyone refer to pa...
I read about virtual memory from L08/CS152 of U.C Berkeley and used to deep dive into the details of VM hardware implementation, yet didn't find any document or figure on the course specifying where the 4 “Base & Bounds“ registers (Data Bound Register, Data Base Register, Program Bound Register, Program Bound Register)...
Vertices in my graph are composed of {name, category} where category is one of {red, grn, blu, ylw}. Edges in my graph are weighted and directed. In the visualization, the thick end of the edge represents the destination. My graph has negative cycles, for example [A-red, B-red, C-blu, X-grn, D-blu, A-red] has a cost o...
Ive been playing around with the Intel Realsense R200 Camera. I am able to exact focal length in x and y i.e. fx and fy, but only "up to scale relative to pixel width and height, respectively" At the moment I dont see any way of querying the pixel dimensions in mm from the API nor can I find them in the tech specs. So...
Why do we need to learn MIPS Assembly language before learning computer organization? What are the implications of learning it first? As a computer scientist, why do we need to learn this one and where will these topics will become handy? with references: -Computer Organization and Design by Patterson and Hennessy -Int...
I was wondering if anybody knows if there is an algorithm for Subset-sum, preferably exact, having a $O(n)$ Time Complexity or near-linear ($n$ = number of elements in the input set) I remember that some time ago I read a paper (from Psinger? I can't find it again..) stating that there is a linear or near-linear time c...
I am currently trying to optimise the scheduler of FreeRTOS and in general Real-Time Operating Systems as a Project. In FreeRTOS, and I suspect other RTOS as well, we don't specify the deadline for the tasks, not to mention the tasks would mostly be periodic. How can we, if possible, generate the deadline for them? May...
Given a collection of sets $S_i$ of disjoint subsets $sub_i$ of a set $X$, find a set $A$ of disjoint subsets $asub$ such that each one of these subsets is subset or equal to at most one subset in each of $S_i$, i.e., for $S_1$ = $\{sub_11,sub_12,sub_13\}$, where $sub_11$, $sub_12$, $sub_13$ are disjoint, $S_2$ = $\{su...
My question is a bit on the philosophical side, and there is probably not one single 'correct' answer on this. Nonetheless, I'm curious to hear your opinion... I'm currently designing a convolutional neural network to locate features in images taken by a microscope. These features are geometrically quite simple and sim...
Is there a formal theory or framework described in text books that models access rights in a mathematical way. I would expect things similar to the following: We have data (objects). We have operations on these objects (CRUD, create, read, update delete) We have actors (users, principals) We might model access rights ...
This is an excerpt from the algorithms textbook How to Think About Algorithms by Jeff Edmonds (This book is a gem by the way). I get his conclusion about Merge/Quick/Heap sorts having $O(NlogN)$ operations with respect to $N$, the number of elements in the input list, and at the same time they are linear in the contex...
https://cseweb.ucsd.edu/~mihir/cse200/ss6.pdf shows $NP$ in $BPP$ implies $NP$ in $RP$ by showing $SAT$ is in $RP$ if $NP$ is in $BPP$ and since $SAT$ is $NP$ complete we have $NP$ is in $RP$. However since $UP$ does not have a complete problem and so can we still show $UP$ in $BPP$ implies $UP$ is in $RP$?
The steps in reversal of DFA are :- Make final state as initial state. If there are more than 1 final state, then make a new start state with epsilon transitions to these states. Change all initial states to final states Reverse the direction of edges. Now what if I have a state which is both initial and final ? Will...
Problem Statement. There are many interesting variations on the Tower of Hanoi problem. This version consists of $N$ pegs and one ball containing each number from $1, 2, 3, \dots$ Whenever the sum of the numbers on two balls is not a perfect square (i.e., $c^2$ for some integer $c$), they will repel each other with suc...
Consider from the Bitcoin white paper a graphic that includes dotted arrows, labeled "sign" and "verify": What does it mean to "sign" and "verify", as outlined in this paper? Are the terms "private key" and "public key" used in the same way that they are in the RSA encryption algorithm?
I just finished reading a white-paper from a recent AI startup. The company, Deep Brain Chain, wants to distribute neural network training over computers worldwide, using blockchain technology. Here is the whitepaper From my understanding of machine learning and artificial neural networks, the communication bandwidth i...
Let us consider school buses. Let a 'Bus Route' be a sequence of bus stops travelled by a single school bus (day after day). Let a 'Bus Stop' be a combination of Latitude (Lat), Longitude (Lon) and Time-of-Day (ToD). That is, a bus may stop at the same Lat/Lon to pick up kids in the morning and again in the afternoon t...
While reading about SIMD on Wikipedia, I noticed the use of the technical term Pool in the figure below: I didn't know what it means; so after searching for it, I found only this article. Yet the definition wasn't very clear to me: In computer science, a pool is a set of resources that are kept ready to use, rather...
Whát i mention here is for having 2x bus will increasing 2x memory access speed like 3x will have 3x memory access speed like that !
I would really appreciate if anyone could tell me how to generate CFG from this language. I am trying to learn the procedure of generating CFGs from CFLs and I am able to solve easier problems.. but I am really stuck on this one, I just can't get it how can I generate at two different positions at the same time. L = {0...
Comparison-based sorting algorithms are lower bounded by $\Omega(nlogn)$, where $n$ is the number of elements in the input list. However, when dealing with different models of computation, such as algorithms that deal with arithmetic operations (Euclid-GCD) or, $n$, the size of the input, is no longer the number of ele...
In the data bus all the registers are connected in and out with the data bus but the AC don't have it only out also the memory don't have a direct connection with it ? Please explain if you know
I want to modify the Naive algorithm to find out if there is any occurrence of the string P in T as a substring with at most one mismatch - where a mismatch is either one of the following: INSERT, DELETE, OR UPDATE. Let jTj = n; jPj = m. What will be the worst-case complexity in modified version? Can I use memoization...
I'm trying to think about an algorithm for this problem. I know there is an algorithm for the second cheapest MST in a graph, but if I understood it correctly it only solves cases in which every weight is singular. My question is how do I get the n'th (say 3rd) MST where duplicate weights count as same tree. I thought ...
Consider the language generated by the following grammar: $S \to aSBb \mid \epsilon$ $B \to aB \mid bB \mid \epsilon$ Is the above language context-free? The above language looks like $\{ w \in (a+b)^* : a^n w_1b w_2b ... w_nb \}$. I tried using the pumping lemma to show that this language is not context-free, but I ...
$L = \{ \langle M \rangle \mid M \text{ accepts two strings of different lengths} \}$. What is complement of this language? my attempt: the complement is: $M$ accepts no two strings of same length and this can be done by dovetailing different inputs on M but we can never say IT CANNOT ACCEPT TWO STRING OF SAME LENGTH...
I am blocked with this question for a long time. $L = \{w\# w ' |$ where $w < w'$ lexicographically, and $w,w'\in \{0,1\}^* \}$ I am trying to find A Deterministic Turing Machine for L. A Non-Deterministic Turing Machine for L. Example $01\#111 \in L$ since $ w=01$ and $w=111$ and $01 < 111$ $1\#011 \notin L$ si...
An algorithm is a “unambiguous specification of how to solve a class of problems... calculation, data processing and automated reasoning tasks” Are the class of problems an algorithm can solve more abstractly considered decision problems? Is the ultimate reason for a calculation, data processing or automated reasoning ...
In the book "Parameterized Complexity Theory" by J. Flum, and M. Grohe, there is a definition on page 7: Definition 1.10. Let $(Q, \kappa)$ be a parameterized problem and $\ell \in \mathbb{N}$. The $\ell$th slice of $(Q, \kappa)$ is the classical problem $$(Q, \kappa)_\ell := \{x \in Q\ |\ \kappa(x) = \ell\}$$ Which is...
Are grammars corresponding to DFAs unambiguous and those to NFAs ambiguous? According to what I studied, every DCFL is guaranteed to have an unambiguous grammar though there are multiple grammars generating them. Every regular language is also DCFL, hence they will follow the same, but I doubt if every grammar correspo...
The problem is defined as: pack a 3D space with a given list of 3 types of cuboids which are each assigned a value, trying to either completely fill the space or to achieve the highest total value of the packing. When researching knapsack problems all of the different variations I came across had a weight constraint a...
Find a context-sensitive grammar for language $L = \left\{ww \mid w \in \left\{a,b\right\}^* \right\}$ where $L \in DCSL \setminus CFL$. I find this task from old exam but there is no solution. I try for solve it for practice, I needed many hour for my solution I write here but I don't think it works.. But I think I ...
I was given the following method to argue that an algorithm $A$ has a worst-case running time of $\Omega(n^2)$: We need to argue that there exists an input $x$ of size $n$, the running time of $A$ with input $x$, i.e., $t(x)$, is at least $cn^2$, where $x>0$ is a constant. If you find a single input of size $n$ t...
The wiki article for Reed Solomon error correction includes the following statement near the end of this section: https://en.wikipedia.org/wiki/Reed%E2%80%93Solomon_error_correction#Syndrome_decoding "The advantage of looking at the syndromes ... Another possible way of calculating e(x) is using polynomial interpolatio...
I'm trying to find the average-case number of times that max is assigned a value by the below algorithm find_max. find_max(L): max = -oo # negative infinity for k = 0 to len(L)-1: if L[k] > max: max = L[k] return max However, I'm struggling to come to a solution. So far, this i...
what is meant by EFFECTIVE ENUMERATION i have comes across this word when I was reading about enumerators for Turing machines is it same as LEXICOGRAPHIC ORDER? so effective enumeration is possible for recursive sets but no recursively enumerable sets? i came across this in this question of a competitive exam L1 is a...
Mathematically it seems so easy to use two elements of a vector as two arguments to a function. $$f(\boldsymbol{x_{i+1}},\boldsymbol{x_{i}})$$ In functional programming however a map (function) allows to work with one element at a time only, so one would need to create vector of pairwise 2-tuples from a single initial ...
I am studying different models of computation and how algorithms can be interpreted under different models. Here is a math(?) question that has been bugging me. Suppose we have $n = \Theta(N\log N)$ bits as the size of input and there are N elements in the input. (The implied assumption is each element has $\Theta(\log...
At the heart of NP-completeness is the idea that one can reduce instances of any problem in NP to, for example, 3-SAT. But this definition doesn't require that it must be possible to convert witnesses for yes-instances in polynomial time also. Does this fact follow regardless? I'm looking at this in particular from the...
I'm trying to understand how the syntax of some programming language is defined. I know that there are some parts of the syntax of programming languages that can't be defined using regular expressions (such as an equal number of opening and closing braces) and that this is why context-free languages like BNF are neede...
In order to show that a problem is NP hard one must provide a reduction from a known NP hard problem to this problem. My question is how to reduce 3SAT to INDEPENDENT-SET? 3SAT is a satisfiable 3 literals in a clause Boolean conjunctive normal formula. INDEPENDENT-SET is a set of vertices in a graph, no two of which ar...
I am trying to implement a secure elecetronic voting system. Therefore I found the Damgard and Jurik Cryptosystem. In their paper the authors describe a secure protocol for "A Length-Flexible Threshold Cryptosystem with Applications" (PDF). I am an experienced Java programmer with more than 10 years of professional ex...
I am in 11th grade. The only subject which I love the most is solving alegebraic equations and questions related to it. I enjoy doing trigonometry but hate the part of proving theorems. I opted computer science for the first time. This is just basic. But whenever I can't understand a CS question, I doubt that I should ...
How do I create a state transition table/array in actual code/pseudo-code? I haven't experienced the "ah-ha" moment yet with the state machine to coding (and I really want to). I've looked at several code sample and read blog posts, but it's not clicking yet. I'm looking for a pragmatic explanation of how the state tra...
I'm looking for a hint for solving the following problem : Given an array $A[1, \dots, k]$ of integers where $A[1] < A[2] < \dots < A[k]$ write pseudocode for an algorithm that determines whether $A[j]=j$ for some $j\in \{1,\dots,k\}$. Worst-case running time should be $\Theta(\log k)$. I shall find an easy to ca...
I have some difficulties in computing Hamming distance in following example: 11100000 00011100 10010010 01001001 I know the definition of Hamming distance (in case of two codewords) but how to proceed in above example. Can someone shed some light on how to compute d_min in above example? Regards
Most popular representation for the natural numbers in type systems is: Inductive nat : Set := | 0 : nat | S : nat -> nat. However, digital computers usually represent numbers as bit sequences, arranged into bytes. The above inductive definition is fine for highly theoretical needs and mathematical proofs, but q...
All metric spaces obey the triangle inequality which is, for three points $a,b,c$, that $$d(a,c) \le d(a,b) + d(b,c)$$ One interesting special case of a metric space is one endowed with an ultrametric structure, in which case the triangle inequality is replaced by the stronger inequality $$ d(a,c) \le \text{max} \{ d(a...
I'd read around on the interwebs, and a lot of the text indicated that many programming languages are generated by a context-free grammar, which leads me to 2 questions: Doesn't variable scoping require a context-sensitive grammer? Particularly, I'm thinking of the following valid C code: int main(){ int count=0; ...
From wikipedia In computational complexity theory, a numeric algorithm runs in pseudo-polynomial time if its running time is a polynomial in the length of the input (the number of bits required to represent it) and the numeric value of the input (the largest integer present in the input). In general, the numeric valu...
If I want a cuckoo filter to hold a dataset with N entries with a target false positive rate of ϵ, how do I select the sizes for the table, bucket, and fingerprint parameters?
Define languages L0 and L1 as follows : L0={⟨M,w,0⟩∣M halts on w} L1={⟨M,w,1⟩∣M does not halt on w} Here ⟨M,w,i⟩is a triplet, whose first component M is an encoding of a Turing Machine, second component w is a string, and the third component i is a bit. Let L= L0 ∪ L1. Which of the following is true? L is not even...
Given a system (S) that accepts a tuple of parameters ($\alpha, \beta, \gamma \dots$ etc). These parameters affect the performance of S in a different way. For instance, decreasing $\alpha$ would improve performance of S at some rate, whereas decreasing $\beta$ has a reversed effect. How can one define a performance me...
I was reading this link. Here I noticed that, in table titles "Float Values (b = bias)", in exponent column, entry for denormalized reals is $00..00$, but in value column, the entry is $-b+1$. Why is there $+1$? If we consider bias of $127$ for single precision format, shouldnt it be $0-127$ only? If its $-126$, then s...
A seek is the task of positioning the read/write head of the disk to the required data block, and irrespective of the size of the data block, all contiguous data can be accessed using a single seek. Seek complexity of an algorithm is defined as the number of times the algorithm leaves one data locality for another, (or...
I was listening CS231n (2017) lectures and noted that there is a lot of attention to Numerical Gradient Computation (NGC). It starts @5:53 in this video and appears a few times later. Also, looking at the batch normalization materials (example), I found a lot of attention drawn to exactly the same topic (well, probably...
I am studying for an algorithms exam and ran into this example problem. A circular disk with radius $2r$ can be covered by $7$ circular disks with radius $r$; in the following you can use this statement without proof. Suppose that we are given a set $S$ of $n$ points in the plane, and we want to cover all points ...
I am reading about divide and conquer algorithm at following link on page on 57 in this link. The document analyzes the running time of the algorithm. At the very top level, when $k = 0$, this works out to $O(n)$. At the bottom, when $k = \log_2 n$, it is $O(3^{\log_2 n})$, which, the author claims, can be rewritten as...
Given $N$ circles and $Q$ points. What is the optimal solution for checking "if point is covered by any circle" for every point? The trivial solution would be $O(QN)$.
$L_1= \{ \langle M \rangle \mid L(M) \text{ is strings of length between } 1 \text{ and } 5 \}$. $L_2 = \{ \langle M \rangle \mid L(M) \text{ is strings of length at most } 5\}$. I am able to figure out that both languages are undecidable as we can have $TM_{yes}$ and $TM_{no}$ and as per Rice's theorem it's undecida...
I read about Virtual Memory in various CS references, however I'm still not sure whether CPU caches such as TLB, L1 and L2 are integrated within MMU. Also I don't know if the hit/miss operations are managed by hardware (i.e MMU) or by software (i.e OS). Does anyone have any idea?
I'm looking at some lambda calculus at the moment and came across this question: 0:R 1:R plus: R->R->R (lambda f:T . lambda g:U . (f 0) (g 0)) (plus 1) (plus (plus 1 1)) Is it well typed given appropriate types for T and U? I'm new to lambda calc but I gather that we substitute (plus 1) for f and (plus (plus 1 1)) for ...
I was referring Booth's algorithm for 2's complement multiplication from William Stallings book. It was explained as follows (please ignore two starting words "As before", it still makes complete sense): The author then gives following example for $7\times 3$, which I am able to understand: Next author gives exa...
My question is as follows: Assuming that $P \neq NP$, show that there exist sets $A$ and $B$ in $NP$ such that neither $A \leq _T^p B$ nor $B \leq _T^p A$, where $A \leq _T^p B$ if there exists a polytime deterministic oracle machine that computes $A$ given access to $B$. That is, $A \leq _T ^p B$ if $A = M^B$ for some...
Are there any examples of context-free grammars for which we simply do not know whether they are ambiguous? By examples I mean an actual specification for the grammar, not some kind of non-constructive existence proof with a counting argument or whatnot. To make things more clear, I should be able to write a parser for...
What algorithm should be used here to solve this problem efficiently? One file stores 5 year log of user IDs & their website visit dates in random order. There were around 1,000,000 users on the website and 1/4 of them were active. Active users visited the website 100 times a day on average. You need to create a new fi...
According to Karpathy's blog "The Unreasonable Effectiveness of Recurrent Neural Networks", recurrent neural networks can map variable-length sequences to variable-length sequences, as shown by the one-to-many, many-to-one, and many-to-many diagrams. How do RNN's do this mapping of possibly different-length sequences? ...
This is referring to not the length of the path, but the sum of the weights of the path traversed. I am getting confused by the variety of algorithms out there. Suppose that for a graph represented by a dictionary of tuple keys and integer values, my simple idea is to check each pair of nodes to see which nodes connect...
I want to show that unrestricted grammar is closed under intersection and I don't want to use Turing machine or etc. So I think that we have two grammar $G_1$ and $G_2$ that are restricted for example simple grammars $$ S \rightarrow XY \\ X \rightarrow aXb | ab \\ Y \rightarrow Ya | a$$ and also $G_2$ is $$ S \righta...
I am having difficulty in reducing non halting problem to the given problem to prove that language is non R.E For eg Completeness problem of TM . In the above problem, we accept $\Sigma^*$ if H does not halt on w . For doing that, we give an input $x$ and simulate H on w for $|x|$ steps. I don't understand how can we ...
I am studying network formation models and I have seen the separation of those models into two groups (wikipedia): Agent-based models: Aka game-theory based models. This distinction makes sense to me. But it mentions a "fixed number of players". Are there no game theoretic models with a dynamic number of players? Dy...
For a typical finite element algorithms, what kind of order of growth in solution time (i.e solve stiffness matrix & post-processing) are we expected to see with an increase in number of elements? Literature I have seen show exponential and power-law like behavior when comparing solve time to number of elements even wh...
how to represent an observation matrix if we do not have a defined observation alphabet? I'm working on extraction of data in a text.
We have a graph with $n$ nodes and maximal degree $k$. On this graph we run a coloring algorithm that finds a maximum independent set. The algorithm colors every node green with probability $\frac{1}{k}$ and colors the node red otherwise. This is done independently for every node. Return the independent set of nodes $x...
when i was studying compilers i came across this in Wikipedia every DCFL has a corresponding unambiguous grammar and hence can be parsed by an LR(1) parser which is the most powerful parser then what is the significance of LR(k) parsers are they more powerful than LR(1) when every DCFL can be parsed by LR(1) why do we ...
Could I transform a bounded-knapsack problem into a 0/1 knapsack problem using the following way-: Example: Lets says I have 3 types of items $n=3$ $p_j=\{10,15,11\}$ $w_j=\{1,3,5\}$ $b_j=\{6,4,2\}$ $c = 10$ Here $n$ denotes the number of types of items, $p_j$ denotes the profit gained by including 1 item of a that par...
I have a table which stores all serial numbers of devices in my system: |------------------------|--------------------------| | # | Serial number (4 bytes) | |------------------------|--------------------------| | 1 | 0x???????? | |------------------------|------...
given 2 lagnauges A,B which are npc. is there a reduction function from A to B $A \leq_PB$ ? my idea was to say that since they are decideable, we can do this: $$ f(x) = \begin{cases} y \in B & \text{ } if x \in A \\y \notin B & \text{if }x \notin A.\end{cases} $$ is this is correct? or its not something that can be t...
I read in some text book ( either ullman or peter linz) that a turing machine must have at least two states. I don't understand why? For example if we want to build a Turing Machine for the empty language then we can start in state $q_o$ (accept state). We will define only one transition for epsilon on which the input ...
CNFSAT is the language of all strings that are encoding of satisfiable boolean formula in conjunctive normal form while CNFFAL is the language of all strings that are encoding of falsifiable boolean formula in conjunctive normal form. Any boolean formula is satisfiable if and only if exists an truth assignment of True ...
I am trying to optimize a coefficients of filter by minimizing sum-squared error. I want to use a genetic algorithm (GA) optimization wherein the coefficients of filter form the GA's chromosome (a vector). How can I construct the objective function, given that I want it to use least-squares minimization?
Till date I have read that a Turing machine can do whatever a computer can. Wikipedia Turing machine mentions that since a real machine can have only a finite number of configurations it is equivalent to linear bounded automata. Is this true?
Let C be a cycle in a simple connected weighted undirected graph. Let "e" be an edge of maximum weight on C Which of the following is TRUE? (A) No minimum weight spanning tree contains e. (B) There exists a minimum-weight spanning tree not containing e. (C) no shortest path, between any two vertices, can contain e....
The above answer taken from the book https://www.amazon.com/Operating-Systems-Sibsankar-Haldar/dp/8131730220 says starvation freedom may not imply progress as processes can be deadlocked. I think that starvation freedom implies deadlock freedom so there is no chance of deadlock and progress is also satisfied. Is the a...
I want to optimization the coefficient of FIR filter using genetic algorithm method. The main data structures in the Genetic Algorithm are: chromosomes (vector) objective function values fitness values If the objective function is : and in the passband in the stopband How to determine the objective function ?
It is said that this problem is NP-complete but I couldn't find the proof. Is there any paper on this problem or not?
As a follow-up from my old question here, I'm wondering more about the equivalence proof. Intuitively, NP has been described as the class of all problems which a solution certificate can be verified in polynomial time. Let's say we have a problem $K$ in NP and we have a certificate $c_e$ obtained externally that proves...
In python3.6, I tried In [60]: a = '\a' In [61]: b = '\b' In [62]: c = '\c' In [63]: l =[a, b, c] If test l In [64]: l #it output following list instead of ['a','\b','\c'] Out[64]: ['\x07', '\x08', '\\c'] encapsulate them directly in a list. In [70]: ['\a','\b','\c'] #it output following list instead of ['a','\b','...
I need some help with the following question: Recall the subset sum problem, which is known to be NP-complete: "Given a finite set of natural numbers and a number $n$, decide whether a subset of the given set exists such that the numbers in that subset sum up to $n$." We consider the great subset sum problem: "Given a...
Say there is a file that is sequentially organized over 2.5 tracks on a disc. I'm assuming there would be a non-zero value for seek time and latency when accessing the first track, but what about the remaining 1.5 tracks? I know it wouldn't actually be zero but I'm talking about a negligible value. When the head moves ...
Title: Best-worst multi-criteria decision-making method Author:Jafar Rezaei, Pub: Omega 53 (2015) 49-57 BWMCD From this example How are optimal weights (W1*, W2* etc) computed on Page:22 ? what are the values of WB, Wj, aBj, WW, ajW for W1 and W2 such that optimal weight of W1* = [0.1579, 0.2469] and W2* = [0.4286, 49...
Given the equation : x & y = x, where x, y are positive integers. Note: Here '&' stands for Bitwise operator AND between two numbers. I am provided with the value of x. Can I find possible values of y satisfying the given equation ? Thanks for help!
I've this exercise of which I'm not very sure about my solution. Exercise: Define the transition table about a Turing Machine that accepts words on the {a, b} alphabet where each a is followed by only two b. My proposed solution is: (f stands for transition function) f(q0, a) = (a, q1, R) f(q0, b) = HALT f(q1, a)...