# Tagged Questions

Programming questions that are significantly affected or best defined by the underlying mathematics of the problem.

4answers
475 views

### Should Equality be commutative within a Class Hierachy?

It is easy to define the Equals operation in ways that are not commutative. When providing equality against other types, there are obviously situations (in most languages) were equality not being ...
1answer
351 views

### What's the normal way machine-learning algorithms are integrated into normal programs?

I'm currently taking a machine learning course for fun, and the course heavily focuses on Matlab/Octave to write the code. One thing mentioned in the course is that, while Matlab/Octave are great for ...
3answers
132 views

### Working with vectors and transformations

I am going to write an graphical 2D application that allows user to create polygons and transform them through transformation such as rotation an so on. I was hoping someone can give pro and cons ...
3answers
2k views

### Algorithm to calculate trajectories from vector field

I have a two-dimensional vector field, i.e., for each point (x, y) I have a vector (u, v), whereas u and v are functions of x and y. This vector field canonically defines a set of trajectories, i.e. ...
2answers
22k views

### How important is Discrete Mathematics for a Computer Scientist? [closed]

As the title says, How important is Discrete Mathematics for a Computer Scientist? Background: I'm pursuing a Master's degree with a focus on fundamentals such as Algorithms, Complexity and ...
2answers
315 views

### Dealing with units in arithmetic operations (multiplication and division)

I need to design a function to perform the basic arithmetic operations that are addition (+), subtraction (-), multiplication (x), and division (/) between 2 numbers. That function takes 3 arguments: ...
2answers
1k views

### Fractional and Cartesian Coordinates

I have a set of fractional coordinates. I also have a rotation matrix that operates on cartesian coordinates. Does anyone know how I could convert my rotation matrix so I can operate on the ...
3answers
2k views

### What Discrete Mathematics topics should the average computer science student know?

I know that Discrete Mathematics is a pretty broad topic that's used in a number of fields but I was just wondering what are some of the topics from it that you would expect an average computer ...
2answers
657 views

### 1 to 1 Comparison and Ranking System

I'm looking to create a comparison and ranking system which allows users to view 2 items, click on the one that they feel is the better one and then get presented with 2 more random items and continue ...
1answer
3k views

### Can one edit a built-in Python module?

I'm currently learning Python and I'm at the point in the book about using the Math library. I looked on the Python website and noticed the library was a bit scarce and am writing some more useful ...
2answers
361 views

### why is a naturally ordered set generated at 9 but not 10 digits

code found at: fatal error...Java Runtime Environment: EXCEPTION_ACCESS_VIOLATION Presuming that the problem indicated above is due to the test app and not due specifically to method ...
8answers
4k views

### How can calculus and linear algebra be useful to a system programmer? [closed]

I found a website saying that calculus and linear algebra are necessary for System Programming. System Programming, as far as I know, is about osdev, drivers, utilities and so on. I just can't figure ...
2answers
371 views

### Layout of mathematical views (iOS)

I am trying to figure out the right way to encapsulate graphical information about mathematical objects. It is not simple. For example, a matrix can include square brackets around its entries, or ...
5answers
15k views

### Return random `list` item by its `weight`

I have, for example, this table +-----------------+ | fruit | weight | +-----------------+ | apple | 4 | | orange | 2 | | lemon | 1 | +-----------------+ I need to return random ...
5answers
739 views

### Long term plan of attack to learn math? [closed]

I am a web-developer with a desire to expand my skill-set to mathematics relevant to programming. As 2nd career, I am stuck in college doing some of the requirements while working. I was hoping the ...
11answers
7k views

### Where is the application of Calculus (of continuous quantities) in Computer Science or programming [closed]

I am a Software Engineer professional. I have studied calculus as a core course in my graduation studies. I want to ask question, that what/where is the implementation of calculus in computer science?
2answers
639 views

### What maths should I learn to become a better computer scientist? [closed]

I'm a self taught programmer, and although I know many people feel math isn't necessary, I find that in many examples of algorithms I come across talk about (what sounds to be) some pretty complex ...
3answers
663 views

### Calculate Ellipse based on 4 points

I need to move an object based on 100 images rotating. The object needs to move in a path that is forming an ellipse when I'm rotating the image based on my gestures. I have 4 points, 2 pairs of ...
2answers
209 views

### Do Databases Optimize Queries with Sum/Average or Other Aggregates?

Imagine a database that has billions of rows with, say, payments. You need to calculate an average payment sum. That will be SELECT avg(amount) FROM payments; Now, if you need to re-calculate this ...
1answer
266 views

### How important is maths depending on what your coding? [duplicate]

Possible Duplicate: What does mathematics have to do with programming? How often do you have to solve pure mathematical or algorithmical problems? I heard that math can be very important in ...
1answer
1k views

### Where should I start learning math with regards to programming [duplicate]

I've created several systems already, a web based menu system, a payroll system and I am currently developing a patient administration system, I know java,C,C++ C#, javascript PHP and other languages....
26answers
44k views

### What does mathematics have to do with programming? [closed]

I just started a diploma in software development. Right now we're starting out with basic Java and such (so right from the bottom you might say) - which is fine, I have no programming experience apart ...
1answer
940 views

### What will generate an adjacency matrix file with a specified topology for me?

I am writing an application that takes some file specifying an adjacency matrix and uses this to construct a graph (in this case, a directed social network). What I would like to do is specify the ...
3answers
2k views

### What function or method can I use to equally distribute a workload

This is more of mathematical question than an algorithmic one; nevertheless it will be implemented in php. I have an array of N tasks. Each task has taken t time to complete(e.g. task 1 has taken 5 ...
1answer
638 views

### Is the Leptonica implementation of 'Modified Median Cut' not using the median at all?

I'm playing around a bit with image processing and decided to read up on how color quantization worked and after a bit of reading I found the Modified Median Cut Quantization algorithm. I've been ...
3answers
2k views

### How do I determine how many numbers are in a floating point number system?

I'm trying to make floating point number systems a bit more intuitive for myself. There are a few things I am confused about, and I think the best way to clear up my confusions would be for someone ...
12answers
5k views

### Is it possible to learn maths via programming, or you should learn maths for programming? [closed]

I am not the best in maths, not very horrid either, but lower than the average, I've always been thinking to improve my maths, but schools and books didn't do the job because I get bored too fast. The ...
3answers
5k views

### Handling extremely large numbers in a language which can't?

I'm trying to think about how I would go about doing calculations on extremely large numbers (to infinitum - intergers no floats) if the language construct is incapable of handling numbers larger than ...
1answer
369 views

### Why is a Bayes classifier used for spam filtering?

I've been reading about Bayesian spam filtering and I think I understand the theory, but I just don't see why this approach is needed in order to calculate the likelihood of a message being spam, ...
5answers
14k views

### How to handle large numbers? [duplicate]

Well, I've just started doing puzzles and it's so annoying to see puzzles which are easy to do but also need to handle very large numbers. That's the problem. Say I have to deal with numbers like 10 ^...
7answers
3k views

### What would be an appropriate algorithm to factorise numbers in the range of a few billion?

I'm learning Python at the moment and to give me reasons to apply what i'm learning I'm having a crack at some of the problems on Project Euler I'm currently on number 3, which is to determine the ...
5answers
2k views

### Why disallow int-to-short assignment but allow multiplication and other math?

In Java, the following code does not compile: int val = 1; short shortVal = val; // Incompatible types Anyone know why Java chooses to complain about this assignment, instead of simply truncating, ...
1answer
767 views

### Is there a formula to figure out the total execution time of sequential asynchronous processes?

I have a set of steps that need to run sequentially over a list of data. However each step only operates on a single piece of data at a time. Because of this, I can run the steps asynchronously. For ...
3answers
3k views

### How does a website like Mathway work?

I recently found a website called Mathway Basically, it works by allowing you to choose your "level of math" (which it uses to determine what tools it should provide to you) and then allows you to ...
3answers
2k views

### CPU Architecture and floating-point math

I'm trying to wrap my head around some details about how floating point math is performed on the CPU, trying to better understand what data types to use etc. I think I have a fairly good ...
17answers
4k views

### Introducing Programming To a Mathematician [closed]

I currently am a programmer, I'm almost 16 years of age and have pretty much narrowed my careers down to something involving a Computer Science degree or Electrical Engineering degree (I know they are ...
7answers
2k views

### How can a large, Fortran-based number crunching codebase be modernized?

A friend in academia asked me for advice (I'm a C# business application developer). He has a legacy codebase which he wrote in Fortran in the medical imaging field. It does a huge amount of number ...
11answers
1k views

### How is fundamental mathematics efficiently evaluated by programming languages?

As I get more and more involved with the theory behind programming, I find myself fascinated and dumbfounded by seemingly simple things.. I realize that my understanding of the majority of fundamental ...
4answers
342 views

### What other languages, beside Transact SQL, state that 22/7 is equal to 3? [closed]

I was using Microsoft SQL Query Analyzer the other day and wrote a very simple select statement: SELECT 22/7 as [PI Equiv] I was suprized that the result was 3, when I was expecting to see 3....
6answers
362 views

### Formatting 'Complex' Math

Note: by 'complex' math I mean an equation with many steps involved and a wide mix of operators. A programmer should know the order that operators are evaluated in an equation. However it can be a ...
4answers
3k views

### why are all the functional programming tutorials so mathy?

I've been trying to learn functional programming and most tutorials I have found use math as examples for the more complicated constructs (even the simple ones in some cases). Why is this? I would ...
11answers
356 views

### Should 'mathematical' functions follow mathematical notation?

I suppose this question is going to be immediately flagged as subjective, but which do you think is better: double volume(double pressure, double n_moles, double temperature) { return n_moles * ...
3answers
19k views

### Good way to learn how to solve questions on InterviewStreet [closed]

Possible Duplicate: How do I adapt to pre-interview challenge questions? InterviewStreet is a new company that essentially acts as a filter for companies to find programmers that can code. My ...
1answer
534 views

### Using Quadratic Bezier Curves to generate a cave that stays within certain bounds

I'm working on a project that generates a series of quadratic bezier curves and connects them together, maintaining slope from the end of one segment to the beginning of the next to make the ...
5answers
12k views

### Math Major wants to become a Software Engineer [closed]

I am a math major, what would be the best field of computer science/computer engineering for me to go into, where I could apply my skills that I used as a math major (i.e. Linear Algebra, Real ...
4answers
24k views

### Prerequisite math skill for Introduction to Algorithms (CLRS) book [closed]

I already have knowledge about basic algorithms. Now I plan to study more advance algorithms and I decide to go with Introduction to Algorithms. I'm not sure, do I need to refresh my math's skill ...
5answers
882 views

### Which language should I use for a computationally intensive program? [closed]

This is a multi-part question. I am writing a computationally intensive program that will perform computations on very large numbers, on the scale of factorial(100) . I'm considering using Java or C++ ...
1answer
391 views

### Developing basic drawing tool involving lines, curves [closed]

I am developing a CAD - drawings to CNC machine code software. These CNC's have sort of a Instruction set which receive parameters,etc to do some blah blah job. I am quite comfortable with the CNC ...
1answer
238 views

### Help me understand this “mindmap / constellation” visual pattern

Please help me identify and understand this visual pattern, what's the common name used for such mindmap / constellation visualisations? http://asterisq.com/products/constellation/roamer/demo http://...
3answers
2k views

### What is the best way to keep track of the median?

I read a question, and I'm looking for input on how to solve it: Numbers are randomly generated and stored into an (expanding) array, How would you keep track of the median? There are two data ...