instruction
stringlengths
35
29.1k
Let $(G,w)$ be an edge-weighted graph, where the weights $w(e)$ are assumed to be rational. My question is: What is the complexity of computing $\chi'_f(G,w)$, the fractional edge-chromatic number of $(G,w)$, denoted by $\chi'_f(G,w)$. Let $M$ be the edge-matching incidence matrix of $G$. Thus, $M_{ij} = 1$ iff the $...
What is the specific name for data types such as integer, string, real (the basic ones)?
I was wondering if virtualization technologies (VmWare, virtual box) are possible thanks to the theoretical existence, translated into practice, of the concept of universal turing machine or if the two are simply a coincidence. As far as I'm concerned they seem to me to be closely linked but I could be wrong.
I propose to solve a scenario that is pretty familiar. I hope you can help me. I have a set of home appliances and their power consumption (in watts). TV: 250 W Oven: 2400 W Washing machine: 500 W I need a way (an algorithm) to find the maximum power consumption in a given interval. Given, for example that: I watch...
I'm learning an algorithm for graphs of maximum degree three. My question is: should the graph of that type have at least one vertex with degree three. For example if the maximum degree of some graph is 2, can we say that this graph is maximum degree three. Thank you
is there a way ensure that there only is flow through vertices c and d and not e or through d and e and not c. But not both at the same time. With an simple extension it is possible to put also minimum constraints on the network but this does not seem to help us.
The chapter's title is "Automata: The Methods and the Madness". This title came along in the second edition and remains in the third edition. In the first edition, the the second chapter's title is "Finite Automata and Regular Expressions". The word "madness" doesn't show up anywhere else in the third edition. Why i...
I am working on an order picking project, which requires to cube the items into several totes in a trolley, then batching the totes, followed by parallel aisle picking/routing. The input data has some orders with items. Items have locations, 3 dimensions. Each tote has the same size. One trolley can fit 4 totes. The c...
The problem says to find the shortest way (the smallest amount of intermediary points), with given source and destination points, such that between two consecutive intermediary points there are two alternative routes. Also, all the connections between the points on the map are given. I understood that the problem is ab...
$\{ M \mid M \text{ is a machine that runs in }100n^3 + 300\text{ time }\}$ I am currently stuck with this one. I thought of reducing HALT to M as the reduction seems legitimate to me: if the first is undecidable then building an instance of the first problem starting from the second, ie asking if a machine M that exec...
Let $L_1, L_2 \subseteq \Sigma^*$ be two languages, where $\Sigma$ is some finite Alphabet. Does $L_1L_2 = L_2L_1$ imply $L_1 = L_2$? What if $L_1$ and $L_2$ are regular languages? Can you give counterexamples?
I am doing a research about the load balancing problem in 5G system, but I am not sure if my problem is a NP-complete problem. The problem is: given a set of n items and a set of m knapsack capacity of knapsacks are equal the weight of item j in knapsack i is w[i][j],that means weight of a item in each knapsack are di...
Dragon book says following about where SLR(1) parser can fail but CLR(1) wont: Recall that in the SLR method, state $i$ calls for reduction by $A→α$ if the set of items $I_i$ contains item $[A→α.]$ and a is in $FOLLOW(A)$. In some situations, however, when state i appears on top of the stack, the viable prefix $βα$ o...
I would like to ask about the standard deviation of objective function value. There are two types of standard deviations: Population standard deviation Sample standard deviation In metaheuristic optimization algorithms most scholars are used std in your papers. What kind of standard deviation is used in metaheuristi...
According to De Boor's algorithm, a B-Spline basis function can be evaluated using the formula: $$ B_{i,0} = \left\{ \begin{array}{ll} 1 & \mbox{if } t_i \le x < t_{i+1} \\ 0 & \mbox{otherwise} \end{array} \right. $$ $$ B_{i,p} = \frac{x-t_i}{t_{i+p}-t_i}B_{i-1,p}(x) + \frac...
From A Swift Tour — The Swift Programming Language (Swift 5): var myVariable = 42 myVariable = 50 let myConstant = 42 A constant or variable must have the same type as the value you want to assign to it. However, you don’t always have to write the type explicitly. Providing a value when you create a constant or varia...
This question is about section 2.3 of Wilf's ``Algorithms and Complexity'' https://www.math.upenn.edu/~wilf/AlgoComp.pdf in which he analyses the complexity of a recursive computation of the chromatic polynomial of a graph, based on the relation \begin{equation} \label{eq: recurrence} P(K;G)=P(K;G-\{e\})-P(K;G/\{e\}) \...
Suppose there exist no free variables in a given predicate logic formula. Is then a model alone sufficient to fully interpret the formula and make inferences? Don't we need an environment or variable lookup table (as often mentioned)?
To solve the min dominating set problem of a graph G, we can reduce it to a set cover problem. For example to find the MDS of the graph G: We can create an instance of the Set Cover problem by: Introducing the universe U to be equal to all vertices of the graph: U={0, 1, 2, 3, 4}. For every closed neighborhood of a v...
I have a question regarding the redundancy of Huffman coding. I know that for a general prefix code we have the following inequality: $$ H(X) \le R \le H(X) + 1 $$ $R$ being the rate (average codeword length) and $H$ is the entropy. Based on this relation, how can we conclude that Huffman coding is very inefficient i...
I received hundreds of transactions within one week. Each transaction has amount. I'd like to create an algorithm to find the maximum amount within 24 hour time window period. I know how to do that by creating a nested loop. But I am looking for a better performance algorithm such as n*Log(n) time complexity. For examp...
Wikipedia says that Hamiltonian path problem is NPC, but Parity Hamiltonian path problem (i.e., is there an odd amount of hamiltonian path) is P. Does a reduction from, e.g., SAT, to HPP, unavoidably duplicate some solutions?
I am researching into coding a solver for a variant of the Sokoban game with multiple agents, restrictions (eg. colors of stones, goals) and relaxations (push AND pull possible etc.) By researching online I have found classic papers in the field, like the Rolling Stone paper (by Andreas Junghanns and Jonathan Schaeffer...
For typed languages, what advantages/disadvantages are there to specifying the parameter type after the parameter name? For languages like C and Java, the type comes first: void myfunc(TypeA param1, TypeB param2); For other languages like Scala, Rust, etc, the type comes after the parameter name: fn myfunc(param1: Typ...
I'm currently learning about how to implement priority queues using heaps, but I've hit a wall while trying to implement the insertion operation. Assume that the size of the array storing the elements of the heap is n, and the size of the heap is also n. Assume further that we try to insert an element 'x' inside the h...
I came cross some works try to use deep learning to approximate NP-Hard https://arxiv.org/pdf/1810.10659.pdf Though the paper seems to have very good results but based on the citations. I'm quit doubt if it really the state of art approximation for NP-hard problem. I'm wondering what are some state of art NP-Hard appro...
$1.75\times10^{15}$ I know how to convert decimal to binary $(1.75)_{10}$ is equal to $(1.11)_2$ But to represent $10^{15}$ is the main problem for me. I can solve the question but this is the point where I got stuck. How can I represent $10^{15}$ in base 2 ?
I have the following def's Sns : Stm → (State ֒→ State) Sns[S] = s' (if <S,s> -> s') else undefined I'm wondering if Sns is a partial or total function. I think it's total since it always returns a partial function, given any statement. But the book I'm reading (semantic with application by wiley, pg 41) says: Note t...
$L_1^*∪L_2^*⊆(L_1∪L_2)^*$ I actually disproved the opposite proposition $[(L_1∪L_2)^*⊆L_1^*∪L_2^*]$ and my intuition tells me that this is actually true... I tried to show that the combinations of words in the right group $[(L_1∪L_2)^*]$ obviously contain all the words from the left group $[L_1^*∪L_2^*]$ and it's also ...
I am trying to reduce Exact Cover to Fixed Exact Cover to show that Fixed Exact Cover is NP-Hard. Exact Cover Input S = {x1, x2, ..., xn} (set) P = {P1, P2, ..., Pm} (subsets of S) Decision problem: Is there a subset {Pi1,Pi2,...,Piq} of P such that every element of S belongs to exactly one of the Pij:s? Fixed Exact C...
Our alphabet is {a,b} and we need to find a regular expression for the language of all words of the form $a^*b^*$, whose length is a multiple of 3. Obviously $(aaa)^*(bbb)^*$ is one of the options, but I just can't formalize more options. Any help will be appreciated.
I need to solve the question if two given oracle turing machines M$_{1}$ and M$_{2}$ have the same language, so T(M$_{1}$) = T(M$_{1}$). An oracle turing machine can use such an oracle for deciding if a normal turing machine will stop on an empty tape. It should be reduced to equivalence problem between two normal tur...
If $\bigr((q\leftrightarrow p)\leftrightarrow s\bigl)$ is a tautology and $p\rightarrow s$ is contingent, does it follow that $q\rightarrow s$ is contingent? Since I can't show $\bigr((q\leftrightarrow p)\leftrightarrow s\bigl)$ is a tautology, I'm unsure how to proceed.
$L = \{cda^nb^n\mid n\in \Bbb N\} \cup \{a,b,d\}^*$ Assuming $L$ is regular then there exist a pumping length $n$ for $L$. Lets use w = $cda^nb^n$. Thus $w \in L$ and $|w| = 2n+2$ $\implies$ $|w| \geq n$. $w$ can be splitted into three pieces $w = xyz$ with the following conditions: $|xy| \leq n$ $|y| \geq 1$ Let be ...
Is the following language in RE? $$L = \{\langle M\rangle : M\text{ is a TM that does not accept }010\}$$ I could use Rice's Theorem with the property $P = \{L : 010\text{ is not in }L\}$ to show it isn't in R, but how do I show it is in RE?
I have a recurrence relation of the form $T(n) = 2T(n/2)+O(1)$ I'm not sure how to deal with the big $O$-notation in the problem in order to start solving it ? Any help would be appreciated.
Is the language $L_1 = \{w_1cw_2 ~|~ w_1,w_2 \in \{a,b\}^{\ast} \text{ and } w_1 \neq w_2\}$ a context-free language? It certainly isn't regular, but is it context free? I'm having trouble creating a grammar that creates terminal symbols from the outside-in; Is there anything to look for explicitly that tells me it is...
Let $X$ be some problem known to be in $NP$. What is the natural next step in exploring the complexity of the problem? Is it trying to prove whether it is in $P$ or try to prove it is $NP$-Hard? Taking the example of the Graph-isomorphism problem it seems to me that after discovering that problem is in $NP$. It is not ...
I have the language $\Sigma = \{0,1,+,= \}$ and $$\mathrm{ADD} = \{x = y + z \mid \text{$x$, $y$, $z$ are binary integers and $x$ is the sum of $y$ and $z$}\}$$ And with the pumping lemma I find what a think is a counter example to the $xy^iz \in \mathrm{ADD}$ with $i = 2$, $p = 4$ and $s = 0+1^p$: $x = 0, y=+1, z= 111...
I've seen that every comparison-based sorting algorithm must perform at least $\log_{2}(n!)=\Omega(nlog(n))$ comparisons on some input (n being the size of the input). Why is the minimum number of comparisons $\log_{2}(n!)$, and how is the omega-notation bound calculated?
For the alphabet $Σ$={a,b,c} I was wondering how you would say: T that has elements from Σ, so could be T=a, T=bc I was considering maybe $Σ^*$ or $Σ^+$ would describe that, but I am not sure what both of them mean. I guess $Σ^*$={aa, aaa, ba, abc, ...} and not sure what $Σ^+$ is.
Problem Statement: Given a Problem $(A)$ such that: Any proposed solution $(S_0)$ is guaranteed to be polynomial size w.r.t. $A$. Now, consider a fixed set of $K$ properties $\{k_0, k_1,...k_c\}$, where each property is $coNP-Complete$. For any solution $S_0$ is considered a valid solution iff: "None of the property in...
I have this Question , I want the answer and show me how to solve it Please : Analyze the running time of the following algorithm using Big-Oh notation maxerea =0; maxpt1 =maxpt2 = maxpt3 =0; for(i =1;i<=n;i++) for(j =i+1;j<=n;j++) for(k =j+1;k<=n;k++){ empty = True; for(l =1;l<=n;l++){ ...
There are 10 Egyptian stone statues standing in a row in an art gallery hall. A new curator wants to move them so that the statues are ordered by their height. How should this be done to minimize the total distance that the statues are moved? You may assume for simplicity that all the statues have different heights.
$P^{NP}\subseteq BPP^{NP}$ holds. According to current knowledge $BPP$ is in $\Sigma_2^P\cap\Pi_2^P$ holds. So according to current knowledge is following true? $P^{\Sigma_2^P\cup\Pi_2^P}\subseteq BPP^{NP}\subseteq(\Sigma_2^P\cap\Pi_2^P)^{NP}\subseteq\Sigma_3^P\cap\Pi_3^P$? Is $P^{\Sigma_2^P\cup\Pi_2^P}$ the largest s...
Valiant converts $SAT$ formula to a $0/1$ matrix such that $Permanent$ of the matrix is $4^m\#SAT$. We know $Permanent$ can be approximated to $1+\epsilon$ factor with probability $1-\frac1\delta$ in time $poly(m|\epsilon|^{-1}\log\frac1\delta)$. Why does not these two help me tell when number of witnesses to $SAT$ for...
I am proving a kind of structure invariance principle for magmas in Cubical Type Theory with the Agda/Cubical library. This is done by constructing a path between two simple magmas and then transporting proofs of simple properties about this path. I have already obtained most of the proof (see my code repository) but d...
If a function has return type of ⊥ (bottom type), that means it never returns. It can for example exit or throw, both fairly ordinary situations. Presumably if a function had a parameter of type ⊥ it could never (safely) be called. Are there ever any reasons for defining such a function?
I am reading a book about complexity analysis and cannot find a way to solve a problem in that book. The problem is, that I do not understand how to determine the smallest possible parameters, given the runtime of an algorithm. Do I just need to insert some numbers and see if the parameters exceed n at some point? Perh...
I am required to find the shortest path using Dijkstra's Algorithm. After performing the calculations, am I getting the following values correct?: A=0 B=13 C=8 D=20 E=14 F=25 G=31 H=38 I=46 J=52
Question1: What is the difference between 2SAT and the complement of 2SAT? Question2: It is known that NL is contained in P, but what we know about P over NL? can be said that an algorithm that runs in P, uses NL space? Information That I gather I follow the Papadimitriou algorithm to solve 2-SAT with Let give 2-SAT a ...
Can anyone help me describe a Turing machine the language of which is the set of the words that have twice as many 0's as 1's? Assume the alphabet is $\{0,1\}$.
Is it possible $NP\subseteq P^{TFNP}$ holds or $NP\subseteq P^{UP}$ holds without the polynomial hierarchy collapsing? Is there problems in one of each of the classes from $NP$, $P^{UP}$ and $P^{TFNP}$ but not in other two? two of each pair of the classes from $NP$, $P^{UP}$ and $P^{TFNP}$ but not in last?
I am new to recursion. I am doing some practice questions and I was wondering what the technique is for going from some recursive code to identifying the number of function calls it makes. function win(n) if n ≤ 3 let memo(n) = 'yes' if memo(n-2) = 'no' or memo(n-3) = 'no' let memo(n) = 'yes' else let memo(n) ...
Two questions about the construction of a hash function: Let $U = \{u_1,...,u_n\}$ be a set of size $n$, and suppose that one is interested in a function $h\colon U \rightarrow [0,1]$ such that $h$ "looks like" it maps each of the $u_i$s to a random number, chosen from the uniform distribution on $[0,1]$. One simple w...
The lower bound of comparisons in a comparison-based sorting algorithm is $\log_2 n!=Θ(n\log n)$. Yet there can be less comparisons needed in an algorithm. If you take a sorted array, it will take $n-1 = O(n)$ comparisons (with insertion sort) to sort the array — comparing every adjacent pair of numbers. I don't unders...
My Partners and me, we are trying to optimize frequency process... I used Java to show our Problem, but the question is about algorithm NOT about Java implementation. Although implementations in java help us a lot. What we want to simplify our problem as much as possible in a JTree. As you can see, each node or leaf h...
C++ and Java include native classes for linked lists, C++ std::list and Java LinkedList For C++ std::list, nodes can be "moved" within a list, or from list to list (if the lists are compatible), via std::list::splice(), which in turn is used by std::list::merge() and std::list::sort(). With Java's native LinkedList, th...
I came across the paper Fast Poisson Disk Sampling in Arbitrary Dimensions which gives an algorithm for generating Poisson disk points in $\mathbb{R}^n$. It's claimed that the algorithm is linear time. However, I wonder if this assumes the dimension n is constant. My understanding of the analysis is that to generate $...
I've been told recently that one can use the Ising model can find solutions to certain NP-hard problems, such as Clique, although it doesn't do so in polynomial time. Googling gets a few Arxiv results but where might I find an introduction to this interesting relationship?
I am trying to make a tower defence game where some critters are trying to make their ways through a 2D grid-like obstacle course. The idea is these critters cannot walk into the obstacles or into each other during their path, and they would like to get to the other side as soon as possible. I just need a cheap, not-op...
I was reading about the concept of quine and in particolar of "reciprocal Quines" for example a Program $A$ that output the code of a program $B$ and vice versa, with the two being written in the same programming language. Thinking of this particular case I have come to the conclusion that these two program must nece...
I need to change x1 = 0.3 and x2 = -0.29 to a FP(floating point) number with one sign bit, a 4 bit mantissa, a 3 bit exponent. The results I got are: x1: 0 001 0011 x2: 1 001 0010 I am also trying to calculate the number of significant digits of x1 and x2 and I have found 2 for each, but I am unsure of this result. The...
I am self-study the book "Geometric Approximation Algorithms" by Sariel Har-Peled. And I stuck on a problem and don't know how to start it. Let $C$ and $P$ be two sets of point in the plane , such that k = $|C|$ and $n = |P|$. let $r = max_{p\in P}min_{ c \in C } \|c-p\|$ be the cover radius of $P$ by $C$ give a $\math...
Given a turing machine which has logrtmic space, and consists of an input tape and a working tape, Is it possible to iterate all egdes of an input graph? I know the answer is probably NO, because clique and other similer NP problems belongs to NP and not to NL. Unfortunately, I can't find a satisfying and clear explan...
Let's say that I have a relational model, defined as: $$X(A,B,C,D,E,F,G)$$ with the functional dependencies: $$f_1: \{A,B,C\} \to \{D,E,F,G\}$$ $$f_2: \{A,B\} \to \{C\}$$ Using this information I need to determine the highest normal form (for us it's BCNF) that this relation will go to. It's clear that the relation is...
Consider the following problem: Input: An undirected graph $G = (V, E)$, each edge has a non-negative weight $w_i$ and a non-negative value $v_i$. There are two vertices to represent start point $s$ and end point $t$. We are also given two values $W,V$. Decide whether there is a simple path from $s$ to $t$ with total ...
I'm building a math application (not homework) and I want to build a component that allows players to drag-and-drop 1's, 10's, 100's, etc to complete problems and a bonus reward if they do it in the fewest moves possible--How can I calculate this? e.g. 50 + X = 96 where X is a randomly generated integer and the player...
In graph theory, it is well-known to be NP-complete the problem of given a set of $k$ pairs of source-sink, deciding whether there exists $k$ vertex-disjoint paths connecting these pairs. Our problem is a variant in which the requirement of being vertex-disjoint is replaced by being induced. A set of $k$ paths is said ...
I'm trying to write a context-free grammar (to be feeded to lark) for parsing lambda calculus expressions. Basic version of it, as presented by most sources, looks like: expr: variable | "(" expr ")" | application | abstraction abstraction: "λ" variable "." expr application: expr expr I'd like the grammar to unambiguo...
In its section Properties of binary trees Wikipedia states: The maximum possible number of null links (i.e., absent children of the nodes) in a complete binary tree of n nodes is (n+1), where only 1 node exists in bottom-most level to the far left. I wonder about the precise statement used here. In my opinion every b...
I am working on the following exercise: Prove that if $P \neq NP$, there cannot exist an approximation algorithm $A$ for the knapsack problem (KP) such that $\exists k \in \mathbb{N}, \forall I \in S: OPT(I) - P_A(I) \leq k$ where $OPT(I)$ is the optimal profit on instance $I$ and $P_A(I)$ is the profit calculated by $...
I am currently working to understand the use of the Cheeger bound and of Cheeger's inequality, and their use for spectral partitioning, conductance, expansion, etc, but I still struggle to have a start of an intuition regarding the second eigenvalue of the adjacency matrix. Usually, in graph theory, most of the concept...
I have checked many websites but did not get the right answer. what is the meaning of constructor in java?
Consider the following decision problem : Cycle: Given a directed graph G, does G contains a directed cycle? It is very clear why Cycle belongs to NL. My question is - how to show Cycle is also NL-hard? it seems almost obvious to show logarithmic reduction from stCON. I thought about the following reduction: Gi...
Let us say the optimization version of the bin packing problem asks you to give a packing using the fewest bins possible and the decision version asks if it is possible to pack the bins into $k$ bins. How can you reduce the optimization version to the decision version? If you only have to answer what the fewest bins ...
In my database class we practiced how to find the candidate keys, given the functional dependencies. However they were easy examples, based on a single attribute being functionally dependent on a single attribute but in our book it gives the following example of more complex functional dependencies. Let's say that I ha...
I am new to Computer Science and started learning about computer networking very recently. I know that bandwidth means how many bits can be sent through the channel in 1 second. However, recently I came across another definition of bandwidth which says it is the range of frequency where the signal is received. How to t...
The object can be locked two different ways, where if the lock is entered the same way a second time, the lock is recursive, but if it's entered the other way, it blocks. Like a reader-writer lock, but symmetric. In case the text isn't clear, this code should be clear. Beware of bugs. I've only proved it correct, I hav...
When I click "view certificate," under Public Key Algorithm it usually says "RSA Encryption" or "Elliptic Curve Public Key." I assume this is the algorithm used to agree on a premaster secret (symmetric keys) between the client and server, or steps 4-6 in the image below. Why not use Diffie-Hellman then? Doesn't epheme...
I am trying to design an algorithm to solve a workshop scheduling problem. The problem is as follows: I have to schedule a workshop consisting of a finite number of time slots, and a finite number of students. Each time slot has a capacity, which must be fulfilled. Each student has a list of preference corresponding to...
How can one find the shortest path between any one of the origins to any one of the destinations through a number of way stations on the way using Dijkstra algorithm? You can visit those way stations in any order. There will be multiple origins and multiple destinations, but a path from any origin to any destination wi...
Assume A, B are two decision problems. Given a reduction from A to B that uses log^c1(n) space and an algorithm that solves B in log^c2(n) space, Can we determine some lower bound to the space needed by an algorithm which solves A using this reduction?
I am currently reviewing for my exam in computer architecture. I've run into a question in the old exam sets that I can't really figure out. The question is regarding caches, more specifically block offset, set index and tag. The question is as follows: The old sets come with solutions. The solution to the problem is...
I am developing a program which seeks strategies for the players A, B in any of a family of simple 2-player gambling-games. The program iterates, using a genetic algorithm to determine, from the current iteration's results, the strategies which are to play one another in the next iteration. Below I give an overview of ...
I remember reading an article/paper (or perhaps a talk, most probably by Scott Arranson) where he lists the major open problems and their likelihood of being true or false in a table/graph. This is listed along with the 'surprise factor' of each result if its true/false. I am unable to locate the article though. I wond...
I am trying to solve the cannibals - missionaries problem; we have the number of cannibals, the number of missionaries and the position of the boat. We are trying to transfer all of them to the other side, however there can't be more cannibals than missionaries on either side. The capacity of the boat is limited by 2. ...
I am learning about some techniques to find similarity between documents. One of the methods is Min Hashing. According to Min Hashing we can find a signature matrix given a random permutation, P. According to this technique in order to calculate signature matrix, we have to take the index of the first row in which docu...
For both schedulers I have found the definition, that no processor stays idle, if there is more work it can do. However, I found two different upper bounds on the computation time of $T$. For the following equations $T_{\infty}$ is the computation time on infinite processors and $T_1$ is the duration on one processor. ...
I am trying to solve this code cracking problem. The solution is either the code or all possible solutions if you can't narrow the possibilities. We have a 5 character code that is consisting of digits {0,1, ..., 7}. We have 10 attempts and for each attempt we have the amount of correctly guessed digits on the right i...
As an input, my program accepts a big set of numbers (often times more than 30) and a maximum threshold. I'm trying to get the maximum average between 10 of those numbers below that threshold (the numbers used in that average are also returned). Right now, I'm testing all 10 number combinations, recording them and thei...
For a 3SAT formula with $n$ variables and $m$ clauses, I am interested in counting the number of isomorphic formulas (isomorphic in the sense that they are logically equivalent and have the same number of variables and clauses). I assume that we can invert the sense of any variable (swap all $x_i$ with $\lnot x_i$) an...
Is it true to say that Huffman codes always satisfy Kraft's inequality with strict equality? At first, I thought the statement is wrong since for Huffman coding there is no assumptions on the probabilities. However, when I tried evaluation the Kraft inequality for several Huffman codes, I realized that it's got nothing...
I am trying to understand Rogozhin's (2, 18) universal turing machine by stepping through a simple 2-tag encoding that I believe should loop forever: a -> aa For example, using an initial input of aaa: aaa aaa aaa .... etc Apologies for the extremely specific question, but it's what I've narrowed my issue...
After the total silence in response to my last question, I am rethinking my assumptions. DPDAs are, of course, solvable, and I believe that their loops can be found in the manner I described in my prior question: arrive at the same state as you were in previously with the same top symbol as you had last time without...
This paper says pebble games have super linear lower bound for every fixed $k$ https://dl.acm.org/citation.cfm?doid=62.322433. Why is it not considered proof of constructive example for a function in $NP$ which requires superlinear runtime?
Given a probability distribution $p$ across an alphabet, we define redundancy as: Expected Length of codewords - entropy of p = $\ E(S) - h(p)$ Prove that for each $\epsilon$ with $0 \le \epsilon \lt 1$ there exists a $p$ such that the optimal encoding has redundancy $ \epsilon$. Attempts I have tried constructing a p...
I am trying to solve this problem: we have an oriented, weighted graph and we have to find a cycle with the biggest weight. Weight of a cycle is the sum of all edges forming the weight. The preferred solution is via backtracking. My idea was to : backtrack all combinations of vertexes (0s and 1s representing whether v...
I am having trouble solving the following task: Given is the language $$D=\{ \langle M, w \rangle \mid \text{$M$ is a Turing machine and $M$ enters all states on input $w$}\}$$ Prove that $D$ is not decidable by reducing $$A_{\mathrm{TM}}=\{\langle T, w \rangle \mid \text{$T$ is a Turing machine and $T$ accepts $w$}\}...
Are there known algorithms for the isomorphism problem for directed weighted multigraphs? If not, could one be created simply by adapting existing algorithms for graphs or digraphs, or is it entirely non-obvious?