Questions tagged [computation]

Computation is paramount to the discipline of computer science, and deals with the type and use of computing technology in information processing, in particular, in the context of an algorithm, or a protocol.

From Wiki

In the theory of computation, a diversity of mathematical models of computers have been developed. Typical mathematical models of computers are the following:

  • State models including Turing machine, push-down automaton, finite state automaton, and PRAM
  • Functional models including lambda calculus
  • Logical models including logic programming
  • Concurrent models including actor model and process calculi
404 questions
-2
votes
1 answer

anyone can help me to fix this R code?

this is my code R of compound option why I could not find function 'pbivnorm' in R ? thats because my R? or what? please help me thanks #Compound Option > PoC<-function(Sbtg,St,K1,K2,S,r,t1,t2){ +…
-2
votes
2 answers

Computational Operator in Math

Can't seem to figure out what the "<<" operator is: 11<< 2 is 44 1<<1 is 2 10<<2 is 40
-3
votes
1 answer

Calculate XP percentage completed for multiple levels (similar to call of duty/etc)

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, since it's 100 level max, I can do const currentXp =…
Jaralato
  • 19
  • 5
-3
votes
1 answer

How to DRY These JS Math Computations

I have these math computations below that are repetitive and I am trying to figure out how to make them DRY. const d = store.state.logbook.summary, AIR = ([d.AIR/d.TOT]*100).toFixed(2), PIC = ([d.PIC/d.TOT]*100).toFixed(2), …
user742030
-3
votes
3 answers

Multithreading Computations in Java

I have a question about multithreading (parallelism) in java. Indeed, I realized two program to compute a Mandelbrot Set : The first launches n threads and each thread computes a part of the height of the Mandelbrot (Example :…
-3
votes
1 answer

Sudden Break in the while loop in Program to find Factors

I was writing a code that calculates the two factors of any given number using two nested 'While' loops but after just one iteration the loop just stops Program #include #include using namespace std; long int Password; void…
-3
votes
1 answer

this program throws infinity for values of m above 120 ?.. can it be solved?

for(int i=n+1;i<=m;i++){ double r = (lm/mu); // double res = (Math.pow(r, i))*(fact(m)/(fact(m-i)*fact(i)))*((Math.pow(n, n-i)*fact(i))/fact(n)) formulae BigDecimal lr= new BigDecimal(Math.pow(r, i)); …
shravan
  • 11
  • 4
-3
votes
1 answer

how to implement client-server model to compute matrix multiplication in android

I have designed a mobile application to compute matrix multiplication but it works for limited size. So, I want to redesign matrix multiplication app so that it can compute for a large dimension(5000*5000) using client-server model where we will…
-3
votes
1 answer

How to perform Particle Swarm Optimization

We have been asked to do 5 or 6 iterations of particle swarm optimisation by hand for homework, but i don't really understand how and we were given no examples. Would it be possible for someone to do the first run through for me so I can see how it…
Programatt
  • 786
  • 4
  • 11
  • 23
-4
votes
0 answers

Design a DFA which accept even numbers of 0's and odd no of 1's

Designing a DFA for Even Zeros and Odd Ones In this problem, we'll create a Deterministic Finite Automaton (DFA) that accepts strings containing an even number of 0s and an odd number of 1s. This means that the DFA will recognize strings with a…
-5
votes
3 answers

Age computation always off by one

The task is to create a function. The function takes two arguments: current father's age (years) current age of his son (years) Сalculate how many years ago the father was twice as old as his son (or in how many years he will be twice as…
Nikolai
  • 3
  • 1
  • 4
-6
votes
3 answers

write a regular expression expression for the set of strings over alphabet {a,b,c) containing at least one a and at least one b

write a regular expression expression for the set of strings over alphabet {a,b,c) containing at least one a and at least one b How can I answer this question?
-6
votes
3 answers

Operator precedence and operator associativity rules in c++

I do not understand why the output of following program is 63: #include int main() { int a = 20; a += a + ++a; std::cout << a; } I was expecting it to be 61. What exactly a += a + ++a; does?
user2747954
  • 97
  • 1
  • 5
  • 16
1 2 3
26
27