instruction
stringlengths
35
29.1k
I was just thinking today that the best approach to find two smallest numbers in any array would be to first sort(ascending order) it with some efficient algorithm like Quicksort(Average case complexity: nlogn) and then access the first two members of the array in O(1). Is my approach optimal or there are some alternat...
I have recently started reading more about context-free parsing techniques, in particular LR parsing. As I have read, LR state transition graph (or table(s)) used for finding handles in sentential form is created by first constructing NFA from grammar rules (with included position in the rule - dot and possibly lookahe...
High-order pattern matching is an undecidable problem. That means there is no algorithm that, given an equation a => b, where a and b are terms on the simply typed lambda calculus, a containing free variables, finds a substitution S such that aS => b, where => stands for "has the same beta normal form" (up to variable ...
In 2007, it has been proven that high-order unification is decidable on the pattern matching case. If that is true, what is stopping someone to write an equation like: (F [1,3,2], F [4,1,3,2], F[3,1]) = ([1,2,3], [1,2,3,4], [1,3]) If the unification works, wouldn't it probably find an F which implements a sorting algo...
There was a comment here that " It is possible in principle to reduce the factorization of a $256$-bit number (which is computable in TFNP) to the Permanent on a matrix of dimension $N\times N$ where $N\leq c\cdot256^c + c$ for some hopefully small constant $c$. However the computation of a nice upper bound on $c$ woul...
Let's suppose I want to generate n equal sized boolean arrays with maximum "difference". - "Difference" in this case is defined as that the arrays share as low as possible fields with one another. (an example of share: array1 = {1,0,0,0) and array2 = {1,1,1,1} -> array1 and array2 share 1 field (array1[0] / array2[0]) ...
In my understanding both of them can be converted to serial schedules. (This helps with consistency by isolation property while also giving the performance boost by concurrency). I'm unable to understand one of the lines in this text: http://infolab.stanford.edu/~ullman/dscb/vs-old.pdf Intuitively, view-serializabili...
I understand the difference between Hoare and Mesa monitors. However I don't understand why priority inversion (when a lower priority process gets done before a higher priority process) is possible in the Hoare type but not possible in the Mesa type. Can someone explain this?
I am studying about DFS these days from the book "Algorithm Design" by Jon Kleinberg. Here a DFS algo is given which is as follows: DFS(s): Initialize S to be a stack with one element s While S is not empty Take a node u from S If Explored[u] = false then Set Explored[u] = true; ...
BACKGROUND: Note: The following question arose in my mind when watching this lecture (watch at 5:30 minutes if you will). Assumption: Just for the sake of this question, let's assume that the term "basic operation" means an addition or a multiplication operation between two single-digit numbers. Now we have to calcula...
How should I understand the definition of computational problem? A computational problem is a mathematical object representing a collection of questions that computers might be able to solve. For example, the problem of factoring "Given a positive integer n, find a nontrivial prime factor of n." What is the mathe...
Let's say I have an array of numbers {a,b,c,d,e} and want to calculate the sum of product of all triples abc+abd+...+cde. I can calculate it very fast without generating all triples using this formula F(n,k)= k*F(n-1, k-1)+ F(n-1, k) with two loops int[] values={a, b, c, d, e...}; int k = 3; int[,...
I was reading about sierpenski's triangle and i found that it is similar to pascal's Triangle, which can show coefficients in binomial expansion, also rule 90 from ECA. If Sierpenski's triangle can show coefficients in binomial expansion, and was simulated by other two systems {Pascal's Triangle} and {Rule 90} does th...
I know this might sound like a newbie question, but bear with me. I have read a paper where researchers use a random forest to predict species distribution, but in their study, they only predict a new set of points given an old set and a map of environmental variables. https://www.uam.es/proyectosinv/Mclim/pdf/MBenito_...
A list of n strings, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is __________. $O(n log n)$ $O(n^2 log n)$ $O(n^2 +log n)$ $O(n^2)$ My attempt: If we are used in-place merge sort , then time complexity for the worst case $Θ(n^2...
I have searched extensively and unsuccessfully for references to a combinatorial problem that arises in my work. I am hoping someone can tell me if this type of problem has a "name" and provably optimal solutions. The problem: Given a set of objects denoted by $X_1,\ldots,X_N$, a commutative and associative operator $\...
I have a field in my data store which must take exactly 180 bits of information. Some users will choose to make this data encrypted, some won't, so some of those 180 bit fields will be ciphertext some will be plaintext. A boolean will indicate which one the user is using. The important thing here is that I need this fi...
I was wondering whether it is possible (and if so, then how) to tell what is the maximum number of equivalence classes generated by a DFA as per Myhill-Nerode theorem (assuming it has no redundant transitions) as a function of number of accepting and rejecting states and cardinality of its alphabet. My guess is that ...
Consider a company that wants to lunch a new subsidiary. To do so, four phases are needed: A, B, C, D which have to be done in this order. The length of each depends on how much money is invested in the phase. Assume that numbers the close to the red edges are for all red ones, and likewise for the purple ones. Here i...
The question asks for the decimal number that 0x0C000000 represents if it is a floating number. I'm not too sure on how to approach this, but here's my thought process: 0x0C000000 = 0000 1100 0000 0000 0000 0000 0000 0000 The first digit is 0, so it's positive. The exponent is 0x0C = 12 - 127 = -116. The mantissa is ...
Our software receives documents (in the order of tens of thousands) from various providers, each document flows through a number of steps, one of those steps finds duplicates and similar documents (within 80% threshold) to this document. We implemented Levenshtein distance algorithm and we limit amount of documents cur...
I've come up with an idea on how to compress data. But I'm not sure if the approach already exists. I would like to know if it does already, and if so, what its name is. The approach is to: Convert the message to a number Find the smallest equation to represent the number The result of this is an equation. Which wil...
I've found and implemented a full adder to be able to do unsigned or two's complement addition on wikipedia: https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder However, in my particular case, I'd like to use a sign bit instead of twos complement, due to there being a variable (unbounded) number of bits involv...
I am stuck by analyzing the time complexity of the following algorithm: def fun (r, k, d, p): if d > p: return r if d = 0 and p = 0: r <- r + k return r if d > 0: fun (r, k + 1, d - 1, p) if p > 0: fun (r, k - 1, d, p - 1) The root call will be fun (0, 0, n, n), ...
So this is the pseudo code I came up with but the run time is very slow. Is there a way to write this code to get it in terms of O(n)? First for loop (starts at 0) grabs the first value of the array and the second for loop is nested inside the first for loop (starts at j =i+1). The second for loop runs through and chec...
We have Stocks in several discrete positions, let say: A B C 40 20 80 And Demand, which may be satisfied by one or more Stock positions (if no specified then it would accept any Stock). Demand for A=20 may be satisfied from A Stock only, and depletes 20 units from it. Demand for AB=20 may be satisfied from any...
I am trying to solve the following problem and despite having performed quite extensive literature review, I do not seem to find any similar problem or technique that would be useful here. PROBLEM FORMULATION: Given a file of size K (bits) residing at a node 1, we would like to disseminate it in minimum time to a set o...
We say an algorithm runs in polynomial time if it is of the form $O(n^k)$ where $n$ is the size of the input, right? So how do we judge how many inputs there are in: $(x_1 \vee x_2 \vee \overline{x_3}) \wedge (\overline{x_1} \vee \overline{x_2} \vee x_4) \wedge (x_2\vee x_3\vee x_5)$ ...actually, in looking for an actu...
I've been thinking about sorting $6$ elements with the minimal possible number of comparisons. I can do it in $10$ comparisons but I've no idea if this is optimal. Or is there a better algorithm ? Algorithm 1. Sort $a_1, a_2, a_3$ and $a_4, a_5, a_6$. Number of comparisons: $3+3=6$. 2. Merge two subarrays. Number of ...
Considering the lower limit to the problem of checking whether the array are only the same number via comparisons. And thnik about $ n-1 $. Consider the diagram hasse. This diagram must be consistent (one piece), so you need at least $ n-1 $ edges (comparisons),. However, I would like to consider a decision tree. Unfor...
Is this problem a know variant of the optimisation version of the bin packing problem? There is an approximating algorithm for it? Let $A = \{a_1,a_2,...a_n\}$ be a set of items, $B = \{b_1,b_2,...b_m\}$ be a set of buckets, with $m \leq n$. Each $a_i$ has a weight, based on the bin it is placed on (the item $a_i$ whe...
It is required that, in a black red tree, the color for the root is always black. However, wikipedia argues that this rule can be omitted as a red root can always be changed to black but not vice versa. I get the first half, that a red root can be changed to black at any time, but in what circumstance is it impossible ...
I was given the following problem in an test (at codility.com) A turtle starts at (0, 0) on a cartesian graph. We have a non-empty zero-indexed "moves" list that contains positive integer numbers. Each number represents the distance moved. The first number is the distance north, the second is the distance east, ...
Question: How does one formulate a back propagation algorithm (either batch, gradient, anything that works) for a neural net, playing a game of Tic Tac Toe? (Java is being utilized) Scenario: There are 9 input neurons, one for each square. A value of -1 represents X, 1 represents O, and 0 represents an empty space. The...
Have a problem that's a variant of the linear time selection algorithm of a randomized array that I'm struggling with. Let $A = A[1], ..., A[n]$ be an array of $n \ge 4$ distinct keys. Describe an efficient algorithm to find the three smallest keys in $A$. Use words. What is the worst case number of comparisons perfor...
How might one compute $4^{-1} \mod 17$ I know the answer is 13. I'm just not sure how to arrive at that number, and can't find any good explanations. Any help would be great
I know that languages which can be defined using regular expressions and those recognisable by DFA/NFA ( finite automata ) are equivalent. Also no DFA exists for the language $\{0^n1^n|n \ge 0\}$. But still it can be written using regular expressions ( for that matter any non-regular language can be ) as $\{ \epsilon...
I'm an academic mathematician. While trying to verify a counterexample to something in my research, the following computational problem has arisen: Fix a vector space $V = \mathbb{Q}^n$. Here $n$ is something on the order of $20,000$. I have a procedure that spits out a sequence of vectors $\vec{v}_1,\vec{v}_2,\ldot...
I have a piece of code that applies recursive Binary and Ternary searches on sorted arrays of increasing size, i.e. 500, 1000, 2000, 4000, etc. The entire code segment is about 200 lines so I've been forced to upload it to Pastebin which you can find here. When the main method is executed, arrays are created and popula...
In this problem, I'm first given n number of values which I have to store in a space efficient manner. Then I'm given m number of values which I have to check if they were added to the data structure before (such that after the operation, I know which value was a member, and which weren't). I could use a Bloom Filter a...
I suppose you are all familiar with the baseball elimination problem (it is about determining whether some team with particular number of points can finish in the first place, when there are still such and such games to be played by other teams). The rules there are rather simple - the winner gets a point, while the l...
I'm actually studying the Bellman algorithm. I have to draw a graph from this array. \begin{array}{|l|c|r|B|d|} Rhythme & A & B& C& D\\ \hline Normal & 5 & - & - & -\\ Rapide & 4 & 3 & 5 & 2\\ Prioritaire & 2 & 2 & 3 & 1\\ \end{array} The instructions are: each vertex corresponds to a possible progress where some phase...
Problem Given a vector of bools of length n I wish to compute the logical and over all subsets up to length k. By logical and I mean that for a subset to give true all of its elements must be true. Example: With a boolean vector of 3 elements (indexes below each for reference below) v = [true, true, false] i = 0 ...
I think about following problem: There are given three sorted arrays $A,B,C$ (each of them is length $n$). Every array has distinct elements. Find median of union $A,B,C$. I consider following approach: Let's consider $A_i, B_i, C_i$, where $i=n/2$. There are six cases - but I consider only one (rest of them is analo...
The algorithm is in Python. Seems correct to me, ideas how to prove it? And what would be its time complexity? from bisect import bisect # Implements the decision version of subset sum. # The subset sum problem: given a set and a number find a subset of the set which sums to the given number. # Inputs: an ordered list...
I get that all problems in NP can be reduced in polynomial time to some NP-Hard problem. An NP-Hard problem is also supposed to be harder or at least as hard as any NP problem. Can an NP-Hard problem be reduced to an NP problem, which is not already an NP-Complete problem? Also, are NP-Hard problems inter-convertible?
In constraint satisfaction problems, heuristics can be used to improve the performance of a bactracking solver. Three commonly given heuristics for simple backtracking solvers are: Minimum-remaining-values (how many values are still valid for this variable) Degree heuristic (how many other variables are affected by th...
For functions of a single totally ordered variable, I already know that $f(n)$ is $O(g(n))$ if and only if $\exists m. \exists c. \forall n. (n \ge m) \rightarrow [ f(n) \le c \cdot g(n) ]$. What I don't know is the meaning of $O(g(n_1, n_2 \dots n_k))$ for $k > 1$ totally ordered variables. What's the formal definitio...
I'm working on proving that the following language is regular: B = {x|for some y, length(x) = length(y) and xy are in A} where A is a regular language. Since A is regular, we know that there is an FSA that describes it. My plan is to modify this FSA, M, into M' using jumps, to prove that for certain strings of x, that...
Are there any graph implementation data structures beyond the standard adjacency list/matrix ones? If so, what are they? I welcome experimental ones as well as highly specialized ones. A little background: I'm developing an algorithm that relies heavily on graph operations, so I'm doing research in graph implementation...
A language $L \subseteq \Sigma^*$ can be described by a regular expression iff it can be defined by a formula in monadic second order with words as structure $(\{0, \dots, n-1\}, <, (P_a)_{a \in \Sigma})$. The proof I know is an indirection construction over automata, i.e. we show that DFAs and regular expressions / fo...
Consider a directed graph with nodes {1,2,3...n} and include an edge (i,j) whenever i<j. According to me, it should be n(n-1)/2 but the book says it's nC2(combinations).
I've already asked this question over at MathExchange, but since I received no replies or comments there, I hoped it might be more adequately fitting in this category. I have a convex (concave) objective function with constraints that are all linear, and would like to use the Multiplicative Weights Update method (see ...
Context-free grammar can generate the string a 2 n for n≥0 . The production rule P is S→SS|a . The derivations is, for example: 1) S⇒a (this is when n = 0) 2) S⇒SS⇒aa (this is when n = 1) 3) S⇒SS⇒SSSS⇒aaaa (this is when n = 2) 4) S⇒SS⇒SSSS⇒SSSSSSSS⇒aaaaaaaa (this is when n = 3). Am I right? Someone told me yes b...
In the GAP-CLIQUE$(k,\ell)$ problem, we are given a graph $G$ over $n$ vertices and have to decide whether $G$ contains a clique of size $k$ or no clique of size $\ell$. Using a PCP system, it can be shown that GAP-CLIQUE$(k,\varepsilon k)$ is NP-hard for any positive constant $\varepsilon$ less or equal to $1$. In fac...
Suppose a stack implementation supports an instruction REVERSE, which reverses the order of elements on the stack, in addition to the PUSH and POP instructions. I'm looking for implementation of queue where ENQUEUE takes a sequence of three instructions and DEQUEUE takes a single instruction , or any better algorith...
What does $L_1 \in CS - CF$ means? I think the meaning is $L_1$ can be generated by context-sensitive grammars, but cannot be generated by context-free grammars. Am I understanding this correctly? Just to be sure.
I want to compare the vertices of two graphs. Given two graphs, $G_1 = (V_1, E_1)$ and $G_2 = (V_2, E_2)$, I want to compare $u_n$ and $v_m$ for $u \in V_1$ and $v \in V_2$. I came up with double loops for doing this: for all u in G1 for all v in G2 if u.label == v.label then do something here end if ...
I'm attempting to create an automatic scheduler from a list of tasks I have available. Here are the key points: Each task has been given a priority beforehand and the algorithm should try to maximize the total 'priority points' it can get from the tasks it schedules. There should be no overlap between any tasks. Each ...
I'm interested in pushdown automata with a unary stack alphabet: let's call them UPDA's. Define a $k$-UPDA to be a pushdown automaton with $k$ stacks, each with a unary stack alphabet. I've figured out that a $k$-UPDA is at least as powerful as a $(k-1)$-PDA (see proof at the end). This implies that a $k$-UPDA is equi...
I'm just refreshing my memory on Turing machines and computability, and I was wondering how to design a function of 2 arguments that is guaranteed not to be computable. I've seen the proof (by diagonalization) for one argument functions, and I'd like to make sure I have the right idea. For functions with 2 arguments, a...
I'm given a more restricted version of 3-SAT called 3-SAT-M: Problem: 3-SAT-M INPUT: A set of clauses C {c1,...,ck} over n boolean variables {x1,...,xn}, where every clause contains exactly three literals (as in 3-SAT). OUTPUT: YES if there is a truth assignment to the boolean variables such that the following constra...
Given a set of points $x_1, \ldots, x_n \in \mathbb{R}^2$ and a radius $r$. Which is the complexity of finding the point with higher number of points at a distance smaller than $r$. E.g the one that maximizes $\sum_{i=1}^n \mathbb{1}_{\|x - x_i\| \leq r}$? A brute force algorithm would be to go over every point and cou...
So I'm trying to learn how to simplify Big O notations, these are the ones i'm working on (also sorry if i mess up the format, i'm new) So the first one i have is: f(n) = n g(n) = n/loglog 12 I have to determine whether f is O(g), Omega(g), or Theta(g). I also want to account for Big O vs Little O (which is also so...
I'm trying to understand this dynamic programming related problem, adapted from Kleinberg's Algorithm Design book. Not homework: i've already a solution, just considering if i'm ok with the theory. Suppose we want to replicate a file over a collection of $n$ servers $S_1, S_2 , \ldots , S_n$. Each server $S_i$ has a ...
I'm taking my first algorithms class, and the first exam is tomorrow. I've been looking forward to this class since freshman year, but now that I'm in it the professor is less than stellar and I've been having trouble (making tomorrow's exam worrying). We've covered the meaning of each of the notations, but we'll be as...
I have no formal training in computer science as I have not yet taken any such classes, so perhaps this question appears naive. I was reading about BPP and it was claimed that a deterministic Turing machine is a special case of a probabilistic Turing machine. I don't understand why this is.
I'm having trouble drawing an automata with this description S ← abb|aab|aaabbb|aaaS|Sbbb. I have tried drawing the abb and aab states but am having trouble making this into one automaton
So I couldn't figure this one out, what do i do when i have multiply logs as the running time of an algorithm. For example: f(n): loglogn g(n): logloglogn Does f = Omega(g) in this case? as in g is a much slower growing algorithm than f?
I'm trying to see if I got these running times right, are these running times for these algorithms correct. Algorithm 1: x=0 for i=1 to n for j=1 to i if( i+j > n) return; //so whenever i+j first reaches n, the algorithm stops Running time I got: O(n)? Algorithm 2: x=0 for i=1 to n for j=1 to n x...
I'm having difficulty understanding what my book is trying to say in regards to preemptive and non-preemptive CPU scheduling. It says the following: CPU Scheduling decisions may take place under the following four circumstances: When a process switches from the running state to the waiting state (for example, I/O r...
Given any arbitrary boolean expression using AND, OR and NOT gates what is the time complexity of minimizing the expression such that minimum number of gates are used. The following Wikipedia article only talks about the space complexity of the problem (which is PSPACE), but does not talks about the time complexity. ht...
I want to express a simple correctness theorem for a term-desugaring function $\Delta$. The goal is to express that if the evaluation of a desugared term yields a value, this value is the desugared result of evaluating the original term. Since the implication operator $\Rightarrow$ is already used in my dynamic semant...
Can quantum computer become perfect chess player? Can it determine whether (when both players are perfect) win white or black? (or is it dead heat?)
We have languages $A= \{a\}$ and $B = \{b\}$. If we consider $(A\cup B)^*$, where ${}^*$ means Kleene star, we have a set of words like $\{\lambda, a,b,aa,ab,aaa,\dots\}$, where $\lambda$ is the empty word. Another example we do is $A^*(BA^*)^*$. If we concatenate two languages, $\lambda$ will not be in the set, but th...
What is the communication complexity of the best known algorithm for computing the average of a set of N*D numbers distributed across N nodes with D values per node? Assume you have full control over the network topology and protocol.
hi how to make regex and 'DFA' to don't accept this 'bab' on this alphabet = {a,b} and accept all language except 'bab'
I am looking for a mathematical formula / algorithm to find the negation of a 8-bit hexadecimal without having to expand into a binary form. E.g; 0000BDDA -> 48602 FFFF4226 -> -48602 Need to get from 0000BDDA -> FFFF4226 without 2' complements / expanding it to binary. I've been cracking my head at it but to no avail...
Considering functions f and g, is the following true? $ (f \in O(g)) \implies (f \in \Theta(g)) \lor (f \in o(g))$ If not, can you please state an example? Despite thinking hard, i could not find one. Thanks a lot!
I have two large files containing paragraphs of English text: The first text is about 200 pages long and has about 10 paragraphs per page (each paragraph is 5 sentences long). The second text contains almost precisely the same paragraphs and text as the first. It is also 200 pages long with 10 paragraphs per page. How...
Finding a Regular Expression for an Intersection of Two Regular Expressions PAIR of regular expressions is ((ss*)t*) and ((ss*) + (tt*)). How do I find a regular expression that represents the intersection of the languages defined by the pair?
I have read about Automata Theory where it is about the study of abstract machines and automata. And i know that an abstract machine takes the input, process it and create the output, just like Conway's Game of life. But, what a formal defination can relate it to Cellular Automata, what about Elementary Cellular Automa...
Could some one please explain how to get the time complexity of checking if a number is prime? I'm really confused as to if it is $O(\sqrt{n})$ or $O(n^2)$. I iterate from $i=2$ to $\sqrt{n}$ and continuously checking if n%i != 0. However, do we consider the complexity of the square root function also? If we do, the Ne...
On the 6th slide at https://web.stanford.edu/class/ee364b/lectures/bb_slides.pdf, while defining L2 and U2, why are we taking min for both?
I was reading Wikipedia about the von Neumann bottleneck. Surely there is some simple answer to this. Why can we not read and write to the same address at the same time? We can if the addresses are different.
For example, if we had an extremely large expression, how do we even first get it into the program? I can't imagine entering each clause in one by one..
I'm trying to write a formal proof in automata theory to show a few properties of DFAs but I am having some trouble with this that I am trying to incorporate into my proof. I want to show how many languages $S$ there are such that $S\subseteq\{0,1\}^*$ and $\forall s\in S, |s|\leq 5$ where $s$ is a string. I got that t...
"If we consider the squares of an infinite chess board as nodes of our graph and consider each to be connected to the other eight squares that are a knight's move away from it what is the percolation threshold of this graph?" Note:One way I have thought about this problem is to try to use vectors: We can think of a kni...
Let $h$ be a homomorphism and let $L$ be a language. Writing ${}^*$ for Kleene star, I want to show that $(h^{-1}(L))^* \neq h^{-1}(L^*)$. Can I prove this just by showing that we can have $h^{-1}(L)$ to be empty (because no strings are mapping into $L$) and therefore the right side is the empty set? Doing the same ...
Let's say I have a formal language, a^n b^n which mean ab,aabb,aaabbb Can I write any regular expression or grammar to create a language like this? I am positive not entirely sure that there is not regex possible, however have no idea about the grammar part?
How would I calculate the execution time, T(n), for this algorithm? int search(int a[], int l, int r, int x) { int m = (l+r)>>1; if (l > r) return -1; // not found if (a[m] == x) return m; if (a[m] > x) return search(a, l, m-1, x); return search(a, m+1, r, x); }
In case of NFA, if the NFA is in a state and reads $\epsilon$ ( empty string ) the NFA splits in to two, with one being at the current state and other with the state along the $\epsilon$ transition. In case of PDA where transitions are of the type $a,b \to c$, with $a$ being the input alphabet being read, $b$ being the...
My problem is to find an efficient data structure that allows the encoding of a (non-directed) graph on the surface of a cylinder (without top and bottom discs). Usually I would store a graph as a list of edges, which are pairs $(a,b)$ of vertices. My problem is that I can have two kinds of edge from $a$ to $b$ either...
INPUT: undirected graph, s, t OUTPUT: connectivity of s and t I perform BFS on s AND t, each taking turns to make one traversal. When a vertex exists in both s and t's BFS tree, we can assume it is connected. When one tree is done traversing but the other is not, s and t are not connected. Does such an algorithm exist ...
I am trying to understand ambiguous grammar in programming languages. I was given this ruleset and told it was ambiguous. If my understanding is correct, this means that it is possible to create the same sentence using different parse trees. After looking at it for a while, I can't find the sentence/parse trees that sh...
For my computer science study, I have to design a replay attack (if possible) for the following authentication protocols. I use the standard security protocol notation. In these protocols, $A$ is Alice, $B$ is Bob and $E(A)$ is for example Eve impersonating Alice. $K_{AB}$ is a shared secret key only Alice and Bob kn...
I have a very large set of animal migration data, consisting of many series of vectors - each series is basically a path of a single animal. The dataset I'm using consists of 244 of these series. I want to train a predictive model so that when it is given a collection of these series and a map of environmental variab...
What type of virus protections are available and their suitability to a cyber-security company. I'm talking about top notch stuff. Are there any methods or techniques that are rare or unusual? Othere than Anti-Virus softwares, are there other ways to keep your systems protected from virus?
I thought this would be a very simple O(n) b.c. you can do the insert any where with in the list. The longer the list, the longer it will take on average to do the insert. However according to bigocheatsheet it is O(1) or has no dependency on the size of the list. What is wrong here?
I was trying to find out how to find whether $N$ is a perfect power or not for some $a$ and $b$ (so the algorithm should discover that it is not a perfect power if it is not expressible in the form $a^b$). My intuition tells me that for every value of the exponent $b$ we can binary search $a$ in the set $\{ 1,...,N-1 \...