instruction
stringlengths
35
29.1k
I'm trying to understand the complexity/number of iterations needed to determine the number of bits in an integer. 4 = 100 = 3 bits 3 = 011 = 2 bits 8 = 1000 = 4 bits I skimmed through this article and it says: A positive integer n has b bits when 2^b-1 ≤ n ≤ 2^b – 1 But when you do the math for an integer 4, you...
I'm trying to solve the recurrence for $T(n) = 7T(n/7) + n$. I know using Master Theorem it's $O(n\log_7n)$, but I want to solve it by substitution method. At level $i$, I get: $7^i T(n/7^i) + (n+7n+7^2n+ \cdots + 7^i n)$ By setting $i = \log_7n$, the above becomes: $$7^{\log_7n}\cdot T(1) + (n + 7n + 7^2n + \cdots + 7...
I have a dense matrix and a set of rows. I would like to check if adding any single row from the set to the original matrix would make the new matrix rank deficient. Right now I am doing a full LU decomposition each time. This feels wasteful, and I have a hunch that I should be able to keep some information between ite...
The numbers in the table below are the result of executing an algorithm that has one parameter $n$, a non-negative integer, and produces sequences of integers as outputs. For values of $n$ from 0 to 5, the algorithm produces the following sequences of numbers as outputs: $n = 0$: 0, 2. $n = 1$: 3, 5, 7, 9. $n = 2$: 6,...
This architecture contains three layers or levels of the database management system: External level Conceptual level Internal level Can some one explain to me with a practical real example so that i can understand this? Before constructing a data model does enterprise's architects consider to make a three schema a...
From this video lecture from MIT https://youtu.be/moPtwq_cVH8?t=1229 there is mention how NP complexity works with finding a "lucky" algorithm and luck can never be accounted for. The example he draws on is just seeking the next yes till you find some final output. For those reasons, I had assumed that even SGD is NP c...
From what I know, a problem can be transformed to a yes/no answer, which can be described by a decision tree. Solution to a problem also can be represented by a set of strings (a language), which means the problem can be regarded as a membership problem. This set of strings can also be represented by an automaton, alt...
In analysis of algorithms, we sometimes use the (unsimplified) Master Theorem for recurrence relations. What should be done in the case that there is a constant factor in the numerator following T? $$ T(n) = 2T\left(\frac{5n}{8}\right) + 1 $$ Does b simply equal $\frac{5}{8}$? This seems a contradiction to the Theorem....
Given a directed acyclic graph $G$ and a start vertex $s$ and an end vertex $e$, consider a coloring of the edges valid if, for every path from $s$ to $e$ and every color $c$, either $c$ is never encountered along that path, or every edge that is colored $c$ is visited by that path. Given $G,s,e$, I would like to find ...
Given $n$ items with weights $w_1,...,w_n$ and values $v_1,...,v_n$, and a weight limit $W$, the purpose is still maximizing the total value of items to be carried (while not exceeding the weight limit). Now, a new constraint is, once an item with value $v_i$ is taken, all items whose value is greater than $v_i$ must a...
Clique (from WikiPedia): Clique is a subset of vertices of an undirected graph such that every two distinct vertices in the clique are adjacent; that is, its induced subgraph is complete. K-Clique problem: Finding a clique of size K. This is NP-complete according to Wiki, Cliques have also been studied in computer s...
I remember when my dad explained to me for the first time how a certain model of computer he had came with a "math coprocessor" which made certain math operations much faster than if they were done on the main CPU without it. That feels a lot like the situation we are in with GPUs today. If I understand correctly, when...
I have to compute $R = \left(\!\!{n + 1\choose k}\!\!\right)$, which happens to be: $$ R = \left(\!\!{n+1\choose k }\!\!\right) = \binom{n+k}{k} = \frac{(n + k)!}{n!k!} = \frac{(n+1)(n+2)\cdots(n+k)}{1\cdot 2\ \cdots\ k}.$$ The problem is that, if you compute the numerator and denominator separately, you will run very ...
I was reading a textbook which says that: If the valid bit is set, the address field indicates the start of the corresponding physical page in DRAM where the virtual page is cached. If the valid bit is not set, then a null address indicates that the virtual page has not yet been allocated. Otherwise, the address poin...
What can we say about languages in $\mathsf{coRE} \setminus \mathsf{R}$? Are there Turing machines for these languages? I know that $\overline{HP} \in \mathsf{coRE}$ doesn't have a Turing machine, and also that all the language that do have Turing machines are in $\mathsf{RE}$, so is it true that for any language that ...
Let $G=(V,E,c,s,t)$ be a flow-network, where $s$ is the source, $t$ is the target, and $c:E\mapsto [0,\infty)$ defines the capacity of every edge in the network. Let $e=(u,v)$ be an edge in the network. Describe an efficient algorithm to find a valid maximum flow $f$, such that $f(e)$ has a maximal value. (That is, if ...
I came across an exercise for constructing a PDA for the following language: $$L = \{ncm \mid n,m\in\{a,b\}^* \text{ and } n \ne m^R\}.$$ Where $L \subseteq ({a,b,c})^*$ So $n$ and $m$ are both a combination of any number of $a$'s and $b$'s, but $n$ is not the reverse of $m$. Does anyone have some tips or advice, would...
I'm trying to solve this puzzle but I get stuck. I thought about trying to use the law of total probability to solve intermediate problems with subset of size $k$ but it didn't helped me that much. Is anyone kind enough to give me the right approach to solve this ? Problem: You are given $N$ boxes indexed from 1 to $N...
I have a question regard online learning with SGD. Is there a way to give a statistical guarantee that the value obtained after $n$ samples deviates at most $\epsilon$ from the real value? Thank you guys.
I have two sets of n points each in 2D Cartesian coordinates. I want to find a one-to-one pairing between the points in sets A and B such that the range of distances between the points is the smallest. For example, consider $n=3$, $A_1 = (0,0)$, $A_2 = (1,0)$, $A_3 = (3,0)$, $B_1 = (1,1)$, $B_2 = (3,2)$, $B_3 = (-1,0)$...
Given a 3SAT instance (a Boolean expression in three conjunctural normal form), we draw a directed graph, where for each Boolean variable $x_{i}$ we have the nodes $x_{i}$ and $!x_{i}$; for each clause, for example $\left(x_{a} \vee x_{b} \vee x_{c}\right)$, we draw the following arrows $!x_{a}x_{b}$, $!x_{a}x_{c}$, $!...
I'm trying to figure out this problem for very long time and am no getting nowhere. I'm working on a simple 3d modeler that uses half-edge data structure. Say I have non-manifold geometry where two triangles share a common vertex, as shown in the image below. And I want to add another triangle such that now three trian...
Let's say you have groups of objects, and a certain amount of objects you can add to these groups (you cannot create new groups, and do not necessarily have to use all your extra objects), and the goal is that you want to maximize the number of same-sized groups. There can be multiple correct answers, and you can add t...
I have looked up a question like this online and found this solution. I couldn't understand what the new NFA A' looks like. Could anyone give me an example of NFA A'?
Are some algorithms inherently recursive? As in, rewriting it in tail-recursive/iterative form with a stack is still needed, and there is no way to do it otherwise. I am asking because I struggled to implement the function stringsMatchingPrefix on a Trie tail-recursively without a stack. The stringsMatchingPrefix probl...
"what does the to 10 mean?" FOR number ← 1 TO 10
Is a computer file just a string of zeroes and ones? If so, can it start with zeroes? I have not been able to find an answer, surprisingly.
My understanding is as follows: Number of address entries in one index block (A) = Block size / Address size Total address entries (B) = Number of index blocks * (A) File size = Block size * (B) So, we must know the block size, block address size, and the number of index blocks to find the file size. However the sites...
I am trying to write a simple multi-pass assembler. Wikipedia states that: Multi-pass assemblers create a table with all symbols and their values in the first passes, then use the table in later passes to generate code. And the assembler must be able to determine the size of each instruction on the initial passes in...
I've been playing around with a program I wrote that converts decimal numbers to binary numbers and i've noticed that eventually, after applying the algorithm (multiply by 2, subtract 1 if greater than or equal to 1), to convert a decimal to binary, the results turn strange likely due to floating point imprecision. For...
I've just started learning relational algebra, so I'm reading a lot of articles for this topic. Not so long ago I've encountered two statements that seem to be quite weird to me. ∩ and ∪ (intersection and union) are in fact redundant in relational algebra and you can rewrite any expression without them. You can't get...
From Nielsen & Chuang (page 138): Suppose an $n$ element list is sorted by applying some sequence of compare-and-swap operations to the list. There are $n!$ possible initial orderings of the list. Show that after $k$ of the compare-and-swap operations have been applied, at most $2^k$ of the possible initial orderings ...
In chapter 2 of the New Turing Omnibus, the author considers an unknown finite automata with 6 states. Through trial and error, it is deduced that the words 0101, 0100101, 0100100101 are accepted. It is then stated that using the pumping lemma, it can be shown that if 01(001)^n01 is accepted for n=0,1,2,3,4,5 then all ...
Suppose the following is true for some f(n) and g(n): $f(n) = \Theta(g(n))$ Does that mean $f(n/k) = \Theta(g(n))$ for any value of $k>0$? I know that for the above to be true, there must exist positive constants $c_1$, $c_2$, $n_0$ such that for all $n \geq n_0, $ $c_1(g(n)) \leq f(n) \leq c_2(g(n))$. Thus if $f(n) = ...
In Dr. Racket, how would I combine the digits w, x, y, z to wxyz (for example 3, 7, 8, 9 to 3,789)? I haven't gotten very far on this: (define digits-to-numbers w x y z)
Suppose you have two lists as follows List $A$ = $(a_1, a_2, ..., a_m)$ List $B$ = $(b_1, b_2, ..., b_n)$ Each element in list $A$ can be paired with many or no elements in list $B$. I have a function $f(a_i, b_j)$ that returns true or false depending on whether the match is valid or not. However, if you pair element ...
PHPMyadmin is stated as a 3 tier database architecture.How is this possible,Isn't it a 2 tier architecture.What are the real world examples of 1-tier and 2-tier architecture.
This paper shows that computer games, such as Super Mario, are NP-hard, by reduction from SAT. It may be possible to use this reduction to help solve hard instances of SAT: use the reduction to construct a Super Mario level and let experienced gamers play it. In the worst case, it might take them exponentially long; bu...
This question relates with this question and answer. May I know why "Writing a structured program for any tangle of an automaton is possible in principle, but probably not worth the hassle (translating arbitrary transfers of control into a nice structure -- for some non-trivial value of "nice" -- is a lot of work, and ...
We know by AEP that if random variables $X_1,X_2,...$ are i.i.d. drawn from $P_X$ then the probability of the vectors in the weak typical set $$A_{\epsilon}^n = \{\vec x \in \mathcal{X}^n: |\frac{-1}{n}\log P(\vec x) - H(P_X)| \leq \epsilon \}$$ tends to 1. I am working on a slightly different problem. Random variable...
This relates to an answer for this question. The opinion said that: Personally, I don’t see much value in coding interviews. The problems I’ve seen asked as coding questions have been (for the most part): asked by a person who has one specific solution in mind and is unable to recognise an alternative answer or even...
A genral Turing model with one tape to define sublinear space (L,NL,..) Normally to define sub-linear space complexity we need special Turing models with many tapes, at least two: a read-only tape and a work tape; or often three: with an additional output tape. (We do this because the reading of the input would cost us...
I have an undirected graph with $n$ vertices and $m$ edges. How to determinate in $poly (n, m)$, is it possible (and how is it necessary) to orient all the edges so that each vertex has the same outgoing and incoming degree.
I'm relatively new to the topic. Suppose that you want to type-check an expression of the form f(a), i.e. a function call. Assuming that all the declarations are provided explicit types, I believe that a simple type-checker would behave as follows: Given the environment, compute the types of a and f; Check that the ty...
After having spent a significant amount of time googling this topic, I am still struggling to confidently answer the following question: Identify the process using logical operators to normalise a floating-point number. My first assumption was, we use the binary shift to remove the leading 0's (for positive numbers) o...
This question comes from a relatively simple coding challenge at Codesignal, but represents an interesting CS/math puzzle. The question states: "When a candle finishes burning it leaves a leftover. m leftovers can be combined to make a new candle, which, when burning down, will in turn leave another leftover. You have ...
I keep seeing posts and articles about how to normalise a floating-point number, why that's done and how such a number is represented in binary. But no one seems to mention who/what the normalisation process is done by in the first place. Forgive me if it sounds like a really dumb question, I'm just a beginner, but are...
Let $G = (V, E)$ be a connected, undirected graph. Given a subset of distinct vertices $S = \{v_1, v_2, \ldots, v_n\} \subseteq V$, how can I find a forest in which each vertex $v \in V - S$ is connected to exactly one of the vertices of $S$ and is of minimum total length? This is a problem from an algorithms book that...
There are a lot of different versions of cubical type theory and a lot of constructs are introduced: intervals, paths, faces, lines, coe, hcom, v-types, glue-types, com, fcom, ghcom, gcom, box and cap. What is a minimal cubical type theory (counted in the amount of constructs/syntax) in order to do the same things as y...
I want to deliver products from various sources to various destinations such that the overall cost is minimized. We need to deliver these products while obeying our contractual obligatione with each supplier. In particular, each supplier ("source") specifies a minimum and maximum quantity of the product that should be ...
I have a question regarding Johnson’s algorithm for finding all simple cycles in a graph. I was wondering it is possible to modify the algorithm in order to find only cycles up to a given length. After having read into the algorithm, my approach would the following: Assume I want only cycles up to length L. Then, if th...
I am trying to figure out what the problem with the following expression in C++ is: y=std::log(std::cosh(x)); My first intention was that there might occure a Cancellation due to the cosh(x) part, because it is definde as $\frac{e^x+e^{-x}}{2}$ and the computation of $e^x$ with double x results in Cancellation. Am I o...
I have sequence of an unique numbers from 1 to 10 in randomly order (for example: list = [7, 5, 3, 4, 2, 6, 10, 1, 9, 8]). I can choose two random number and if the list from left number larger then right number I swap them (for example 2 and 5 list[2] larger then list[5] so I'll swap them and etc). Need to find avera...
I want to discuss the strings accepted by couple of DFAs: DFA in Figure 1 has 3 final states. It looks like that it accepts both the substrings "aa" (q0q3q0q1) or "bb". So this is not I want. DFA in Figure 2 has one final state q0. Its good because it does not accept "aa" or "bb" but the problem is that it does not a...
Today we talked about Information Theory and the binary symetric channel. For newbies here is a little explanation : For instance if I want to send a binary to someone : The bit will be "flipped" with a "crossover probability" of p, and otherwise is received correctly. Example : Note that in order to reduce the proba...
I was looking into the ear-clipping algorithm for triangulating simple polygons. I have successfully implemented it on planar polygons. However if polygon is non-planar the algorithm breaks down. Specifically one step of the algorithm is to test if there're any polygon vertices inside each ear. However point triangle t...
Suppose two people A and B draw a list of cards with difference scores n = {0, 1, 2, ..., n - 1}. Let $i \in$n such that $i \in [0, n - 1].$ Let $a_i$ be the probability that the person A draws a card with score of $i$, and let $b_i$ be the probability that the person B draws a card with score of $i$. In the event in w...
If you have a signed integer int x = any And then state that x < 0 Is the following statement true or false? ((x*2) < 0) The answer is false, which seems counter intuitive. Is it because X can be any negative value, it can also be a very big negative value which will overflow if multiplied by two. So if I have the num...
Suppose I have the following proof: open import Agda.Builtin.Equality open import Data.Nat.Base data ⊥ : Set where data : Set where I : O : inv : → inv I = O inv O = I invNeq : ∀ d → d ≡ inv d → ⊥ invNeq I () invNeq O () data Idx : Set where at : ℕ → Idx ℝ : Set ℝ = Idx → _≈_ : {a b : Set} → (f₁ f₂ :...
Isn't it possible to prove it by defining some problem that can be solved in $f(n)^2$ in the worst case due to its output always being $f(n)^2$ characters so that it won't be solvable in $f(n)$? Where am I wrong?
From the book Algorithms (Jeff Erickson), there's a lemma that states: The last vertex in any postordering of G lies in a source component of G My initial reaction to this was that the proof would look something like this: A DFS creates an acyclic directed graph. A postordering of an acyclic directed graph is a rever...
This is inspired by a problem from here. This is the approximate form of the problem: Given a string like "aaaa777cbb" (10 symbols long), run length encode it in-place to a string like "a473c1b2" (8 symbols long). You are guaranteed that the input will always be longer than the output. The precise form of the problem i...
Is this true for all $n$ and some $c>0$? I'm thinking the answer is yes, but I'm not sure. My thinking is as follows: $f(n) = c\cdot g(n)$ for all $n$ and some $c>0$ is the definition of Big-Oh. So, $O(g(n))$ is substitutable for $c\cdot g(n)$: $f(n) = O(g(n)) + O(g(n))$ And by the max rule of sum: $f(n) = O(g(n))$
Not sure if this is the right exchange for this question. But you could definitely answer it. Note professor said this was “wrong” on their quiz. Question: Identify a daily activity that can be speed up with parallelization. My answer: People driving their own car vs people taking a bus. My reasoning: When people all ...
I work at a company and i got to a seminar we're they told us to solve this problem below in the picture Is there an algorithm that can help me solve this question. I thought about a randomized algorithm after that i get stuck?
Meta note: I asked this question here a while ago. It got an answer: type a /\!! b = (a, ((b -> Void) -> Void)) Unfortunately, I do not reckon it to be quite right: () /\!! a ≅ a does not hold. I do not want to delete the question on Stack Overflow as the answerer still put quite some effort in (and I did not manage ...
How can sentence similarity be used for sentiment analysis? I know we have sentence Bert which can use cosine sim to measure the distance between to vectors (the sentence embeddings), but has anyone used to for sentiment analysis specifically?
Exp(n) if n == 1 return 2 If n == 0 Return 1 End If If n%2==0 temp = Exp(n/2) Return temp × temp Else //n is odd temp = Exp((n−1)/2) Return temp × temp × 2 End if how can i prove by strong induction in n that for all n ≥ 1, the number of multiplications made by Exp (n) is ≤ 2 lo...
I read a statement in the textbook that : Operand Forwarding cannot remove all RAW Hazards in Pipelined Processor but am unable to conceptualize that in my brain. Can you please explain it with an example where Operand Forwarding will not be able to remove RAW Hazard .
I want to work on a paper with one of my friends in Recommender systems. My field is programming, and I favourite part is to be more technical. I want to know that, is field of Recommender systems a part of Computer science or field in Information technology?
Consider following problem statement: You have given $n$ actions. You can perform any of them. Each action gives you success with some probability. The challenge is to perform given finite number of actions to get maximum successes. Here, we can perform actions and slowly decide upon possible probabilities of each ac...
is this format okay? this is my first time using stackexchange.
Address 0000 stores 0xde 0001 stores 0xad 0002 stores 0xbe 0003 stores 0xef Treat the data stored as 2 16 bit integers, what are the two values stored? I thought the answer would be 0xadde and 0xefbe but I was wrong. Why?
I'm having trouble understanding and solving the problem. Suppose we have a program which is composed of 3 portions A, B and C and that each portion takes $t_A$, $t_B$ and $t_C$ respectively to run on a single-core CPU. Assume that $t_A$ < $t_B$ < $t_C$ Assume we parallelize only the portion C of the code and that we r...
I am working on a pretty small lab for my university course and I'm having trouble converting a given regex into a set of regular definitions, then into a grammar and finally a regular grammar. I have reviewed the course material given to me and it has given me some understanding of the process, just enough for me to a...
So I understand how to convert an NFA to a DFA, however my question is, on a conceptual level, how and why are useless states created, and how can you (if there is a way) convert an NFA to a DFA without creating any useless states?
I read up on an abstract example of ZKPs (the cave and the door), but I'm trying to understand NIZKs (specifically zk-snarks and zk-stark). All the examples I can find online seem to have some interactive component even when trying to explain nizks. I don't particularly fancy reading some 300 pages of papers to underst...
In Haskell, I have the following datatypes that encodes arbitrary real numbers and arbitrary complex numbers, respectively: newtype ArbReal = ArbReal {approximate :: Word -> Integer} data ArbComplex = ArbReal :+ ArbReal For the ArbReal type, the ArbReal constructor labels a function that, when fed an integer $n$, comp...
I'm extending a framework for lossy compression of multidimensional floating-point data. At some point in the pipeline, sequences of symbols from a non-uniform distribution are losslessly compressed using entropy coding. The existing software used an implementation of arithmetic coding based on this post. As an extensi...
Also, what is the meaning of the notation used in the question- c: v->{0,1,2....k-1} such that c(u)!=c(v)?
Problem Statement: Say you have an array prices for which the $i^{th}$ element is the price of a given stock on day $i$. Design an algorithm to find the maximum profit. You may complete as many transactions as you like (i.e., buy one and sell one share of the stock multiple times). Note: You may not engage in multiple ...
When we have only an asymptotic upper bound, we use $O$-notation. For a given function $g(n)$, we denote by $O(g(n))$ (pronounced “big-oh of $g$ of $n$” or sometimes just “oh of $g$ of $n$”) the set of functions $$O(g(n))= \left\{ f(n):\text{ there exist positive constants }c\text{ and }n_0\text{ such that},\\ 0\leq f(...
i was just wondering if quantum computing has done any good so far in solving NP complete problems. I am aware that quantum computing does solve some NP problems which are classically hard in polynomial time but as far as i know none of those problems are NP complete. So there are a few interesting questions one could ...
I have a graph with $n$ vertices and $m$ edges. Some edges are already oriented, some are not. How do I determine how to orient all undirected edges so that each vertex has the same outgoing and incoming degrees, and whether it is even possible to do so? P.s This graph for example:
I have a planar graph and I'm trying to implement this algorithm (https://geometrictools.com/Documentation/MinimalCycleBasis.pdf Chapter 4, page 3). For the filament F0(V4, V3, V2), that has one endpoint (same for filament F2), it's easy to detect and remove in a graph (I think it's sufficient iterate vertices and when...
Just started learning about graph and it's various representations (matrix and adjacency list). Now I found that the adjacency list representation can be implemented in various ways: Array of arrays (where we have one index in main array for each vertices and adjacent vertices are in subarrays at each of this index) A...
I want two know how can I add two positive or negative integers using the same Turing Machine I am using unary numbers in the following way: 0 = 1; 1 = 11; 2 = 111; 3 = 1111 ... I know how to add two postive integers and I am using this site for tests: https://turingmachinesimulator.com/ name: add two positive integers...
To design a code with $m$ data bits and $r$ check bits which allow all single-bit errors to be corrected, the formula $$(n + 1) 2^m \leq 2^n$$ with $n = m + r$ and $(m + r + 1) \leq 2^r$ is used. Why is $+ 1$ used here, doesn't $n$ contain already all possible codewords?
When you are asked to hand compile into assembly language, are there multiple correct answers? For example, in https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-004-computation-structures-spring-2017/c11/c11s3/compilation_answers.pdf, can you get the correct solution even if your solution doesn'...
I need to solve this question using the substitution method: $T(n) = 3T(n/2)+2n$ if $n>1$ otherwise, $T(n) = 1$ Note: $$\sum_{i=0}^k x^i = \frac{x^{k+1}-1}{x-1}$$ $$a^{\log_b n} = n^{\log_b a}$$ I made some attempts at it but I haven't been able to recognize the pattern. It looks to me that it will be $\mathcal{O}(...
A while back I learned of these great algorithms: function parseInt(value, code) { let x = 0 let i = 0 while (i < value.length) { const a = value[i] x = x * code.length + code.indexOf(a) i++ } return x } function toString(value, code) { const radix = code.length let result = '' do { co...
Many computer languages have complex regular expressions tools. For example, in Javascript you have global flags, escape characters, whitespace character, assertions, character classes, groups and ranges etc. I'm wondering if using just the 3 basic regular expressions operators as defined in formal languages, that is c...
I’m finishing up Roughgarden’s two-part algorithms course on edx, and it was good, but I didn’t actually ‘design and analyze’ many algorithms, the questions mostly tested whether you understood the textbook. I’m looking for some problems where I can drill a bit with the core concepts from the course (divide and conquer...
There are 2 machines. Each task either requires 1 or 2 machines to run (ie, a 1-machine task can run in parallel with another 1-machine task but a 2-machine task occupies both machine The list of n tasks are given in [start time, end time], both of which are on top of hours. If we were to order the tasks by non decreas...
First I have plus_assoc ready. Theorem plus_assoc : forall n m p : nat, n + (m + p) = (n + m) + p. for simplicity we omit the proof of plus_assoc. now I want to prove plus_swap: Theorem plus_swap : forall n m p : nat, n + (m + p) = m + (n + p). Proof. intros n m p. rewrite -> plus_assoc. ... the equation was rewr...
I have a dataset with totally $1000$ scenarios, each of which is composed of $5$ users' coordinates $(x_i,y_i), \forall i \in \{1,\dots,5\}$. Now, based on users' coordinates, I want to cluster these $1000$ scenarios into 100 clusters. Specifically, if users in two scenarios keep proximal or same coordinates, such two ...
I wanted to know if it was possible to add code directly to a computer without an operating system or any programming language. To do that, I thought that maybe I could use the binary files to reverse engineer the actual cpu architecture. Just a random thought but I would like to know if that is possible.
I am trying to triangulate TTF glyphs for drawing in opengl. The below image shows an example glyph (Taken fron FontForge application). The X represent control points of a bezier spline, circular and square points represent points on the glyph but they can also be the start / end points of the bezier splines. I have a ...
According to Wikipedia B-tree page, Knuth's definition fifth property is "All leaves appear in the same level and carry no information.". What does it mean that they carry no information? Does that mean that there are no more pointers to children nodes? (kinda redundant to say that as they are the leaves no?) In the mo...
I'm so sorry if this question is too general, but I need to understand the general process of the "State elimination method". In other words, what is the general idea, and what is the difference to convert the NFA to RE and DFA to RE. Online there are a lot of resources, but it is difficult to find a complete answer to...