Problem Detail: You want to visit n cities: $0 → 1 → 2 → · · · → n$. For traveling between city $i$ and $i + 1$ $(0 ≤ i < n) $ you need to choose between two modes Read More …
Category: Uncategorized
[Solved]: Isn’t Functional Programming just Imperative Programming in disguise?
Problem Detail: A YouTube video I was watching explained the differences between Imperative and Functional programming by demonstrating how the numbers from 1 to 10 are summed up in Java and in Haskell respectively. In Java, you must explicitly state each Read More …
[Solved]: Is this grammar really LL(1) while not being LR(1)?
Problem Detail: $S rightarrow S$, $L(G) = {}$ LL(1) analysis: We estabilish $FIRST(S)$ to be empty and $FOLLOW(S)$ to be ${$}$. $FIRST(S)$ doesn’t contain ε, so the parse table looks like this: +—+—+ | | $ | +—+—+ | S | Read More …
[Solved]: Big-O Notation of Anagram solution algorithm
Problem Detail: In Solution 1: Checking Off of Problem Solving with Algorithms and Data Structures, just beneath the ActiveCode: 1 extract (included at the bottom of this post for reference), it is stated: each of the n characters in s1 will Read More …
[Solved]: Are there complete problems for P and NP under other kinds of reductions?
Problem Detail: I know that the complexity class $mathsf{P}$ has complete problems w.r.t. $mathsf{NC}$ and $mathsf{L}$ reductions. Are these two classes the only possible classes of reductions under which $mathsf{P}$ has complete problems? Also, what classes of reduction can be used Read More …
[Solved]: How to solve an arrangement problem at the Archive Nationale of France using graph theory?
Problem Detail: Good evening! I’m actually doing an internship at the Archives Nationales of France and I encountered a situation I wanted to solve using graphs… I. The dusty situation We want to optimize the arrangement of books of my library Read More …
[Solved]: What different lines of reasoning and traditions lead to the conclusion that Software Engineering is or isn’t part of Computer Science?
Problem Detail: Background: Some people consider Software Engineering as a branch of Computer Science, while others consider that they are, or should be, separate. The former stance seems to be well presented in written works. On Wikipedia, Software Engineering is classified Read More …
[Solved]: Minimizing Turing machine-like automaton with no final states
Problem Detail: I have a deterministic finite automaton which behaves mostly like a Turing machine, with following difference (relevant to this question): The tape is initially finite. The automaton can insert and delete cells from the tape. Actions are associated with Read More …
[Solved]: Simple routing table question
Problem Detail: I’m having difficulties understanding the solution to the following question: Consider the following description of a LAN: The main Internet connection is connected to our gateway router. This in turn is part of the backbone network on the 65.21.1.0/24 Read More …
[Solved]: Dijkstra algorithm: equal number of shortest paths
Problem Detail: If I had a Dijkstra graph with the number shortest paths from Node A to O being 1, would it be correct to say: the equal number of shortest paths from A to O is 1 and not 0, Read More …