instruction
stringlengths
35
29.1k
I am studying game theory and I am wondering how many winning combinations are possible for Nim game? Suppose, stones = 500 and piles = 5. With these number, there are many initial game positions are possible. like [1, 2, 4, 3, 490], [100, 100, 100, 100, 100], [100, 200, 100, 100], [0, 200, 200, 50, 50] and so on. So b...
http://www.cim.mcgill.ca/~langer/273/3-notes.pdf I can name one more: XNOR. But besides these, what other output functions are there?
In a test paper, a question is given as : Let, x1^x2^x3^x4 =0 where x1, x2, x3, x4 are Boolean variables,and ^ is the XOR operator. Which one of the following must always be TRUE? (A) x1x2x3x4 = 0 (B) x1x3+x2 = 0 (C) x1'^x3' = x2'^x4' (D) x1+x2+x3+x4 = 0 + is OR and concatenation is AND operator. Correct answer is ...
I was reading the paper Fundamental Concepts in Programming Languages by C. Strachey the other day, wherein I read something that was quite strange to me. Quoting directly (with the strange part highlighted by me): Faced with the situation as it exists today, where there is a generally known method of describing a cer...
When I compute a gaussian kernel for image blurring should I normalize the 1D vectors? Because when I apply the raw values sometimes the image gets lighter or darker. The function I'm using is $f(x) = \frac{1}{\sqrt{2\pi}\sigma}e^{\frac{-x^2}{2\sigma^2}}$ or the 2D function. So, should I just apply the results using cr...
In preparation for my design and algorithms exam, I encountered the following problem. Given a $2 \times N$ integer matrix $(a[i][j] \in [-1000, 1000])$ and an unsigned integer $k$, find the maximum cost path from the top left corner $(a[1][1])$ and the bottom right corner $a[2][N]$, given the following: $\bullet$...
The following problem is exercise 4.3 of the book "Algorithms" by S. Dasgupta, C. Papadimitriou, and U. Vazirani. Squares. Design and analyze an algorithm that takes as input an undirected graph $G = (V,E)$ and determines whether $G$ contains a simple cycle (i.e., a cycle which does not intersect itself) of length fou...
According to this video, EXP has problems that are exponentially difficult to check. But according to this video, EXP are problems that are exponentially difficult to solve. It would make sense to me, that if EXP contains problems that are exponentially difficult to check, that they would contain problems that are hard...
Consider the following description of a subproduct tree. We define a tree T for some points x[0] to x[n-1], and define m = log_2(n). Tree T is represented as a matrix where each row-column entry i, j is the product of pairwise nodes in the row above it. In total, there are m rows; the 1st row is has n column entries, a...
In total functional programming programs are restricted to total computable functions. A well-known class of total functions are the primitive recursive functions ($PR$). However the Ackermann function and others aren't part of $PR$. Is there a well-defined class of total functions which is broader than $PR$? Bonus que...
Let $a:=(a_1,a_2,\ldots,a_n) \in \mathbb{Z}^n $ and $k \in \mathbb{N}^*$, with $$f: \begin{cases} \hfill \mathbb{Z}^n \times \mathbb{N}^* \hfill &\rightarrow \mathbb{Z}^n \\ \hfill ((a_1,a_2,\ldots,a_n), k) \hfill & \mapsto (b_1,b_2,\ldots,b_n)\\ \end{cases}$$ $f$ satisfies the following constraints: $(\forall b_{i...
Let f and g be two functions with integer range 0..m-1. They may keep state and interact with the world (for example setting a seed or reading the current time), calling them multiple times may produce different results. f and g can see each other's state, but cannot modify the other's state. Assume at least one of f a...
In formal language theory, deterministic context-free languages (DCFL) are a proper subset of context-free languages. They are the context-free languages that can be accepted by a deterministic pushdown automaton. Now Assume that $R$ is a regular language and $D$ is a deterministic context-free language. How can we...
The multi-commodity flow problem problem statement - wiki According to constraints of multi-commodity flow problem a given material must start at source s with demand d and end up at its target t. The linear program form of this problem as given in clrs is f is flow, c is capacity, u and v are vertices, d is demand, s...
I am searching for an algorithm for this! Cannot find anything useful in textbook so far. Thanks in advance! Question: The input is a $N \times K$ matrix, where $N$ and $K$ are positive numbers( usually $N$ is a large number, $K$ is a small number). Each row of the matrix contains distinct values, but each column may...
Is the number of possible programs usually finite or infinite? I'm playing with the idea of generating all possible programs for a language - is that even a finite number or must we be more specific, finite RAM etc?
In a filter bubble, what are some of the techniques and best ways to determine the relationship between a video that is watched or liked, and the list of related videos to be presented to the browsing user? Thanks.
Algorithms can either be oblivious or non-oblivious, but what is the actual difference between the two?
I am working on a hex-based game in which I'm trying to pre-calculate pathfinding for a given map using the Floyd-Warshall algorithm. The map size is on the order of thousands of hexes (so maximum tens of thousands of edges). The map represents an arena in which two teams fight, and both have the ability to change the ...
I studied LR(1) parsers and then LALR(1) and noticed that if we wanna construct LALR(1), We should FIRST construct the LR(1) parser and then by combining states we can go ahead for LALR(1) parser. Now a question comes in my mind, Can we make LALR(1) parser DIRECTLY? Without using (Or constructing LR(1) parser) ? If Yes...
I wonder what "device-to-device communication" (from a research perspective) covers what "ad hoc networks" don't. To the context of this question: I am reviewing papers which deal with "device-to-device communication" (D2D). And all aspects of the presented approaches are known to me from the research field of "ad hoc ...
Suppose of I two sets of $n$ integers bounded in $[-B,B]$. The integers are $$a_1,\dots,a_n$$ $$b_1,\dots,b_n$$ I want to find if there is a common subset $I\subseteq\{1,\dots,n\}$ such that $$\sum_{i\in I}a_i=0$$$$\sum_{i\in I}b_i=0$$ This problem is $NP$-complete. Is there a pseudo polynomial time algorithm with comp...
I'm trying to design an algorithm which will accept two natural numbers: a and b. Its purpose is to get b from a by making the following operations: *3 and /2. For example, if a = 10 and b = 7, then: 10/2*3/2 = 7 I decided to use branch and bound, since I believe there's no better suitable algorithm for this. My progr...
I have an algorithm like the following for(int k) { statement1; for(int j) { statement2; } for(int m) { statement3; } } j => m Is it correct for me to conclude that the complexity class is O(n^2)?
$STCON=\text{{(G,s,t)|G is a directed graph with a path from s to t}}$ $Co-STCON=\text{{(G,s,t)|G is a directed graph without a path from s to t}}$ I've tried the following proof: Let $S\in NL$, and let $S^\complement \in coNL$. ($S^\complement$ complement is $S$) Let $M_S$ be the NDTM that solves $S$. $x\in S \iff x\...
Draws from a Dirichlet process (DP) are discrete, and exhibit clustering behaviour. Dirichlet Processes The Dirichlet Process ($DP$) is a stochastic process used in Bayesian nonparametric modelling. It can be thought as a distribution over probability distributions: its samples are probability distributions whose marg...
What is the archive attribute for windows files. What is Archive in file details?
I am working on a Simple hypothetical Allocation Problem. I have some Virtual Machines(VM) placed on a Physical Machine (PM). The VMs and PMs have 3 common variables, CPU, Memory, Network. The VMs require these resources, while PMs can provide these resources. At certain points I need to check if the VM is similar to (...
I read Klaus Havelund's thesis on the Fork Calculus: http://havelund.com/Publications/thesis.ps He develops the Fork calculus for reasoning about concurrent functional programs, the motivation being Concurrent ML. In chapter 5, he writes: First, we add a recursion operator, allowing us to define processes with infinit...
I came through Josephus problem a little while ago. Problem is stated as follows : "People are standing in a circle waiting to be executed. Counting begins at a specified point in the circle and proceeds around the circle in a specified direction. After a specified number of people are skipped, the next person is exec...
I was thinking about proofs and ran into an interesting observation. So proofs are equivalent to programs via the Curry-Howard Isomorphism, and circular proofs correspond to infinite recursion. But we know from the halting problem that in general testing whether an arbitrary program recurses forever is undecidable. By ...
How would I go about showing that L $\leq_p$ L' does not necessarily imply L' $\leq_p$ L? I was thinking I should show an example of two problems, where one can reduce to the other but not the other way round, but am not sure what such problems could be.
I am specifically focusing on lambda calculus, following this paper: A Tutorial Introduction to the Lambda Calculus. Suppose we have three functions that represent the natural numbers 0 and 1, and a successor function: $\lambda sz.z = 0$ $\lambda sz.s(z) = 1$ $\lambda wyx.y(wyx) = succ$ Suppose I were to evaluate $succ...
I'm reading David Maier's outstanding but out-of-print book on relational databases (the book,"The Theory of Relational Databases", is available online from the author's website http://web.cecs.pdx.edu/~maier/TheoryBook/TRD.html). I have a question regarding the proof of Theorem 4.2 of Chapter 4. On page 55 of the book...
Some papers define an operational semantics of a programming language. That is nice, but what makes such a semantics fit for the purpose? An idea is to have a progress theorem, i.e. well-formed expression is either a value or a reduction can take place another is type preservation, that an reduction preserves the type ...
I am currently working on some sparse non-singular matrices. One of the algorithms I use requires divisions by the elements on the main diagonal so I have to ensure that my main diagonal is filled with non-zero values. My matrices represent a set of linear equations and there is no problem to use permutations between r...
What is the distinction between S-attributed definitions and L-attributed definitions? Which one is more expressive? Is there any significant difference in how easily they can be implemented with a recursive descent parser? Why or why not?
According to this post https://stackoverflow.com/questions/28397767/computing-leading-and-trailing-sets-for-context-free-grammar while constructing operator precendence parser we have to create tabel with operator. Actually i dont understand the rules which tells how to build such table. For example take last producti...
I've been wondering if there's a connection between "good logics" and "good programming languages". It seems that logics are shown to be "locally sound and complete" whereas programming languages are shown to be "type safe" (preservation and progress). If there's a relationship could you please explain it and give some...
In this paper http://eccc.hpi-web.de/report/2001/061/ by Maciej Liskiewicz, Mitsunori Ogihara, Seinosuke Toda the complexity of counting self-avoiding walks in subgraphs of two-dimensional grids and hypercubes it is mentioned that counting number of self avoiding walks of length $n$ is $\#P$ complete and that counting ...
I'm a beginner in learning about computational complexity and this has stumped me. I've read that by the time hierarchy theorem, it's known that EXP-complete problems are not in P. (Wikipedia) It makes absolute sense intuitively that this is the case, as does P≠NP. From what I understand, the time hierarchy theorem sta...
Bayesian Optimization is the classic example of meta-model driven optimization where new observations are used to train a Gaussian process that provides a clue to where to optimize next. LEM (Learnable Evolution Models) are evolutionary models where rather than recombining observations (like GAs) a population is fit to...
I think I know how the arithmetic coding works but what I don't understand is the reasoning about efficiency. I have read in this pdf that the number of bits required to specify a range is greater the smaller is the interval. This is obvious. Then I read that: $$2^{-l(x)} \leq \frac{p(x)}{2}$$ so $$l(x)\geq \log{\frac{...
I want an algorithm that takes the following Input: $M,N,k,d$ positive integers such that $kM = dN$. and produces the following Output: Random bipartite graph, with $M$ vertices all of degree $k$ on one partition, and $N$ vertices all of degree $d$ on the other partition. No loops allowed. The output should be uniforml...
In Lance Fortnow's book The Golden Ticket, he mentions that once you have a polynomial-time algorithm for an NP-complete problem, you can use it to find a faster algorithm. Can you tell me how that is done? And once that is done, you can use the new algorithm to discover an even faster one ad infinitum, till a fixed po...
Can neural networks be considered a form of reinforcement learning or is there some essential difference between the two? By the same token could we consider neural networks a sub-class of genetic algorithms? According to my current understanding the taxonomy is kind of like this: Reinforcement Learning Evolut...
Consider the following problem. A prisoner eats once a day, he can either have a low, or a high calorie dish. In order to be allowed to eat the high calorie dish, he must not have eaten the previous day. The prisoner knows the calories of each dish for the full week, and wishes to maximize his calorie intake for the we...
Is it true that $\#P$-complete problems could possibly be solved in polynomial time if P=NP? I know that even some counting problems related to polynomial time decision problems are $\#P$-complete, so even if P=NP it may not necessarily be true. My confusion is over how we write the answer to a $\#P$-complete problem ...
While trying to find a better backpropagation algorithm, I came across a paradox in my algorithm and then I found out this also happens in the usual backpropagation algorithm. Our neural network looks like this: In this simple example, we have no biases. The activiation function is the usual $f(x)=\frac{1}{1+e^{-x}}$ ...
I am reading on how solving maximum flow (Ford-Fulkerson) can be also used to solve unweighted bipartite graph matching problem. I think I don't understand the essence of this problem, because to me it seems trivial. The method of solving the problem says to convert the original bipartite graph into a network, by creat...
I know that one of the techniques used by RISC machines to improve the pipeline is the delayed branch, but what other techniques do they employ, namely, can they use register renaming? I know that Superscalar processors have register renaming, but a Superscalar processor can only be a CISC machine, right?
The original simplex algorithm requires an exponential number of pivot operations in the worst case, e.g., if run on the Klee-Minty example [3,4]. What about the simplex algorithm used in SMT solvers [1,2]? Could you provide an example where it requires exponential time? The algorithm I have in mind is by Bruno Dutert...
Is it possible to solve a problem with a worse case less than $O(n^2)$, when the input is an an array of numbers and the output is all pairs that sum to a number divisible by 10? for example int [] a = {1, 2, 15, 25, 28}; // would produce [2, 28], [15, 25] I don't think so because when all sums are divisible by 10 th...
Since every finite language is regular, I'm trying to find how would a DFA for the following language $\{xx^R \mid x \in \{a,b\}^*, |x| = \ell\}$ look like. Would there be one DFA for all words of length $\ell$ or one DFA per word?
So far, from all the research I've done, I've come across 2 different ways that NP time is explained. One is that a nondeterministic turing machine is able to solve the problem in polynomial time. It seems like this is the exact same as being able to verify that a result is correct in polynomial time, but not necessari...
By now I understand that generalized chess is harder than NP, and is EXPTIME-complete for the decision problem "Given an nxn board with a given position, can white force a win?" because the proof would require an exponential amount of steps to show that each branch of the tree eventually leads to a win. Therefore it's ...
In his book "The Fabric of Reality", Penguin Books 1998, p. 218, David Deutsch says that the first quantum computer (built 1989 in the office of Charles Bennet, IBM Reasearch) "became the first machine ever to perform non-trivial computations that no Turing machine could perform". My question: Do we really know that qu...
I'm looking for an algorithm to solve the following task: Input: a set $T$ of transpositions; a permutation $\pi$ expressed as a product of transpositions from $T$ Desired output: express $\pi$ as the shortest possible product of transpositions from $T$. In other words, the output should be a list of transpositions $\t...
In Johnson's 1975 Paper 'Finding All the Elementary Circuits of a Directed Graph', his psuedocode refers to two separate data structures, logical array blocked and list array B. What is the difference in them and what do they represent? Moreover, what does 'Vk' mean?
For computing pure Nash equilibria (game theory), there exists a MILP method in literature (clicky). In the proposed MILP, there is no objective function. A solution is a pure Nash equilibrium if it is a feasible solution of the MILP. Should there, in theory, exist an equivalent MILP with an objective function so that ...
Given an array of non negative integers Find the longest continuous sub array which it's sum is divisible by 5. For example if the array is: [1,3,9,2,1,5,0,1] A continuous subarray which it's sum is divisible by 5 for example is: [3,9,2,1] The longest one will be: [3,9,2,1,5, 0] So the output will be 6. It is obvi...
So the problem I'm solving is this: I have a list of conversations of 3 messages each (for eg. "hi", " how are you", "remind me to fix this bug" is one conversation, and my problem will have many of these) and need to pick out the message that is most likely to be a task ("remind me to fix this bug" would be the messag...
A very tricky problem in graphics rendering is drawing thin lines ($1px$ width) that do not look jaggy. The only implementation I have seen that is very good is that in Mathematica, but their algorithm is proprietary. Is there a well known algorithm for anti-aliasing thin lines?
From this question, I had the debate about how problems harder than NP are proved. I said that intuitively I understand it as (from this video explaining that some problems are provably harder than NP): Generalized chess is harder than NP, and is EXPTIME-complete for the decision problem "Given an nxn board with a giv...
Coming from a digital functional hardware verification background, I don’t really understand the Halting Problem. I can represent the program as a state machine and show whether all inputs in all states generate a valid output or lead to an infinite loop. The only requirement is that the inputs and states are finite. E...
When a program runs in CPU, it turns into a process. In what kind of data structure is the process stored in a system memory? In Heap or Tree or some other data structures?
(r1) E → E+T (r2) E → T (r3) T → T F (r4)T →F (r5) F → F∗ (r6) F → a (r7) F → b I am just doing the exercise on the workshop. I just knew how to the build the SLR state machine for this CFG. After built the State machine. I have found the FOLLOW and FIRST set for this CFG. But I can not find the way that how to buil...
I'm trying to find out how potential function works. I'm trying to compute an amortised complexity of $n$ operations on dynamic array. To make it simple, assume, that we can't delete items and we can add item only to end of the array, so something like push. Let's assume that allocation is for free and if the array is ...
I'm trying to study for the summer ahead of class I saw this question, please how do I go about it? Find NFA/DFA for the language $L = \{0^n1^n : n \in N\}$
In the red-blue line segments intersection problem, what does it mean that the red-red (and blue-blue) lines cannot intersect? Does mean mean that the algorithms wont work correctly or does it mean that these kind of intersections will be simply ignored? In other words, do the fast intersection algorithms require that ...
Are there any compression algorithms outside of entropy encodings that yield a significant compression ratio for memoryless sources (not the Markov kind, but this kind)? More concretely, if a million ASCII characters, each generated from the same probability distribution that is not necessarily even but where the proba...
Here's a doozy: Given a knapsack with a capacity W, and n overlapping items (definition of overlapping to follow), which items should we take to maximize the value of the knapsack? In this problem, you can think of an "item" as a bag of coins with the following properties: There are many, many different types of coins...
We make $n$ insertions and each insertion targets a list of size $k\le n$, so we can make a binary search which takes maximum $\log k\le \log n$. So why isn't the running time of selection sort $O(n \log n)?$
So my problem is as follows: I get responses (such as "yeah whatever", "yes do it", "no don't do it", "nah", "yeah do it" etc.) and I need to classify them into either "yes" or "no" i.e. a binary classification. What algorithm and features should I use for this? My thoughts yet: Use an averaged perceptron or logistic ...
Problem Let y be an array of float numbers (of length $n$) bounded in the range [0,1]. I am trying to compute the array x that respects the following criteria: x must be of length $n$ too x must also be bounded in the range [0,1] No two values of x must be closer to each other than $\epsilon$. That is $ \epsilon \le x...
I am studying Dynamic Programming using both iterative and recursive functions. With recursion, the trick of using Memoization the cache results will often dramatically improve the time complexity of the problem. When evaluating the space complexity of the problem, I keep seeing that time O() = space O(). This is bec...
From what I have searched on Google so far, the only difference between LALR(1) and SLR(1) is that LALR(1) uses states with merged lookahead sets. One source says that LALR(1) won't run into shift-reduce conflicts because the parser will "remember" from which state it arrived at the current state. However, there are no...
I have read somewhere that DCFL is not closed under kleene star. but I haven't found any example
As a short example suppose we have a kind of pollution sensor and a jet fan in a tunnel. Jet fan turn on/off according to the automatic scenario based on pollution sensor value. Pollution itself is based on some parameters like number of cars in the tunnel, direction of wind,speed of wind etc. And number of cars can...
Exercise 2.3-7 from "Introduction to Algorithms" by Cormen et al. Third Edition, states: Describe a O(n lg n)-time algorithm that, given a set S of n integers and another integer x, determines whether of not there exist two elements in S whose sum is exactly x. At first, I had no idea how to solve it since I thought ...
In this question, we abuse the mathematical notation to express bitwise operations in the following way: $\ll$ is a binary left shift $\oplus$ is a bitwise XOR $0b1, 0b110, 0b10 \ldots$ are used to denote raw bits $repr$ is a function associating to a number a given bit representation $\mathbb{B}$ is the set of natura...
Is there a particular section of image data which when trained on deepdream algorithm and given some input image produce a resulting image from which we can conclude that the deepdream can be used for this image set (other than just producing hallucinations on input image for fun) ?
I was learning about recursion and i came across the following pseudo code for quicksort. QUICKSORT(A,p,r) 1 if p < r 2 then q := PARTITION(A,p,r) 3 QUICKSORT(A,p,q-1) 4 QUICKSORT(A,q+1,r) In this code there are two consecutive statements that recursively call quicksort function. It confuses...
Original Fortran only had static memory. Algol introduced stack allocation. Lisp had Garbage Collection. But when where manual dynamic memory management such as in C introduced. In C memory can be manually allocated and deallocated with malloc and free. Was this the first instance of this method of memory management in...
I have studied Pumping Lemma carefully and have solved many exercises about it but I can't get an idea on how to solve this one: can anyone help me? Let L = { w#x | x is a substring of w }. Prove that L is not regular. I have tried setting the Pumping length to |w| and to |x| but I just don't find words that are not in...
As part of my PhD research I am currently building a simulation of a 256 core NoC and really want to model its interaction with the memory system. My supervisor has suggested using the University of Maryland's DRAMSim2 tools, but it looks like work on that stopped a couple of years ago and the tool is not complete, whi...
My algorithm professor said a recursive function should not have side-effects since it's a methodological error because recursion is "pure". Anyway I don't understand why, even because I find side-effects useful and difficult to replace a recursive side-effect function with a "pure" one.
I know that a solving a specific problem can have different runtimes on different models of computation. But can a specific algorithm have different runtimes on different models of computation? Also, would an algorithm be considered the high level description or the implementation level description of the procedure you...
Context I am developing an application and came across a problem that seemed difficult to solve. Before attempting to reinvent the wheel (and trying to solve an NP complete problem on my own), I would like to get some feedback. Below you will find an abstract version of the problem. The Problem Input: A bag of colored...
I have a disjoint set data structure (sometimes known as a union-find data structure) where I store a value in each "node". I want to look up a node by value. How can I do this? The representations normally discussed in literature, both linked list and forests, deal with operations being given nodes (of the linked li...
I'm trying to learn how to use a recursive descent parser, and reading on this page I find this example: $S \rightarrow AB \\ A \rightarrow a \\ A \rightarrow SA \\ B \rightarrow b \\ B \rightarrow SB$ By substituting $S$ we arrive at: $S \rightarrow AB \\ A \rightarrow a \\ A \rightarrow ABA \\ B \rightarrow b \\ B \r...
Given a graph $H$. A set of permutations $\alpha$ which contains permutations of vertices of $H$. The permutation set $\alpha$ has automorphisms of subgraph $H_1, H_2,..... H_x$ where $x$ is the number of total subgraphs. These subgraphs are connected. These permutations can be extended to the automorphism of $H$. B...
I was reading the paper Mechanized Metatheory for the Masses: the PoplMark Challenge by Aydemir et al (PDF) and I found the following three questions on page 13 of the PDF a bit confusing. Challenge 3: Testing and Animating with respect to semantics. Given $\mathrm{F}_{\texttt{<:}}$ terms $t$ and $t'$, decide whethe...
Differently from Sarsa and Q-learning, pure temporal difference learning (TD-learning) works with state value functions $V(s)$ and not state-action Q value functions $Q(s,a)$. It means that, in order to select the best action at state $s$, the resulting state $s'$ for every possible action must be computed, so we can g...
For some transformation, I am currently working on, it is useful to "pull out" subexpressions and replacing them with variables. i.e. $\textbf{transform}(42 + 3 * 4) = (\lambda x. 42 + x) (3*4)$ This has, of course, the same result (if it does not extract bound variables and is correct only modulo evaluation order, i....
The problem is as follows: "Given a weighted graph G and a path p, show that p is the longest simple path in G." I'm thinking a reduction from HAMPATH would work, but after 3 hours of racking my brain over this, I have no idea how to do it. What makes the reduction difficult is that I'd need to somehow "know" the path,...
This site is full of Pumping Lemma questions, and I do admit I've not read them all. I've tried some proofs myself and they seem to work, but I can't find anywhere what is the (general) exact structure of a proof where you show a language is not regular or context-free? Wikipedia and most proofs start with "Suppose $L$...
I am wondering, if in the LOOP programing language, whether instances of the LOOP x DO P END are defined to stop in the case $x < 0$. The definition only says "Execute $P$, $x$ times" for the above program. IT is perfectly clear for $x = 0$. However, I believe in order to keep the language simple the definition doesn't...
I want to start learning of AI and have an idea to program "social evolution simulator" but want to hear any advice to avoid creation "well known bicycles" and get strong knowledge-base. Will be grateful for online resources and/or books. Thanks. Also, I understand, that any programming language can be used for this, b...
I'm looking for an algorithm that solves the Hamiltonian cycle problem parameterized by treewidth. In particular, I'm curious about such an algorithm running in $\text{tw}(G)^{O(\text{tw}(G))} \cdot n$ time. In other words, once you have the treewidth, an algorithm that says if the input graph has a Hamiltonian cycle.