instruction
stringlengths
35
29.1k
Lets assume dir a has dir b which has dir c. In a recursive deletion of these directories we can't "just delete" dir a. We must first delete dir c (and any file it has, if it has), then dir b (and any file it has, if it has) and only then could we delete dir a. This seems to me "from bottom to top", time and again. Is ...
Random number generators commonly found in default libraries are actually pseudo-random number generators. Nevertheless, more sophisticated options exist to gather entropy from "truly"-random sources such as atmospheric noise, thermal noise, electromagnetic and quantum phenomena. Speed of random number generation is im...
Given a matrix A, let Aij denote the element of the i'th row and j'th column. $$ A_{i,j}\in \{0, 1\}$$ Find the number of sub-matrices with all ones. 1 <= #rows, #columns <= 150 P.S. This apparently can be solved in O(#rows x #columns) using dynamic programming and stack. I just can't wrap my head around how this can b...
There are papers that describe how generalized algebraic datatypes (GADTs) are encoded in core Haskell (System FC)[1][2], but I could not find any documentation on how OCaml formalizes/implements/encodes GADTs and how does it compare to Haskell GADTs. Question: How are GADTs formalized/implemented/encoded in the core l...
I am building an analyzer that takes in text and numbers the lines; taking in hello how are you i'm fine thanks as input and using the code: %{ int i=0; %} %option noyywrap %% .* {i++;printf("[%d] %s \n",i,yytext);} %% void main(){ yylex(); } this yields: [1] hello how are you [2] i'm fine thanks there's...
I'm trying to figure out the pumping length of (a+b)(a+b)* From what I understand, this means that there is some A or B followed by any number of either A's or B's e.g ABBBB or AAAAA but AAAABA wouldnt be in the language. Firstly I'm not sure if my assumption above is correct. Using the decomposition rule. Suppose L is...
Being C a complexity class, if C is contained in its complementary class, does it imply that the C = coC? So far I tried to prove $C \subseteq coC \implies C \subseteq coC \land coC \subseteq C$. I can assume that $C \subseteq coC$, but how can I prove that $coC \subseteq C$? I came up with this: $ L \in coC \rightar...
I need to create a DFA for a sequential order of states e.g. A -> B -> C -> B -> A and so on, where 'A' is the start and finish state, 1 is a transition to the next state and 0 just loops back to the current state. 1 and 0 are the only inputs The only way I've found I can do it in this order is by having 2 B states, Is...
I need to find the shortest path between two nodes in a directed, positively weighted graph that migt contain cycles. All weights are either zero or one. If it was not weighted, I'd use breadth-first search. Dijkstra's algorithm should solve this, but is there a more appropriate algorithm?
given array of size n, and a function called FindPivot which returns the median with a time complexity of O(n^(1.1)). what is the worst case time complexity of quicksort using the given func to find pivot? the answer given by the teacher is theta(n^(1.1)) I thought it should be theta(n^1.1logn) please explain
I was tasked with writing a function that finds the value of an element that is the first duplicate in an array to be encountered. For the array [2, 1, 3, 5, 3, 2] The answer is 3, not 2. for an array like this: [5, 3, 8, 2] (no dups) the answer is -1. I wrote this function: def solution(a): # return if no dups ...
question is: given an unwighted nondirected graph G=(V,E) portrayed as an adjacency list, a special arc is defined as an arc (u,v) where both u and v has the same distance from source vertex s. i need to give an algorithm to find all of the special arcs for a given s node. the teacher's solution is: run BFS from s and...
For language $L = \{a^n\, b^m\: |\: m \:\%\: n = 0 \}$, that is, is a multiple of . I'm trying to find a proof that it isn't a context free. I know it isn't regular, but it also doesn't seem to be context-free to me. However, I am not sure how I would go about proving that it isn't context-free with pumping lemma. My ...
I am reading Tanenbaum's Modern operating systems. I am not able to understand what he means by last line in the attached image. He says that the run may straddle word boundaries in the bitmap. What does he mean by that? Can someone explain it to me?
According to the answer provided by Janoma, there are several methods to determine the regularity of a language. Theorem Let L ⊆ Σ∗. The following conditions are equivalent: L is generated by a regular expression (i.e., the definition of regular language). L is recognized by a nondeterministic finite automaton (Kleene...
I am making some notes on order theory for my own self study (and certainly anyone else that wants to read them). I'm impressed with what mermaid can do out of the box, but unfortunately I will need to make directed network diagrams with certain choices of embedding rules. Mermaid will choose an embedding that is aesth...
I have a set of $n$ elements, and a binary relation between these elements. However, this is not guaranteed to be an equivalence relation. (Specifically, the elements are line segments in a plane, and the relation is intersection: if $A$ intersects $B$, and $B$ intersects $C$, $A$ may or may not intersect $C$.) I would...
I haven't seen anything online that covers this specific case: I run a camp which has about 8 teams of kids, and every day there are 2 sports activities. Teams play each other in different sports throughout the summer. I need to manually create a schedule with the following constraints: 2 Teams should not play each ot...
The 3-co-SAT problem consists of deciding whether if a 3CNF formula, has an unsatisfiable assignment of variables, i.e., assignment of variables that evaluates to 0. We know that 3-co-SAT is in coNP, however, I do not understand why it is also not in P? It seems to be very easy to check whether if there exists an unsat...
I came across the following problem while doing my Formal Language class assignment and hope someone can give me some hints: I have $\Sigma = \{0,1\}$ and $L=\{x0a \mid x \in \Sigma^*, a \in \Sigma\}$, namely $L$ contains all strings whose second-to-last character must be a $0$. I have found that there are four equiva...
It is claimed that "lambda calculus is a universal model of computation that can be used to simulate any Turing machine". How can I, using this universal model, simulate an algorithm of calculating an algebraic sum of two numbers? How will this algorithm look, according to the grammar of the calculus, which does NOT in...
I.e. is it right to say "a PTAS parameterized by sth"? Is it unusual, and is it correct?
In lambda calculus, $\lambda xy.\phi$ isn't in general equivalent to $\lambda yx.\phi$. However, it seems possible to imagine a calculus which replaces application with something like specification, where order of specification is unimportant (at least when the substitutions target different variables): $$\mathit{Term}...
I have a set of closed curves (not convex, not planar) in 3D. The goal is to produce A mesh (any will do) that is manifold and contains the closed curves as boundaries/holes. For example like this drawing: In the case of 2 boundaries you would get something close to the general cylinder described by the 2 boundaries....
I was thinking what if you just started with the node with lowest non-zero degree $u$ (only count undirected edges) and picked random edge that is connected to that and direct that inwards. EX: undirected edge $uv \to (v,u)$. Then repeat, ignoring nodes that have reached the at-most-one limit. At the end, you check to ...
For my MSc thesis, I need to prove rigorously that $\log x = o(\sqrt{x}).$ How can I do it?
Example of function f(x) such that it is true that f(x) = Ω(g(x)) but that it is not true that f(x) = ω(g(x))
I was wondering if it is possible to list all subsets of size $k$ of the set $\{1,...,n\}$ by performing at most $C \binom{n}{k}$ operations for a fixed constant $C$. I did find a way to compute these subsets more efficiently than by just listing all subsets of size $k$. An example is starting with $[1,...,k]$, increas...
Question is add minimum number of edges so that this given graph consists an eulerian path (but not necessarily an eulerian circuit). Why do edges less than these given edges won't suffice? As I solved this question, it turns out that an eulerian path can exist by removing more than one edge. Does it work as a contrad...
In Harper's Practical Foundations for Programming Languages, page 19, rule (2.9) defines the $sum$ function inductively. $$ \frac{b:nat}{sum(zero;b;b)}\tag{rule 2.9a} $$ $$ \frac{sum(a;b;c)}{sum(succ(a);b;succ(c))}\tag{rule 2.9b} $$ Then the author introduced Theorem 2.4 to prove $sum$ is indeed a function, that is, $c...
The example says that C is unreachable, but there is the production S-> aBC so C is clearly reachable. This is an error right? or am I missing something.
given array A of size $n$ which is made of $logn + 1$ sub arrays which are sorted, I need to sort ASAP. example of array : $A[500,501,3,8,100,1,2,9]$ as you can see, sub arrays are :$[1:2][3:5][6:]$ my solution was: merge all logn + 1 arrays together, simultaneously. so like I compare : $1:3:500$ >> append 1 to sorted...
I know that finding the optimal solution to One Way TSP (TSP but the salesman does not have to return to his original city) is NP-Hard, but is it NP-Complete? I ask this because I recently found a solution to Open TSP but can't find a good resource to tell me whether or not One Way TSP is NP-Complete.
An edge cut of a graph $G$ induced by a partition of $G$'s vertices into sets $X$ and $Y$ is the set of all edges with one endpoint in $X$ and another endpoint in $Y$. An edge separator is a set of edges whose removal will increase the number of connected components in the graph. Note that these are two distinct conce...
I learned that Y fast tries support amortized loglog(u) time insertions , deletions. and loglog(u) time membership, successor and predecessor operations with O(n) space. So when n is closer to U in dense big data environments Y fast tries seem better than B trees. But most database systems use Btrees internally. I was...
In a personal project of mine, I have been faced with the following problem. I have an $n \times n$ matrix $T$ where an entry $t_{ij} \geq 0$ denotes an arbitrary metric between two points $i$ and $j$ in the 2D Euclidean space. What I would like to do is create a graph $G=(V,A)$ which can approximate matrix $T$ where $...
Let's suppose we are given the following inequalities: 3x + 7y <= 71 4x + 9y <= 21 ... and so on, in the above format. The coefficients and the value generated (71,21 ...) would be positive, and x and y would also be positive. The input would be inputted as follows: 3 7 71 4 3 18 ... and so on, in the above for...
This variant of #Positive 2-SAT is defined as follows : We are given a set of variables : (a,b,c,d,e) we can form our 2-literal clauses from these set of variables but we want the input in this variant such that for example if we are given a clause (a,e) then this input must contain every possible 2-literal clause from...
Consider a set of $N$ vectors (each of Length $L$) with positive integer as elements. Given a target vector $T$ of length $L$. Objective: Using the given set of vectors (by addition or subtraction) reduce $T$ to the form $T'$ such that: all entries in $T'$ are either 0 or 1. the first entry of $T'$ is 0. How do we ap...
I am trying to solve a problem to show equivalence between two regular expressions, and simplifying one of them I got $R.L^* + L^*$ in the end which I am not sure how to simplify further. I want to equate it to $R + L^*$. Is this equivalence correct or is there a way to derive it?
Given string P with length n, and a function A on P [n] --> [n] that does the following: For every 1 <= k <= n A on P [k] = { the maximum index i such that P[1...i] = P[k...k+i-1] Write an algorithm that's optimal as possible that given string P calculates the value of A on P [k] for every 1<= k <= n
while solving some questions about network flow I was wondering about the following statement: Given a network flow (a graph $G=(V,E)$ with a source $s \in V$ and sink $t \neq s \in V$) > and an arbitrary vertex $v \in V$, how can we find if the vertex $v$ belongs to any minimum cut? A vertex $v$ belongs to a minimum...
Let's assume, I have a grayscale image that every pixel represented with 8 bits. I want to quantize (decrease color depth) the image into 2 bits. Hence, I need a function as $f:A\rightarrow B$ where $A\in \left[0,255\right]$ and $B \in \left[0,3\right]$. Simplest way to define function $f$ is $$ f(x) = \begin{cases} 0,...
I am figuring out separation logic and trying to run simple examples in CVC5 smt solver. I am missing some core understanding of how pointers and values are treated there and I don't know where to look for more information. I am sorry for the long snippets, but they are very simple. First query (set-logic QF_ALL) (set-...
I recently learnt that a subset of a regular set may not be regular. This is causing me confusion as I imagined if a set is regular then every string longer than $p$ can be pumped in the language. So does a non-regular subset have strings only length $<p$? But if they have length $<p$, can't they be trivially pumped?
Consider this language: $K=\{xy \mid x=\{a,b\}^*, y=x^R \text{ or } y=x\}$ I know that these languages are non-regular separately: $K_1=\{xy \mid x=\{a,b\}^*, y=x^R\}$ $K_2=\{xy \mid x=\{a,b\}^*, y=x\}$ But what about their union?
Suppose we have a metric space $(X,d)$ and we call $r$ to be a root vertex and then there are $n$ clients(i.e. $n$ vertices/nodes) who need packages delivered to them from $r$. The $i$th client demands a package of weight $w_i$ and is $d(r,i)$ distance away. Two clients $i,j$ are $d(i,j)$ distance away. Initially, all ...
In this youtube video, the instructor explained some basic code in RISC-V assembly, but i didn't understand why in the first line, he is shifting i by 3. Why do we have to multiply it by 8?? I feel like it has something to do with the fact that LOAD IMMEDIATE operations can load values up to 12 bits only, but I couldn'...
How to design Push Down Automata for a language that has equal number of a's and b's where $n \ge 1$? I got how to do it for $n \ge 0$, not able to get it for $n \ge 1$.
I was reading this question on CS stack exchange called How important is initial state for local search optimisation? I would like to extend it with the following example: I have been reading about optimisation techniques and noticed that if a random initial state is provided to a genetic algorithm, it may still find a...
I was reading David J.C. MacKay's Information Theory, Inference and Learning Algorithms(pdf available in the link), and in section 16.4 of Chapter 16: Message Passing, he writes about how only separable problems can be solved using a message passing approach. One of the non-separable problems he mentions is: the size...
Describe the language accepted by the DFA shown above
(sci-fi-esque question inspired by Counterpart). A portal between our world (called $A$) and a parallel world that's exactly the same (called $B$) opens up. Bob sees himself through this portal. $A$-Bob says hello, but since he's in the exact same circumstance, $B$-Bob also says hello at the exact same time. Basically,...
I have been studying the necessity of a WHILE loop when defining the Ackermann Function. I am looking to write a program to compute the Ackermann function in a high level language such as Python or JavaScript to compare it to the WHILE language. The Ackermann function is defined recursively, and recursive calls do not ...
After accepting the command entered by user,the shell generates a readily executable simple command line by parsing it evaluating variables(if present),performs command substitution,interprets metecharacters like * and ?(if present) and identifies the PATH. Can anyone explain to me in simple terms the parsing part and...
I am looking for book references on combinatory logic. Is there a book focused on how combinatory logic is applied in the context of pure functional languages like Haskell? I found "Combinators: A Centennial View" by Stephen Wolfram (2021), but it has too much advertising in it. Every second page Wolfram tries to sell ...
I am reading the following paper: https://arxiv.org/abs/2301.06941 The authors in Eq.(8) have obtained a relation which has the mutual information, $i$, in the exponent of the exponential on the RHS of the 1st line. At the end of this equation, it seems mutual information is replaced by minus conditional entropy. How d...
I am trying to understand how KD-tree works when we insert a node and how it splits the xy plane, please. Below $[5, 4]$ splits the xy-plane into left and right parts while $[2,6]$ splits it into top and bottom. Why don't we say that $[2,6]$ again splits the space into left and right?
Contiguous arrays with variable length, such as C++'s std::vector, have been a major sequential container for languages whose evaluation is eager. However, it has been commonly considered that contiguous arrays do not mix well with lazy evaluation. Indeed, Arrays that Haskell provides are strictly evaluated for its ent...
Suppose, I have a list of lists where multiple lists can have same elements. In my final output, I just want one list with the same element. An example is the following: Input: A=[[1,2,0], [0,1,2], [2,1,0], [4,5,6], [6,5,4]] Desired Output: $[[0,1,2], [4,5,6]]$ Can someone help me with an easy function for doing so? Th...
The question is the following: Construct CFG for the L = {w ∈ {0, 1}∗ : w is a palindrome and |w| is divisible by 3}. I am able to construct CFG for the set of all palindromes as below: S --> aSa | bSb | a | b | ϵ I am not able to figure out how to make |w| divisible by 3 in my CFG.
I am a bit confused on what the difference between a "function problem" and a "search problem" is. The specific problem I have been studying is known as End-Of-The-Line: Given two functions, $P(x)$ and $N(x)$, a value $v$ is said to be balanced if $N(P(v)) = P(N(v)) = v \lor N(P(v)) \neq P(N(v)) \neq v$. Given that $0...
You have $n$ questions in an exam. Question $i$ is answered correctly with probability $p_i > 0$. If question $i$ is answered correctly, you get $R_i$ marks. You can choose to answer the questions in any order. As long as you are giving correct answers, you can accumulate all the marks. However, whenever your answer to...
forgive me if my question is vaguely phrased. I’m fishing around for a PRNG algorithm which generates numbers of a constant length, regardless of the seed. I tried experimenting with a LCG but obviously the output for that is 0<=Xi+1<=m. Plus points if the algorithm is reversible (like you could get the seed back from ...
In a directed, weighted graph with non-negative weights we are asked to find a path from a starting node s to node t that weights $\leq W$. In our given graph there is no such path but we have the ability to skip as many edges as we like. How can I create an algorithm that calculates the number of minimum skips needed ...
The setting is the following: There are n players that want to compete in a specific game over the course of an event. A game is played between 2 teams of 2 players each (so a 2v2). Each player as a general rating value based on the ELO-System and it is assumed that the combined rating of a team is the mean of the memb...
Recently, I’ve been interested in the console of the Source game engine, more specifically, its alias command, which allows one command to invoke others. It may allow recursion (i.e. running alias freeze freeze will cause inputting freeze to freeze the engine), but does not allow parameters (i.e. running "alias define ...
I had asked a question here about this before but it had a lot of vagueness to it, so I'll rephrase the entire thing. I'm trying to create a PRNG that would replicate Borge's Library of Babel, i.e. 3200 characters made of 29 individual characters (26 alphabets, space, comma and period). Yes, I know libraryofbabel.info ...
In Boolean Satisfiability of CNF formulae we have $k$-SAT where each clause has at most $k$ literals. It is well known that $k$-SAT is polynomial time reducible to $3$-SAT. It is also well known that $2$-SAT is solvable in polynomial time whereas $3$-SAT is NP-Complete (and therefore $k$-SAT $(k \gt 2)$ is NP-Complete ...
For an Algorithms course we are studying propositional calculus. As an excercise we are given formal statements which we are to explain in natural language first and then evaluate with specific values. As a very simple example, which will serve us to clarify matters of notation, statements are of the form $$\langle \su...
In Gödel, Escher, Bach Chapter XIII: BlooP and FlooP and GlooP, Douglas Hofstadter states that: This puts us in the uncomfortable position of asserting that people can calculate Reddiag[N] for any value of N, but there is no way to program a computer to do so. How come this is true? What if Reddiag[N] = 1 + Reddiag[N...
The Wikipedia article on temporal logic lists many varieties of temporal logic, such as LTL (linear temporal logic), CTL (computation tree logic), CTL*, and others. Which of these is the logic described in Manna & Pnueli's textbook The Temporal Logic of Reactive and Concurrent Systems: Specification? I've started to re...
I came across the following problem in the book "Elements of Programming Interviews in Python". Given an array A of n objects with Boolean-valued keys, reorder the array so that objects that have the key false appear first. The relative ordering of objects with key $true$ should not change. Use $O(1)$ additional space...
With recursive-descent parsing, direct/indirect left recursive rules do not allow top-down parsing. How would this grammar be converted to be non-left recursive? S-> Aa | b, A -> Ac | Sd | epsilon I have gotten this far but I am not sure if it is correct. S-> bS' S'-> epsilon | AaS' A-> SdA' A'-> cA' I wasn't sure if...
Could someone help explain the logic of the ms . The question is The RandomChar() module is to be modified so that alphabetic characters are generated twice as often as numeric characters. Describe how this might be achieved. and the marking scheme says my logic is that if you randomly generate an integer between 1 a...
Suppose given two sets $\{a_1,a_2,\dots,a_n\},\{b_1,b_2,\dots,b_n\}$ of positive real numbers. We try to find a subset $I\subseteq\{1,2,3\dots,n\}$ such that: $\sum_{i\in I}b_i$ maximized and $\sum_{i\in I}a_i\leq 5$. I think this problem is NP-hard but I can't reduce from famous problem like partition problem. Any hel...
I have seen this C code showing an implentation of Peterson's Critical Section algorithm. It is obviously skeletal and hardwired for two threads but the logic is supposed to be correct in detail. Despite reading and talking I remain with a grain of doubt about the following line (and the similar line for Thread B): `...
Can we have an algorithm that takes some input and does something random to it (in such a way that the algorithm does terminate) which does not have a worst-case running time upper-bound? A (non-)example which shows what I mean: If let's say that my algorithm is one that takes an input number, generates a random number...
This is the given question- Construct a DFA over the alphabet {0,1} such that it accepts all strings containing even number of 0's OR the number of 1's divisible by 3. The very first problem I've encountered was the 'or' mentioned in the question. Does this mean i just '+' the RegEx for -'accepts all strings containi...
Michael Sipser's Introduction to Theory of Computation: Is there a typo in the highlighted line? I ask that because near the beginning it says that R is a set of states of N, and that R itself is a state of M. It also says that E(R) is 'the collection of states that can be reached from members of R by going only along...
From 6.3.2 of Aho et al. When type expressions are represented by graphs, two types are structurally equivalent if and only if one of the following conditions is true: They are the same basic type. They are formed by applying the same constructor to structurally equivalent types. One is a type name that denotes the o...
Consider two binary search trees T1 and T2, each with height h, with all values in T1 less than all values in T2. I want to merge these both trees to get a new binary search tree of height at most h+1 My Thoughts: The first thought was to put T1 as the left child of the leftmost node in T2. But the resulting bst will h...
Consider two red-black trees T1 and T2, each with black-height h, with all values in T1 less than all values in T2. How to merge these two trees to obtain a red-black tree in O(h). The root is always considered black in the red-black tree
Consider a DAG such as one shown below: How do I find a particular topological order of nodes, such that when the nodes are placed in a straight line, the maximum number of unique-edges that cross through any node is minimized. Unique edges are edges that originate from unique nodes. So, if two edges are originating f...
Consider the alphabet $\Sigma = \Sigma_c \cup \Sigma_i \cup \Sigma_r$ separated into call, internal, and return letters. Assume that $c \in \Sigma_c, r \in \Sigma_c$, and $a \in \Sigma_i$. I have a question regarding whether the language: $L = c^n a c^* a r^n$ is accepted by some Visibly Pushdown Automaton or not. $L$ ...
The N-Queens in question is referring to the one where it is interested in finding all solutions for some natural number n. I just read about the idea of a verifier being an algorithm that verifies whether it accepts an input and a "certificate". So say for example that I want to check some configuration of n queens in...
The most widely used notion of equivalence of regular expressions $r_1$ and $r_2$, or finite state automata ${A}_1$ and ${A}_2$ resp., over an alphabet $\Sigma$, is to consider their languages: we can define $$r_1 \cong r_2 \qquad\text{iff}\qquad \mathsf{language}(r_1) = \mathsf{language}(r_2) $$ and likewise for ${...
This idea blows my mind, I would appreciate for any guidance. In essence, the question is how a machine should work to transform any kind of formal logic into its graphical representation (e.g. conceptual graph)? And moreover, from graphs into linear form. I have heard about ISO standard for Common Logic framework. It ...
I have a problem to solve, but I am having some issues with it... Find an algorithm with time complexity O(V+E), where V and E stand for vertices and edges respectively. The algorithm searches a tree graph for a subgraph. The subgraph is supposed to be the so called caterpillar graph, i.e. a path with "legs" or "hair" ...
I've read that in general for a modal formula P, a world w and a Kripke frame ⟨W,R⟩ w⊨□P if and only if for every u∈W, if wRu then u⊢P In case of LTL, being a modal logic, I assumed that the worlds are different moments in time and the relation R is the chain of "arrows" between those moments. However, in this case the...
I have recently discovered a greedy algorithm to construct De Bruijin Sequence. The greedy approach (prefer-largest specifically) works like the following: Start with a sequence of all 0's of length n - 1 where n is the order of De Bruijin Sequence. For k^n times (where 0...k-1 are the possible digits in the strings i...
(I reorganized my question.) We have a function $f$ mapping the integers $\{1, . . . , 2^k\}$ ONTO the integers $\{1, . . . , 2^k \}$ such that when these integers are represented in binary, and $f$ is polynomial time computable but the inverse function $f^{-1}$ is not polynomial time computable. Define a language $L =...
I am currently working on parameterized complexity, especially on the hard proofs. There is a problem that I am currently working on, denoted by $P$ and a parameter $x$, I discovered that there is no parameterized reduction for $P$ w.r.t the parameter $x$ from any W-class. I have tried to give a reduction from a W[2]-h...
I am going to story data in a growable persistent storage. I need to implement allocation/deallocation (like malloc/free and possibly realloc but in Rust) of continuous regions of memory on this storage. Allocation should never fail, but the storage grow if out of allocated storage. Priorities: Should do alloc/dealloc...
Is the answer O(h) or Ω(h) for f+g? My professor says its Ω(h), but I can't get it.
As a reminder, in an A* algorithm, vertices in the priority queue are sorted according to their priority $f = g + h$, where $g$ is the cost of getting to this vertex from the start vertex, and $h$ is an estimation on remaining cost to get from this vertex to the destination vertex. In my specific A* path finding algori...
Originally posted on SO. I have a very simple language that gets compiled to an Expression tree, and then evaluated. Users can define mathematical operations, use variables and control flow. Moreover, from the script it's also possible to read an external input, which is fixed for a given evaluation (i.e. it outputs th...
In lambda calculus (I will use untyped) if a term containing a redex is beta-reduced to another term, then for some reason they are considered "beta-equal". But the lambda calculus only works one way! Assume that 3 conditions are met: The original term is finite (for simplicity: it consists of a finite number of chara...
In what paper(s), textbook(s), and/or classnote(s) can I find a detailed proof of the completeness of a certain proof system for PLTL (Propositional Linear Temporal Logic)?
Does 2^n describe a class of problems or is it considered polynomial?