instruction
stringlengths
35
29.1k
I thought the Gibbs phenomenom is the result of Fourier analysis estimation (but was it Fourier Series estimation or can it also be Fourier Transform estimation?) JPEG uses the Discrete cosines Transform. A DCT is similar to a Fourier transform in the sense that it produces a kind of spatial frequency spectrum. But ...
I need to find a context-free grammar for the following language which uses the alphabet $\{a, b\}$ $$L=\{a^nb^m\mid 2n<m<3n\}$$
This is my problem: There are n collections of M geometric shapes (not necessarily disjoint). Pick a single shape from each collection, such that the n selected shapes are pairwise interior-disjoint. This problem is NP-complete even when the shapes are restricted to axis-parallel squares (see this cstheory.SE que...
If given that all edges in a graph $G$ are of equal weight $c$, can one use breadth-first search (BFS) in order to produce a minimal spanning tree in linear time? Intuitively this sounds correct, as BFS does not visit a node twice, and it only traverses from vertex $v$ to vertex $u$ iff it hasn't visited $u$ before, su...
I was studying Paxos from the paper by Lamport called "Paxos Made Simple". Recall that Paxos is a distributed system algorithm with the goal that the processes participating in its protocol will reach consensus on one of the valid values. On page 3, it says Since all numbers are totally ordered, condition P2 guarante...
I was studying Paxos from: http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf Recall that Paxos is a distributed system algorithm with the goal that the processes participating in its protocol will reach consensus on one of the valid values. I was reading page 4 of the paper where it says condi...
I was studying Paxos from: http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf Recall that Paxos is a distributed system algorithm with the goal that the processes participating in its protocol will reach consensus on one of the valid values. On page 4 of the paper, at the bottom where they outl...
I believe I understand the concepts of algorithm analysis. However, I'm not fully confident in applying those concepts. I'd appreciate help in bridging the gap between concept and application. I understand that if $f(n) \in O(g(n))$ and $f(n) \in \Omega(g(n))$ then $f(n) \in \Theta(g(n))$ Essentially, when Big-O and B...
Context Consider this algorithm. If the set $\{\angle p_ip_{i+1}p_{i+2} : i=0,...,n-1\}$ does not contain left and right turns, output "yes the polygon is convex"; otherwise, "no". My answer Consider this nonsimple polygon having 4 vertices; the algorithm above will output "yes" as the set of points does not contain ...
I'm writing a balanced $n_d$-Hyperoctree data structure in which the only fundamental operations I provide are edge traversals between parent and child nodes. I'm storing the nodes using a Morton z-curve. Using only this information: The level of a node can be computed by traversing to the root of the tree. Neighbor ...
Suppose I have two vectors $V_1, V_2 \in R^l$. Can they be converted into bit vectors $B_1,B_2 \in \{0,1\}^l $ such that if $V_1, V_2$ is close in Euclidean distance, $B_1,B_2$ is close in hamming distance? Please note that this is a little different from locality sensitive hashing, where each vector will be hashed ...
I am trying to prove this following theorem, can someone help please? Let $L$ be a language over the alphabet $\Sigma = \{ a,b \}$. If $L' = \{ w\$w^R \mid w \in L\}$ is context-free, then $L$ is regular.
I've read that subset sum is NP-complete. What happens when I change the decision problem to look for a constant number? So the decision problem would look like this: Input: A collection of nonnegative integers A and a nonnegative integer b, Output: Boolean value indicating whether some subset of the collecti...
First off I am new to computer science (first semester) and do not know anything about physics, so I am appologizing up front for this not very scientific question. I've been wondering how data is processed at the LHC. I am sure CERN doesn't just use one programming language to write code but I am curious what the fast...
Consider, for example, the definition for $\Sigma_2^p$ complexity class. $$ x \in L \Leftrightarrow \exists u_1 \forall u_2 \;M(x, u_1, u_2) = 1, $$ where $u_1, u_2 \in \{0,1\}^{p(|x|)}$, for some polynomial $p$. Here, $M$ must be polynomial time. But polynomial in the size of what exactly? For example, if we choose (g...
I was studying Paxos from: http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf and was wondering, what guarantees Paxos to converge and not run forever without a consensus/agreement on a value? Is it guaranteed to converge always or is it a probabilistic bound that the probability that it does n...
My neural net is having trouble switching the sign of a weight. The issue is that the deltas applied to the weight are proportional to that weight, so when it gets closer to zero, the deltas become smaller and are never sufficient to get it past that point. I tried adding a momentum term with 5% of the previous iterati...
For example, Let the Grammar be: S->Sa|B Thus, S->Sa->Saa->...->Saa...aaa->Baa...aaa What's wrong with this? Why is right recursion a solution to the problem? S->BS' S->aS'|e
I've a subset of the simple paths in a graph. The length of the paths is bounded by $d$. What's the most compact way (memory-wise) I can represent the paths such that no other paths apart from the selected ones are represented? Note that I want to use this representation in an algorithm that will iterate through this...
I'm trying to work through various exercises in Skiena's "Algorithm Design Manual." One problem that I am stuck on is as follows: What value is returned by the following function? Express your answer as a function of n. Give the worst-case running time using Big Oh notation. function conundrum(n) r:=0 for i:=1...
I am now preparing for a test in my algorithms course and I have stumbled upon a question about a data structure which seems too trivial for me, but is probably not trivial at all. The question is: Let a "minimum stack" be a data structure that supports the following functions: Creating a new empty data structure. I...
It seems like the proof that $A_{DFA}$ is decidable in Sipser (2nd ed.) assumes the computation will halt... and hence only really proves that $A_{DFA}$ is recognizable. The language $A_{DFA}$ is defined by $A_{DFA} = \{\langle B, w \rangle \mid B \text{ is a } \mathsf{DFA} \text{ that accepts input string } w \}$. Her...
I want to prove that a language is not $\omega$-regular. The language I'm working with can be defined as: $$L = \{ a_1 \dots a_n x^\omega ~ | ~ n > 0, a_1 \dots a_n \in L^\prime \}$$ where $L^\prime$ is a specific non regular language (I omit the definition $L^\prime$ because I think it is of no help for my problem), ...
In proofs of decidability, we often want to simulate another model of computation by a Turing machine. But if I can simulate a $\mathsf{DFA}$ by, say, a C program, then is there some result which says that the $\mathsf{DFA}$ can be simulated by some $\mathsf{TM}$? Could a program be used in place of a $\mathsf{TM}$ in ...
Given an integer $n$, calculate $n!=n\times(n-1)\times(n-2)\dotsc 3\times2\times1$. What is the best time and space complexity of calculating $n!$? P.S. I do not have any idea about this topic. I was using MATLAB and I needed to compute $200!$ but it said "Out of memory"!! That's why I am asking.
In a programming book that I'm currently reading it's stated that $$\sum\limits_{i=1}^{n}i^2$$ is $O(n^3)$. My understanding was that $i\times i$ is a primitive operation and the complexity would be $O(n)$. What am I missing?
Say that for a particular problem, e.g., the independent set problem, it has been shown that no polynomial-time algorithm exists to solve it. Could we get around this by finding an algorithm which approximates the solution to a certain accuracy? That is, would the result above bar the existence of an algorithm which fi...
a few days ago I asked a question about the limits of compression: Can PRNGs be used to magically compress-stuff? The idea common to all the answers was that if you consider all programs of length < k (Let's call this set $C_k$), then there is only a finite number of possible outputs generated by programs in $C_k$ (let...
I am learning 2-phase locking and its unclear to me how it achieves/guarantees before-or-after atomicity (i.e. serilizability). I went to the following notes http://ocw.mit.edu/resources/res-6-004-principles-of-computer-system-design-an-introduction-spring-2009/online-textbook/atomicity_open_5_0.pdf on page 9-73 it ar...
While familiarizing myself with polynomial hierarchy, I have come across a problem of showing $NP^{\Sigma_{k}^{p} \cap \Pi_{k}^{p}} \subseteq \Sigma_{k}^{p}$. By looking at the proof for $NP^{SAT} \subseteq \Sigma_{2}^{p}$, I got the concept where we can guess the choices of the NTM and answers to SAT call and then enc...
I have searched on Google, but I can't quite understand what is pass-by-value-result. What is the advantage and disadvantage of using pass-by-value-result? If I have a program code like this, what will be the result when parameters are passed by value-result? #include <stdio.h> int a=2; int b=1; void fun(int x, int y...
Recall that Paxos is a distributed system algorithm with the goal that the processes participating in its protocol will reach consensus on one of the valid values. I was studying Paxos from: http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf and I was confused about one specific part. How does ...
I'm wondering if there is a way to extend Hinley-Milner's type system to allow polymorphic types without the need of a let construct, by adding an intersection type (as Dan pointed out) that represents the possible types of a function type. Say I have this expression: $\lambda x.\lambda y.(x\ (x\ y))$ While running the...
For an assignment in my university, we have to answer multiple choice questions about theoretical computer science. This particular one I find very hard to understand. I wonder if some of you could explain it to me. In this question, L1, L2, L3, L4 refer to languages and M, M1, M2 refer to Turing machines. Let L1 ...
When given the length of a source array, I want to generate the array of swaps that need to be performed in order to sort the source array. I want to make this array as small as possible. Swaps will be performed only if necessary for sorting, as defined by the following function. def compare_swap(array, a, b): if ...
What are the possible ways to calculate $(x^y) \bmod z$ quickly for very large integers? Integers $x,y \lt 10^{10000}$ and $z \lt 10^6$.
I have to craft up a number made of 19 digits so that, after some mathematical operations made 11 times, the resulting sum of the remainders of the first ten operations is equal to the the remainder of the eleventh operation. The eleven calculations are as follows. I need to reverse them in order to be able to craft up...
I am trying to get an idea of how the AKS primality test should be interpreted as I learn about it, e.g. a corollary for proving that PRIMES ⊆ P, or an actually practical algorithm for primality testing on computers. The test has polynomial runtime but with high degree and possible high constants. So, in practive, at w...
Every proof I can find of this result is by way of regular expressions. Is there any "constructive" proof that defines the corresponding DFA (probably NFA)? For instance the proof of concatenation closure is most often presented by demonstrating the NFA. I'm just curious whether this is out there somewhere
I've read the wikipedia article, but I don't speak category theory (and I'm not sure how to start so I'm just picking something that sounds interesting). So, can someone give me a simple, possibly incorrect (for learning/clarity), pragmatic (if it applies to programming, which I'm pretty sure it does) explanation of wh...
I am trying to figure out a reduction to prove $W[1]$-hardness for this, but I am having significant trouble. Here is the problem: Bag Automaton: A non deterministic finite state automaton $M=(Q,I,s,F,d)$. $Q$ is the set of states, $I$ is the set of items, $s\in Q$ is the start state, $F\subseteq Q$ is the set of acce...
Let's suppose I have an NP-complete problem A. Can there be $A_1$, $A_2$ such that $A_1$ and $A_2$ are disjoint, $A = A_1 \cup A_2$, and $A_1$ and $A_2$ are NP-complete? My guess would be yes. For example, just partition SAT into formulas with an even number of variables and formulas with an odd number. Follow up: ...
I am curious what is the difference between diameter of a graph vs longest path of a graph. I just read diameter of a graph can be solved using Floyd warshall in O(V^3) while longest path can be calculated in O(V + E) using topological sort.
I am interested to know whether that language $$ L = \{ a^pb^q \mid p, q \text{ are prime} \} $$ is regular. How do you prove that it is not regular?
I came across the following problem in a exam. We choose a permutation of n elements $[1,n]$ uniformly at random. Now a variable MIN holds the minimum value seen so far at it is defined to $\infty$ initially. Now during our inspection if we see a smaller value than MIN, then MIN is updated to the new value. For examp...
I have a homework question about the properties (decidability, Turing-recognizability, etc.) of the language $$ L = \{ \langle M \rangle | \text{$M$ is a TM and $M$ accepts some string $w$ which has 101 as a prefix} \}. $$ I have made an attempt at showing decidability of $L$: On input $\langle M, w\rangle$ (where $M$...
I'm reading "Sets for Mathematics" by Lawvere, and he uses the following metaphor at the end of section 1.3: "we will see...how any abstract set F of the right size can act as mappings between given abstract sets. (For example, in computers variable programs are just a particular kind of variable data.)" The internet s...
Any schema that satisfies BCNF also satisfies 3NF. But how can this be true if BCNF does not necessarily guarantee dependency preservation, whereas 3NF guarantees dependency preservation?
What are the time complexities of the following code? I posted this on the general stackexchange website, but it was suggested that I post it here. def func(n): for _ in range(n): if n == 4: for _ in range(n): <O(1) operation> It will only be O(n^2) for one specific input (n = ...
I was studying Paxos from: http://research.microsoft.com/en-us/um/people/lamport/pubs/paxos-simple.pdf and I was trying to understand page 4, specifically, the following paragraph: "To maintain the invariance of $P2^c$, a proposer that wants to issue a proposal numbered n must learn the highest-numbered proposal with n...
Please can anyone explain me the worst ,average and best case running time for the Unifrom binary search .. Also how can the lookup table be explained?
What is average number of cycles in an undirected ordered graph of size $n$? I've tried finding out sum of number of cycles in all sorts of a graph of size n but I couldn't find that out.
I've been researching on AdaBoost and GentleBoost classifiers, but can't seem to find a clear answer to the question: What is Adaboost better at classifying in computer vision? What is GentleBoost better at classifying? I've been told that AdaBoost is good for things with soft edges, like facial recognition, while Ge...
I am facing hard time understanding min-entropy. Fix $v \in \{0,1\}^{n/2}$, let $F\colon \{0,1\}^n \to \{0,1\}^{n/2}$ be chosen randomly, and let $X_v$ be a string chosen uniformly at random among $F^{(-1)}(v)$ (or a special string $\epsilon$ if $F^{(-1)}(v) = \emptyset$). We want to compute the probability that $H_\in...
Consider the problem: Given an undirected graph and two of its vertices, is there a path between them? I often read that this problem can be solved in linear time in the number of vertices! I am not sure why this claim holds. Can this really be done in linear time (not amortized) without preprocessing?
Is there any algorithm which takes edges (given by its two end points), and determines in which cell (or cells) of grid it is? Grid has fixed dimensions and number of cells. Grid is represented by its cells with matrix. And every cell has list of edges that intersect that cell. Input is set of pair points, but I can al...
Is this state machine a moore machine or a mealy machine? I am confused because the states have outputs and the transitions have output based on the input. I tried making a state table but I think its wrong. Can anyone provide the state machine?
I was wondering how I could go about creating an algorithm that gets all the cliques in a graph in PSPACE So far, based on some of the readings I've done, I am considering to use bit-strings (that have a length equal to the number of vertices in the graph). Then, for every possible subset of the vertices, a turing mach...
The following may contain errors. It is precisely because I am not sure I understand the topic that I am asking questions. I do not have books about it and could not find an adequate reference on the web. I am discussing a problem regarding an enumeration of strings that should be in amortized constant delay. From what...
The algorithms for the problem I am working on become more and more complex as I try to improve their performance. They already span several pages with cases and sub-cases, and will probably become even longer. I am worried that there might be mistakes that are difficult to notice. As a programmer, I am used to writing...
I was learning some basic sorting techniques with their complexity. However I cannot understand why only the number of comparisons are taken into account while calculating time complexity and operations such as swap are ignored. Link to selection sort analysis. Please help me understand.
What is the proof of P ⊆ NP? I cannot happen to find a good explanation for it. I read that the verifier will just ignore the proof and accept any proof if the solution is YES and reject all proofs if the answer is NO. I'm also unclear about verifier. Definition of P and NP I follow: P: a problem 'Q' is said to be in ...
Andrew S. Tanenbaum, in his book Modern Operating Systems (3rd Edition), states that the distinction between operating system software and normal (user mode) software can sometimes be blurred in embedded systems (which may not have a kernel mode). Can someone please describe more what an OS without a kernel mode looks...
suppose Threads 1 and 2 are executing concurrently with shared integer variables A, B, and C. Thread 1 executes:A=4, B=5, C=B-A; Thread 2 executes: A=3, B=6, C=A+B; I'm trying to find what can the possible values of C be after execution of this fragment when synchronization is not implemented. I know if there is no sy...
I read in the artificial-intelligence book of Russel and Norvig that The tree-search version of A* is optimal if heuristic function is admissible, while the graph-search version is optimal if heuristic function is consistent(monotone). An admissible heuristic is one that never overestimates the cost to reach the goal. ...
Is there a standard way to check if two edges of a graph cross? I'm having trouble coming up with an algorithm to do this, and any insight/intuition into how this can be done would be great. To be clear, here's an example: The algorithm would ideally return that the edge shared by 7 and 8 crosses with that between 5...
I know that CNF SAT is in NP (and also NP-complete), because SAT is in NP and NP-complete. But what I don't understand is why? Is there anyone that can explain this?
I'm trying to find a linear solution with a small constant factor but I'm not sure what to search for, or even how to succinctly describe it. The best I've come up with is: Given a set of rectangles on a plane find the set(s) which allow the same y value for some largest contiguous set of x values. All rectangles ar...
This is an assignment of an introductory course of complexity theory and I need to find a way to do the following: Given $n,m \in \Bbb N$, is $n \le m!$ ? The idea is to provide a Post Machine that can decide this in an efficient way, using $n,m$ in a binary codification. We know that the factorial isn't efficient, so ...
There is a basic result in circuit complexity that says: There exists a language that cannot be solved with circuits of size $o(\frac{2^n}{n})$. The argument is a simple counting argument on the number of boolean functions and the number of distinct circuits. See, for example, these lecture notes. I believe it is un...
I have this context-free grammar and I want to find out whether its language is finite or infinite. S -> XY|bb Step 1 X -> XY|SS Step 2 Y -> XY|SS Step 3 So I would do S -> XY From step 1 S -> YYY From step 2 S -> SSYY From step 3 S -> SSSSY From step 3 S -> SSSSSS From ...
It seems like it would be possible to add more precision to the IEEE 32-bit mantissa system if the leading zeroes were also dropped, just like the leading 1 is dropped due to it being implicitly known. For example, the number 17 would be represented as 0|10000100|00010000000000000000000. The leading 1 of the mantissa i...
I am doing a project in order to recognize an apple. (I am using Emgucv with Visual Studio 2010 C#, if that's relevant). My project is a classification (is or is not an apple). I have 2000 images of apples but I need images for the second class. I have read about classification using ANN but they have multiple classes...
I am now pretty confident on how I would turn something into a Turing Machine. Now my question is how do you convert TM into a complement of a Turing Machine. From what I can remember in Finite Automata, complementing it you would just turn a start state into a ending state, also if you have an ending state you would m...
Suppose that $G$ and $H$ are both expander graphs on the same node set with a second largest eigenvalue of $\lambda_G$ resp. $\lambda_H$. What can be said about the expansion of graph $G \cup H$? In particular, is the spectral gap of $G \cup H$ at least as large as the minimum of the spectral gaps of $G$ and $H$? Doe...
Title says it all pretty much. I do realize that often edit distance is defined as the minimum number of operations needed to transform one string to another, but I want something to point to that's even more general than that. I recently saw a brain teaser that claimed that some string was connected in a network to a...
As a programmer with non CS background, I am learning algorithms. When explaining the performance of quicksort in an Algorithm book and also elsewhere on the web, I do not see any reference to the time/space needed for shuffling. I do understand that shuffling is important to have the $O(n\log n)$ performance, but shuf...
Given an array, say A, with a finite definite length like N (e.g. 1000) can we define a problem to be NP-Complete without any intentional injection of NP-Completeness by something else : for example questions like this are not acceptable: "Solve this, NP-Complete, problem using A as an auxiliary array." Please note tha...
You are given two things: A fixed initial 'model' partition of an interval, e.g. I------I---I-----I-------I----... where each - or I represents an element in a discrete time series and the Is are the partition boundaries. This can also be represented as a sequence of subinterval lengths, i.e. 7, 4, 6, 8, ... Then, yo...
System: Application OS: Scheduler, VMM, IPC, FS Drivers, dispatchers, VFS The above would be a monolithic kernel. In a monolithic kernel all core OS functions are separate from user spaaaaaace. Functions such as the FS are handled completely by the kernel. This leaves the end user/dev open to write applications that re...
I am currently learning about Turing Machines, I am curious if a Turing Machine can have fewer states ? Can it be done like a Transition Graph where you can have multiple states at once ? I got this TM off of a youtube video sorry for bad hand writing, but could I just merge some of the states like you would do in Tr...
I have to prove the following 2 properties of the Small-step semantics of the WHILE programming language: If $\langle C_1; C_2, s\rangle \rightarrow^k s'$ then there is a state $s''$ and natural numbers $k_1$ and $k_2$ such that $\langle C_1;s \rangle \rightarrow^{k_1} s''$ and $\langle C_2; s'' \rangle \rightar...
Let A = $(Q, \Sigma, \delta, S, F)$ be a deterministic finite automaton associated with the language $L \subseteq \Sigma^*$ $L' = \{y \in \Sigma^*:\exists x\in L. |x| = |y|\}$ $L \subseteq L'$ How do I show that there exist a NDFA associated with L' ?
I have a problem that I encountered that boils down to the following: Considered this directed graph I found on Google: I have the following information available to me Node: Ancestors 1 : 3 2 : 1 3 5 7 3 : Null 4 : 3 5 5 : 3 6 : 1 2 3 4 5 7 7 : 1 3 8 : 1 2 3 4 5 6 7 How can I re-construct the original graph in a r...
Many of us are familiar with the $P$ class. Counting solutions is believed to be a difficult task and that is why we usually end up approximating the number of solutions (we relax the accuracy of the counting). I want to ask, if relaxing the quality of the solutions counted has been addressed as a problem. Is there for...
On the following picture, we have overlapping polygons: we know the positions of vertices and the edges for each polygons, and the intersections are exactly known (vertices at the intersection are represented on the figure). Is it possible to 'partition' the domain spanned by the union of these polygons into 'disjoint'...
Is my (very high-level) understanding correct here regarding quantum algorithms — Quantum computers can process a massive amount of operations in parallel to the nature of qubits and their ability to have states that are superpositions of $|0\rangle$ and $|1\rangle$. Yet when we measure the qubits all the possible stat...
Can we define instructions as expressions with side-effects?
Consider two sets: the set of validities of propositional logic and the set of validities of monadic predicate logic. Call the first set $VP$ and the second set $VQM$. Both of these sets are decidable, so there are Turing machines that recognize both them and their complements. I'm interested in how the decidability o...
An associative array is a set of pairs (key, value). Does it represent a mapping, or a relation (i.e. does it allow the same key to be associated to different values)? Does it represent an injective mapping only, or does it allow different keys to be associated to the same value? Can a hash table implement any associa...
Let $M$ be a square matrix with entries that are $0$ or $1$ and let $v$ be a vector with values that are also $0$ or $1$. If we are given $M$ and $y = Mv$, we can computer $v$ if $M$ is non-singular. Now let us take the second bit (from the right) of the binary representation of each $y_i$ as another vector $z$. So ...
In the multi criteria decision making context, let $\mathcal{A}$ be a set of alternatives or choices. Each alternative $\alpha\in \mathcal{A}$ is a vector of $k$ criteria $\alpha=(v_1,v_2,\dots,v_k)$. Let $\geq_1,\dots,\geq_k$ be a set of $k$ partial orders over $\mathcal{A}$. For any two alternative $\alpha,\beta\in ...
I'm taking a graduate course on the theory of functional programming, based on Paul Taylor's "Practical Foundations of Mathematics." I understand the statement of Tarski's theorem about how for any $\omega$-compelte poset $X$, and any $\omega$-continuous function $T:X\rightarrow X$, that $T$ has a fixed point which is...
I am doing a project to recognize a kind of leaf using ANNs with Emgu CV in C#. My project is to get frames from camera then present them to the ANN and have the ANN tell me if that frame contain a leaf or does not contain a leaf. I am using 1000 images of leaves that I want to recognize, so if the frame contain a lea...
Let me ask my general question using a specific example, namely range searching: Given a set of points in the plane and an axis parallel rectangle, report all points lying in the rectangle. If the rectangle contains $k$ points, then this can be solved in $O(\log n + k)$ time (after some preprocessing). I understand th...
The question is: How many different undirected graphs are there with n nodes and no parallel edges but may include self-loops? I've been wracking my brain over this for hours now. Basically, I know that for 1 vertex, there are 2 graphs. For 2 vertices, there are 8 graphs. For 3 vertices, there are 64 graphs. However, I...
Is it theoretically exist a computer that never affected by computer virus? just wonder if there could be a revolution on the computer?
I'm trying to show how to reduce the Partition problem to the 3-Partition problem. I'll first describe the problem using the definitions and notations I'm familiar with (I hope they're legit), and will then ask my question. So, the Partition problem is as follow: Given a multiset of integers $X$, we have to decide whet...
I'm a GCSE Computing student and I've been asked to compare writing programs in a block programming environment (I think this means using programs such as Scratch or App Inventor but I'm not entirely sure) compared to writing programs using high level programming languages such as Python, Java etc. I'm honestly not try...
We know that if an edge is a part of a cycle in an undirected connected graph $G$, then if we remove that edge the graph is still connected. Is the opposite true? If an edge is not a part of a cycle in a connected graph $G$, and we remove that edge, then the graph we get is disconnected? P.S.: I think that it is true, ...