instruction
stringlengths
35
29.1k
The input: Given a set $U=\{1, \ldots, k\}$ called the universe. Let $C=\{S_1, \ldots, S_n\}$ be a collection of subsets of $U$ and let $ s_j$ be a nonnegative integer for all $j=1,\ldots,n$ such that $\sum_{j=1}^{n} s_j=k$. The question: Are there $n$ subsets $A_j$ of $S_j$ (i.e., $A_j\subset S_j$) such that $$ \quad...
$\small\textit{''The obvious things are the most difficult to understand''}$ May be the question does not make sense, but let me ask it anyway. The Hoare assignment axiom is $$ \dfrac{}{\{Q[v \mapsto expr]\} \;\; v:=expr \;\; \{Q\}} $$ Is there an intuitive explanation of the axiom? I "agree" with the Floyd assignment...
I am able to solve $0^{k}10^{k}10^{j}$ where $ k < j$. and I was able to see that this is also a concatenation of two strings. How to do it for $0^{2k}10^{2k}10^{k}$ for $k \ge 0$?
I have a dynamic closest-pair problem. In my problem though, the points never move, but instead disappear and reappear. That is, I would like to find for a point $p$ (where $p\in\mathbb{R}^3$)* in a set of points $P$, the closest point in $S$ where $S\subset P$. The catch its, while $S\subset P$, which elements of $P$ ...
Lately, I asked this question to find the maximal set of elements $S$ of a given array $T$ such that every element of $S$ is greater than or equal to the cardinality of $S$. My question is now different. How to find all maximal sets $S_i$ of a given array $T$ such that every element of $S_i$ is greater than or equal t...
Prove that $L = \{wu, wu \in \{a,b\}^* \ \land |w| = |u| \}$ is not regular. I'm trying to approach this problem with the pumping lemma. So I know I have to pick a string s, which can be split into xyz components in terms of the pumping length, p. But I cannot seem to find an s. For example using $ s = a^p b^p$ or $s ...
Given a linear program, is there any library or available code to enumerate all the corner points of a polytope ?. PS: Simplex method finds one corner point depending on the objective, but I need to enumerate all the corner points. Thanks in advance!
Let's say that an algorithm uses several nested loops to accomplish it's task, for instance : An algorithm treating voxels on several frames, so there would be four dimensions : t (for time), x, y and z. An algorithm evaluating a function that takes n entries, searching for which entries there is a certain result. For...
I need to show that deciding whether a graph G has at most 2017 strongly connected components in in NL. After searching, i found a previous answer: Checking whether a digraph on $n$ vertices contains exactly $10\sqrt{n}$ strongly connected components in NL The answer there by yuval filmus was given for verifying an exa...
The linear bounded automata (LBA) is defined as follows: A linear bounded automata is a nondeterministic Turing machine $M=(Q,\Sigma,\Gamma,\delta,q_0,\square,F)$ (as in the definition of TM) with the restriction that $\Sigma$ must contain two symbols $[$ and $]$, such that $\delta(q_i,[)$ can contain only elements of...
I want to automatically track heads in CCTV records. Sometimes I need to re-identify heads because of multiple heads crossing each other. So I continually need to extract features from tracked heads so that I will be able to re-identify them when needed. Those tracked heads are seen from any angle. What would be the...
I'm reading the book Parsing Techniques by Dick Grune et al. and in section 3.1.3 "Linearization of the Parse Tree" they introduce the notion of linearization: [...] a parser can produce a list of rule numbers instead, which means that it linearizes the parse tree. There are three main ways to linearize a tree, prefix...
If i wanted to write a piece of software that simulated a warehouse where typical warehouse procedures occur eg loading of trucks onto conveyors goods being transported around a warehouse by machines goods being packed by operatives goods being picked by operatives ... etc should this be modelled / is this known a...
I need to know the complexity of the following algorithm: Draw elements from a set of size $m$, one by one, randomly, with replacement, until coming across $n$ different elements from the set ($n\le m$). We do not care what are the numbers drawn, and halt once $n$ different numbers were seen during this process. This i...
I am new to this algorithm and graphs. Just started learning. Could someone help me which algorithm is best suited to find the spanning tree of a Directed Acyclic Graph with less forward edges?
I'm into designing a recommender system for movie database and for effective optimization.I suggested the idea of using particle swamp optimization ,but my professors need recent algorithms,can any one suggest recent nature inspired algorithms for optimization.(After Cuckoo Search Optimization).
I have some doubts all related to the same basic concept of how a computer works. 1) I always thought that the address bus width defines ultimately how many memory locations the CPU can access (point to), therefore the memory range (i.e. in a 32-bit wide address bus, the CPU can access up to 2^32 memory locations, whic...
Okay I am trying to understand why asynchronous systems are better that synchronous systems in terms of throughput. Relating to the calculation done in this answer. Can someone tell if my reasoning is correct ? Lets say I have a system that has 1000 live connections and each connection takes 5 packets to complete and a...
It isn't very hard to decide if word belongs to language L. CYK algorithm should do here. Occured thought, can CYK be modified to detect if all words of language L contain some specific subword?
Have such exercise: Let $L_1=\{a^{2n}b^n|n\geq1\}^*$ and $L_2=\{b^na^n|n\geq 1\}^*b$ Prove, that $L_1, L_2$ are context free, while quotient $L_1/L_2$ is not context-free. (This is home exercise, which I am not sure what to make of it. 3rd one) Anyway, proving $L_1, L_2$ are CFL is trivial. For $L_1$: S->aaSb|$\epsil...
From what I understand, to implement RAID 5, one would need a minimum of 3 disks, where 2 would be for data storage, and the third would be for the parity. But what is the maximum number of disks one can have? For example, let's say each disk is 1GB, but I have 5GB of data, would I be able to make a RAID 5 with 6 disks...
I met this problem when dealing with a social network problem. It is a subproblem of that. The problem is like that: We look at a graph $G(V,E)$, where $V$ is the set of vertices and $E$ set of edges. We define $x \in V$ as an 'important' vertex if at least $\frac 1 3 deg(x)$ ($deg(x)$ refers to the degree of $x$)of th...
Ok, this is a follow up question to this, about the Erathostenes Sieve. If we look at this paper (page 3, footnotes), the author says: If we start crossing off at $p^2$ rather than $p$, the number of composites we cross off is $\frac{n}{p}−p+1$, but it makes no significant difference to our sum, because it only su...
Prove that every undirected connected graph with $|V| > 2$ has at least two vertices such that if one or both are removed (along with their incident edges) the resulting graph is still connected. Describe an efficient algorithm to find two such vertices. How would I go about solving this?
How many matrices satisfy the following constraints? $n$ rows $n$ columns Cell values are either $0$ or $1$ Sum of any row is at most $m$ sum of any column is at most $m$ Is there a formula or an efficient algorithm to solve this problem?
This question has recently occurred to me as I was working on an implementation of the (Bounded) Post's Correspondence Problem. Basically, which method is generally best for PCP? Breadth-first or depth-first search? Or is this question, well, undecidable? I understand the basic difference between the two approaches, bu...
I've been given some homework on dynamic programming and I'm having trouble to find the suboptimal recurrence. Let me copy the statement: In a given motorcycle training circuit, the number of riders is becoming increasingly large. As such, a new set of stricter rules is being enforced. Lap times last exactly a minute...
I have two cameras side by side. I'd like to register two images taken from each camera. I think global transformation will not work for this issue since changes of distances between two images for the closer objects are significantly higher. What should I do in this case? I tried to read some papers but I am not sure ...
In Cormen et al.'s Introduction to algorithms, section 15.3 Elements of dynamic programming explains memoization as follow: A memoized recursive algorithm maintains an entry in a table for the solution to each subproblem. Each table entry initially contains a special value to indicate that the entry has yet to be fill...
I've heard that the functions that are definable in simply-typed $\lambda$-calculus is the class of extended polynomials. However, it is still not clear to me what exactly is extended polynomials. Could someone explain that to me? Some pointers would be good as well. Thanks.
I fail to understand the proof of the Emptiness Problem $E_{TM} = \{\langle M \rangle | M $ is a TM and $L(M) = \emptyset\}$ 1) Use the description of $M$ and $w$ to construct $M_1$, which on Input $x$ behaves as follows: If $x \neq w$, reject If $x = w$, run $M$ on input $w$ and accept if $M$ does 2) Run $R$ on in...
All I have in hand is a adjacency matrix of a digraph with equal weight on every edge, is there a very simple way to convert this to a state change probability matrix?
I have implemented a 3d Tic Tac Toe game with AI, where the computer is unbeatable. The only thing is that the board looks like this: _ _ _ _ _ _ _ _ rather than this: _ _ _ _ _ _ _ _ _ There are a total of 3 boards stacked on top of each other, and any lines of 3 x's or o's grant a point. When the board is full, al...
In Axioms and Hulls, Knuth defines the notion of a CC system, which is a generalization of Euclidean points in general position. While all such arrangements of points in the plane give a CC system, not all CC systems give an arrangement of points, i.e. are not realizable. Is there a polynomial-time procedure to determi...
I'm trying to understand how external sorting works from the book "Data Structures and Algorithm Analysis" by Mark Allen Weiss. The author illustrates an example where he tries to sort 81,94,11,96,12,35,17,99,28,58,41 with a memory which can hold upto M=3 numbers. He uses two input tapes Ta1,Ta2 and two output tapes T...
Domain theory gives an amazing theory of computability in the presence of simple types. But when parametric polymorphism is added there doesn't seem to be a nice theory that explains whats going on quite as nicely as domain theory explains computation over simple types. Certainly I wouldn't expect such a thing to exist...
In the previous two years of the GATE exams, a question has been asked for finding number of flip flop's for counting sequence $0−1−0−2−0−3$ in 2016 and $0−0−1−1−2−2−3−3−0−0$ in 2015. But still, the approach discussed in these questions hasn't arrived at Common answer (or) solution. For $0−1−0−2−0−3$, there are $6$ dif...
I'm currently reading an analysis hashing with chaining, and it goes over two examples: In the first, the search is unsuccessful; no element in the table has key k. In the second, the search successfully finds an element with key k. (This is all under the assumption of simple uniform hashing). I understood the an...
I know that when an NL Turing machine is allowed to go back and forth freely, the resulting class of problems solvable on it is NP. But limit of two passes over the witness tape, does not seem to add much power to the NL machine, if at all. I am stuck on this problem. What is the resulting complexity class? Is it stil...
Hi fellow computer scientists, I just began my journey to the world of ML and NLP so please bear with me. I'm hoping to find some guidance here. I would be very grateful if anyone could point me in the right direction (reading materials, lectures, specific algorithms, tools, etc.) for solving the following list of prob...
I'm trying to develop an algorithm to find a convex hull of a star shaped polygon in $O(n)$ time. The specific problem, which is also described here, is as follows: A polygon $P$ is star-shaped if there exists a point $p$ in the interior of $P$ that is in the shadow of every point on the boundary of $P$. The set of al...
I having some trouble tackling an assignment. We're asked to prove that there exists a recursive language that's not decidable by a Turing machine in $O(n)$ time for inputs of length $n$. We're supposed to do so using diagonalization. Here's what I have so far: Assume that for each recursive language $L$, there exists ...
I need to calculate the difference between two dates in hours and in minutes which is what the code below does. The only issue I have is that the dates and the location (timezone) has to be input by the user. How do I achieve that? Can be a different language from PHP as I only need a flowchart and the pseudocode. ?p...
How efficiently can I build a binary tree satisfying the heap property from an array and such that the inorder traversal of the tree is the original array? For example, if I have: 2 1 5 6 2 3 I want to build: 1 / \ 2 2 / \ 5 3 \ 6 Because it has the heap property and its inorder is the original ar...
I am trying to use the computation histories argument to fit this. But I am unable to find this as yet.
With an adder circuit where A+B=C, I am trying to have a method to determine when C will be valid based on a change in A or B. I know that it is possible to just determine the longest the circuit would take, but is it possible to determine if the result (C) is equal to A+B. This would speed up the result of the opera...
Here is the problem: There are connected graph with nodes representing a number of people. Each node/person has an opinion on a topic e.g. trump vs clinton, paper books vs kindle, etc The goal is make every node in a graph share the same opinion, by selecting a specific subset of nodes, in a particular sequence. If maj...
I am trying to use a simple perceptron to recognize if there is a square or a circle on an image. The images I generated are 300x300 px and I am having issues training the network since the images are large and I seem to run out of memory after a few images. What would be the correct approach for this?
On page 7/8, section 1.2, of Practical Foundations of Programming Languages, 2nd edition, Robert Harper gives this initial definition of abstract binding trees: The smallest family of sets closed under the conditions If $x \in \mathcal{X}_s$, then $x \in \mathcal{B}[\mathcal{X}]_s$ For each operator $o$ of arity $(\ve...
I have a doubt understanding How a 3-Dimensional array is stored in column Major Order. An array in Row Major order is stored like [plane][row][column] So, for finding address of any element we cross planes first, rows next and then some elements in that column. But How is a 3-Dimensional array stored in Column Major O...
It seems that I've found a generic way to convert any recursive procedure to tail-recursion: Define a helper sub-procedure with an extra "result" parameter. Apply what would be applied to the procedure's return value to that parameter. Call this helper procedure to get started. The initial value for the "result" param...
I am trying to find a network, where Dinic's algorithm makes $|V|^2*|E|$ steps. Clearly it cannot be a network with $3$ or less vertices, but I am not able to come up with a working example for quite a while now. Any idea?
I'm trying to write the relational algebra for a problem related to this schema: I want to do the following: For each flight list the departure airport code for the first leg of the flight and the arrival airport code for the third leg. I know how to do this for the individual parts, but I'm not sure how to select fro...
I'm studying the Post Correspondence Problem (PCP) and understand the concept, although I have problems with proving how to show that an instance of a PCP or modified PCP has no solutions. For instance, how could I show that the the instance $\ ((0,11,1), (001,1,11)) $ of an MPCP has no solutions? and what is the thou...
In a very famous paper (in the networking community), Wang & Crowcroft present some $\mathsf{NP}$-completeness results of path computation under several additive/multiplicative constraints. The first problem is the following : Given a directed graph $G=(V,A)$ and two weight metrics $w_1$ and $w_2$ over the edges, defin...
Tomorrow is my presentation and I want to clear my concepts… I've read that in DFA, "For each state, transition on all possible symbols (alphabet) should be defined." Is for each state, defining transition on all possible symbols mandatory in DFA? If its not, then please give any examples?
Given a sequence of numbers, I have to prove that the number of decreasing subsequences (non-strictly), so that every number is included in one subsequence and the number of subsequences is minimum is actually the length of one of the longest increasing subsequences. I need to this because I have to prove the greedy al...
Have been trying to understand the image below which shows status of spinlock using cache coherence. Reference is Computer Architecture A Quantitative Approach------------------ Could anybody explain why there is a cache miss in step no.5 when P2 tries to execute swap.
I'm working on a problem and I've managed to design an efficient algorithm, but I'm stuck at the last part. After some processing I'm left with a tree and I have to answer several queries of the form $(x,y)$, such that for each such query we have to print the minimum cost edge on the path from $x$ to $y$. Now, this c...
Say we have a set of time intervals, that may intersect. A time point "marks" all of the intervals that are still unfinished at that time point. I wish to find an algorithm so that I can mark all of the intervals using the least amount of time points. E.g. if all of the intervals have not finished at time 6, one point ...
This is my first question here. I'm not a CS at all, so it might be quite trivial. I have written a program in C where I allocate memory to store a matrix of dimensions n-by-n and then feed a linear algebra subroutine with. I'm having big troubles in understanding how to identify time complexity for these operations f...
The real problem I am facing is the following. INSTANCE: I have sets $N:=\{1,\ldots,n\}$ and $K:=\{1,\ldots,k\}$ and matrix $a_{ij}>0$ for all $i\in K$ and $j\in N$. QUESTION: I need to find a subset $S$ of $N$ of size as small as possible and partition the set $K$ into $|S|$ disjoint sets $K_j$ whose union equals $K$...
Is a graph with two of the same edges a graph? Specifically, can this graph be considered a directed graph?
I am EXTREMELY confused on where to start with this problem. We recently just started learning about graph theory and I don't know where to begin. Prove that in a connected graph G with $p$ vertices, $q$ edges, and at least one cycle, $q \ge p$ How do I begin with this question? Any help would be greatly appreciated....
Let's say I'm trying to learn emotion given multi-modal sources. In this case, video and audio. However, I only have one dataset for video emotions and one dataset for audio. Is it possible to train a Deep Learning classifier on each dataset separately? One way I can imagine doing this is creating some sort of shared h...
As we know many programming languages and systems don't implement the strong reduction of $\lambda$-terms, instead they do weak reduction (no reduction under abstraction). I recently experimented several tests on $\lambda$-terms. I applied strong reduction and call by value reduction on them. strong reduction took l...
Often there are programming languages that are specialized for specific tasks. Some programming languages are excellent at array arithmetic (such as matrices and the use of multidimensional arrays), yet some are much better at higher-level mathematics that is hard to reproduce in other languages (yet still possible all...
Consider these two sets of coordinate pairs with weights: | set 1 | | set 2 | | (1,0) - (0,1) 1 | | (1,1) - (1,1) 2 | | (0,1) - (1,1) 4 | | (0,0) - (0,0) 1 | | (1,1) - (0,0) 3 | | (1,0) - (1,0) 3 | | (0,0) - (1,0) 8 | | (0,1) - (0,1) 6 | Each set has the properties: A coordinate is ...
H_max() algorithms work by considering a state in the planning graph, and using all applicable actions to make every atom in that state true. The h_max() for a given state is the cost of the most expensive atom in that state. Lets say that we have a relaxed planning task and it's heuristic (h+) then c*h_max()
Defunctionalization is a transformation first described 1972 by John C. Reynolds to eliminate higher-order functions. Are there alternative transformations (more efficient?) to eliminate higher-order functions?
I want to know if adding an edge to a undirected acyclic graph introduces no new vertex to the undirected acyclic graph then therefore we can say that adding this edge creates a cycle? I am confident this is correct, but I am looking for a formal proof on this if it is true(preferably a published paper that shows this)...
Is there a flowcharting application like Raptor for Mac. I am using the OS X (Sierra) version. I use Raptor in Windows and need a similar application for Mac.
Describe the problem as a graph problem. I've tried to modify the breadth first search algorithm, but haven't gotten anywhere. Any ideas?
I'm very curious about anything related to packet headers since im not well aware of how TCP/UDP protocols identify it's connection endpoint after a public IP is addressed. As for today I know the port will identify the process, but what happens when typically more than one computer is working over the same public IP a...
In the course of my research, I stumbled upon a problem which can be recast as the following decision problem: First some notation: Let $\mathbb{F}=\{0,1\}$ be the binary field. For $x\in\mathbb{F}^N$, $N\in\mathbb{N}$ arbitrary, let $w(x)$ denote the Hamming weight of $x$, i.e., the number of non-zero components. Le...
Following is the problem from a finished programming contest. Two players try to create a number, DesiredTotal, by adding numbers from 1 to N. The first to cross the number is the winner. The number to be added cannot be repeated. For example, if one player used 4 to increase the sum from 20 to 24, the neither p...
Having single operator, which could do work and it's time of availability - for example from 8 am till 9 pm. And operator have limited resource - let's call it energy (e), e <= E_MAX. List of works that need to be done: [w1, w2, w3, ... ,wN], (operator could complete only subset of works, all incompleted works moving...
From what I know, the high level scheduler decides which process is to be taken from backing store and placed into memory/ready queue, while the low level scheduler decides which process in the ready queue is executed by the CPU. If this is the case, which of the two schedulers actually use the scheduling algorithms (s...
In unification, for example set $s=\{ f(a,Y),f(X,d) \}$ has a disagreement set $\{ (a,X),(Y,d) \}$, since these two elements does not match on their fields. simply speaking that is a set disagreement set and in unification finds terms for $X$ and $Y$ to make disagreement disappear, so unifies. I got a question about no...
NB: I've been trying to Google for prior work on the problem described later in this post, but the search results I get for all the keywords I can come up with (e.g. minimal satisfying sets) are inundated with false positives. In this post I'm just asking for terminology/nomenclature/buzzwords to make my Google searc...
Let be the following problem : "Given a graph $G$, does it exists a clique in $G$ of length $\ge k$" for a given $k\in\mathbb{N}$. Show that it is NP-Complete I know how to show that a set of vertices $S$ is a stable set in $G$ iif $S$ is a clique in $G_C$. the Hamiltonian cycle problem is in $NP$ And I know the d...
Suppose you have two heaps each containing $2^k - 1$ elements. Design an efficient algorithm for merging these two heaps into a single heap. My approach was to assume two heaps are maxheap. Create one node with value $-\infty$ and attach one heap as left subtree and another as right subtree, and call the heapify proce...
In many formal definitions of Turing machines, the Greek letter $\Gamma$ is used to denote the tape alphabet of the TM. What is the origin of using $\Gamma$ for this? I'm having a hard time imagining what this might stand for.
I was just thinking about Turing-completeness and its relationship with modern computers. I've always thought that a real computer is not technically Turing-complete. It is equivalent to a linear-bounded automaton; a Turing machine has infinite memory, whereas a real computer has only finite memory. However, you can ...
Knuth's Algorithm X is a recursive, nondeterministic, depth-first, backtracking algorithm that solves the NP-complete problem exact cover (EC). (It actually finds all solutions to EC.) I do not understand how such algorithm could do that. What is the time complexity of this algorithm in terms of big-O notation? Here is...
(source: edu.au) This is the sort of bidirectional shift register, I'm talking about. I understand why the normal right shift is useful, but when you shift it left, all you're really doing is sending the data input straight to the output. Is there a useful reason for shifting bits in this manner? EDIT- I'm trying to u...
It seems to me that the 'implies' in English language does not mean the same thing as the logical operator 'implies', in a similar way how 'OR' word in most cases means 'Exclusive OR' in our everyday language use. Let's take two examples: If today is Monday then tomorrow is Tuesday. This is true. But if we say: If t...
I'm evaluating Amazon's machine learning platform, and thought that I would give it a "simple" classification problem first. As a disclaimer, I am quite new to machine learning (hence my interest in an ML platform). The classification problem is language detection. Given a list of 20k words, and their language (Engli...
A subset $S$ of vertices in an undirected graph $G$ is called almost independent if at most 100 edges in $G$ have both endpoints in $S$. Prove that finding the size of the largest almost-independent set of vertices in a given undirected graph is NP-hard. For these types of problems, I know that I should try to find a...
It is clear that AKS primality proving is the newest one, but as the results show it is not the fastest one. When I try the 9 digits long prime number it consume about 6 minutes to give you the result. Are there any modifications to make it faster for large random primes in size above 200 digits? The problems in the AK...
Background: I am a complete layman in computer science. I was reading about Busy Beaver numbers here, and I found the following passage: Humanity may never know the value of BB(6) for certain, let alone that of BB(7) or any higher number in the sequence. Indeed, already the top five and six-rule contenders elude us: w...
In Windows, if you write a random assembly program that has a random jump to an address that doesn't exist, the program crashes and Windows says something went wrong with the program. Since each computer system is essentially a constant execution of assembly, how does the one program crashing not cause the entire syste...
In my GATE Exam I have given with the following question statements and R5 ← R0 + R1 R6 ← R2 * R5 R5 ← R3 - R6 R6 ← R5/R4 X ← R6 the question was to calculate number of Output, True and Anti Dependencies in the instructions. I calculated and it turns out to be RAW (True Dependency) I1 - I2 (R5) I2 - I3 (R6) I3 - I...
I am studying DFA's, but I've been struggling to find an explanation of what does the final state mean? I know that it is indicated by double circle on the graph, but what does it imply?
Currently I'm using the well-known ratio-2 algorithm which is nice and fast, but I'm looking for an intuitive way to improve my results. All the articles I read so far were way too complicated for me, I'm looking for simple ideas to improve the results. What I got so far: def approx_vc(g): """ Find ...
Let $D=(V,E)$ be a digraph and let $a\colon E\to\mathbb{R}$ be a cost function on the edges. How can I prove that $D$ has no circuits with negative costs only if there exists a function $\pi\colon V\to\mathbb{R}$ such that $a(uv) + \pi(u) − \pi(v) \ge 0$, for all $uv\in E$? I realised that this is true by some examples...
I have this version of Prim's algorithm Prim$(G=(V,E),s\in V,w)\\ 1.\ d(s)\leftarrow 0;\forall u \neq s:d(u)\leftarrow \infty\quad \color{red}{O(|V|)}\\ 2.\ \forall u \in V:p(u)\leftarrow \text{null}\quad \color{red}{O(|V|)}\\ 3.\ s\leftarrow \emptyset,T\leftarrow \emptyset\quad \color{red}{O(1)}\\ 4.\ Q \leftarrow \...
Since my question relates directly to a part of the text from a 2004 book, Logic in Computer Science: Modelling and Reasoning about Systems (2nd Edition) by Michael Huth and Mark Ryan, in order to provide context for the following discussion, I'm partially quoting the book verbatim: The decision problem of validity in...
im looking for efficient algorithm to expand $(x+a)^n$ without using binomial theorem is the repeating square method efficient for that problem with the help of binary representation of n ?
Currently I have to learn Coq and don't know how to deal with an or : As an example, as simple as it is, I don't see how to prove: Theorem T0: x \/ ~x. I would really appreciate it, if someone could help me. For reference I use this cheat sheet. Also an example of a proof I have in mind: Here for double negation: Re...