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
-1
votes
1 answer

Python OpenCV face detection

How can I check for the location of an eye for example. Its in this function? eyes = eye_cascade.detectMultiScale(gray, 1.4, 7) How to read the input of this? i would like to calculate in a face detection program if on the picture for example a nose…
John
  • 23
  • 3
-1
votes
4 answers

Write a program that performs mathematical computation

I'm taking my very first programming class ever and the second lab is already kicking my butt. the prof wants us to write a program that will get measurement from the user in feet with a decimal (input) and then display that number in feet and…
j.davis
  • 5
  • 4
-1
votes
1 answer

Node.js: What is most efficient way to delegate CPU-heavy work?

Every single book, tutorial and course out there says that node.js doesn't handle heavy CPU computation very well but I haven't crossed one that suggest any solution. Do you think it is good idea to deal with said computation problem by writing…
Ketus
  • 123
  • 1
  • 11
-1
votes
1 answer

Calculate amount in SQL Server

I have already created a SQL Server stored procedure to compute certain amount using the formula provided in my specs. The formulas are: ServiceFee = 25 / numberoftransaction WitholdingTaxOfServiceFee = (ServiceFee / 1.12) * 0.02 I'm having…
Vhinchies
  • 53
  • 1
  • 6
-1
votes
1 answer

What is the philosophy to determine client/server rendering (Nodejs)

When playing with NodeJS, I came up with this question, since one can now put some code either on client side or server side using even the same language. E.g. For a small game app, I can put the computation on client side when interacting (via…
cheneychen
  • 52
  • 1
  • 6
-1
votes
4 answers

Algorithm do discovery number patterns

Well, i must develop a software that can discovery a pattern in sequence of numbers, ex: First Pattern: 10,20,30,40,50.. (The software must understand that numbers are always count +10). Second Pattern: 1,3,5 ... ( The software must understand…
Shelly
  • 1,035
  • 5
  • 27
  • 51
-1
votes
1 answer

Computing the age in groovy - more realistic way

I wrote a piece of code that generates the age more realistic to real life. I assume that we increment our age every year right when we meet the day and month of our birthday, so technically some years are longer and some are shorter, but to us…
AlexCon
  • 1,127
  • 1
  • 13
  • 31
-1
votes
3 answers

Correct implementation of The Johnson-Lindenstrauss lemma

I am trying to implement the Johnson-Lindenstrauss lemma. I have search for the pseudocode here but could not get any. I don't know if I have implemented it correctly or not. I just want you guys who understand the lemma to please check my code for…
elizwet
  • 11
  • 4
-1
votes
1 answer

Pumping Lemma's Condition 3 concept

I'm following one of the examples from my textbook on the Pumping Lemma: Let C = {w | w has an equal number of 0s and 1s} Condition 3 stipulates: |xy| <= p If |xy| <= p, then y must consist only of 0s, so xyyz is not in C. Therefore s cannot be…
Locke McDonnell
  • 93
  • 1
  • 1
  • 4
-1
votes
1 answer

Compute cost of an Item?

im not sure if i say it right. my question is how can i get the COST of an item if then given is the Net and the GST?
XBasic3000
  • 3,418
  • 5
  • 46
  • 91
-2
votes
1 answer

Language classification (computation)

I need to determine if L:={|HP<=L(M)} is a recursive language, and if L is a recursively enumerable language. I think that Rice's theorem can help prove L is not recursive but I don't think that L is recursively enumerable...
Belgi
  • 14,542
  • 22
  • 58
  • 68
-2
votes
1 answer

Interval Computation for Python

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 Customer 2023-01-17…
Hey_jude
  • 5
  • 2
-2
votes
3 answers

How to calculate the slope of four points in R?

In this set of data, the first row represents the x-values. Each sub sequent row represents a corresponding y-value. I would like to calculate the slope of each row (4 points). What is a possible way of computing the slope so that there's a slope…
Rhyn
  • 135
  • 14
-2
votes
2 answers

Not able to compute value of negative base in JAVA

In my Android app I am trying to evaluate the expression: (-2^(x)) but can't seem to get the Math.pow() method from the JAVA library to work. I am able to evaluate (2^(x)) but not the other with negative base. Here is a look at the Logs. The y…
i_o
  • 777
  • 9
  • 25
-2
votes
1 answer

Discrepancy in computations

SET QUOTED_IDENTIFIER ON GO ALTER FUNCTION [dbo].[fn_LensThickCalcAC] (@sph as DECIMAL(9,2), @cyl as DECIMAL(9,2), @ri as DECIMAL(9,2), @bc as DECIMAL(9,2), …
Hexxed
  • 683
  • 1
  • 10
  • 28
1 2 3
26
27