Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
67 views

wald = function(x, n, conf.level = 0.99){ p = x/n sd <- sqrt(p*((1-p)/n)) z = 2.576 ci <- p + z*sd return(ci) } numSamples <- 10000 numTrials <- 10 probs <- seq(0.2, 0.4, 0....
Mariana Adabuk's user avatar
-1 votes
4 answers
74 views

What formula could i put starting with cell A2 that would create the following computational list of numbers all the way down. I want to start with a number then in cell A1 and then in the cell below ...
TG33's user avatar
  • 11
0 votes
1 answer
351 views

This is a computational problem. My code: import numpy as np # Number of nodes in the cube num_nodes = 8 # Create the conductance matrix G and the current vector I G = np.zeros((num_nodes, num_nodes)...
Tomy's user avatar
  • 133
0 votes
1 answer
162 views

Hello I am learnign about finite automata and I want to see if these diagrams and my explanation make sense. {w ∈ Σ∗ | w contains the substring 1010} using five states There is the substring of 1010 ...
cool cat's user avatar
0 votes
0 answers
38 views

Full screen of code and libraries computation errors I am encountering a compilation error related to driver_proc struct definition in my project for phase4. The error appears when I try to run make ...
Nick Ray's user avatar
-1 votes
1 answer
62 views

The following equation is same as doing nothing to the integer ((as.bigz(27080235094679553)+1028)*2)/2 - 1028 However, the answer to this in console is 27080235094679552. To get the correct answer I ...
Chirag Patil's user avatar
0 votes
1 answer
60 views

I'm reading the devito_book/fdm-jupyter-book/notebooks/01_vib/vib_undamped.ipynb and the code in it seems not compatible with devito 4.8.3. So I tried to rewrite it as: import numpy as np from devito ...
Shanmu Jin's user avatar
1 vote
1 answer
200 views

Re Brun's constant, the sum of the reciprocals of the twin primes: https://en.wikipedia.org/wiki/Brun%27s_theorem http://numbers.computation.free.fr/Constants/Primes/twin.html How do I compute the sum ...
Ch'nycos's user avatar
  • 324
0 votes
0 answers
62 views

I have been struggling with Cartopy ever since I started using it few months ago. Many times, the Jupyter notebooks have crashed, and even running scripts from the command line didn't work.I am ...
linux_lover's user avatar
-1 votes
1 answer
62 views

I am solving am optimization problem in Cplex opl of version 12.10. The problem is formulated as a Mixed Integer Cone Programming model. I execute the code separately for each of the 24 hours of the ...
SUBHADARSHINI PANDA's user avatar
0 votes
1 answer
64 views

At the company where I work, I'm trying to carry out a process that is to show an image to the user when they turn on the computer, it's a PowerShell script. Our employees are in Active Directory and ...
igorcarmona1's user avatar
2 votes
1 answer
5k views

I'm trying to solve this challenge: Design a DFA for all binary strings having an even number of 0's or containing exactly two 1's I'm a bit confused with this question. I had tried to come up with ...
just coding's user avatar
0 votes
1 answer
622 views

The DFA for even numbers of and b is this DFA for even numbers of a and b but the DFA of even and equal number of a and b is not available L={\epsilon,aabb,abab,baba,bbaa,aaaabbbb,aabbaabb,bbaabbaa,...
SOURAV's user avatar
  • 1
1 vote
0 answers
45 views

I'm encountering a problem that is working with loops in pandas is not efficient, and I'm new to Pyspark, so I would like to ask for ideas, solutions to complete 2 tasks illustrated below. I have a ...
lily ng's user avatar
  • 11
2 votes
1 answer
144 views

I have a long list of numbers. There are no duplicates in the list and all numbers are representable with 2N bits. For every pair of numbers, I can calculate whether a particular condition is true (...
Luke's user avatar
  • 707
1 vote
1 answer
99 views

I have a general solution to my heat equation as: I have tried implementing this in MATLAB but I get inconsistent results. Do you think the issue is about my code or just the triple summation does ...
Orkiel's user avatar
  • 31
0 votes
1 answer
129 views

I am having a really tough time on this conversion problem. I have read, re-read and watched videos but I am pretty sure the answer I am coming up with is not correct.here is the diagram of the NFA I ...
comp_sci_noob's user avatar
1 vote
1 answer
404 views

I'm doing a project required to compute the precise(up to a certain precession N) numerical derivatives of a function. The usual approach was to use the finite difference types of algorithms, i.e. (f(...
ShoutOutAndCalculate's user avatar
-1 votes
1 answer
74 views

import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D # Parameter simulasi Lx = 10.0 # Panjang domain pada sumbu x Ly = 5.0 # Panjang domain pada sumbu y nx = ...
anotherd's user avatar
1 vote
1 answer
65 views

Consider we have the following data frame: message 0 ABC 1 abc 2 cba 3 abcd 4 dcsa 5 adcd 6 abcd 7 cba I want to perform row-wise ...
Sophia's user avatar
  • 384
0 votes
1 answer
113 views

The definition of convergence for root finding algorithms is given in a few sources as: A sequence ${x^k}$ generated by a numerical method is said to converge to the root $\alpha$ with order $p\geq 1$ ...
Username_57's user avatar
1 vote
1 answer
251 views

Is there a better technique than the following to exhaustively enumerate the square root of numbers between 0 and 1? I have tried to implement Newton's method, but as it converges quadratically, using ...
Muhammed Abiola's user avatar
0 votes
1 answer
118 views

I was solving leetcode 2466 (https://leetcode.com/problems/count-ways-to-build-good-strings/) and I had an issue when I tried to solve the problem recursively. This was the code which was giving me a ...
perpetualprime's user avatar
0 votes
1 answer
72 views

I am learning computations on GNU octave and am struggling with the following task. Let the interpolation nodes X be given and the functions lagrange(X,Y,x0) and original_function(x0) defined, which ...
JustUsNow's user avatar
0 votes
0 answers
428 views

I am trying to identify any potential options to accelerate linear algebra calculations by using the GPU. To be more precise I need to accelerate an explicit dynamics solver. Since in each increment ...
Greydas's user avatar
1 vote
2 answers
165 views

I want to write a code using python for solving a function such as follows : u = sum(n*x*y) for n=[0 to N] Let's say x = [1,2,3,4,5] and y =[6,7,8,9,10] and n= [1,2,..100] I expect an output like ...
nofugz's user avatar
  • 21
-2 votes
1 answer
35 views

need some help on this :) I have a table like this Time Participant 2023-01-17 15:13:23 Customer 2023-01-17 15:14:00 Customer 2023-01-17 15:16:16 Customer 2023-01-17 15:16:18 Agent 2023-01-17 15:16:28 ...
Hey_jude's user avatar
-1 votes
3 answers
60 views

Is there a reasonable way to get the following done in fast compilation way? I try to sum the list of numbers to specific treshold and replace previous values to 0. I'm looking for the fastest ...
na ni's user avatar
  • 1
0 votes
1 answer
670 views

The CPU frequency and CPU usage are the main factors that impact energy consumption (as far as I know). however what is better from an energy-saving perspective to run task minimum energy consumption: ...
sako's user avatar
  • 29
0 votes
1 answer
564 views

I don't get the difference between machine precision and underflow. Take for example the single precision system: there the machine precision is 10^-7 while the underflow is 1.18 *10^-38. That means ...
stancallewier's user avatar
-1 votes
1 answer
883 views

I am studying Computational Physics with a lecturer who always ask me to write Python and Matlab code without using instant code (a library that gives me final answer without showing mathematical ...
Becker Hija's user avatar
1 vote
1 answer
162 views

I've been assigned to solve an exercise that questions the following: Suppose a function f: N->N that is strictly decreasing. Can we assure f is computable? So far I've found that all non-...
Pol's user avatar
  • 13
-1 votes
1 answer
89 views

This my code and I want a output like in the picture: SELECT `test`.custinfo.CustID, OtherDeductionName AS DeductionName, sum(OtherDeductionAmount) as DeductionAmount FROM `db_payroll`.`...
allan's user avatar
  • 7
0 votes
1 answer
286 views

I have two tensors, a and b, with sizes a.shape=(10000,10000,120) and b.shape=(10000,10000,120). I'm trying to get a cost matrix between a and b, cost = torch.sub((a-b)**2,-1), where cost.shape=(10000,...
Hoin's user avatar
  • 5
1 vote
0 answers
113 views

I have been running an R script that takes around 4 days to complete. The script involves a for loop that contains a text progress bar indicator, like so: pb = txtProgressBar(min = 1, max = 60000, ...
geoscience123's user avatar
-1 votes
1 answer
105 views

I know if we want to prove the np completeness of some problem we must show these : there is a nondeterministic polynomial solution for the problem all other np problems are reducible to the problem ...
Mohsen Liaghat's user avatar
0 votes
1 answer
2k views

When one needs to run long-running computations on macOS, caffeinate utility is very handy. However, it is not very clear from the documentation, which flags I suppose to use? man caffeinate says: -i ...
Dmitry Kabanov's user avatar
0 votes
1 answer
446 views

I am about to calculate Chorophyll-a in the water bodies in one region, as I outlined above. I have created a mask, with water=1, land=0(transparent). And I want to calculate quality formula (NDCI, ...
Minyan Zhao's user avatar
14 votes
1 answer
2k views

I was writing a method that would calculate the value of e^x. The way I implemented this in python was as follows. import math def exp(x): return sum([ x**n/math.factorial(n) for ...
Seeker's user avatar
  • 280
-2 votes
1 answer
421 views

I am developing an XP/Leveling system for a website. Think of it like Call of Duty levels. For example Level 1 = 0 - 100XP Level 2 = 100 - 200XP Level 3 = 200 - 300XP Now obviously for level 1, ...
Jaralato's user avatar
2 votes
1 answer
76 views

I have a graph algorithm I don't need to run from scratch when invoking a function because I've been tracking the necessary information in advance. The opposite of lazy evaluation, or "reversed ...
Dominik's user avatar
  • 99
1 vote
2 answers
131 views

I want to calculate complex eigenvectors (Psi functions for shrodinger equation) for 20k*20k matrices, but always gets smth like this: [ 2.99009782e-09 -1.12381299e-08 -2.82346868e-08 ..., 6....
Ислам Малахов's user avatar
0 votes
0 answers
87 views

I am working on a computational project where I have to determine a series of functions f_0, f_1, f_2,...f_n, that will be used in a calculation. The evaluation of the nth function requires knowledge ...
Jakob KS's user avatar
0 votes
0 answers
40 views

suppose that we have a multidimensional array like this: [ [{ a: 0} , {a: 1} , {a: 2}], [{ b: 0} , {b: 1}], [{ c: 0} , {c: 1} , {c: 2}, {c: 3}]] what i want to obtain are all combinations from a0,b0,...
DoubleM's user avatar
0 votes
1 answer
138 views

I encountered a problem and would like to ask what type/class of problem it should fall into in terms of algorithm/computing theory. I’d also like to ask if there’s a smart algorithm to solve it ...
Xiaofeng Mu's user avatar
0 votes
0 answers
34 views

I already got their percentage for attendance to exam, i cant add all these to compute their total grade, it says in error unknown column 'attpercent' in 'fieldlist'
Aero Gaming's user avatar
1 vote
3 answers
195 views

Part of a longer algorithm, populating the column array b takes 80% of the total run time. The line (see code below) where S1 is calculated in the for loop is the bottleneck because it's called an ...
Guido's user avatar
  • 69
0 votes
2 answers
127 views

I am trying the write the formula in the image using Java. However, I get the wrong output. This is what I am so far for the computation. Assume Input is: Loan Amount = 50000 and Length = 3 year. My ...
audioguy's user avatar
0 votes
0 answers
523 views

The title may be a little obscure, sorry. I'm not quite sure how to phrase it otherwise. The problem is as such: I have a 2D kernel (as is used for convolution) and a vector of weights (e.g., floats ...
Aku's user avatar
  • 621
1 vote
0 answers
102 views

As can be seen in Figure1. I am trying to plot a square lattice in python. Somehow I am missing the corner points. The code is working fine for 3x3 square lattice but it's not for 5x5 and the ...
SHUBHAM PATEL's user avatar

1
2 3 4 5
9