instruction stringlengths 35 29.1k |
|---|
I am studying now for a test in my complexity course. When I solved previous exams I saw the following question: Prove that the language $L$ of all directed graphs on $n$ vertices that contain exactly $10\sqrt{n}$ strongly connected components is in $NL$.
We saw in class that checking whether a directed graph contains... |
Let us define two languages of Turing machines.
$$
EQ_{TM} = \{<M_1,M_2> : L(M_1) = L(M_2)\}
$$
$$
ALL_{TM} = \{<M> : L(M) = \Sigma^*\}
$$
It is easy to show that neither of the languages are in $RE \cup coRE$, and also it is easy to construct a reduction $ALL_{TM} \leq EQ_{TM}$.
I suspect that there is no reduction in... |
I am generating random DFAs to test a DFA reduction algorithm on them.
The algorithm that I'm using right now is as follows: for each state $q$, for each symbol in the alphabet $c$, add $\delta (q, c)$ to some random state. Each state has the same probability of becoming a final state.
Is this a good method of generat... |
I am interested in showing connection between CSP (Constraint Satisfaction Problems) as it's defined in CSP (definition with Constraint graph, sometimes called binary CSP) and 3SAT problem, when domain of CSP contains of 7 values.
The specific requirement is to show reduction from 3SAT to GAP CSP, when domain of CSP c... |
I am building a text categorizer for short sentences. In addition to telling the user "the category of the text you entered is C", I want to be able to explain why I made this decision, in a short and understandable way. For example, I don't want to tell the user "I put your sentence into a complex 3-layered neural ne... |
I am asking this to advance the argument that BigDecimal is better than float or double for representing exact amounts of currency.
Can someone refer me to a proof that between any two integers there are only four values that multiples of .01 and can be exactly represented in base 2? Or at least confirm I'm correct ... |
Pardon me if i'm missing something which is very obvious here but i cant seem to figure it out.
$E=\{ \langle M, w \rangle \mid \text{ Turing Machine encoded by $M$ accepts input $w$ after at most $ 2^{|w|}$ steps}\}$
We have to prove $E\notin P$
The book (Papadimitrou, Elements of the ToC) assumes $E\in P$ and it con... |
I was looking for an appropriate term to call my proposal. I knew it is either platform or architecture. But could not simply and clearly distinguish them in an academic manner. So, I searched the web and the literature and found few definitions on architecture and platform as follows that sound logical.
Software Arch... |
Suppose that we have a directed graph $G = (V, E)$ represented as an adjacency list. Suppose that we want to list all of the edges incident to some node $v \in V$. We can do this by iterating over all the elements in the adjacency list.
My question concerns the runtime of this operation. Is it proper to say that the... |
On the circulation problem page on wikipedia, the multicommodity circulation problem formulation seems to be insufficient, since we can just set all but one flow to $0$, and reduce it to a circulation problem.
I can't find any concrete description of multicommodity circulation problem to verify the correctness. There i... |
Regarding Processor Direct Cache, what is the proper mathematical technique for discovering how many words are loaded on a cache miss?
For example if you have a direct mapped cache with a total data cache size of 32 words and a direct mapped cache of 4-word blocks. I believe I have a cache index of 8 cache blocks:
32/... |
It is easy to rotate pixel array if the angle is a multiple of 90 degree.
For example, (quote from Computer Graphics with OpenGL)
We can rotate a two-dimensional object or pattern 90' counterwise by
reversing the pixel values in each row of the array, then
interchanging rows and columns.
But I could not understa... |
I want to show that the following problems are in NP (NP-completeness is irrelevant) by textually describing a non-deterministic Turing machine which runs in polynomial time. The assumptions are that addition, multiplication, tests for divisibility can be done in polynomial time and natural numbers are represented in b... |
Working on a project for my Data Structures class.
I've implemented a Red/Black tree in Java. One of the operations required of the data structure is "find a node which has a key of at least n". The leaves of the tree are the sentinel node.
My initial thought was using the regular search with modifications:
Search for... |
In a different post it came up that
(using the Turing machine model of computation),
it is not even safe to say that $N$ numbers can be read in $O(N)$ time.
To me this is boggling since
it's something I take for granted in the RAM model of computation,
and I admittedly only have a cursory understanding of Turing ma... |
A bit of background, the work that I currently and will be doing involves sorting very large amounts of data (in this case, grayscale pixels in descending order), sometimes up to 4 million.
Which are the most effective and efficient sorting algorithms that could handle multiple large datasets (such as descried in the... |
Given a valid binary search tree whose keys are unique real numbers, and a set of $k$ pointers to the $k$ minimum elements in the tree, will the BST property be maintained if I replace all $k$ elements with the average of the $k$ elements?
The BST property as given in Corman:
Let $x$ be a node in a binary search tree... |
Let there be 2 sets $X$ and $Y$, both are countable (assume the bijection from $\mathbb{N}$ to the respective sets is computable) and infinite. Let $S$ be the set of all possible functions (NOT necessarily computable, i dont care about computability at this point) from $A$ to $Y$ for all $A \subset X$ (Remember that $A... |
If you have a long string of length $n$ and a shorter string of length $m$, what is a suitable recurrence to let you compute all $n-m+1$ Levevenshtein distances between the shorter string and all substrings of the longer string of length $m$?
Can it in fact be done in $O(nm)$ time?
|
Given an undirected graph with positive weights, there are 2 kinds of edges: locked edges and unlocked edges.
Determination if a given edge is either locked or unlocked edge takes O(1).
For given two vertices s , t and a positive number k = O(1), How can I find the shortest path between s and t which contains at most ... |
I am a student of computer science with interest in image processing. I have learned how to apply a few effects to images like making them grayscale, sketching them out of lines, etc.
I would like to learn more about the algorithmic techniques behind creative manipulation of images like making them sepia-tone, smudg... |
A binary sequence of length $n$ is just an ordered sequence $x_1,\ldots,x_n$ so that each $x_j$ is either $0$ or $1$. In order to generate all such binary sequences, one can use the obvious binary tree structure in the following way: the root is "empty", but each left child corresponds to the addition of $0$ to the exi... |
I have two for loops, one nested within the other. I have two int variables n and U, where U > n. I know that the outer loop runs exactly U times (pretty much for(int i = 0; i < U -1; i++)), and the inner loop runs exactly n times in total for the duration of the entire execution. It can run n times once and never run ... |
I have a rather interesting exercise in Game Theory.
Assume there is a 2-players game, and player $i$ has $n_i$ pure strategies. The game is given by listing the payoffs for each player for each $n_1 × n_2$ possible plays.
Give a polynomial time algorithm to check if there is a Nash equilibrium for the game in which ea... |
I am reading Kolmogorov Complexity by Li and Vitányi:
"Let $x$ be a finite binary string. We write '$x$ is random' if the shortest binary description of $x$ with respect to the optimal specification method $D_0$ has length at least $x$."
By length $x$ I understand the natural number that the binary string maps to canon... |
While I was doing
CLRS (3rd
edition), I came across this question on page 629:
Professor Sabatier conjectures the following converse of Theorem
23.1:
Let $G = (V,E)$ be a connected, undirected graph with a real-valued
weight function $w$ defined on $E$. Let $A \subseteq E$ that is
included in some minimum spanni... |
Given $s$ as a string over some alphabet, what is the best known algorithm to compute a corresponding deterministic finite-state automaton (DFA) that accepts any string that contains $s$?
I am mostly interested of the lowest time complexity so if you tell me what is the best known complexity in O notation to build an a... |
I'm trying write a program to solve equations from the following form:
$$ \begin{align}
a \bmod x &= t_1 \\
b \bmod x &= t_2 \\
\end{align} $$
where $a$, $b$, $t_1$ and $t_2$ are known values.
I have multiple equations of the same form and I'd like to solve them for $x$.
Assuming I have constraints on $t_1$ and on $t_2... |
There is a lot of information available on the subject of Pairwise Comparisons but I haven't found any guidance on how to optimize pair measurements that have confidence values attached to them.
Imagine that an AI black box has been trained on many pairs of objects in order to predict the distance between the objects i... |
How do you go about analysing coin change recursive solution. i.e,
T(N,K) = T(N,K-1) + T(N-1,K) for K denominations that add up to amount N.
You can find the problem description and pseudo code here - http://www.algorithmist.com/index.php/Coin_Change#Recursive_Formulation
|
From a very strictly adhering sense to the hardware and circuit-level operations of any standard (non-specialized, DSPs, or supercomputing systems, etc.) microprocessor follow very similar, almost exact in some ways, operations.
The typical role of the (main) processor in a computer, integrated with other hardware circ... |
The partition problem is a well-known NP-complete problem. In the definitions I have seen, the input is assumed to be a multiset of integers, and we want to decide the existence of a partition into two sets that have the same sum. My question is:
Is the partition problem still NP-complete if all input integers are dis... |
Could anyone help me please to find who was the first person who has proved that the language of all borderless words is not regular and when was that? Could you mention the reference, please?
A word $w$ has a border $u$ if $u$ is both prefix and suffix of $w$ (and $u$ does not equal $\lambda$ or $w$).
|
I have a large data set consisting of ca. 40 categorical data items and a few interval data items (real numbers, less than 5 such items). Most categories should have a lot of values that repeat themselves over and over, and very few that appear very rarely. Some categories are also overcategories of others (like countr... |
This is a problem from a past contest at topcoder : Problem.
Its solution is given here : Solution [Scroll Down to Penguin Emperor]
I am unable to understand how the section with subheading "Combinations are associative" works. What is actually going on in this step ? How is the convolution property being used ? Or the... |
How to find the smallest difference between two numbers in a sorted list using divide-and-conquer approach? For example,
(smallest-dif '(5 500 510 670 750 10000)) => 10
|
Within the field of cache-oblivious algorithms the ideal cache model is used for determining the cache complexity of an algorithm. One of the assumptions of the ideal cache model is that it models a "tall cache". This is given by the statement $Z = \Omega(L^2)$. Where $Z$ is the size of the cache and $L$ is the size... |
"The designer of an algorithm needs to balance between space complexity and time
complexity." - Comment on the validity of the statement in the context of recursive
algorithms.
This is a question from my university's previous paper. But i couldn't find a decent answer. Actually i am confused about how can a developer ... |
I'm looking for empirical papers which investigate if a user can benefit from Q&A sites like Stack Overflow. I welcome any papers related to this topic, e.g:
an experiment, investigating if a specific task can be executed faster,
an analysis, investigating if a user understands the solutions on Q&A sites or if he jus... |
I need to find the maximal subset $S$ of an array $A$ of length $N$ ,where each element of $A$ contains $X$ and $Y$, such that for each $0 \leq i \lt N$ , $j \lt i$ the rule is $S[i].X \lt S[j].Y$ , What would be the best approach for finding such subset of $A$ (in terms of time, knowing that $N \leq 100,000$) ?
EDIT:
... |
Let us consider the following game: there are some players and a computer. Each player inputs one positive integer and his name (player doesn't know another's numbers, just his own). When all the players made their moves, computer outputs a name of winner – who submitted the lowest unique number.
How do you think, what... |
I'm currently writing my thesis, which uses genetic algorithms at some point.
Now I need to define some parameters for the genetic algorithm
I know that, because of the No Free Lunch Theorem there is no optimal parameter configuration for all problems.
However I do need some default parameters, because finding the opt... |
The problem is a scheduling problem with n jobs and k machines. Each job i can be started at any time, but its duration is not exactly known except a time span interval. For example, a job may take anything from 5 mins to 10 mins. The list of jobs and their duration interval is given to the scheduler and the aim is to ... |
Christofides' 1.5-approximation considers complete graphs as inputs, and as I understand this is essential. If the input graph is not complete, how can I add new edges with suitable weights such that the resulting complete graph still satisfies the triangle inequality, and, of course, the TSP solution for the complete ... |
I am having problems understanding a basic concept in CLRS, it is about worst case partitioning during quicksort --
The worst-case behavior for quicksort occurs when the partitioning routine produces one subproblem with $n − 1$ elements and one with $0$ elements.
What does it mean by subproblem of size $0$? But what... |
Can somebody refer me to peer-reviewed papers studying the advantages or disadvantages of writing code in a functional style? Are there papers which discuss the applications of Lambda Calculus in fields such as Machine Learning, Language Design, etc.?
|
I'd like to reduce 3 colorability to SAT. I've stuffed up somewhere because I've shown it's equivalent to 2 SAT.
Given some graph $G = (V,E)$ and three colors, red, blue, green. For every vertex $i$, let the boolean variable $i_r$ tell you whether the $i$-th vertex is red (or more precisely, that the $i$-th vertex is r... |
Consider we have a finite set $S$ with $n$ distinct elements. We want to find a subset $\{a_1, a_2, \dotsc, a_k\}\subseteq S$ ($k\ll n$) such that a function $f(a_1,a_2,\dotsc,a_k)$ is maximized. Consider $f$ to be a symmetric function that takes $k$ arguments.
More specifically, we are given $n = 120$ items, each ite... |
I just recently learned about the existence of this hierarchical temporal memory (HTM). I already read the document Hierarchical Temporal Memory: Concepts, Theory and Terminology (by Jeff Hawkins and Dileep George), which seems rather easy to understand, but one red flag is that the document is neither peer-reviewed no... |
If Turing Machines are the automata equivalent of the $\lambda$ calculus, what is the automaton equivalent of the $\pi$ calculus? I suppose it would be some class of automata that resembled a Turing Machine, but with support for communication channels or signals of some type, but I'm not sure, and would appreciate some... |
Do they need to "unwind" exactly to the same set of paths or does it suffice when one set is contained in the other ?
Or is it sufficient to argue that M,s satisfies both LTL formulas for any starting s and a model M, that is, reaching with both at "true" ?
Generally.
Let $M$ be any model. Further, let $s$ be any stat... |
Would it be convenient to express semantics of imperative languages (e.g. C) and object-oriented languages (e.g. Java) with $\lambda$-calculus?
Or in the other words: is $\lambda$-calculus a suitable candidate for expressing semantics of all context-sensitive languages?
|
I recall hearing briefly about this back in one of my CS courses on hardware, but I can't recall many of the details, nor can I find anything online that talks about it. A search on Google only yields a bunch of pages about Android emulators and people complaining that PCSX2 is slow. I'd like to know, in general, why s... |
I want to find out an algorithm to find out the largest least common multiple (LCM) of the partitions of an integer $n$.
Example: $5 = 1 + 4$, $5 = 2 + 3$, since $\mathrm{LCM}(1,4) < \mathrm{LCM}(2,3) = 6$, the largest LCM of the partitions of $5$ is 6.
The definition of "partition" is the standard definition of it. I... |
The running time of knapsack is $O(n*W)$, but we always specify that this is only pseudo-polynomial. I was wondering if somebody could tell me if I understand the notion of pseudo-polynomial time correctly.
My current understanding is that pseudo polynomial time means polynomial in the magnitude of the input, and poly... |
It is written on Wikipedia that "... selection sort almost always outperforms bubble sort and gnome sort." Can anybody please explain to me why is selection sort considered faster than bubble sort even though both of them have:
Worst case time complexity: $\mathcal O(n^2)$
Number of comparisons: $\mathcal O(n... |
I have an algorithmic problem.
I have a set of different polygons in the 2D space. Each polygon is represented according to its vertex representation (x and y coordinates) and may contain up to N different vertices.
Assuming I have a set of N polygons, then for a new polygon k, how do I determine whether or not k ove... |
For my CS degree I have had most of the "standard" mathematical background:
Calculus: differential, integral, complex numbers
Algebra: pretty much the concepts up until fields.
Number Theory: XGCD and related stuff, mostly for crypto.
Linear Algebra: up until eigenvectors/eigenvalues
Statistics: probabilities, testing... |
I am learning how to solve the time complexity for the recurrence relation
$$
T(n) = 2T(n - 1) + n^2\text{, where }T(1) = 1
$$
The solution notes that I should begin by considering the following sequence:
$$
\text{Define }T^k(n) = T^{k - 1}(n + 1) - T^{k - 1}(n) \\
\text{and let }T^{(0)}(n) = T(n)
$$
How is... |
Introduction
For a paper I need contracts, which are also referred to as Design by Contract (DbC)1, and conceptually go back to Hoare[2]. For my work I need to apply contracts to Java bytecode. The question is only about using contracts on Java bytecode, nothing more.
If you ask, why do you want to use contracts on Jav... |
I try to get a better understanding about Failure Detectors in the field of Distributed Computing.
Let consider the algorithm for reaching consensus with Perfect Failure Detector, it's named as Perfect FDAgreement in the textbook Distributed Algorithms by Nancy A. Lynch on the page 679. In addition, it can be found in ... |
Does the output of a parser have to be a tree or could it also be general graph?
Moreover, is there any existing language or a plausible one that uses general graphs representation instead of trees for their syntax?
|
Let's say I have a problem which depends on two variables, $m$ and $n$. I also have two algorithms for solving the problem. How do I decide which algorithm to use?
For example, say I have an array of unique numbers $A$, not necessarily sorted, and a second sorted array $B$. I want to create a third array $C$ which c... |
Can someone please point me towards a rigorous derivation of the energy function of a discrete Hopfield network. What I want, is the derivation must start out with the structure of the network and prove that the critical points of the dynamical system can be obtained by minimization of some function (possibly by constr... |
There is a famous Coordinated Attack Problem. Let define a simple message-passing system $S$ with requirements
Uniform Agreement: No two processes decide dierently.
Validity:
(a) If all processes start with 0, then no process decides 1.
(b) If all processes start with 1, and there are no failures, then no process de... |
I have a complete $n$-partite graph, where each partite set has $n$ vertices (yes it's also $n$), so the graph has $n^2$ vertices in total. My problem is to find a minimum weight $n$-clique in the graph. I would like to know whether the problem can be solved in polynomial time.
More details of the terms:
Complete $... |
Let $G$ be a $d$-regular expander graph. What is the electrical resistance of $G$? Is it a constant independent of the number of nodes $n$ once $d$ is large enough? If not, can we give matching upper and lower bounds in terms of $n,d$?
|
I recently learned how to implement merge-sort, using a standard recursive algorithm. Can the algorithm be implemented in a way that allows for a tail-recursive implementation? Can it be implemented in an iterative style?
In general how can a recursive algorithm converted into an iterative and tail-recursive algorithm?... |
From what I have come to understand, the best way to implement it is to use the suffix array $S$ of the string $w$ and its LCP-array (Longest Common Prefix) $L$.
The answer can be obtained by
$$ \sum_{i=1}^{|w|} \left( |S[i]| -L[i-1] \right).$$
What I don't get is how and why is this working?
I would be very grateful... |
I have a set $S$ of integers. I want to remove all elements of $S$ that are divisors of another element of $S$. In other words, I want to compute $T = \{y \in S : \forall d \in S . d \nmid y \}$.
How do I do this efficiently?
I can see how to do it in $\Theta(|S|^2)$ time, by examining all pairs of elements of $S$ an... |
I hope my question makes sense: Starting with the premise that the untyped $\lambda $ calculus is equivalent in power to a Turing machine, to what in a Turing machine does adding types to the $\lambda $ calculus correspond? Is there some kind of automaton analog to typing, whether static or dynamic?
|
We need to convert wireframe representations of 3D objects into a representation consisting of 6 orthogonal views each containing nested (non intersecting) closed contours, each having a Z (depth/height) value. We are only concerned with 3D shapes compatible with the target representation. Can someone at least point us... |
This question is from an exam preparation that I have to demonstrate to my teacher to show him that I understood the topic thoroughly .
Given a set $S$ of integers with $n$ elements, an integer $z$ and an integer $k \leq 2$, sketch an algorithm that checks whether there are $k$ elements in $S$ of which the product equa... |
I often interact with people who want to ask for an algorithm for a computational problem (or its complexity), but they don't express it in a rigorous way for us (computer scientists) to understand.
Referring them to books like CLRS is not helpful because the examples there usually have a quite straightforward way of s... |
I tried this problem from CLRS (Page 39, 2.3-4)
We can express insertion sort as a recursive procedure as follows. In order to sort A[1... n], we recursively sort A[1... n-1] and then insert A[n] into the sorted array A[1... n-1]. Write a recurrence for the running time of this recursive version of insertion sort.
Th... |
Is it common to have a different feature set for samples in the train set and in the test set?
My use case is text categorization: when training, I use the words as the features. But when testing, I want to add hypernyms.
For example, if the training set contained the sentence "I eat a fruit", and there is a test sente... |
According to wikipedia, every finite set is computable.
Definition: set $S \subset N$ is computable if there exists an algorithm which defines in finite time if a given number $n$ is in Set.
Question: what is wrong with this counter-example:
given some $TM$
$S \subset N$
Lets assume $S$ could contain only $0$, i.e., ... |
Given two graphs $G_{1}(E_{G1},V_{G1})$ and $G_{2}(E_{G2},V_{G2})$, with scalar weights on the vertices, I would like to find a subgraph $H_{1}$ of $G_{1}$ that best matches some subgraph $H_{2}$ of $G_{2}$. However, in most papers I've seen the weights are usually on the edges, $H_{1}$ is pre-specified and the matchi... |
So, it's fairly easy to prove that if $L \in DCFL$, then $L \Sigma^* \in DCFL$. Basically, you take the DPDA accepting $L$. You remove all transitions on final states, and then for each $a \in \Sigma$ and each final state $q$, you add a transition looping from $q$ to $q$ on $a$.
I'm using this in a paper, and I'd love ... |
Let's say I have a software that calculates integrals, formally if possible and if not, then it computes an approximation by taking a small $dt$. Of course if the integral is an unknown number, I wouldn't be interested in giving it a name. But if I calculate $\int_0^e\left(\frac{\pi}e+1\right)dt$, I'd like to get $\pi+... |
I've developed the following backtrack algorithm, and I'm trying to find out it time complexity.
A set of $K$ integers defines a set of modular distances between all pairs of them. In this
algorithm, I considered the inverse problem of reconstructing all integer sets which realize a given distance multiset. i.e. :
Inp... |
Let $G$ be a directed graph, and $H$ a subgraph of $G$ that contains all the vertices of $G$. (In other words, $H$ is obtained by deleting some of the edges of $G$, but not any of the vertices of $G$.)
A subgraph isomorphism $\varphi$ from $G$ to $H$ is a graph isomorphism from some subgraph of $G$ to $H$. In other wo... |
I wonder if there exists a game in which $\epsilon$ - Nash equilibrium leads to a much higher payoff than any other Nash equilibrium.
Show, for every $\epsilon$ > 0, a two player game where there is an $\epsilon$-Nash equilibrium in which both players have a much higher payoff then in any Nash equilibrium.
What is $\e... |
I'm using a SAT solver to encode a problem, and as part of the SAT instance, I have boolean variables $x_1,x_2,\dots,x_n$ where it is intended that exactly one of these should be true and the rest should be false. (I've sometimes seen this described as a "one-hot" encoding.)
I want to encode the constraint "exactly... |
This is a cross-post of this StackOverflow question, (I'm not aware of linking questions between StackExchange sites). You can ignore the part about programming.
I'm making a journey planner (or a general timetable application) for all the public transport in my country (bus/train/air).
The state of the project is at m... |
We have an array of integers $a[]$, with each $|a[i]| \leq 10^{6}$, $size(a)\leq10^{5}$, and $a[i]-a[i-1]\leq100$.
Then we define the term range as a subarray $[x,y]$ of the array $a[]$, $x \lt y$.
We need to find total number of ranges that satisfy the property that for two given ranges $([x_{1},y_{1}]$ and $[x_{2},y... |
Given an undirected simple graph $G$ and two nodes $s$ and $t$, the question asks for an algorithm to find the shortest simple cycle (no edge or vertex reuse) that contains the two. As far as I know, the problem is NP-complete if the two constraint were changed to arbitrary, but what if the number is given?
|
I think of an algorithm which computes the time complexity. It would be great if a code editor could compute the time complexity of the selected lines and even compare two pieces of codes in order to help developer to select one of them. I heard something related with halting problem but couldn't figure out.
|
Are there any CS problems, preferably open, that are related to music or musical theory somehow? I would think of problem with musical notation but also probabilities when randomizing according to a scale or a tonality or general what is considered harmony in frequencies and physics, electromagnetism and waveforms.
Ca... |
What are some examples of difficult decision problems that can be solved in polynomial time? I'm looking for problems for which the optimal algorithm is "slow", or problems for which the fastest known algorithm is "slow".
Here are two examples:
Recognition of perfect graphs. In their FOCS'03 paper [1] Cornuéjols, Liu ... |
The Question: You are given a singly-linked list with n nodes that you can only iterate through once at most. You are given additional space to store one node (i.e. a pointer to it). Devise an algorithm that can operate under these conditions, choose/select one node from the list such that the the probability of each ... |
I'm doing some research with NFAs, and I'm wondering there are algorithms which quasi-efficiently minimize them. I realize that this problem is $PSPACE$ hard, so I'm not looking for a polynomial time algorithm.
What I mean by this is an algorithm which may run in exponential time in the worst cases, but which uses some... |
I am not entirely sure if the title is the correct way to phrase what is occurring. There is a recurring process which I decided to attempt to model using production rules similar to those used in a context-free grammar.
The real world process is a production line. It takes 1 unit, after 2 weeks, produces 1 unit, after... |
Problem: How do we can generate some mathematical close form of the following sequence, which has following 256 entries:
1 7 7 7 7 9 9 9 7 9 9 9 7 9 9 9 7 11 11 11 11 13 13 13 11 13 13 13 11 13 13 13 7 11 11 11 11 13 13 13 11 13 13 13 11 13 13 13 7 11 ... |
I'm writing a program (using genetic algorithms) that finds sort-of-optimal scheduling plan for a factory.
The factory has several types of machines (say, locksmith, miller, welding)
There are few machines of each type. (say, 3 locksmiths, 2 millers, 3 welders)
There are several types of operations (some machines do m... |
I am very familiar with error correcting codes. However, it is not obvious how to apply them to adaptive streaming data. There also doesn't seem to be much literature on the problem.
The naive approach might be to take small codewords of data and use forward error correction until there is a statistically significant c... |
When should I call a definition recursive and when should I call it inductive?
I have read Carl Mummert's nice answer on MSE. So if I understand correctly we refer to definitions of objects like natural numbers, lists, trees, etc. as inductive whereas we refer to definitions of operations over objects like $+$ or $head... |
Assume that we have an operation $f$ such that
$$
f([a_0,\ldots, a_n])= [f(a_0),\ldots,f(a_n)]
$$
Do we say that $f$ distributes over lits or do we say it commutes with lists?
Which one is the correct way of expressing this property?
How about the following?
What do we say for the relation between $f$ and $\vec{a} = a... |
Given two sets of vertices $U$ (size $n$) and $V$ (size $m$), how many possibilities of set of edges $E$ exist that make the bipartite graph $G = (U, V, E)$ connected?
Obviously there are $2^{n m}$ different set of edges but many will be disconnected.
|
As I think of data structures I studied and dealt with, they are all optimized to retrieve/put a random element, to perform optimally based on unspoken assumption that each element has equal odds of being asked for (e.g. Red-Black trees).
By the nature of my program, I need to maintain an online dictionary of items th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.