Hello,
I am currently learning Python as a basis for further studies in programming. The course that I took at college was quite basic, teaching us the basic concepts required for programming, and some web oriented concepts like data scraping, APIs, automated tasks using bots. As I delved...
I am not going to watch youtube anymore because of advertisements and it was never worth it anyways to pay for. I'm not going to pay for either a college fail student trying to earn some sidecash in India or some genuis professor who simply doesn't care if the students learn from him. Youtube is...
As I said earlier, I've already grasped basics of C++. Since my ultimate goal is to work in coding industry, for interviews, I need to prepare for algorithms and data structures, grind leetcode. Between C++ and Java, I choosed C++ because that was taught in our university.
I won't read the...
Do you know any such good resources? I want to improve my problem solving skills.
I also want to practice competitive programming, so any good courses for that?
I want to practice pointers any good courses for that?
Would it help to study Verilog (VHDL) or Field-Programmable-Gate-Arrays (FPGA) if self-crafted x64/aarch64-assembly would take too much power/be too slow?
This is the weighted, directed acyclic graph I created in JavaScript
class WeightedDirectedGraph {
constructor() {
this.adjacencyList = {};
}
addNode(node) {
if(!this.adjacencyList[node]) {
this.adjacencyList[node] = [];
}
}
addEdge(node1, node2, direction, weight) {...
So I have this problem to solve, I was thinking that for k=2, the threshold value is too low and inefficient, but I'm not sure when k is at logn or more. If 2 sorting algorithms have the same complexity, won’t merging them be pointless in terms of running time? For b), i think the merged...
Hey guys, how you doing?
Im here to ask for you help. I am writing my bachelor paper as an implementation/review of the TPP algorithms out there. Almost every paper that I read references the Ramesh algorithm, that returns an exact solution for TPP problems, but I just can't find the algorithm...
Here you have solutions for the section 1 of the Cox-Little-O'Shea textbook. Please, check exercises 6a and 6b of the Section 1 Chapter 1.
You can text me to my whatsapp number +505 81974943 or send me a message to my email gerardforever1@gmail.com.
(Ideals, Varieties, and Algorithms. An...
My effort:
I think that the sorting problem in question is Heap Sort which has an O(logV) complexity, but how can I operate with that information so I can solve this? Can you help me by giving me the outline of an idea?
Hey guys, I need a little help with this exercise so I know I'm on the right path.
My explanation:
The Bellman-Ford-Moore algorithm computes shortest paths in O(nm) time, so in this situation we say that in a directed bipartite graph the number of iterations that the algorithm will do is...
HELLO, i have started working on Genetic Algorithm , i have studied evloution of fitness function, but i really could not get it. please help me in this regard
wasi
Because of having enough on my plate I don't think I would have read this book even without the negative review here, but it is the sort of thing that interests many here.
https://beta.spectator.co.uk/article/let-s-leave-philosophers-to-puzzle-over-the-reality-of-numbers
(The reviewer is...
Studying different ways to generate random numbers according to a distribution and the below algorithm describes the "box method". A search on Google led to the Box-Mueller method. Are they related? Also, what would be a simple implementation of this algorithm for ##f(x)=\sin{(x)}## on...
Use the formal definition of Big-Oh to prove that if f (n) and g(n) are nonnegative functions such that f (n) = O(g(n)), f (n) + g(n) = Ω(g(n)).
By the definition of Big-Oh:
If f(n) and g(n) are non-negative functions such that f(n) = O(g(n)) there must be positive constants c and n0 such...
The answer says insertion sort runs faster when we're sorting less than 43 items. I agree but with the condition that the first item will not be faster. Why does the answer not mention this? Is it because it is insignificantly faster?
All the white space among words in a text file was lost. Write a C++ program which using dynamic programming to get all of the possible original text files (i.e. with white spaces between words) and rank them in order of likelihood with the best possible runtime.
You have a text file of...
Hi,
I had thought that "hill climbing method" is a general terminology to refer to methods such as perturb and observe and incremental conductance. The same is also said here, "The hill climbing based techniques are so named because of the shape of the power-voltage (P-V) curve. This technique...
I have a book called "Grokking Algorithms", and when I'm done with my current tabletop game project I plan to work through this as much as it seems worthwhile to do so.
I was not at my best when I took the class that corresponds to what's in this book, so I figure it would be good to study it...
Homework Statement
Wherein α is a string, λ = ∅ = the empty string, and T* is the set of all strings in the Alphabet T.
Homework Equations
(exp-Recursive-Clause 1) : α0 = λ
(exp-Recursive-Clause 2) : αn+1 = (αn) ⋅ α
The Attempt at a Solution
[/B]
This one is proving difficult for me. I...
I wanted to remove the dc component from a signal but i can't use the average method because i have only a half cycle sampled not a full cycle . Is there any algorithm or method that can remove the dc component using only a half cycle?
(The signal is sin(x)+2*sin (2x) +3*cos (3x)+4*cos (4x) +5...
I am someone who likes to come up with new algorithms. Is there a platform to exchange such ideas. Any mailing lists to advance computer science? Perhaps there are programs that accept new algorithms. Sorry if this is a vague post but this is a broad topic.
Hello,
I am close to finishing my undergraduate degree in Computer Engineering, and I am very interested in pursuing graduate studies. For a long time, I have been passionate about computer science and I've been looking into the research done in various labs in the schools that I'm considering...
I would like to discuss code for hit and miss monte carlo methods, and also monte carlo with veto algorithm in C++. Since I am coding in C++ after a long time, I am messed up with syntax too. I have a specific set of problems to work with. If interested we can start working on it here.
Hey all,
This coming Spring semester (starts in 6 weeks), I will be taking C++ Data Structures and Algorithms at my University. I started programming at University, so my experience is very limited (I've taken 3 programming courses, 1 in Python, 2 in C++).
Topics we've covered in C++ were...
Let me start by saying that this is from a 30 question assessment on Big Oh, Big Theta, and Big Omega. I understood every other question, however, even after being given the correct answer, I do not understand why my answer was wrong for this one. If you could point me in the direction of any...
Multiplying big numbers is a very common application of the FFT, and as such, there are many papers on the subject available online.
However, these papers all use sophisticated algorithms where a simple one seems to work. My question is, what's wrong with the simple algorithm:
Multiplication...
Many have argued using a Godel diagonalization argument that there is no program that can tell ahead of time that the Turing Machine would halt. But would the way to get around this is to have a continuously, changing algorithm in response to learned input? I probably should say rapidly...
Homework Statement
Hello!
I am struggling with plotting polar graphs manually (without any help of the calculator). My main unresolved issue is with finding correct values of theta in a given range.
For example, I have an equation:
$r = cos(5\theta)$
Homework Equations
and I know that the...
Has any thinking be done in applying evolutionary programs (cellular automata with a purpose) to fusion.
It would seem that the current methods that can be applied are few. Evolution, itself, has been described as the dumbest way of realizing the smartest methods of achieving its goals...
Hey everyone,
I'm in my second semester of programming which covers an introduction to C++ (the prior course was Python). We just covered classes and arrays, and are moving onto intro. to algorithms and pointers (we're currently mid-semester).
In the algorithms chapter, they covered 4 "basic"...
Homework Statement
You are asked to consult for a business where clients bring in jobs each day for processing. Each job has a processing time ti that is known when the job arrives. The company has a set of ten machines, and each job can be processed on any of these ten machines.
At...
Homework Statement
You've periodically helped the medical consulting firm Doctors Without Weekends on various hospital scheduling issues, and they've just come to you with a new problem. For each of the next n days, the hospital has determined the number of doctors they want on hand; thus, on...
What happens, if instead of having any pointer pointing to a node's parent, we had pointer pointing to the node's successor? We know, that Searching would remain the same. But in my opinion Insertion and Deletion would change. This would happen, because in insertion, we would be needed to find...
Consider the algorithms :
TREE-SUCCESSOR(x)
1. if x.right_child !=NIL
2. return TREE-MINIMUM(x.right_child)
3. y=x.parent
4. while y != NIL and x == y.right_child
5. x = y
6. y = y.parent
7. return y
TREE-MINIMUM(x)
1. while x.left_child != NIL
2. x = x.left_child...
First off I'm studying for an exam tomorrow, this isn't homework. Also, I've already written the proof and verified I've gotten the correct answer. I'm here to ask some questions about the solution that I am not completely confident I understand.
Here's the problem:
Prove that n2 + 3n2 is Θ(n3)...
Is there good survey of known algorithms for solving recurrence relations ?
By "solving" a recurrence relation such as a_n = \sum_{i=1}^{k} { c_k a_{n-k}} , I mean to express a_n as a function of n .
In the case that the c_i are constants the algorithm based on the "characteristic...
Hi. First of all, I am a beginner when it comes to NN and GA. I have a good enough math background though. Could anyone suggest me a good book that covers these topics in an intermediate level? Obviously a very in-depth coverage is hard to expect but I would like something more than a few pages...
of size N into an K subgroups. I've been trying for hours to do this and still haven't found a solution.
Example: The array {A,B,C} of size N=3 and I want all the move combinations that make it into K=1 subgroups. The only such subgroup is the one with all the elements, and I can get that with...
Homework Statement
Given connected, directed and weighted (positive weights) graph. Find the shortest cyclic path for each vertex. Cycles have back edges and can also be self loops.
2. The attempt at a solution
I need some clarifications for this problem related to implementation in C.
After...
I am reading the undergraduate introduction to algebraic geometry entitled "Ideals, Varieties and Algorithms: An introduction to Computational Algebraic Geometry and Commutative Algebra (Third Edition) by David Cox, John Little and Donal O'Shea ... ...
I am currently focused on Chapter 1...
So I'm at a bit of a cross roads. For this summer semester, due to class restrictions I can only take either operating systems with Automata Theory, or Analysis of Algorithms with Automata Theory. I've heard from many people that Algorithms is a nightmare, and I'm not sure if taking Automata...
To prove that n log n is big oh of log(n!), I did:
n log n <= C log(n!)
n log n/ log(n!) <= C
Let k = 1
n > k, so for n = 2
2 log 2 / log 2 <= C
2 <= C
C is an element of [2, infinity)
Taking C = 2 and k = 1
can we say, n log n <= 2 log(n!)
and hence n log n is big oh of log(n!) ?
Assume the following set of instructions:
1. i = 0
2. if i < n, goto line 6
3. if A [ i ] = = x, goto line 7
4. i++
5. goto line 2
6. return false
7. return true
Assume that line i take Ci time, where Ci is a constant. The worst case total time of running this block of code can be calculated...
In maximization algorithm like that is used in artificial intelligence, the posterior probability distribution is more likely to favour one or few outcomes than the prior probability distribution. For example, in robots learning of localization, the posterior probability given certain sensor...
Homework Statement
Explain and compare two efficient implementations of a priority queue using binary tree.
Ilustrate this on an example of ascending priority queue that is created when elements
15, 38, 45, 21, 8, 55,20 are inserted and the two largest elements are deleted.
Homework Equations...